Delve · Field guide
How to evaluate an AI agent: grade the trace, not the answer
Evaluation is instrument design: pick the grading surface, harvest real failure modes, then choose reliability metrics that survive production.
Delve Editorial · AI Engineering · 10 min
#evaluation #reliability #ai-agents #tool-use #llm-as-judge
The short answer
Evaluate the agent as a policy over actions, not as a function that returns an answer. Score the end-state effects its actions produce in a reset-able environment, across repeated trials, and gate the release on consistency (pass^k) rather than best-case success. Do this only after you have read real traces and named the failure modes you intend to catch.
The order matters more than the tooling. Teams that buy an eval platform before naming failure modes end up measuring what is easy to compute. Teams that name failure modes first discover their metric set from the traces themselves. And any LLM judge you insert is a measuring instrument: its agreement with humans is a direction, not a license to remove human review, because agreement says nothing about how often the judge is wrong in the region where you let it decide autonomously.
- Unit of scoring End-state effects, not answers
- Reliability metric pass^k, consistency across trials
- Hidden trap Step errors compound with horizon
01 · The mechanism
Decide what you are scoring: answer, trajectory, or outcome
An agent is a policy over actions, not a function from question to string. A grader that reads only the final answer measures the wrong object, and on live, stateful systems it can measure nothing stable at all: the ground truth shifts under the agent's feet, and a fixed list of correct tool calls breaks the moment a server schema changes .
Three grading surfaces are available, and each is blind to something the others see.
- Final artifact: cheapest to check, blind to how the work was done. An agent can produce a perfect report after reading the wrong tenant's records. - Action trajectory: catches bad tool arguments, forbidden calls, and loops, but cannot tell you whether the work actually landed. - End-state effects: inspects the environment after the run — the ticket closed, the row updated, the file present — regardless of which path produced it .
The last is the strongest default for tool-using agents because it is path-agnostic: it scores whether the intended effects occurred, not whether the agent reproduced one blessed sequence. DynamicMCPBench builds exactly this — a live explorer records a successful trajectory, distills it into effect checkpoints, then scores other agents on reproducing those effects rather than on the final answer .
The trade-off is infrastructure. Effect checkpoints require a controllable environment with reliable state reset. Without reset, trials contaminate each other and your pass rate silently drifts upward.
A correct final answer produced by invalid intermediate actions is not a success you can repeat.
Path-agnostic effect scoring only works if you can reset the environment between runs; otherwise earlier trials leave state that later trials exploit.
02 · The diagnostic
Build a failure taxonomy from traces before writing assertions
Before writing a single assertion, read 50 to 100 real traces and name what goes wrong. A named failure taxonomy is the artifact that makes every later metric interpretable; a metric chosen first tends to measure what is convenient rather than what hurts.
Recurring modes in tool-using agents:
- Argument hallucination: plausible but wrong parameters — a real customer ID for the wrong customer, a date range offset by a week. - Silent partial completion: the agent announces success after completing two of five required effects. - Loops and deadlocks: retrying a failing call with identical arguments, or waiting on a dependency it already satisfied. - Error compounding: one bad intermediate state poisons every subsequent step. - Unnecessary escalation: handing off work it could have finished, which reads as safe and quietly destroys the automation rate.
Compounding changes the shape of the problem. Models reach roughly 60% accuracy on single-step infrastructure state prediction, but under auto-regressive conditions — where each prediction feeds the next — they retain only 13 to 24% of their teacher-forced accuracy, and a hybrid method's statistically significant advantage disappears entirely . A cascade model of pipelined agents explains the structure: past a critical depth, no bounded human validator can restore the output to tolerance, an irreversibility threshold determined by chain length and validator capacity rather than by any single model .
The consequence for evaluation is that success must be reported as a function of horizon. Benchmarked agents fell from 39% on the shortest tool chains to 13% on the longest .
03 · The instrument
Harness design: replay, mock environments, and judge calibration
A harness is useful only if two runs of the same task are comparable. Four controls deliver that: frozen tool responses (record and replay real output so a flaky API doesn't masquerade as agent failure), seeded sampling, versioned environments (model snapshot, tool schema, prompt, and dataset hash pinned together), and multiple trials per task, because a single run hides variance.
Multiple trials are cheap and the most often skipped. They are also what makes reliability visible at all: scoring a task as solved only if all three attempts succeed exposes agents that can sometimes succeed and rarely can be trusted .
Judges are instruments, not oracles, and two calibration numbers matter — they are different numbers. The first is agreement: a bias-calibrated judge reached rank correlation of 0.59 to 0.68 with blinded human raters, and calibration reduced week-to-week volatility . The second is certified error rate: how much grading a judge can absorb while its mistakes stay under a stated budget. That is harder than it sounds. Trajectories cluster by task, so i.i.d. selective-judging certificates overstate safety — one naive certificate claimed 98% automation while realized error exceeded the budget in 17.5% of task resamples. A task-level bootstrap certificate stayed valid, and under it a small 4B judge certified 0.30 to 0.59 of evaluation at a 10% error budget .
Read the two results together: high agreement does not license automation. Agreement says the judge is directionally right; only a cluster-aware certificate says how often it is wrong where you let it decide alone.
Agreement tells you the judge is directionally right. Only a certificate tells you how often it is wrong where it decides alone.
04 · The decision
Metrics that survive production: reliability, cost, and tail risk
Accuracy answers can it. Reliability answers will it, on Tuesday, for this customer. Those are different numbers and teams routinely ship on the wrong one.
pass@k counts a task solved if any of k attempts succeeds; it rewards a lucky sample. pass^k counts a task solved only if all k attempts succeed. The gap is large. On a 750-task, 24-model benchmark scored by pass^3, the strongest agents solved roughly half the tasks, and 31% of tasks were solved by no model at all . Reporting pass@3 on that suite would overstate readiness substantially.
Three more numbers belong beside it. Cost per resolved task, not per call, because failed runs that burn forty tool calls still bill. Tail latency at p95 or p99, because the median run is not the one users complain about. Human-handoff rate, tracked as a first-class outcome: an agent that escalates 30% of work is a triage tool, not an automation.
Weight errors by severity rather than counting them. A wrong read is not a wrong write, and an aggregate error rate erases that difference; severity-weighted cost is what makes the ship decision legible to people outside the team.
The boundary condition matters: benchmark gains stop predicting field behaviour once deployed traffic diverges from the eval distribution, or once suite content has leaked into training data. Neither shows up as a metric moving. Both show up as a gap between offline scores and a shadow deployment on real traffic.
A pass rate without its environment hash is not comparable to last month's number.
05 · The maintenance
Turn the eval into a gate that stays honest
An eval nobody owns decays into a compliance ritual. Assign one owner, version the suite alongside the code, and state the release-blocking threshold in advance — for example, pass^3 on safety-critical tasks may not regress more than two points, and severity-weighted error cost must stay under a fixed ceiling.
Two pressures erode it. The first is Goodhart pressure: once a metric gates releases, teams optimize the metric, and prompt tweaks tuned against the visible suite are the agent equivalent of teaching to the test. The fix is structural rather than moral — hold out a rotating slice the team cannot see, and refresh it on a schedule.
The second is eval decay. Service models change without public changelogs, and the change is measurable: tracking three model families over ten weekly waves against a fixed prompt bank produced divergent trajectories — one stable, one improving, one degrading mid-study . A silent vendor update can therefore invalidate a threshold you set last quarter. For agents, tool schemas, API behaviour, and data distributions join the list.
A cadence that holds: re-run the full suite on every model snapshot or tool-schema change, re-score a human-anchored sample quarterly to re-calibrate judges, and re-derive the failure taxonomy whenever production surfaces a failure the suite scored as a pass.
The strongest caveat: none of this certifies safety. It certifies that the agent behaves as measured on the tasks you thought to include, and the tasks you forgot are exactly where incidents live.
The tasks you forgot to include are exactly where incidents live.
Four ways to grade an agent run
Each surface proves something the others cannot, at a different build cost.
| Grading surface | What it detects | What it misses | Build cost |
|---|---|---|---|
| Final artifact | Whether the deliverable reads as correct | Invalid steps, wasted actions, side effects on real systems | Low: rubric or string check |
| Action trajectory | Bad tool arguments, forbidden calls, loops | Whether the work actually landed | Medium: step-level assertions |
| End-state effects | Whether the environment changed as intended, by any path | Reasoning quality, cost, elegance | High: reset-able mock environment |
| Human-judged sample | Failure modes nobody has named yet | Scale and statistical power | High: minutes per trajectory |
Common misconceptions
- A strong benchmark score means the agent is ready to ship. Benchmark scores are usually pass@k on a fixed distribution. Production needs pass^k on your distribution. On one 750-task suite the strongest agents solved about half of tasks at pass^3 while 31% were solved by no model at all, which is a capability ceiling, not a readiness signal [S1].
- An LLM judge that agrees with humans 85% of the time can replace human review. Agreement is not a certified error rate. Because trajectories cluster by task, i.i.d. certificates can badly overstate safe automation — 98% claimed versus budget breaches in 17.5% of resamples — and a valid cluster-aware certificate covered only 0.30 to 0.59 of evaluation at a 10% budget [S2].
- Long tool chains fail because the model is not good enough yet. Chains fail because per-step error compounds geometrically. Models retain only 13 to 24% of their teacher-forced accuracy under auto-regressive conditions, and past a critical depth no bounded human validator can restore the output to tolerance [S3][S5]. Architecture and horizon control, not just model choice, is the lever.
Instrument your pilot in one week
Five steps, ordered so each one makes the next cheaper.
Pull 100 traces and name the failures
Sample real runs across task types, tag each with a failure mode from a shared list, and keep adding modes until new traces stop producing new names. This list, not the metric, is the deliverable.
Pick the grading surface per failure mode
Map each named mode to the surface that can detect it. Argument hallucination needs trajectory checks; silent partial completion needs end-state effect checkpoints; tone and usefulness need a judged sample.
Freeze the environment and repeat every task
Record tool responses, pin model snapshot and schema hashes, seed sampling, and run each task at least three times. Report pass^3 as the headline, not pass@3.
Certify the judge before trusting it
Hand-label a stratified sample of trajectories, measure judge agreement, then measure the error rate only inside the region you plan to auto-decide. Start the judge on the easy region and leave the ambiguous tail to humans.
Set the gate and the rotation before launch
Write down the threshold that blocks a release, name the owner, and schedule a held-out slice the build team never sees. Re-run the full suite on every model or tool change.
What would change my mind: A controlled study showing that single-shot final-answer accuracy on a static offline set predicts field success as well as multi-trial effect-based scoring would undercut the entire approach and make much of this instrumentation unnecessary.
Recall check
An agent returns correct reports but occasionally queries a customer database with the wrong tenant ID. Which grading surface catches this?
- A rubric on the final artifact
- Step-level assertions on the action trajectory
- An end-state effect checkpoint on the report file
- User satisfaction scores after delivery
The artifact and the end state both look fine — the report is correct and the file exists. Only trajectory grading inspects the tool arguments themselves, which is where the tenant ID lives.
Your agent succeeds on 70% of tasks at least once in five attempts, but only 20% of tasks succeed in all five. What does this tell you?
- The suite is too small to draw any conclusion
- The agent is production-ready because capability is demonstrated
- pass@5 is 70% while pass^5 is 20%, and production behaves like the second number
- The 50-point gap is judge noise and can be ignored
Capability and reliability are separate measurements. A large pass@k to pass^k gap means the agent can do the work but cannot be relied on to, which is the failure mode that burns trust in deployment.
A calibrated judge agrees with your human reviewers on 85% of sampled trajectories. Why is that insufficient to turn off human review?
- 85% is below the usual 95% threshold for any automated scoring
- Human reviewers are themselves unreliable, so agreement is meaningless
- Judges are always biased toward longer answers, so agreement is inflated
- Agreement is measured across all cases; the error rate inside the auto-decided region is what needs certifying, and clustered tasks can break naive certificates
The decision is about the subset the judge decides alone, not the average. Because trajectories cluster by task, standard i.i.d. certificates overstate safety, so you need a cluster-aware bound before removing humans from any region.
Open questions
- How quickly does an effect-based eval suite lose predictive power after a tool API changes? If decay is measured in weeks, quarterly re-baselining is already too slow and the suite needs continuous regeneration from live traffic.
- What certified automation fraction is achievable for open-ended, non-tool tasks such as drafting or research? The 0.30 to 0.59 certified coverage figures come from tool-use and web corpora; judging prose quality may be far less certifiable.
- Do pass^k thresholds calibrated offline transfer to shadow deployments on real traffic? Most release gates assume they do, but distribution shift between eval sets and live traffic is measured rarely and reported even less.
Sources
- DynamicMCPBench: A Trace-Grounded, Effect-Scored Benchmark for LLM Agents over Live MCP Servers — browse-export.arxiv.org
- Certified Selective Automation of LLM Agent Evaluation — browse-export.arxiv.org
- Error Compounding in LLM-Based Infrastructure Simulation: A Multi-Domain Benchmark Study — Zenodo
- Human-anchored longitudinal comparison of generative AI with a bias-calibrated LLM-as-judge — PLOS
- The Irreversibility Threshold: When Error in LLM Agent Pipelines Outruns Human Correction — Zenodo