Evaluating agents

Testing an agent is harder than testing a single answer, because it takes many steps. Outcome evals check the final result. Trajectory evals check the path it took: which tools, in what order, and whether any steps were wasted or risky.

Everyday analogy

Judging a student's maths exam: you check the final answer (outcome), but also their working (trajectory). The right answer reached by a lucky guess isn't good enough.

Example

A booking agent got the right hotel (outcome ✓) but searched 40 times and almost booked twice (trajectory ✗). It needs fixing before launch.

🏁Outcome eval• Was the final result right?• Hotel booked ✓🧭Trajectory eval• Was the path sensible?• Searched 40 times ✗• Nearly booked twice ✗VS
Test the result and the path the agent took.
  • Golden test sets built from real past failures.
  • LLM-as-judge: another model scores the answers. Fast, but check it against human judgement.
  • Regression testing after every prompt, tool or model change.
  • Track cost, speed and safety, not just correctness.

Types of evaluation

TypeWhat it checks
IntrinsicThe output itself: correct, fluent, well-formed?
ExtrinsicThe real result: did the user's task actually get done?
AutomaticMetrics and LLM-as-judge, fast and repeatable
HumanExperts rate a sample, slower but trusted
ComparativeModel A vs model B, or prompt A vs prompt B
ContinuousKeep measuring in production, not just before launch

Measuring a team of agents

When several agents work together, a correct final answer is not enough. You also check how well they worked as a team.

MeasureQuestion it answersExample
Task success rateOut of 100 tasks, how many were fully done?92 of 100 claims processed with no human fixing them
Routing accuracyDid the coordinator send work to the right specialist?Billing questions reached the billing agent, not the technical one
Hand-off qualityDid each agent pass on everything the next one needed?The writer agent never had to ask again for the sources
Wasted stepsHow many steps, tool calls or messages were unnecessary?14 steps where 6 would have been enough
Cost and time per taskIs the team worth it compared with one agent?Three agents used 3× the tokens but saved only 10 seconds
RecoveryIf one agent or tool fails, does the team still finish safely?Web search timed out; the team retried once, then flagged it
EscalationDoes it hand over to a human when it should?Claims above the approval limit went to a reviewer

A simple fairness test: run the same 20 tasks with one agent and with the team. If the team isn't clearly better, keep the single agent.

Try it yourself

About 15 min

Write a mini test set

  1. Write 5 test questions for an agent you designed, plus the ideal answer for each.
  2. Include one tricky and one out-of-scope question.
  3. Run them through a chatbot using your agent instructions and score pass or fail.

What you should see: A small, repeatable test set is how teams know an agent really works.

Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.

Build it for real · guided projectBuild an AI workflow that summarises feedback for youAbout 75 min · No coding needed · step by step
Test what you learned

Take a quick quiz, or look up any word in the glossary.