# How to evaluate AI agents on your own closed cases

> Build an eval set from closed cases, score it with a binary rubric, run each case several times and keep a regression set. Includes sample sizes in plain terms.

Source: Context Labs (thecontextlabs.com). Canonical page: https://thecontextlabs.com/blog/evaluate-ai-agents-on-your-own-closed-cases
By Luv, Context Labs. Published 2026-12-01, updated 2026-12-01.

## The short answer

Freeze a few hundred closed cases as each looked on decision day and run the agent on them blind. Score every run against a pass/fail rubric your best expert wrote, run each case more than once to measure consistency, and keep the failures as a permanent regression set that every future change must pass.

## In this guide

- Turning closed cases into an eval set
- A binary scoring rubric
- pass^k: why one run per case hides the real problem
- The regression set
- How many cases you need, with the arithmetic

## What is an agent eval, in plain terms?

Anthropic's engineering guide gives the working vocabulary. A task is one test with defined inputs and success criteria. A trial is one attempt at a task. A grader is the logic that scores some aspect of the result. The outcome is the final state when the trial ends, such as whether a record exists, as opposed to what the agent says it did ([Demystifying evals for AI agents](https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents)).

A closed case maps onto this cleanly: the file is the task, each replay is a trial, your rubric is the grader, and the agent's prepared decision is the outcome.

## How do you turn closed cases into an eval set?

1. **Pick one workflow and one decision.** "Commercial credit memo, ready for committee" or "auto physical damage claim, payable amount".
2. **Sample on purpose.** Pull routine cases, known exceptions, and cases that went badly: reopened claims, overturned decisions, audit findings, complaints. The Anthropic guide warns that one-sided evals produce one-sided optimisation, so include cases where the right answer is "stop and ask".
3. **Freeze the inputs as of decision day.** Strip everything created after the decision: the closing note, the payment record, later correspondence. If the outcome leaks into the file, the score is worthless.
4. **Mask personal data before the file leaves its system.**
5. **Settle the ground truth.** The closed decision is a strong label, not a perfect one. Where the agent and the file disagree, an expert rules on who was right. Hamel Husain and Shreya Shankar recommend appointing one domain expert as the final word on quality for most small and mid-sized teams ([AI Evals FAQ](https://hamel.dev/blog/posts/evals-faq/)).
6. **Split it.** Keep a development set you look at freely and a held-out test set you score only at decision points.

## What should the scoring rubric look like?

Binary. The same FAQ argues that pass/fail labels force clearer thinking and more consistent labelling than a 1 to 5 scale, and that numeric scales are usually unnecessary. A reviewer can defend "the payable amount is wrong". Nobody can defend the difference between a 3 and a 4.

Write one row per criterion and pick the cheapest grader that can judge it. Anthropic's guide lists three kinds: code-based graders, which are fast but brittle, model-based graders, which handle nuance but need calibration, and human graders, the slow reference.

| Criterion (credit memo example) | Grader | Pass condition | Critical? |
|---|---|---|---|
| Revenue, EBITDA and debt match the financial statements | Code | Each value within rounding of the expert spread | Yes |
| Net leverage calculated correctly against the 3.5x covenant | Code | Exact match to recomputed ratio | Yes |
| Risk rating | Expert | Same rating the committee approved, or the expert agrees the agent's is defensible | Yes |
| Every factual sentence cites a source page | Model judge, calibrated | No uncited claims | No |
| Nothing written to a system before approval | Code, on the tool-call log | Zero writes before the approval record | Yes |

A case passes only if every critical row passes. The headline number is whole cases done right.

If a model is the judge, validate it against human labels. The FAQ suggests 100 to 200 labelled examples per failure mode, tracking both missed failures and false alarms.

## Why should you run every case more than once?

Because agents are not consistent, and a single run cannot show it. The τ-bench paper introduced pass^k to measure reliability over repeated trials, and reported that a leading function-calling agent succeeded on under half the tasks and that its pass^8 in the retail domain was under 25% ([Yao et al., 2024](https://arxiv.org/abs/2406.12045)).

Two metrics are easy to confuse:

- **pass@k:** the agent got it right at least once in k tries.
- **pass^k:** the agent got it right on all k tries. This is the one that matters for unattended work.

Anthropic's guide gives the arithmetic: a 75% per-trial success rate over three trials gives about 42% for pass^3. A customer gets one run, so report pass^k.

## Worked example: 120 closed credit files, three runs each

This example is fictional.

A regional lender replays 120 closed commercial credit files, three times each, for 360 trials.

| Result per case | Cases | Passing trials |
|---|---|---|
| Passed 3 of 3 | 94 | 282 |
| Passed 2 of 3 | 16 | 32 |
| Passed 1 of 3 | 4 | 4 |
| Passed 0 of 3 | 6 | 0 |
| **Total** | **120** | **318** |

- Per-trial pass rate: 318 ÷ 360 = 88.3%
- pass@3 (right at least once): 114 ÷ 120 = 95%
- pass^3 (right every time): 94 ÷ 120 = 78.3%

A vendor slide would say 88% or 95%. The operations number is 78%. The 20 cases that passed once or twice are the most useful files in the set: same input, different result.

## What is a regression set, and when do you run it?

A regression set is the list of cases the agent must keep getting right. The Anthropic guide separates capability evals, which should start with a low pass rate and give you room to improve, from regression evals, which should pass almost every time so that any drop signals a break. It suggests starting with 20 to 50 simple tasks drawn from real failures.

Every failure you fix becomes a regression case. Run the set whenever anything changes: a prompt, a rule, a tool, a model version, a new document template.

## How many cases do you need?

Enough that the margin of error is smaller than the difference you care about. For a pass rate near 90%, the 95% margin is roughly 1.96 × the square root of (0.9 × 0.1 ÷ n).

| Cases (n) | Margin of error at a 90% pass rate | Good for |
|---|---|---|
| 50 | about ±8 points | Finding failure types |
| 200 | about ±4 points | A go or no-go on a pilot |
| 400 | about ±3 points | Comparing two versions |

For rare, severe errors, use the rule of three: if you see zero failures in n cases, the true rate could still be as high as about 3 ÷ n. Three hundred clean cases supports "under 1%", not "never".

## Where it goes wrong

- **Outcome leakage.** The closing note is still in the file, and the agent "predicts" what it just read.
- **Vendor-chosen data.** Accuracy on someone else's sample says little about your book.
- **One run per case.** You measure luck along with skill.
- **Grading the route instead of the result.** Step-order checks are brittle. The exception is a control, such as approval before a write. Grade that as a hard rule.

## How Context Labs fits in

Context Labs (thecontextlabs.com) is an AI workforce platform for insurance, banking and private equity. It learns how your experts run multi-hour workflows, then pairs AI judgment with deterministic execution and waits for human approval on critical steps. Context applies the same discipline to its own changes: expert corrections are tested against past work, reviewed and approved before the next run, and each change is saved with its reasoning and approval. Run it on your own closed files and measure.

## FAQ

### How many closed cases do I need to evaluate an AI agent?

About 200 cases supports a pilot decision, with a margin of error near four points at a 90% pass rate. Fifty is enough to find the main failure types. For a production threshold, test several hundred cases and ensure your riskiest segment has enough volume to be judged on its own.

### What is pass^k?

pass^k is the share of cases the agent gets right on every one of k repeated runs. It measures consistency. It is stricter than average accuracy and far stricter than pass@k, which counts a case as passed if any one run succeeded. For unattended work, pass^k is the honest number.

### Should experts or a model grade the results?

Use code wherever a rule can decide, such as amounts, dates and required fields. Use your expert for judgment calls. A model judge is acceptable for high-volume checks like citation coverage, but only after you have compared it with expert labels and measured what it misses.

### What if the agent disagrees with the closed decision?

Treat it as a finding, not a failure. Have an expert review the disagreement blind to who decided what. When the original handler was wrong, the case exposes leakage or inconsistency in your manual process. Record the ruling so the label is fixed for future runs.

### How often should the regression set be run?

Run it on every change to the workflow: prompts, rules, tools, document templates and model versions. Also run it on a schedule, because a hosted model can change underneath you. A regression pass rate that slips below its usual level is a reason to stop and investigate before the next live case.

## Related guides

- [How to pilot insurance AI on your own closed claims](https://thecontextlabs.com/blog/pilot-insurance-ai-on-closed-claims)
- [How Context learns from expert corrections, safely](https://thecontextlabs.com/platform/feedback-loop)
- [Insurance AI pilot scorecard: 10 weighted criteria](https://thecontextlabs.com/library/checklists/insurance-ai-pilot-scorecard)

## Sources

- Anthropic, "Demystifying evals for AI agents", January 9, 2026: https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
- Hamel Husain and Shreya Shankar, "AI Evals FAQ": https://hamel.dev/blog/posts/evals-faq/
- Yao, Shinn, Razavi and Narasimhan, "τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains", arXiv 2406.12045, June 2024: https://arxiv.org/abs/2406.12045

[Book a demo](https://thecontextlabs.com/demo)
