Evals: climbing the wrong hill

I like watching a metric go up on a Friday afternoon as much as anyone, though I learned the hard way to check what caused it before celebrating. Here is how I set up evals today, based on my own work and what AI labs and tool makers have published.

Build your own golden set from real traces

Open thirty to fifty real production traces in a spreadsheet. Write one short, blunt note per failure, then group those notes into categories until new ones stop showing up. Usually at least half of what you find comes from data or infrastructure bugs, like a stale cache sending yesterday's promo table to the model, rather than the model itself.

Read those first traces yourself instead of handing them to an LLM. Reading them directly is how you spot failure types you didn't expect. Once your product is live, keep turning real traces into test cases, starting with responses users gave a thumbs down.

Write each case clearly enough that two experts would agree on pass or fail without talking to each other. Run deterministic code checks first, then check retrieval, and add narrow LLM judges last with one failure type per judge. Make every judge strictly pass or fail, because 1-to-5 scales tempt both people and models to pick 3 when a call is tough. Tag each case by category so you can score every group on its own instead of hiding regressions inside a single average.

Handle the things that change

Version your golden set just like code. Every time you add, edit, or delete a case, create a new version, tag the active one as prod, and keep older snapshots available so you can reproduce past runs. Start every test trial in a clean environment so leftover files or cached data from one test don't cause the next test to fail.

Pin a fixed date inside your tests so relative words like "next week" mean the exact same thing on every run, and write expected answers relative to that date. Add an expiration date to temporary items, like a deal ending Friday, so expired promos don't break future test runs. As your product and users change, keep reviewing errors, update expected answers, and retire cases that pass every single time without catching bugs.

Test the edges

Add edge cases on purpose. Anthropic's eval guide calls out inputs that are irrelevant, ask for records that don't exist, or are so ambiguous that two people wouldn't agree on the answer. Test both sides of every behavior: if you only check that an agent searches when needed, you can end up with an agent that searches on almost every message. For every clear prompt that needs immediate action, include a vague prompt where the right answer is asking one short clarifying question.

Focus on one slice, then check everything before you merge

Not every test case has the same job. Keep a capability set that starts at a low pass rate for the problems you are actively trying to solve, alongside a regression set that should pass near 100%. Use category tags to iterate quickly on the slice you are fixing, then run the full regression set before merging so your fix doesn't break another feature. Once a capability case passes reliably, move it into the regression set.

Keep a separate held-out test set that you never look at during day-to-day prompt tuning, and run it only on release candidates and model upgrades so you don't overfit to your test answers.

Run every case more than once

LLM outputs vary from run to run, especially in multi-step agents, so run each test case several times to cut down noise. The τ-bench paper introduced pass^k, which measures the probability that all k tries succeed, in contrast to pass@k, where one success out of k tries is enough. Use pass@k when one good option is plenty, and use pass^k when users need the workflow to succeed every time. I use pass^k for customer products because a family planning a vacation gets one conversation.

Evals and production monitoring do different jobs

Offline evals run in CI on every pull request and model upgrade as your first check before release. Because CI runs constantly, use fast code assertions there first rather than slow LLM judges. Production monitoring takes over after launch to catch user shifts and real-world failures nobody thought to write tests for beforehand.

Re-run manual error analysis after any major prompt rewrite or model change, and connect offline evals with live monitoring. Failures in production become new offline test cases, offline runs verify your fix before deploy, and live metrics confirm whether users saw an improvement. Once your CI suite passes above 95% on known failure modes, keep it running automatically and prioritize your roadmap from real user behavior.

Evals are product work

Your evals define your business rules and quality bar in practice, which makes them product work rather than QA cleanup. The people closest to the users and requirements should define what a passing answer looks like, with one domain expert making final calls on borderline cases over time. Maintaining evals should be just as routine as maintaining unit tests. And if five prompt changes in a row move your score by 0.2%, stop editing the prompt: change the workflow, the state, or the UI, or write that step in plain code.

Further reading