Evaluation & Trajectory Debugging
You'll be able to:
You can define a success metric for an agent that goes beyond 'did the final answer look right' — covering step-level quality, tool-call correctness, and cost-per-task.
An agent passes its evaluation suite at 92 percent and enters production, where it completes about 60 percent of real tasks. The evaluation was not wrong about the answers — it checked only the final output, and a meaningful share of those correct answers were reached by skipping a verification step or guessing well. A process that arrives at the right answer for the wrong reason works until the inputs shift, which in production is immediately.
Final answers are not enough
Agents differ from single model calls in that the path matters. Two runs producing identical correct answers can differ enormously in reliability: one checked the database and confirmed the account status, the other assumed and happened to be right. Only step-level evaluation distinguishes them, and only the first generalises.
A workable agent evaluation covers four things beyond the final answer. Tool-call correctness: was the right tool called, with valid arguments, in a sensible order. Required-step coverage: did the agent perform the checks the task demands, whatever answer it reached. Efficiency: how many redundant or abandoned steps appear in the trajectory. Cost and latency per task, tracked as first-class metrics rather than noticed on the invoice.
Cost per successful task is the metric that decides viability
Accuracy alone cannot tell you whether an agent should ship. An agent at 95 percent costing two dollars per task may be strictly worse for the business than one at 85 percent costing five cents, depending on what a failure costs and whether a human reviews the output anyway. The metric that captures this is cost per successful task, which folds accuracy and spend into one number and makes the comparison honest.
Nondeterminism means single runs prove nothing
The same input can produce different trajectories. A prompt change that appears to improve accuracy by three points on one pass through the suite has, in most setups, told you nothing — that is comfortably inside run-to-run variance. Agent evaluation needs repeated sampling per task and a view of the distribution, not a single number. Teams that skip this ship changes that were noise and later cannot explain why performance moved.
Failure modes
Final-answer-only evaluation — process quality is invisible, so lucky paths score identically to sound ones. Signal: a wide gap between evaluation scores and production success.
Happy-path evaluation sets — the suite contains only well-formed requests, so ambiguity and adversarial input are never tested. Signal: production failures clustering on inputs no eval case resembles.
Noise read as signal — single-run comparisons drive prompt decisions. Signal: a changelog of improvements that do not accumulate into measurable gains.
Untracked cost — a prompt change quietly triples token use. Signal: spend discovered at the end of the billing period rather than at review time.
Explaining this to stakeholders
On why the demo is not evidence: a demo shows the system can succeed, not how often it does. Those are different questions, and only the second determines whether we can rely on it.
On judging the process rather than the answer: a colleague who reaches the right conclusion without checking anything is not reliable, they are lucky. We measure whether the checks happened, because that is what predicts next month.
On cost per successful task: an agent that is right more often but costs forty times as much is not automatically better. The number that matters is what we pay for each outcome we can actually use.
Check Yourself
Module Mission
25–35 minFor an agent that resolves customer-support tickets, define an eval set of 10 cases with: input, ideal trajectory, acceptable trajectory, unacceptable trajectory. Note which are hardest to score automatically.
Loading your work…
Curated Materials
1.2hThe deep work happens here — the lesson is your briefing.
Live on aiqbench
This lesson's subject on the rest of the site, today.
In the news, last 30 days
- OpenAI AI Agents Bypass Security Restrictions and Access Government Systems Without PermissionCybersecurity News ·
- We let AI agents break the rules on Black Friday. One stole a TV and another called the policeFortune ·
- How workable is the “human-in-the-loop” concept in agentic AI?IDC ·