11.1.7 · Skill in AI engineering

Evals and datasets

Measuring AI behavior with test sets and repeatable evaluation runs.

Evals replace "it looked fine" with numbers. A dataset of real cases, a grading method, which may use code, people or another model, and repeatable runs let you compare prompts and models. They are the AI version of automated tests.

Your status · Evals and datasets

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

Without evals, every change to a prompt or model is judged by a few examples that “looked fine”. Evals replace that with numbers: a set of real cases, a way to grade each answer, and runs you can repeat. They are the automated tests of AI features. Product engineers need them to change prompts and models without breaking what already works.

How to do it

  1. Read real outputs first. List the ways the feature fails before you measure anything.
  2. Build a dataset from real cases, including the hard ones, and keep it versioned.
  3. Write cheap checks in code for what code can check: format, length, forbidden content.
  4. For quality, ask a domain expert for pass or fail judgements with a short reason.
  5. If you use a model as a judge, check it against the expert’s judgements before you trust it.
  6. Run the evals on every change, and add each production failure as a new case.

Common mistakes

  • A single average score that hides the important failure types.
  • A model judge nobody has compared with human judgement.
  • Datasets made only of easy, invented examples.
  • Evals run once and never again.

Example

Rechat’s assistant, Lucy, improved fast with prompt changes, then stopped improving: fixing one failure created another. Evals broke the plateau. Mamitsu has no evals yet; its maker reads extractions himself. His new weekly report checks a sample against a larger model, which shows where two models disagree, not which one is right. (Mamitsu in In practice)

Flow

Three levels of evals, by cost

Unit testsFast checks in code, onevery changeHuman and modelreviewOn a set scheduleA/B testsAfter big product changesUnit testsFast checks in code, on every changeHuman and model reviewOn a set scheduleA/B testsAfter big product changes

Each level costs more than the one before, so it runs less often. Most of the early work goes into the cheapest level.

ReportedHamel Husain, 'Your AI product needs evals'

Sources: Your AI product needs evals (Hamel Husain) ↗ · Using LLM-as-a-judge for evaluation: a complete guide (Hamel Husain) ↗

Technical leverage

Build repeatable evaluation pipelines, version datasets and turn production failures into regression cases.

Evidence of mastery

Put it into practice
Practice
Evaluate a product task with a labeled dataset, representative edge cases and an explicit acceptance threshold.
Artifact
An evaluation suite with human-reviewed labels, baseline results and a release decision.

What good looks like

  • Report results by important failure type, not just an average score.
  • Model-based graders are checked against independent human judgments.

Use this evidence to assess your work. Your map status is a self-assessment, not a certification.

In practice

Real products

Resources

4

Tools

2