Flashcard: what is an agent 'trajectory' and why does it matter for evaluation?
A trajectory is the full thought, action, observation sequence an agent ran through. Trajectory evaluation scores the path, not just the final answer, so you can catch inefficient, unsafe, or accidentally correct runs.
Picture two students who both turn in the same correct math answer. One solved it cleanly in three lines. The other wrote two pages of crossed-out attempts, accidentally divided by zero twice, and somehow landed on the right number. As a teacher, do you grade them the same? Probably not. The final answer hides everything you actually care about: did they understand the method, did they avoid dangerous mistakes, would they get the next problem right too. A trajectory is the agent's two pages of work. It is every thought, every tool call, every observation in order. Looking at the trajectory tells you whether the agent solved the task for the right reasons or got there by luck.
Detailed answer & concept explanation~7 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: define trajectory as the ordered thought, action, observation sequence, explain why final-answer eval misses path-level information, list the four canonical scoring axes, name two or three observability tools and two or three benchmarks, and mention LLM-as-judge as the scaling mechanism.
Real products, models, and research that use this idea.
- Langfuse, LangSmith, Arize Phoenix, Helicone, and Weave all capture agent trajectories as nested trace spans; each turn becomes an inspectable call stack with model, tool, and observation spans.
- SWE-bench scores real GitHub issue resolutions but exposes the full trajectory so researchers can debug why a model failed on specific repos.
- TAU-bench (Tool-Use Agent Benchmark) is explicitly trajectory-focused; tool-call sequence quality, not just final answer, contributes to the score.
- AgentBench evaluates trajectories across eight environments (web, code, OS, etc.), exposing per-step latency, cost, and success metrics for cross-task comparison.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow do you score thousands of trajectories without reading each one by hand?
QWhat does a trajectory tell you that you cannot see in the final answer alone?
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.
Grading agents on final-answer accuracy only. Two agents can both land the right answer with wildly different paths; the wasteful or unsafe one will fail on the next slightly different task.
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.