Evaluating Agent Behavior

Build graders that measure agent output before you ship — rubrics, golden sets, and the code-vs-model tradeoff.

intermediate · Claude / GPT-5
#evaluation#testing#quality

Why vibe-checking fails

“I read some outputs and they looked good” does not survive contact with a model update, a prompt tweak, or a traffic spike. Without a grader you cannot tell an improvement from a regression, and every change becomes a gamble.

A usable evaluation has three parts: cases, a grader, and a baseline score.

Start with 20 real cases, not 200 synthetic ones

The most common mistake is generating a large synthetic dataset before having any real usage. Synthetic cases encode what you assumed users would do, which is usually wrong.

Collect from reality instead:

Twenty real cases beat two hundred imagined ones. Expand later, once real traffic tells you what else matters.

Choose the cheapest grader that can judge

Match the grader to what is being measured — do not reach for a model when code will do:

What you are checkingGraderWhy
Exact format / valid JSONCodeDeterministic, free, instant
Contains required citationsCode (regex)No judgment needed
Numeric answer within toleranceCodeCheaper and stricter than an LLM
Tone, clarity, completenessModel (rubric)Requires judgment
Whether the plan is soundModel + human spot-checkToo consequential to automate fully

A code grader that catches 80% of failures today is worth more than a model grader you are still tuning next month.

Writing a rubric that agrees with itself

Model graders drift. Constrain them:

That last check is the one teams skip, and the reason their eval results do not replicate.

Reading the numbers

Track these across versions:

When pass rate drops, look at the regression list before changing anything. Two or three specific failures usually explain the entire delta.

Practical caveat

An eval measures your golden set, not your product. Revisit the set whenever user behavior changes — a stale suite confidently green-lights regressions it no longer covers.