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.
- 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
| Type | What it checks |
|---|---|
| Intrinsic | The output itself: correct, fluent, well-formed? |
| Extrinsic | The real result: did the user's task actually get done? |
| Automatic | Metrics and LLM-as-judge, fast and repeatable |
| Human | Experts rate a sample, slower but trusted |
| Comparative | Model A vs model B, or prompt A vs prompt B |
| Continuous | Keep 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.
| Measure | Question it answers | Example |
|---|---|---|
| Task success rate | Out of 100 tasks, how many were fully done? | 92 of 100 claims processed with no human fixing them |
| Routing accuracy | Did the coordinator send work to the right specialist? | Billing questions reached the billing agent, not the technical one |
| Hand-off quality | Did each agent pass on everything the next one needed? | The writer agent never had to ask again for the sources |
| Wasted steps | How many steps, tool calls or messages were unnecessary? | 14 steps where 6 would have been enough |
| Cost and time per task | Is the team worth it compared with one agent? | Three agents used 3× the tokens but saved only 10 seconds |
| Recovery | If one agent or tool fails, does the team still finish safely? | Web search timed out; the team retried once, then flagged it |
| Escalation | Does 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 minWrite a mini test set
- Write 5 test questions for an agent you designed, plus the ideal answer for each.
- Include one tricky and one out-of-scope question.
- 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.