▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
AI Agents in Production · Lesson 8 of 14 · 1 min read · 6 min video
Evaluating agents
Task test sets, trajectory checks and LLM-as-judge, run on every change.
📄 Download slides (PDF)· free sign-upYou changed the prompt. Is the agent better or worse? Without evals you're guessing. Agent evals are like LLM app evals, plus one extra question: did it get there the right way?
Build a task test set
Collect 30–100 realistic tasks, each with what "success" means:
- Real user requests (anonymised), especially ones that went wrong
- Edge cases: missing info, two requests at once, an angry customer
- Attacks: a message that tries to make the agent ignore its rules
Check three things
- Outcome: was the final answer or end state right? (Is the order actually cancelled in the test database?)
- Trajectory: did it take a sensible path? Right tools, no unnecessary steps, no forbidden actions
- Cost and steps: how many tokens, tool calls and seconds did it use?
LLM-as-judge
Some outcomes can't be checked with code, like "was the reply polite and accurate?" Use a separate model with a clear rubric to score them. Check the judge against your own ratings on 20 cases first, so you know it agrees with you.
Run evals on every change
Changed a prompt, tool, model or limit? Run the full set and compare pass rate, cost and steps with the last version. Only ship if it's better, or the same and cheaper.
In one line
Evaluate agents on a realistic task set by checking the outcome, the path taken and the cost, and run it on every change before you ship.
Share with a friend