Evaluation & Operations
MDX
Building Golden Datasets for Agent Evaluation
Create representative tasks, expected outcomes, and edge cases that reveal meaningful regressions.
Editorial review: clarity, operational relevance, safety boundaries, and source quality.
Start from real work
Collect anonymized examples that reflect common, difficult, ambiguous, and high-risk tasks. Synthetic cases are useful for coverage but can miss the messiness of actual users.
Sample the real task distribution, then deliberately oversample rare high-consequence cases. Preserve the user's language, missing context, tool conditions, and environmental state while removing sensitive information. A bare prompt without the surrounding records is not a reproducible agent test.
Define acceptable outcomes
Many agent tasks have more than one valid path. Specify required facts, prohibited actions, evidence standards, and success conditions instead of one exact output string.
Represent acceptable behavior as constraints and outcome properties. Record required facts, allowed and forbidden actions, maximum attempts, evidence expectations, and valid escalation reasons. When multiple trajectories work, do not force one reference sequence; doing so rewards imitation instead of task success.
Keep the set alive
Add cases from production incidents and human corrections. Maintain a stable core for trend comparison while rotating a private holdout set to reduce overfitting.
Version each case with its fixtures and rubric. Review additions from incidents to ensure they test a general failure rather than one accidental wording. Maintain a hidden holdout, measure inter-reviewer agreement, and periodically retire cases whose product behavior or policies are no longer current.
Practical example
A golden case for duplicate customers
The dataset contains the request, two similar customer fixtures, authentication scope, expected need for clarification, prohibited account writes, and valid final statuses. It does not prescribe the exact question the agent must ask. The evaluator checks that the agent does not guess an identity, exposes no unrelated data, and either resolves the ambiguity from permitted evidence or escalates cleanly.
Field checklist
Apply it in practice
- Capture realistic context and tool fixtures.
- Include common, difficult, ambiguous, and high-risk cases.
- Specify acceptable properties rather than one transcript.
- Version rubrics and maintain an untouched holdout.
Decision framework
Questions to answer before you build
A golden dataset is a versioned collection of realistic task environments and acceptable outcome properties—not a folder of ideal answer strings.
Does the set match real work?
Sample common tasks, then deliberately add difficult, ambiguous, adversarial, and rare high-consequence cases.
What outcomes are acceptable?
Specify required facts, permitted and prohibited actions, evidence standards, limits, and valid escalation reasons without forcing one path.
How will the set stay useful?
Version fixtures and rubrics, add generalized cases from incidents, maintain a hidden holdout, and retire obsolete policy scenarios.
Common failure signals
Watch for these warning signs
- Removing the tool and account state needed to reproduce the original task.
- Using synthetic cases exclusively and missing messy real-user behavior.
- Treating one exact transcript as the only valid solution to an open-ended task.
Selected primary references
Continue with the source material
These sources inform the wider editorial perspective for this topic. They are not presented as line-by-line citations for every statement.
- NISTAI Risk Management Framework ↗A voluntary framework for governing, mapping, measuring, and managing AI risk.
- OWASPOWASP Top 10 for LLM Applications 2025 ↗A practical catalogue of common security risks in LLM-enabled applications.
- AnthropicDemystifying evals for AI agents ↗Evaluation strategies for multi-step, tool-using agent systems.