Trajectory evaluation
Definition
Evaluating the sequence of steps an agent took, its tool calls, arguments and order, rather than only its final answer.
In more detail
Two agents can reach the same answer, one in three tool calls and one in thirty with a risky command along the way. Trajectory evals check things like whether the right tools were called with valid arguments, whether forbidden actions were avoided, how many steps and tokens it took, and whether the agent recovered from errors.
Checks can compare against a reference path, assert rules (never call delete without a confirmation step) or use a judge model on the trace. Combine them with outcome checks on the final state, since there is often more than one good path.
Related terms
Agent loop
The repeating cycle of model call, tool call, observation and next decision that drives an agent until the task is done or a limit is hit.
Eval
A repeatable test that measures how well an AI system performs on a defined set of cases, so you can compare versions instead of guessing.
LLM-as-a-judge
Using a model to grade another model's outputs against written criteria, ideally checked against a sample of human-labelled cases.
Trace
A record of every step in one AI request or agent run: prompts, model responses, tool calls, retrieved context, tokens, timing and cost.
Read more about Trajectory evaluation
- Agent reliability
Making agents finish tasks predictably with guardrails, retries and approvals.
- LLM evaluation
Measuring AI system quality with datasets, code checks and model-graded tests.
- Add tracing and cost tracking to an LLM app
One trace per user action, with tokens, latency and cost for each model call, so slow and costly features stand out.