How to evaluate AI agents: graders, pass@k and pass^k, and reading transcripts
Anthropic's approach to agent evals: tasks, transcripts and outcomes, three kinds of grader, capability and regression suites, and pass@k vs pass^k.
The vocabulary
- A task is one test case with its success criteria.
- A trial is one attempt at a task. Outputs vary between runs, so you run several trials.
- The transcript is the complete record of a trial: outputs, tool calls, reasoning and intermediate results.
- The outcome is the final state of the environment. An agent can say “your flight is booked” in the transcript; the outcome is whether a reservation exists in the database.
Three kinds of grader
| Grader | Good at | Weak at |
|---|---|---|
| Code-based (string match, tests, state checks, transcript checks) | Fast, cheap, objective, reproducible and easy to debug | Brittle when a valid answer doesn't match the expected pattern; little nuance |
| Model-based (rubrics, pairwise comparison, reference-based) | Flexible and scalable; handles nuance and open-ended output | Non-deterministic, costlier than code, and needs calibration against human graders |
| Human (expert review, spot checks, A/B tests) | The gold standard; used to calibrate model graders | Expensive and slow |
Anthropic's advice is to use deterministic graders where possible, model graders where necessary, and human graders judiciously to validate the rest. Combine them per criterion: a support agent's success might need a state check for “ticket resolved”, a transcript check for “fewer than 10 turns” and a rubric for tone.
Capability and regression evals
A capability eval asks what the agent can do well, and starts with a low pass rate that gives you room to improve. A regression eval asks whether the agent still handles the tasks it used to, and should pass nearly 100% of the time; a drop means something broke.
As capability tasks reach high pass rates, they can graduate into the regression suite and run continuously. Watch for saturation: an eval at 100% still catches regressions but no longer tells you whether a change is an improvement.
pass@k and pass^k
pass@k is the chance that at least one of k trials succeeds, and it rises as k grows. pass^k is the chance that all k trials succeed, and it falls as k grows. With a 75% per-trial success rate and 3 trials, pass^3 is 0.75 × 0.75 × 0.75, about 42%.
Use pass@k when one success is enough, as with a coding tool that can try again. Use pass^k when users need the agent to get it right every time, as with a customer-facing agent.
Tasks and graders you can trust
- Start early with 20 to 50 tasks drawn from real failures, such as bug reports and support tickets.
- Write unambiguous tasks: two domain experts should reach the same pass or fail verdict on their own.
- Balance the set by testing both when a behavior should happen and when it shouldn't.
- Run each trial in a clean, isolated environment so leftover state can't cause correlated failures.
- Grade the outcome rather than an exact sequence of tool calls, give partial credit for multi-step tasks, and make graders hard to game.
Read the transcripts
You won't know whether your graders work until you read transcripts and grades from many trials. A failure should look fair: it should be clear what the agent got wrong. When it doesn't, the eval may be penalizing valid solutions, over-constraining the agent or asking an ambiguous question. Fix the eval before you trust its score.