IT Vizag
← AI Agents in Production

▶ 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-up

You 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

  1. Outcome: was the final answer or end state right? (Is the order actually cancelled in the test database?)
  2. Trajectory: did it take a sensible path? Right tools, no unnecessary steps, no forbidden actions
  3. Cost and steps: how many tokens, tool calls and seconds did it use?
🔒 Code example: sign up free (above) to unlock it.

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.

Tip: Use fake tools that return fixed data in evals. Real APIs make results random and can send real emails.

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.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend