Skip to content
The AI Agent Factory

24.6 Metrics you can defend

Approved by
Panaversity ·
15 min read

In everyday life. A shop puts a sign in its window: "9 of 10 customers are happy." A careful reader asks four things. Which ten customers? Who asked them, the owner or a stranger? Were they asked once, or every week? And how many customers does the shop have? The sign can be true and still tell you almost nothing. A number you can defend is one that comes with the answers.

What you will learn. What a suite's number must carry with it before anyone can trust it. You practice it in Lab 24, Task 4.

  • What makes a metric defensible?
  • Why run a case more than once?
  • What pass rate should a suite have?
  • Why not one average score?
  • What can 40 cases not show?
  • What does a defended number cost?

Why it matters. "39 of 40" can be true and still mislead. A reader who does not know the set, the marker and the trials cannot tell.

At work. Friday's suite report, as the builder sent it to Ana:

Suite: 40 cases (25 questions, 15 extractions), live run, 1 trial each
Checks by code:  39 of 40 pass (threshold 39). Failing: 1 extraction, total read as subtotal
Judge:           25 answers read. 24 correct, 1 incorrect, 0 unknown
Judge agreed with Ana on 9 of her 10 held-out answers: 6 of 6 passes, 3 of 4 fails
Waiting for Ana: 1 answer ("Who approves a $12,000.00 invoice?")
Result:          RED until Ana marks it

Every line says who made the marks. Code marked all 40 cases. The judge read 25 of them as well. Ana will mark one. On Monday at 8:40 she can see in one look how far her judgment reached on Friday, and who carried it. A trial is one run of one case, and this concept explains it below.

Figure 24.3. One result, three markers. Each of the 40 cases shows who marked it: code, the judge or Ana.

What makes a metric defensible?

A metric is a number that reports quality. A defensible metric is one you can explain to someone who doubts it. For a suite, that means the number carries four things with it:

  • The set. "39 of 40" is a pass rate on a stated set: Brightline's 40 cases, at one commit. It says nothing about questions unlike those 40.
  • The marker. A mark by code, a mark by the judge and a mark by Ana are different kinds of evidence, so the report keeps them on separate lines.
  • The judge's agreement. Every judge number sits beside the held-out line from 24.5.
  • The trials. How many times each case ran.

Why run a case more than once?

A model's answers vary between runs, so one pass does not show that a case always passes. A trial is one run of one case.1 With several trials you can report two different numbers, which 31.6 uses again:

  • pass@k is the chance that at least one of k tries is right.
  • pass^k is the chance that all k tries are right.

A worker that answers questions about money needs pass^k. A case that is right 3 times in 4 is right three times in a row only about 42% of the time (0.75 × 0.75 × 0.75).1

The prep course stops before trials. They come from Anthropic's post on agent evals.1

On a pull request, each case runs once, because the builder is waiting. Before a prompt or a model is released, the full suite runs with three trials for each case. In Claude. It runs as one batch, many requests sent together and answered later, at half the price.23 A batch can take up to 24 hours, which is why it is a release step (Chapter 29) and never a pull-request check. 24.10 has the batch's other limits.

What pass rate should a suite have?

It depends on what the suite is for.1

  • A capability eval asks what the worker cannot do yet. It starts low, and a rising number is what you watch for.
  • A regression eval asks whether the worker still does everything it did before. It should sit near 100%, and any drop is what you watch for.

Brightline's golden set is a regression suite, so its threshold is 39 of 40. A new case from a live failure fails at first, so until the fix is in it works like a capability case. Once the worker passes it, it stays in the set as a regression case. Anthropic's guide says the case graduates.

Why not one average score?

An average hides the cases. The prep course says so itself: a steady average can hide three cases fixed and three cases broken, so read the result case by case.4 Friday's run shows the same thing with a verdict. Twenty-four of 25 answers were correct, which is 96%. The one that was not would have told a clerk that a $12,000.00 invoice is paid first and approved after. So the report lists that answer by its question, and no line gives a rate without its cases.

The prep course's judge gives each answer a score from 1 to 10, and the suite's result is the average. It asks you to say what each band of scores means: for example 1 to 3, 4 to 7 and 8 to 10. It also says why the judge must give its reasons. Without them, a judge tends to give a safe middle score, about six.4 You may meet this form on the exam, so know how to read it.

What can 40 cases not show?

Forty cases teach the method, and they do not give production-level confidence. Four limits follow from the size:

  • One case is 2.5 points. The difference between 39 of 40 and 38 of 40 is one answer, which a second trial might reverse.
  • Sources set the minimum far higher for reporting a rate. Anthropic's "great start" of 20 to 50 cases (24.2) is for finding failures. For a number that is published, its guidance is 100 items as the minimum for a multi-turn eval and 1,000 for a single-turn one.5
  • The judge's line is based on 10 answers, and its weaker half on 4.
  • One practitioner's guide asks for far more to check a judge. It asks for about 100 marked answers for each kind of failure, and it says that below 60 the result is often too uncertain.6

So Brightline says "39 of 40 on our golden set, at this commit", and never "the worker is 97.5% accurate". The set grows by each failure Ana adds, and that is the only way the number comes to mean more.

What does a defended number cost?

More calls and more reading. Three trials cost three times the calls, and a report with six lines takes longer to read than one number. One number alone is fair in one place only: on a builder's own screen, between two runs of the same set, to see which way a change moved it.

The operating rule: never report a number alone. Give the set, who marked each case, how far the judge agreed with the expert, and the number of trials. Then list the cases that failed.

Do this now. Ask your coding agent to rewrite a weak claim. Copy this line:

Rewrite the claim "our AI Worker is 95% accurate" as a report I could defend. Ask me for the set, who or what marked each case, how many trials each case ran, and which cases failed. Leave a gap for anything I cannot tell you, and do not fill it in.

Count the gaps it leaves. Each one is a question someone will ask you.

Check yourself

Question 1 / 8

0 answered

In Friday's report, who or what marked all 40 cases?

  1. Demystifying evals for AI agents, Anthropic.↑↑2↑3↑4
  2. Introduction to evals: Evals in production: CI, batch, and drift, Claude Academy.↑
  3. Batch processing, Anthropic.↑
Owner
Panaversity