Evaluating AI systems
Numbers instead of opinions
- Intermediate
- 10 chapters
- 155 min read
How to know whether an AI feature actually works: golden datasets, exact match and token F1, semantic similarity, model judges and rubrics, groundedness and citation checks, confidence intervals, and a harness that fails the build on a regression.
What You'll Learn
- Turn a demo into a regression set you can rerun
- Build a golden dataset with coverage instead of volume
- Score short answers with exact match and token F1
- Use semantic similarity with a calibrated threshold
- Write a rubric and a judge that agrees with human labels
- Check that every claim is supported and every citation resolves
- Read a score with a confidence interval, and compare two runs
- Ship an evaluation harness with a regression gate
Prerequisites
- Comfortable with Python functions and dictionaries
- Basic statistics helps but is not assumed — the intervals are built from scratch
- The RAG course is useful context for the groundedness chapter
Vocabulary
The terms the chapters assume, in plain words.
- baseline
- The score you compare a change against, usually from the version already in use.
- confidence interval
- A range around a measured score that shows how much it could move if you tested a different sample.
- embedding
- A list of numbers that represents a piece of text, placed so texts with similar meaning sit close together.
- exact match
- A score of one only when an answer matches the expected text after ignoring case, punctuation and spacing, and zero otherwise.
- golden set
- A fixed list of questions with the answers or properties you will accept, used to compare changes.
- groundedness
- The share of claims made by a model that the sources you supplied actually support.
- judge
- A model asked to score or compare answers against a rubric, used when fixed rules cannot measure quality.
- recall
- The share of everything that should have been found that was actually found.
- regression
- A drop in quality against a result you had already accepted, caught by rerunning the same tests.
- rubric
- A written list of criteria with descriptions of what a good, acceptable or failing answer looks like.
- semantic similarity
- A score for how close two texts are in meaning, usually by comparing their embeddings.
- threshold
- The cut-off score at which you accept a result rather than reject it or send it for review.
- token F1
- A score that combines two overlap rates, one for covering the expected text and one for avoiding extra text, so both must be good.
Course Content
- 01Measure, don’t vibeNot started
Trying five prompts and picking the one that looked best is not evaluation. A regression set turns every change into a number you can compare.
- 02The golden datasetNot started
Where the cases come from, how to label them without arguing, and why a set that mirrors only the easy questions will pass while the product fails.
- 03Exact match and token F1Not started
The two oldest metrics in question answering, and what each one is blind to. Exact match is unforgiving; token F1 gives partial credit and can be gamed by repeating words.
- 04Semantic similarityNot started
Comparing embeddings catches paraphrases that exact match misses — and quietly passes contradictions. Used with a threshold and a second check, it is the cheapest useful judge.
- 05LLM as judgeNot started
A model can grade answers at scale, but only if it is given a rubric, a fixed output shape, and a check for the biases it is known to have.
- 06Groundedness and citationsNot started
A RAG answer has two jobs: be right, and be supported by the passages it was given. The second is easier to check, and it catches the most damaging failures.
- 07Trusting the numbersNot started
Twenty cases and a five-point improvement can be noise. Confidence intervals and repeated runs are what separate a real gain from a lucky sample.
- 08Evaluating agentsNot started
An agent emits a path as well as an answer. Score the tool calls, the order and the stopping point, run each case more than once, and count the failure modes instead of hiding them in one pass rate.
- 09Human review workflowsNot started
A review queue is a measuring instrument, not a pile of opinions. Sample in strata, calibrate the rubric, measure agreement, and turn every disagreement into a better case.
- 10Capstone: an eval harnessNot started
A harness that loads cases, runs the system, checks properties, prints a table and fails the build when a case that used to pass stops passing.
