Evals basics
An eval is a repeatable test for software whose answers change every time. This article explains what that means, the two kinds of eval, and the habit that makes the rest work.
Start with error analysis, not with a metric
The most common mistake is to pick a score (helpfulness out of 5, say) before you know what goes wrong. Scores like that hide the problems and drift over time.
The method that works, as taught by Hamel Husain and Shreya Shankar, goes like this:
- 1Collect real traces.Use real or realistic inputs and record what the system did, not only the final answer.
- 2Read them and note the first thing that went wrong.One short note per trace, such as "invented a refund policy" or "ignored the user's postcode".
- 3Group the notes into failure modes.Cluster similar notes into named categories. Count them. The biggest category is where to start.
- 4Write one eval per failure mode you care about.Next article: how to do that well with rubrics.
Reading 30 real outputs by hand usually teaches you more than a week of picking metrics. Do this before you buy any tool.
The eval loop
Evals are not a one-off. They run as a cycle:
Look at real outputs โ name the failures โ write an eval for each
โ โ
Change the prompt, tools or context โ Run evals, see what breaks
Each time you change the product, run the same evals again. A score that goes down is the signal to look at the traces, not to argue with the score.
Sources
- Hamel Husain and Shreya Shankar on evals, error analysis and better prompts (Lenny's Newsletter)
- Hamel Husain's writing on evals and AI products
Compiled by Human Agency from the sources listed. For terms, see the Jargon Decoder. Overview: AI Evals.