Why is final-task success rate insufficient for evaluating LLM agents, and what does trajectory eval add?
Explain why final-task success rate alone is insufficient for evaluating LLM agents, and describe what trajectory evaluation adds. What specific metrics does trajectory eval provide that enable better debugging of multi-step failures?
Success rate is a sparse binary outcome with no failure localization. Trajectory eval scores each step (tool-call validity, state, efficiency, recovery) so you can pinpoint where a multi-step run broke.
Imagine grading a student only by whether they got the final answer right on a long word problem. If they failed, you learn nothing useful: was the setup wrong, did they add wrong, or did they copy the answer wrong at the end? You cannot help them improve. Trajectory evaluation is like grading every line of their working. Now you see exactly which step went off the rails. Maybe they always mess up the same step. With agents this matters because tasks have many steps: search the web, read a file, call an API, write the result. The final 'did it work?' answer hides all of that. Scoring each action tells you the agent is great at searching but keeps calling the wrong tool to save files, so you fix that one thing.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: why outcome success rate is sparse and unattributable, the four step-level trajectory metrics, ground-truth and partial-credit design, LLM-judge over trajectories, and the outcome as anchor tradeoff.
Real products, models, and research that use this idea.
- SWE-bench Verified reports task resolution rate, but harnesses like SWE-agent log full action trajectories so failures trace to a specific edit or test step.
- GAIA and AgentBench score multi-step tasks where teams inspect trajectories to localize tool-selection failures rather than trusting the pass rate alone.
- LangSmith and Langfuse trace every agent step (tool, args, observation) so engineers replay trajectories and attach step-level evaluators.
- tau-bench scores agent runs against expected database state transitions, a state-validity check rather than a pure outcome metric.
- OpenAI and Anthropic agent evals pair outcome success with LLM-judge rubrics over the full trajectory for attribution.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow do you build ground-truth trajectories when many valid action paths reach the same goal?
QHow would you award partial credit on a trajectory instead of a binary pass or fail?
QWhat are the failure modes of using an LLM judge to score a full agent trajectory?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Reporting only end to end success rate for an agent. It is sparse, high variance, and tells you nothing about which of ten steps failed, so you cannot debug or improve the agent.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.