An eval is a test for AI output: a set of real cases, a check for each one, and a score that says whether a version is good enough. Writing evals before you build is the most useful step in an AI project, because it forces you to say what “working” means.
Without evals, every change is a guess. Someone tries a few examples, it looks better, and it ships. With evals, a new prompt or a new model gets a score you can compare with the last one.
Start from the success bar
Write one sentence that a person outside the team could check:
Correct totals on 95% of test receipts.
That sentence names the output (totals), the check (correct), the test set (receipts) and the bar (95%). A sentence like “extracts receipts accurately” names none of these.
If you can’t write this sentence, the problem isn’t ready for a model yet.
Build the case list
A case is one input with its check. For a receipts feature:
| Case | Input | Check |
|---|---|---|
| Simple | Clear printed receipt | Total equals 42.80 |
| Faded | Faded thermal paper | Total equals 18.25 |
| Tip | Handwritten tip added | Total includes the tip |
| Currency | Receipt in euros | Currency is EUR |
| Not a receipt | Photo of a menu | Asks for a receipt and invents nothing |
Some practical rules:
- Use real inputs, including the ugly ones. Made-up cases tend to pass.
- Include cases where the right answer is to refuse or ask.
- Start small. Twenty good cases are far more useful than none, and you can add more later.
- Keep a set aside that nobody tunes against, so you can spot overfitting.
Choose how to grade
There are two kinds of grader, and most eval sets need both.
Code graders check things exactly: does the total match, is the format valid, was the right tool called? They’re fast, cheap and consistent. Use them wherever you can.
Model graders use a second model to judge things code can’t, such as whether a summary is faithful or a reply is polite. They’re useful but imperfect, so give them specific criteria and check a sample of their verdicts yourself.
Run each case more than once
The same input can produce different output from one run to the next. One passing run doesn’t show much.
So run each case several times. A strict way to score that is pass^k: a case passes only if all k trials pass. It shows how much small errors add up. If a step passes 90% of the time, the chance of five passes in a row is 0.9 to the power of 5, about 59%. For tasks where every run has to be right, this is much closer to what users will experience than a single trial.
Make it a release gate
Evals only help if they can stop something. Set the rule that a new version goes live only when it meets the bar and doesn’t make existing cases worse. That covers prompt changes, tool changes and model upgrades, since a new model version can break a case that used to pass.
Compare versions on the same cases. Otherwise you’re comparing two different tests, and the scores mean nothing. How to evaluate an agent harness shows how to decide whether one version really beats another.
Feed production back in
Every real failure should become a new case. When a user reports a wrong total, add that receipt to the set, then fix it. Over time the set comes to reflect what actually goes wrong, and a fix for one failure can’t quietly undo the fix for another.
This is the loop behind any self-improving system: measure, change one thing, measure again, and keep the change only if the score improves. We cover the risks in self-improving agents in production.
Common mistakes
- Writing evals after the build. They end up testing what the system already does.
- Testing only the happy path. Then the score is high and production is still bad.
- Tracking one average score. An average can rise while an important kind of case gets worse. Group your cases and watch each group.
- Ignoring cost and speed. A version that scores 1% better at ten times the cost is usually a worse version.
- Trusting generated tests blindly. Evals written by a model may test what the model already gets right, so a person should read them and add hard cases from real use.
Where Catoms comes in
Catoms plans to write evals from your problem spec, score several harness versions on them, and keep testing new versions against the same set. You’d still own the success criteria and the eval files. It isn’t live yet, and everything in this guide works without it. To see where evals fit among the other parts, read what an AI harness is.