Skip to content
GenAI Learn/Hardening Agents
Browsing as a guest. Sign in to save your progress and earn XP as you complete chapters.

Evaluating Agent Performance

7 min read

You'll learn to

  • -Define success metrics for an agent, not just a model
  • -Design a test suite for agent trajectories
  • -Compute real trajectory-level metrics from a fixed log

A company hosting fifty different agents for clients ships a model update that improves one agent and quietly breaks three others, and nobody notices for weeks, because there was no systematic way to measure whether any agent was getting better or worse over time. Evaluating a single model's output, the RAG evaluation chapter from Tier 8, is not the same problem as evaluating an agent's entire multi-step trajectory, and treating them as identical is exactly how a regression like this slips through unnoticed.

Three Dimensions, Not One

Agent evaluation needs to look at the full trajectory, not just whether the final answer looked reasonable. Task completion: did the agent actually finish what it was asked to do? Trajectory quality: did it take an efficient, sensible path, or did it wander, retry unnecessarily, and burn extra steps getting there? Safety: did it avoid taking any dangerous or disallowed action along the way, regardless of whether the final outcome looked fine?

Real aggregate metrics computed from a fixed trajectory log

Read that output carefully. An 80% completion rate looks solid in isolation. It says nothing at all about the one trajectory that completed its task while also taking an unsafe action along the way. This is the entire argument for evaluating on all three dimensions together: a single aggregate success metric can look healthy while quietly hiding a genuine safety problem underneath it.

LLM-as-Judge, Applied to Trajectories

The same LLM-as-judge technique from Tier 8's RAG evaluation chapter extends naturally here, scoring a full trajectory instead of a single response. Give a powerful model the task, the full sequence of thoughts, actions, and observations the agent produced, and ask it to score efficiency, safety, and completeness on a fixed scale. This scales to evaluating thousands of trajectories in a way manual human review never could, which is exactly what makes catching a regression across fifty different production agents tractable at all.

Regression Testing for Agents

Trace and score every single agent run in production, not just a sample, and track those scores over time as a genuine time series. When a model swap or a prompt change causes scores to drop for a specific agent, that is a regression, caught the same way a traditional test suite catches a code regression, just measured on trajectory quality instead of pass or fail on a unit test.

Interview Signal is part of Pro

See a real weak answer next to a real strong one for this exact topic.

Quiz is part of Pro

Test what you just read with a short quiz, and bank the XP.

ScaleDojo Logo
Initializing ScaleDojo