deep · 6 min
Agent evals
Testing an agent by checking what it actually changed in the world, then reading its steps to find where failed runs went wrong.
updated 29 Sept 2026
An airline support agent is given a booking task in a test. It reads the policy, finds a loophole in it, and gets the customer a better deal than the test's author had in mind. The test marks it as a failure.
That happened to Claude Opus 4.5 on an airline benchmark. And it gets at the hard part of testing agents. With a single model answer, we compare the answer with what we expected. An agent takes many steps, there's usually more than one right way through, and it can pass a task on one try and fail it on the next. So what exactly should we grade?
The basic vocabulary (tasks, trials, graders) is in evals. Here we're looking at what changes when the thing under test is an agent loop.
Two records of every run
Take a refund agent. A customer writes in. The agent looks up the order, checks the refund policy, verifies the customer, and issues the refund with a tool. That run leaves two things behind.
The transcript (also called the trace or trajectory) is everything that happened: each message, each tool call and its arguments, each result, the model's reasoning.
The outcome is the state of the world when it stopped. Is there a refund for the right amount in the payments database?
Notice the agent's last message, "your refund is on its way", is part of the transcript. It proves nothing. The refund record is the proof.
The tempting mistake
The obvious way to grade an agent is to write down the right sequence of tool calls and check the run against it. Tools exist for exactly this. LangSmith's trajectory evaluators compare a run's calls with a reference in four ways:
| Mode | Passes when |
|---|---|
| Strict | Same calls, same order |
| Unordered | Same calls, any order |
| Subset | No calls outside the reference |
| Superset | At least the reference calls, extras allowed |
So what goes wrong if strict matching is our main score? Agents keep finding valid routes nobody wrote down. Say a second run verifies the customer before checking the policy. Same refund, same database row. A strict match fails it.
Anthropic's evals team found step-sequence checks too brittle for exactly this reason. That's the airline story again, in smaller form.
Grade the outcome
So the score is the outcome. Treat the agent as a black box, run it, and check the end state. That's what users care about, and it doesn't punish a different good route.
Outcome checks are usually code, and cheap (code-based evals). A coding agent: run the tests. A support agent: compare the database at the end with the state you expected, which is how τ-bench grades, with a second model playing the customer. Anything that writes to a system: query the system. When there's no end state to check, like an answer to a research question, fall back on a model grader with a rubric (LLM as judge), checked against people (human review).
Give partial credit when a task has parts. An agent that found the problem and verified the customer but didn't issue the refund did better than one that fell over on step one.
Where do step checks still belong? Two places. First, rules that must hold on every route. "Never refund before verifying the customer." "Never call the delete tool." Those are about the path itself, so check them directly. A subset match is also a fair way to catch wasted calls.
Read the steps when it fails
The second place is diagnosis. An outcome tells us that the agent failed. The transcript tells us why. So log every run with tracing, and for each failure write down the first upstream failure: the earliest step where things went wrong. That's error analysis for agents. Check the tool name, the arguments, the result and the resulting state as separate checks, so a failure points at one thing.
Then count. Make a grid where rows are the last step that worked and columns are where the first failure hit. In one text-to-SQL example, the step from writing SQL to running it caused 12 failures, while another step caused 2. Now we know where to look first.
Once isn't enough
Agents aren't deterministic. So run each task several times and decide which question you're asking: will it succeed at least once in k tries (pass@k), or every time in k tries (pass^k)? For agents users rely on, the second matters, and the gap is big. In 2024 the best function-calling agents on τ-bench solved under half the tasks, and on the retail tasks the chance of passing the same task 8 times out of 8 was under 25%.
Start every trial from a clean environment. Leftover files or a shared database make trials fail together for reasons that have nothing to do with the agent.
Count cost next to success, too. A 2024 review of agent benchmarks found that, on a coding benchmark, fancy agent designs were no more accurate than simply retrying, at up to nearly a hundred times the cost. Accuracy alone can be pushed up by retrying, which tells you nothing. The traces give you steps, tokens and dollars per task for free, so put them next to the pass rate.
When the grader is the bug
That airline loophole wasn't the only time a grader got it wrong. On another benchmark, Opus 4.5 first scored 42%, partly because the grader expected "96.124991…" and rejected "96.12". With the grading fixed and a looser setup, it scored 95%.
Public benchmarks have the same problem at scale. SWE-bench Verified gives an agent a real GitHub issue and grades the fix by running the tests. Scores went from about 40% to over 80% in a year. Then OpenAI stopped reporting it in 2026. A closer look found tests that rejected correct fixes and tests that checked for features the issue never mentioned. Frontier models could also reproduce the original fix word for word from just the task ID, so they'd seen the answers in training.
Two lessons carry over to our own evals. A test that rejects a correct fix is the same bug as a strict match that rejects a better route. And a fixed set of tasks leaks, or gets tuned against, over time. So read the transcripts of failed runs before trusting the number. Some failures are better solutions.
Simulated users are a catch of their own. When a second model plays the customer, its behavior varies like any model's, so it's part of what you're testing. Read some of those conversations too.
What we don't have yet
This site's own build runs into the limit of all this. The guide becomes
a tutor that plans a route through the map, explains a node, quizzes you
and tracks your progress. Some of that fits. Whether a plan respects the
needs order is an outcome check. "Never change progress without the
reader confirming" is a rule that must hold on every route. But none of
these sources say how to grade whether an explanation actually taught
someone something, which is the part that matters most for a tutor. That
one we'll have to work out in the build.
Further reading
- Demystifying evals for AI agents, Anthropic, 2026. Transcript vs outcome, partial credit, and the airline loophole. The best single read on this.
- Q: How do I evaluate agentic workflows?, Hamel Husain and Shreya Shankar, 2025. Short and practical: end to end first, then the failure grid.
- How to evaluate your agent with trajectory evaluations, LangChain docs. The four match modes, if you need a rule check.
- τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains, Yao et al., 2024. Grading by end state with a simulated customer, and where pass^k comes from.
- AI Agents That Matter, Kapoor et al., 2024. Why accuracy alone misleads. Read it before you compare two agent setups.
- The End of SWE-Bench Verified, Latent Space with Mia Glaese and Olivia Watkins (OpenAI), 2026. How a leading agent benchmark wore out.