An agent passing five demos is not a production evaluation. Enterprise agents traverse retrieval, models, tools, permissions, and multi-step actions. Each layer introduces a different failure mode, so a useful evaluation dataset must capture complete workflows and the cost of getting them wrong.

An agent passing five demos is not a production evaluation. Enterprise agents traverse retrieval, models, tools, permissions, and multi-step actions. Each layer introduces a different failure mode, so a useful evaluation dataset must capture complete workflows and the cost of getting them wrong.
Why test datasets for agents are not just prompt-response pairs
A simple Q&A dataset pairs an input with a reference answer. A production agent may call a search tool, generate SQL, request approval and write back to a business system. An acceptable outcome depends on the evidence, allowed tools, authorization context and whether the side effect actually happened.
Start with the workflow contract: what is the authorized goal, what facts are available, which steps require approval, and what constitutes a completed outcome? Then translate each element into testable cases.
Build an evaluation dataset in five layers
Layer | Example test | What to score |
|---|---|---|
Intent & routing | Same request with ambiguous phrasing | Correct job, safe abstention |
Retrieval & evidence | Stale document versus current policy | Relevant and authorized citations |
Tool execution | Read-only versus write-enabled account | Allowed calls, parameter validity |
State & recovery | Timeout after external action | No duplicated side effect |
Outcome & oversight | High-risk invoice exception | Correct escalation, verified result |

Make labels specific enough to audit
For each case, include the user role and tenant context, expected tool allowlist, reference documents or data snapshots, acceptable final state, forbidden actions, and reviewer notes. Label the failure severity separately from whether the final answer looks plausible.
This is an illustrative test-case format, not a real customer trace. Use synthetic or properly de-identified records when production data cannot safely enter evaluation.
Measure more than answer correctness
Task success: did the agent reach the expected business outcome?
Policy violation rate: did it attempt tools or data beyond authorized scope?
Evidence quality: are retrieved passages relevant, current and actually supportive?
Action verification: can the system prove whether an external operation completed?
Recovery correctness: did retries create duplicate side effects?
Latency and cost: how expensive is each successful, safe workflow?
Use per-severity breakdowns instead of averaging everything into one impressive number. A 99% aggregate pass rate can obscure a small but unacceptable high-risk error category.
Separate offline tests, shadow runs and live gates
Offline evaluation is where you stress adversarial, rare and synthetic cases. In shadow mode, compare proposed actions to existing workflows without executing side effects. During a controlled rollout, maintain approval boundaries and an immediate rollback plan. Only expand autonomy when observable results justify it.

A practical weekly evaluation cadence
Every week, sample failures, overrides and near-misses from production traces. Classify them by failure family, assign an owner, add representative cases to a regression set and make changes in a staged environment. Keep a frozen benchmark for trend comparison and a moving challenge set to prevent overfitting.
Cadence | Action | Owner |
|---|---|---|
Daily | Inspect severe policy violations and failed side effects | Operations owner |
Weekly | Annotate incidents and add regression cases | Evaluation lead |
Per release | Run full gates on changed models, prompts, tools and schemas | Release owner |
Monthly | Review drift, false approvals and ROI by task family | Business + security |
When to use human reviewers
Human review is especially important when actions have financial, legal, safety or irreversible consequences, when model confidence is poorly calibrated, or when required evidence is missing. Reviewer decisions should generate structured labels, not just free-form comments.
Minimum viable evaluation program
Define three workflows and assign severity for every forbidden action.
Create 30–50 representative cases as a pilot-size example, not a universal sufficiency threshold.
Add tests for retrieval freshness, permissions, tool schemas and side effects.
Measure outcomes with human adjudication for ambiguous cases.
Connect release gates to incident-driven regression tests.
How to construct hard negatives rather than easy demos
A hard negative is a case that looks superficially correct but violates a requirement. For a finance agent, a retrieved invoice may match the customer name while belonging to another tenant. A SQL query may return the expected total but use the wrong currency conversion date. A tool call may succeed but skip mandatory human review. Build separate labels for surface plausibility, policy compliance and business correctness so these cases do not receive undeserved passing scores.
Construct controlled mutations of the same baseline case: remove required permissions, replace a current source with a stale source, alter one table identifier, delay an external API response, or corrupt a tool schema. Pair each mutation with the expected refusal, clarification or rollback behavior. This method reveals failure mechanisms more clearly than collecting hundreds of similar positive examples.
Design the release gate and escalation policy
A deployment gate should combine non-negotiable rules with measurements. A single severe cross-tenant access violation should block release, regardless of mean task success. A low-severity answer formatting issue might be accepted temporarily with a tracked defect. Require manual sign-off for changes that enlarge the tool surface or permissions. Use the exact same approved test suite to compare the new system with the current baseline, then record a signed release decision and rollback contact.
For every blocked or escalated scenario, verify that the trace includes the causal evidence: user identity class, attempted tool, policy rule, response or failure and outcome state. Logs that merely say “agent failed” are insufficient. When the behavior is probabilistic, report repeated-run variance and whether the evaluation is deterministic or judged by another model. If a model judge is used, calibrate it against reviewed human labels and retain disagreement cases for adjudication.
Frequently asked questions
What should an AI agent evaluation dataset include?
Include identity and permissions, tool and retrieval expectations, state transitions, forbidden actions, evidence and outcome criteria.
How often should production agent evaluations run?
At minimum before significant releases, with ongoing incident-driven regression cases and routine review appropriate to risk.
What is the difference between an eval and a trace?
A trace records observed execution; an evaluation compares that execution or outcome with explicit criteria.
How many AI agent evaluation cases are enough to begin?
A small pilot can start with a few dozen well-chosen cases, but no universal count guarantees coverage. Expand according to workflow risk, failure severity and observed production incidents.
How should failed agent runs become regression tests?
Capture a de-identified trace, record the expected safe behavior, assign severity and ownership, and add a reproducible test to the next release gate.
Related definition
Framer is a no-code tool for building and publishing responsive websites—perfect for anyone creating modern, high-performance pages without coding.




















