insideout Get Pro
Learn
AI engineering · Module 08

Evaluation

Measure whether an AI system is actually getting better.

Start here · Lesson 01

Specifying a good output

Write down what success looks like before you measure anything.

Start lesson

LessonsAll lessons

  1. 01 Specifying a good outputWrite down what success looks like before you measure anything. Free
  2. 02 RubricsBreak quality into parts a person or a model can score the same way twice. Free
  3. 03 Read the failures firstLook at real failures and sort them before choosing a metric. Free
  4. 04 The confusion matrixWhat accuracy hides, and precision, recall and F1 per class. Pro
  5. 05 Overlap metrics: BLEU, ROUGE, BERTScoreWhen matching a reference answer works, and when it misleads. Pro
  6. 06 Models as gradersUse one model to grade another, and check it against people. Pro
  7. 07 How model graders are biasedPosition, length and self-preference, and how to correct for them. Pro
  8. 08 People as gradersWhen to use human raters, and how far to trust their agreement. Pro
  9. 09 BaselinesCompare against the simplest thing that could work. Pro
  10. 10 AblationsRemove one part at a time to learn what each part is worth. Pro
  11. 11 Is the new version really betterConfidence intervals and paired tests for comparing two systems. Pro
  12. 12 Multiple testing in experimentsTry enough variants and one will win by luck. Pro
  13. 13 Treating prompts like codeVersion prompts and run regression tests before every change ships. Pro
  14. 14 Testing a prompt changeMeasure a change on the task itself, not on how the output reads. Pro
  15. 15 Scoring generated textFluency, faithfulness and relevance, and which metric fits which. Pro
  16. 16 Capstone: an evaluation reportEvaluate a real system and write up what you found. Pro

Build it yourself · on your own machine

An evaluation report on two local models

A one-page report that says which of two small models is better at maths word problems, with error bars, sorted failures and a test you can rerun.
  1. Before running anything, write down the success measure and the rule you'll decide by, then take 200 questions from GSM8K's test split on Hugging Face.
  2. Write a strict checker that pulls the final number from each reply, and run two small models in Ollama (say llama3.2:3b and qwen2.5:3b) at temperature 0 with the same prompt.
  3. Read 30 failures from each model, sort them into piles such as arithmetic slip, misread question and bad format, and count the piles.
  4. Have a third, larger model grade whether each reply's reasoning holds up, and check it against your own marks on 30 replies with Cohen's kappa.
  5. Put 95% bootstrap intervals on both scores, and run a paired sign test on the questions where the two models disagree.
  6. Turn the checker and 20 fixed questions into a regression test that runs with one command.

How you'll know it worksA one-page report with both scores and their intervals, the sign test's p-value, the failure counts, the grader's kappa and a decision made by your rule, plus a regression test that passes from a clean checkout.

Python, Ollama with two small models and a larger grader such as qwen2.5:7b (no API key; an hour or two of laptop time), SciPy, scikit-learn and pytest. Uses lessons 01 to 16.