Module 2 · 4 lessons

Evaluation and observability

How to tell whether answers are getting better or worse: test sets, live signals and the limits of a model grading a model.

Before you start

From this track: Modules 0 to 1. Each module uses only ideas from the ones before it.

Builds on: Observability, SLOs and error budgets

Already know these? Start with the first lesson below.

1. Building a test set

The picture

A few by hand can fool you

A fixed set of real questions, each with a check, shows what a change really does, which a few tries by hand can miss.

Scene 1 of 4 · Three tries by hand

You change the prompt and try three questions by hand: all three look better.

Prompt version 1 (before) against version 2 (after)
QuestionBeforeAfter
Can I return shoes after 40 days? (highlighted)failpass
Is the blue jacket in stock? (highlighted)failpass
Why was I charged twice? (highlighted)failpass
Pass rate before
not shown yet
Pass rate after
not shown yet
  1. Three tries by hand. You change the prompt and try three questions by hand: all three look better.
  2. A fixed set. This small test set keeps 10 real questions, and each one has its own clear check.
  3. Run all of them. Run on every change, the set shows 60% passing before and 80% after.
  4. The one that broke. But "What is your phone number?" now fails, and none of your three hand tries found it.
  5. Now you try. Pick the questions you would try by hand, and compare with the full set. For example, tapping "How do I reset my password" and "Do you match lower prices" gives this: By hand: 0 better, 0 worse, 2 the same. The full set: 60% to 80%, with 1 broken. Your sample missed the broken question, so only the full set shows the whole picture.

Scene 1 of 4: Three tries by hand. You change the prompt and try three questions by hand: all three look better.

Key points

  1. Three questions tried by hand can all look better.
  2. A fixed test set gives each question a clear check.
  3. Run the whole set on every change, like code tests.
  4. Add every question that goes wrong in real use.

You cannot tell whether a change helps by trying two or three questions by hand. You need a fixed set of real questions, with a clear check for each.

A check can be exact, such as "the answer mentions the 30-day limit", or a short note on what a good answer must do.

Run the whole set on every change, the way code runs its tests, and keep adding questions that went wrong in real use.

Example. A store bot keeps 200 real customer questions, each with a check. A change ships only if its pass rate does not fall.

In system design: Treat the test set as part of the code: keep it with the code, and run it before every prompt or model change.

Where it goes wrong

  • A small test set is noisy. With 10 questions, one answer changing moves the score by 10 points, so a small gain may mean nothing.
  • Answers vary from run to run, so one run of the set can mislead. Run it more than once before comparing two versions.

In an interview

  • Say where the test questions come from, how each is checked, and when the set runs, such as before every release.

Check yourself

Why is trying three questions by hand not enough to judge a prompt change?

Two harder questions

The first uses the idea on a new case. The second asks you to judge a design.

Apply it

Your test set has 20 questions, and version B passes 1 more than version A. How far does the pass rate move, and what does it show?

Judge a design

A team still uses the 50 test questions it wrote on day one, and never adds any. What is it missing?

Sources and further reading (2)

First-hand sources to check this lesson against and to go further. They are standards, official docs, original papers, and guides from engineering and security teams. Each link was opened on 8 November 2026.

  • Official docsDefine success criteria and build evaluationsAnthropic docs (one provider)Writing test cases with clear checks, and grading by code, by a person or by a model.
  • Official docsOpenAI EvalsOpenAI on GitHubAn open-source tool for running a fixed set of test cases against a model.

Open this lesson on its own page

2. Fixes that break other things

The picture

Show

v1 passes 6 of 10 (60%); v2 passes 8 of 10 (80%). v2 fixed 3 and broke 1.

QuestionCheckv1v2
1. Can I return shoes after 40 days?fixed by v2Says no, since the limit is 30 days fail pass
2. Do you ship to Canada?Says yes, with the 5 to 7 day wait pass pass
3. How do I reset my password?Gives the reset-link steps pass pass
4. Is the blue jacket in stock?fixed by v2Says it cannot check live stock fail pass
5. What is your phone number?broken by v2Gives the support phone number pass fail
6. Can I pay with a gift card?Says yes pass pass
7. Why was I charged twice?fixed by v2Offers the refund steps, without blame fail pass
8. Can I change my order after it ships?Says no, and offers a return pass pass
9. Do you match lower prices?Says there is no price matching fail fail
10. Where is order 123?Asks the user to sign in first pass pass

Read one question's answers, and how each was scored

Question number

5. “What is your phone number?”

Scoring rule. The answer passes when it contains "555 0100".

Prompt v1 pass

“You can call support on 0800 555 0100.”

Prompt v2 fail

“You can reach us any time through our friendly help page, where our team is always happy to help.”

A model grader against a person, on v2's answers

They agree on 8 of 10, but the grader caught 1 of the 2 answers the person failed. They disagree on:

  • “Do you ship to Canada?” The answer: “Yes. 5 to 7 days.” The grader says fail; the person says pass, since the check is: says yes, with the 5 to 7 day wait.
  • “What is your phone number?” The answer: “You can reach us any time through our friendly help page, where our team is always happy to help.” The grader says pass; the person says fail, since the check is: gives the support phone number.

What this simplifies. The questions, answers and checks are made up to show the idea. Each answer is scored by a rule that looks for exact words. Such a rule is cheap and easy to read, but a right answer in other words would fail it. A real test set has hundreds of questions, and the grader here stands for a second model asked to judge each answer.

A change that fixes some answers often breaks others. Looking only at the overall score can hide this.

So compare each question between the old version and the new one, and look at what got fixed and what got broken.

Example. Below, prompt v2 raises the pass rate from 60% to 80% by fixing 3 questions. But it breaks 1: it no longer gives the support phone number.

In system design: Read every question a change breaks before shipping it, even when the overall score goes up.

Where it goes wrong

  • A score that rises overall can hide one broken answer that matters most, such as a legal or safety question. Mark those as must-pass.
  • A provider can update a model with no change in your code. Use a fixed model version, and test before you move to a new one.

In an interview

  • Describe comparing old and new answers question by question, and say which failures block a release.

Check yourself

Version 2 raises the pass rate from 60% to 80%. What should you still do before shipping it?

Two harder questions

The first uses the idea on a new case. The second asks you to judge a design.

Apply it

Version 1 passes 12 of 20 questions. Version 2 fixes 4 of the failures and breaks 2 that used to pass. What is its pass rate?

Judge a design

A team calls the provider's model by a name with no fixed version, and runs its tests only when its own code changes. What can go wrong?

Sources and further reading (2)

First-hand sources to check this lesson against and to go further. They are standards, official docs, original papers, and guides from engineering and security teams. Each link was opened on 8 November 2026.

Open this lesson on its own page

3. When a model grades a model

The picture

Check the checker

A second model can grade answers fast, but it must first be compared with a person, because it can be fooled.

Scene 1 of 4 · A person marks them

A person checks 10 answers against their checks: 8 pass and 2 fail.

Version 2's answers, marked by a person and by a model grader
QuestionPersonGrader
Can I return shoes after 40 days?pass?
Do you ship to Canada?pass?
How do I reset my password?pass?
Is the blue jacket in stock?pass?
What is your phone number?fail?
Can I pay with a gift card?pass?
Why was I charged twice?pass?
Can I change my order after it ships?pass?
Do you match lower prices?fail?
Where is order 123?pass?
Marks that agree
not shown yet
Bad answers the grader caught
not shown yet
  1. A person marks them. A person checks 10 answers against their checks: 8 pass and 2 fail.
  2. A model marks them. A second model marks the same answers in seconds, far faster than a person can.
  3. Where they differ. They agree on 8 of 10, but the grader catches only 1 of the 2 bad answers.
  4. Fooled by a warm tone. It passed a friendly answer that never gave the phone number: tone won over the actual check.
  5. Now you try. Pick an answer, and compare the person's mark with the grader's. For example: Person: pass. Grader: fail. The answer was "Yes. 5 to 7 days." The answer was right but short, and the grader marked it down: it tends to favour longer answers.

Scene 1 of 4: A person marks them. A person checks 10 answers against their checks: 8 pass and 2 fail.

Key points

  1. A model grader checks many answers fast and cheaply.
  2. It can favour answers that sound sure, warm or long.
  3. Compare its marks with a person's on a sample.
  4. Rely on it only where its marks match people's.

Checking hundreds of answers by hand is slow, so teams often ask a second model to grade each answer against its check.

A is fast and cheap, but it can be fooled. It tends to favour answers that sound confident, longer answers, and answers in its own style.

So compare its verdicts with a person's on a sample, and trust it only for checks where it agrees with people.

Example. In the panel above, the grader agrees with a person on 8 of 10 answers, but catches only 1 of the 2 bad ones. It passed a friendly answer that missed the phone number.

In system design: Use a model grader to check more answers, but first measure how often it agrees with people.

Where it goes wrong

  • Shown two answers, a grader often favours the first one. Swap the order, grade again, and count only verdicts that agree.
  • A grader can favour answers written in its own style. Check it against a person's marks before you rely on it.

In an interview

  • Say how you would check a model grader: compare it with people on a sample before trusting its scores.

Check yourself

Before trusting a model to grade answers, what should you check?

Two harder questions

The first uses the idea on a new case. The second asks you to judge a design.

Apply it

A grader shown answer A then answer B picks A. Shown B then A, it picks B. What do you do with this verdict?

Judge a design

On a sample of 10, a grader agrees with a person on 8 answers, but passes 1 of the 2 bad ones. The team wants it as the only check on safety answers. Is that wise?

Sources and further reading (2)

First-hand sources to check this lesson against and to go further. They are standards, official docs, original papers, and guides from engineering and security teams. Each link was opened on 8 November 2026.

Open this lesson on its own page

4. Watching quality in real use

The picture

Watch real chats, not only tests

Signals from real traffic, such as how often a person must take over, show a quality drop that a test set missed.

Scene 1 of 4 · A normal week

For five days, about 5% of chats are handed to a person to finish.

Share of chats handed to a person, each day (made-up numbers)
  • Day 15%
  • Day 25%
  • Day 36% release v2.3
  • Day 45%
  • Day 55%
Two days before
not shown yet
Two days from
not shown yet
  1. A normal week. For five days, about 5% of chats are handed to a person to finish.
  2. A new release. On day 6, release v2.4 ships, with a new prompt and a new model.
  3. The jump. From that day, about 12% of chats need a person, up from 5%: check that release first.
  4. Logs to find out why. Each logged request keeps its prompt, chunks, answer and model, with private fields hidden.
  5. Now you try. Pick a release, and compare handoffs in the two days before it and the two days from it. For example: Before: 11.5%. After: 12.5%. No real change around this release, so it is probably not the cause.

Scene 1 of 4: A normal week. For five days, about 5% of chats are handed to a person to finish.

Key points

  1. A test set cannot cover everything real users ask.
  2. Watch thumbs down, repeated questions and handoffs to a person.
  3. A sudden jump points at whatever changed that day.
  4. Logs need limits: they hold prompts with personal data.

A test set cannot cover everything users ask, so also watch signals from real traffic.

Useful signals include thumbs up or down, how often users ask the same thing again, and how often a person has to take over.

Log each request with its prompt, the it used, the answer and the model. Prompts often hold personal data, so limit who can read the logs, hide private fields and delete old logs.

Example. If the share of chats handed to a person jumps from 5% to 12% after a release, that release is the first thing to check.

In system design: Watch quality signals next to and cost, and alert on sudden changes, as you would for errors.

Where it goes wrong

  • Few users press thumbs up or down, and unhappy ones press more often. Read the votes as a signal, not a score.
  • Logs full of prompts become a store of personal data. Limit who can read them, hide private fields and delete old ones.

In an interview

  • Name the quality signals you would chart beside latency and cost, and the change that would raise an alert.

Check yourself

After a release, the share of chats handed to a person jumps from 5% to 12%. What does that most likely tell you?

Two harder questions

The first uses the idea on a new case. The second asks you to judge a design.

Apply it

Thumbs-down votes rise from 2% to 4% of chats, but few users ever vote. How should you read it?

Judge a design

A team logs every full prompt and answer, keeps them forever, and lets all staff read them. What is wrong?

Sources and further reading (2)

First-hand sources to check this lesson against and to go further. They are standards, official docs, original papers, and guides from engineering and security teams. Each link was opened on 8 November 2026.

Open this lesson on its own page