# How Many Eval Examples Are Enough?

> How many test cases an AI eval needs, why 20 to 50 real failures is a fine start, and when you need hundreds, explained for your AI interview.

**In short:** There is no magic number. Start with 20 to 50 real failures, then add more, sometimes hundreds, when the gap you need to prove is small.

AI and LLM interview question Q268, Evaluation and observability. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/how-many-eval-examples-are-enough

## Say it in 30 seconds

There is no fixed number. I start with 20 to 50 real failures from our bug reports, because early on a good fix usually makes a big, clear change, and a small set can show it. When I need to prove a small gain, I grow the set to hundreds, since a few dozen cases often can't tell a real gain from luck. I add a case for every new failure, and I run each one more than once, because answers vary.

## Say it in 2 minutes

Start with the failures you already have. On a claims triage agent, that means the cases that went wrong last quarter: a water-damage claim sent to theft, a missing policy number, a claim that should have gone to a person. Twenty to fifty of these are enough to start, because early on a good fix usually moves the score a lot, and a big change shows up even in a small sample. Real failures match what customers actually send.

The number changes when the gap I need to prove gets smaller. Each run is a little random, so I run each case several times and compare score ranges, not single scores. With 50 cases, 84 percent has a range of about 71 to 92 percent, so a move to 90 percent could be luck. With 400 cases, the same scores sit in much tighter ranges, and a gain of a few points becomes believable.

Count is not the whole story. Coverage matters more: every kind of claim and every rule the insurer must follow needs some cases. When the agent passes everything, the set has stopped showing progress, so I add harder cases. A new production failure becomes a new case that week.

Start small with real failures, grow the set until the gap I care about is clearly bigger than the noise, and keep it fresh.

## What is an eval example, in plain words?

An eval, short for evaluation, is a fixed test that scores how well an AI system does a job. Each item in the test is an eval example, also called a test case: an input, plus what a good result looks like or how to grade it.

A hospital does not sign off a new triage nurse after one shift. It checks them on real past cases with known right answers, and only then trusts them with live patients. An eval is that check for an AI system.

Take an insurance claims triage agent. It reads a claim and decides whether to pay it, send it to a person, or ask for documents. Its eval is a list of past claims, each with the decision a senior claims handler made.

- **Eval:** A fixed test that scores an AI system on a job, run the same way each time.
- **Eval example:** One test case: an input, and what a good result looks like.
- **Trial:** One run of the system on one example. Answers can differ from run to run.
- **Grader:** The rule, code or model that marks a trial as a pass or a fail.

## So how many examples do you need?

There is no fixed number. The right size depends on how small a change you need to detect, and how much the score moves around between runs. Big changes show up in small sets. Small changes need large sets.

> "In reality, 20-50 simple tasks drawn from real failures is a great start." (Anthropic, engineering team)
>
> "More mature agents may need larger, more difficult evals to detect smaller effects, but it's best to take the 80/20 approach in the beginning." (Anthropic, engineering team)

So the plan has two stages. Early on, a small set of real failures finds the big problems fast. Later, when a team wants to prove a small gain, the set has to be much larger. A range here is the band the true pass rate could plausibly fall in, given how many cases were run. The chart shows the check I run before I trust a result.

*Diagram, How to know your set is big enough: Start with 20 to 50 real failures and run each one more than once. If the new score lands clearly outside the old range, you have evidence. If the gap sits inside the range, it may be luck, so add cases.*
1. Each real failure is run 3 times, since answers vary.
2. The repeated scores are compared as ranges, not single numbers.
3. If the new score lands clearly outside the old range, you have evidence.
4. If the gap sits inside the range, it may be luck, so grow the set.

> **Tip:** Interviewers like an honest answer. Say the number depends on the change you need to prove, then give the 20 to 50 starting point and the range check.

## Why can a small set fool you?

Every run of an AI system is a little random, so a score can move a few points on its own. With a small set, a few lucky or unlucky cases can move the score a lot.

Take 50 cases from the claims agent. With the old prompt, 42 are right, which is 84 percent. With the new prompt, 45 are right, which is 90 percent. Is the new prompt better? The code below turns each count into a 95% range for the true score.

```python
# A claims triage agent is scored on real past failures. Each case is a pass or a fail.
from math import sqrt

def wilson(passed, n, z=1.96):
    # A 95% range for the true pass rate: if the same test were rerun many times, about 95 in 100 such ranges would contain it.
    p = passed / n
    centre = (p + z * z / (2 * n)) / (1 + z * z / n)
    half = z * sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / (1 + z * z / n)
    return centre - half, centre + half

def show(name, passed, n):
    low, high = wilson(passed, n)
    print(f"{name}: {passed}/{n} = {passed / n:.0%}, range {low:.0%} to {high:.0%}")

show("50 cases, old prompt", 42, 50)
show("50 cases, new prompt", 45, 50)
show("400 cases, old prompt", 336, 400)
show("400 cases, new prompt", 360, 400)
```

Output:

```text
50 cases, old prompt: 42/50 = 84%, range 71% to 92%
50 cases, new prompt: 45/50 = 90%, range 79% to 96%
400 cases, old prompt: 336/400 = 84%, range 80% to 87%
400 cases, new prompt: 360/400 = 90%, range 87% to 93%
```

With 50 cases, the two ranges overlap a lot, so a 6-point gain could be luck. With 400 cases, the ranges only just overlap, at about 87 percent on both sides, so the same gain is far more believable than it was at 50 cases. Overlapping ranges are a rough check. Both prompts ran on the same cases, so a paired test would be the stricter way to compare them. The size of the set depends on the gain you need to prove.

## Is a bigger set always better?

No. Coverage matters more than count. Every kind of claim and every rule the insurer must follow needs a few cases. Forty cases of one kind of claim tell you less than ten cases across five kinds.

1. **Start with real failures:** Turn last quarter's complaints and bug reports into cases. Anthropic says this keeps the test close to what users really do.
2. **Cover every kind of case:** Give each kind of claim and each rule a few cases. Thin coverage hides the failures that matter most.
3. **Run each case more than once:** Answers vary between runs, so repeat each case and compare the ranges, not one score.
4. **Add a case for every new failure:** When production breaks in a new way, that case goes into the set the same week.
5. **Grow to hundreds for small gains:** A few points of improvement usually needs a large set. As a rule of thumb, plan for hundreds of cases, as the 400-case example above shows.

A set can also stop being useful. This is called saturation: the set is so easy that the score stops moving. Anthropic says: "Eval saturation occurs when an agent passes all of the solvable tasks, leaving no room for improvement." At that point, add harder cases from real work.

> **Tip:** Writing hundreds of cases by hand is slow. Anthropic suggests asking Claude to help generate more from a baseline set of example test cases. I still check every generated case myself, because one bad case teaches the wrong lesson.

### How would you size the set for a new claims agent?

Ship in stages, and let the set grow with the agent's job. The table shows what a sensible plan looks like.

- **Week 1: 20 to 50 cases.** Real claims that went wrong, to find the big problems fast.
- **Before launch: Hundreds of cases.** Enough to show the new prompt beats the old one by a few points.
- **Every month: New failures added.** Each production miss becomes a case, so the set keeps up with real use.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] No fixed number: it depends on the gain you need to prove.
- [ ] Start with 20 to 50 real failures, not invented cases.
- [ ] Run each case more than once, and compare ranges, not single scores.
- [ ] Coverage over count: every kind of case and rule gets some cases.
- [ ] Add a case for every production failure, and watch for saturation.
- [ ] Name the cost: labelling cases takes people's time.

**Common traps**

- Trap: "We need a thousand examples before we can start." Better: Start with 20 to 50 real failures. Waiting for a big set means no evals while the agent ships.
- Trap: "Our score went up 6 points, so the new prompt wins." Better: Check the range first. On 50 cases, a 6-point gain can be luck. Rerun or grow the set.
- Trap: "A bigger set is always better." Better: Coverage beats count. A few cases of every kind of claim show more than a pile of cases of one kind.

## Can you spot the weak evidence?

**Spot the weak evidence:** Four results from the claims agent. Which one shows a real improvement?

A. New prompt 86%, old prompt 84%, both on 50 cases, one run each.
B. New prompt 100% on 12 cases the engineer wrote on Friday.
C. New prompt 92%, old prompt 81%, on 400 real cases, each run 3 times.
D. New prompt 84% in run one and 84% again in run two, on 50 cases.

**Answer:** C. The gap is wide, the cases are real and many, and each one was repeated. The others have too few cases, cases written to pass, or no gap at all.

**Quick check:** The claims agent passes all 30 of its eval cases on every run. What should you do first?

A. Ship it, the score is perfect
B. Add harder real cases the set does not cover yet
C. Cut the set down so it runs faster
D. Remove the cases the agent already passes

**Answer:** B. A perfect score means the set can no longer show progress. That is saturation. Harder real cases bring the signal back.

## Can you answer these from memory?

**Flash cards**

- **How many eval examples to start?** 20 to 50 real failures. Grow the set when the gap you must prove is small.
- **Why run each case more than once?** Answers vary between runs, so one run can mislead you.
- **Is a bigger set always better?** No. Coverage of each kind of case matters more than the count.
- **What does a 100 percent score mean?** Possible saturation, or a grader that is too easy. Check the set, then add harder cases.
- **Where do new cases come from?** Production failures, support tickets and bug reports, turned into test cases.
- **Why not compare single scores?** Small sets swing. Compare the ranges the scores sit in.

## Likely follow-up questions

- Q247 Offline vs online evaluation? https://designervenkat.online/interview/ai/offline-vs-online-evaluation
- Q248 What is a golden dataset, and how do you build one? https://designervenkat.online/interview/ai/what-is-a-golden-dataset
- Q255 pass@k vs pass^k? https://designervenkat.online/interview/ai/pass-at-k-vs-pass-power-k
- Q257 How do you regression-test prompts? https://designervenkat.online/interview/ai/how-to-regression-test-prompts
- Q271 What are error analysis and transcript reading? https://designervenkat.online/interview/ai/what-are-error-analysis-and-transcript-reading
- Q279 Statistical significance in evals? (full answer coming)

## Learn it in depth

- [LLM Evaluations](https://designervenkat.online/learn/ai-engineering/llm-evaluations)
