Start Agent Evals Small: 20 Tasks, Trials, pass@k vs pass^k
How to start evaluating an AI agent with 20 to 50 real tasks, run repeated trials, and choose between pass@k and pass^k, with a short script to compute both.
Topics:Evaluation
If an agent succeeds on a task 75% of the time, how often does it succeed on three tries in a row? About 42%, according to the arithmetic in Anthropic's guide to agent evals (0.75 cubed). That gap between "it can do it" and "it does it reliably" is why single-run demos mislead, and why repeated trials belong in your first evaluation.
TL;DR
Start with 20 to 50 tasks taken from real failures, run each one several times, and read the transcripts. Report two numbers: pass@k, the chance that at least one of k attempts succeeds, and pass^k, the chance that all k succeed. Use pass@k when one success is enough, and pass^k when users need consistency. The definitions and the 20 to 50 task guidance come from Anthropic's "Demystifying evals for AI agents", published in January 2026.
Vocabulary that keeps the team aligned
Agent evals are easier to discuss once everyone uses the same terms. The Anthropic guide defines them like this: a task is a single test with inputs and success criteria; a trial is one attempt at a task; a grader is logic that scores some aspect of performance; a transcript is the full record of a trial, including outputs, tool calls and reasoning; and an outcome is the final state of the environment.
The outcome definition is the one people skip. The guide's example is a booking agent: the question is whether the reservation actually exists in the database, not whether the agent says it does. Grade the state of the world wherever you can.
For the broader metrics (trajectory, tool use, policy adherence, cost), see How to Evaluate AI Agents: Beyond Final-Answer Accuracy. This article is about how to start, and how to read the results.
Choosing graders
You will usually combine three kinds of grader. The same guide describes them as follows.
Code-based
- String matching, binary tests, static analysis, and checks on outcomes or tool calls
- Fast, cheap, objective and reproducible
- Brittle, and limited in nuance
Model-based
- Rubric scoring, natural-language assertions, pairwise comparison
- Flexible and scalable
- Nondeterministic, costlier, and needs calibration against humans
Human
- Expert review, spot checks, A/B tests
- Gold-standard quality, and the way to calibrate model graders
- Expensive and slow
A sensible default is code graders for anything checkable (did the file change, did the test pass, does the row exist), a model grader for qualities like tone or completeness, and a small human sample to check the model grader.
Why one run is not enough
Agents are nondeterministic, so a single pass or fail is one sample from a distribution. Running k trials per task turns that into a rate, and the choice of how to aggregate the trials changes the story.
- pass@k is the likelihood of at least one correct solution in k attempts. It rises as k increases. It suits tasks where a single success is what matters, such as generating candidate fixes that a person will pick from.
- pass^k is the probability that all k trials succeed. It falls as k increases. It suits customer-facing agents that must behave consistently.
- Per-trial success rate
- 75%
- Example from Anthropic's evals guide
- Chance of 3 of 3 successes (0.75 cubed)
- 42%
- Computed from the example above
- Chance of at least 1 of 3 successes (1 minus 0.25 cubed)
- 98%
- Computed from the example above
The same agent looks excellent on pass@3 and mediocre on pass^3. Neither number is wrong. Decide which one matches how the agent is used, and say so in the report. If a person reviews every output, pass@k may be fine. If the agent acts alone on a customer's account, pass^k is the honest measure.
Here is a small script that computes both from raw trial results, assuming each task has k independent trials recorded as booleans. It computes simple empirical rates over the trials you ran.
def pass_at_k_empirical(trials: list[bool]) -> bool:
"""At least one trial succeeded."""
return any(trials)
def pass_hat_k_empirical(trials: list[bool]) -> bool:
"""Every trial succeeded."""
return all(trials)
def estimate(results: dict[str, list[bool]]) -> dict[str, float]:
n = len(results)
return {
"pass@k": sum(pass_at_k_empirical(t) for t in results.values()) / n,
"pass^k": sum(pass_hat_k_empirical(t) for t in results.values()) / n,
}
# Per-task probability form, if you know the per-trial rate p:
def pass_hat_k_from_rate(p: float, k: int) -> float:
return p ** k
def pass_at_k_from_rate(p: float, k: int) -> float:
return 1 - (1 - p) ** kWith very few trials per task these empirical numbers are noisy, so treat them as a signal to investigate, and increase trials where the decision matters.
Starting small
Do not wait for a large benchmark. The Anthropic guide says teams often delay evals until they have hundreds of tasks, and that "20-50 simple tasks drawn from real failures is a great start." It gives the reason: early in development, changes tend to have large effects, so small samples can detect them. It also recommends starting from manual checks you already run and converting user-reported failures into test cases.
Step 1: Collect
Pull 20 to 30 real failures, bug reports or manual checks into a list of tasks
Step 2: Specify
Write a clear success condition for each, so two domain experts would reach the same verdict
Step 3: Run
Execute each task several times and save every transcript
Step 4: Grade
Use code graders first, then a model grader, then spot-check by hand
Step 5: Read
Open transcripts for failures and for a few passes, and fix broken tasks or graders
Step 6: Repeat
Rerun after each change and compare pass@k and pass^k
Two details from the guide are worth copying. Tasks should be unambiguous enough that two domain experts would give the same pass or fail verdict. And a task that fails at 0% across many trials usually points to a broken task or grader, not an incapable agent.
Read the transcripts
Numbers hide the cause. The guide says you cannot tell whether graders work well without reading transcripts and grades from many trials, and that a score should not be taken at face value until someone has done so. Reading shows whether a failure was a real agent mistake or a grader rejecting a valid answer, and a fair failure should make clear what the agent got wrong.
Budget time for reading, not only for running. A thirty-minute pass through ten failing transcripts will usually find a grader bug or an ambiguous task before it finds a model problem.
What to do on Monday
Pick one agent you already run. Write down the twenty most recent things that went wrong or that you check by hand. Turn each into a task with a success condition, run each five times, and report pass@5 and pass^5 side by side. Then pick the one metric that matches how the agent is used, and put it in your release checklist. The Build an eval pipeline lab takes the same approach into a repeatable harness, and the LLM evaluation fundamentals article covers the wider discipline.
Frequently asked questions
What is the difference between pass@k and pass^k? pass@k is the probability that at least one of k attempts succeeds, so it rises as k grows. pass^k is the probability that all k attempts succeed, so it falls as k grows. Use the first when one success is enough and the second when consistency matters.
How many tasks do I need to start evaluating an agent? Anthropic's guide says 20 to 50 simple tasks drawn from real failures is a great start. Add more as the agent matures and failures become subtler.
How many trials per task should I run? The guide does not fix a number. Run enough to see variation, for example several per task, and increase the count where a decision depends on a small difference.
Should I use an LLM as a grader? Model-based graders are flexible and scale well but are nondeterministic and need calibration against human judgement. Use code graders where a result is checkable, and sample by hand to confirm the model grader.
What does a 0% pass rate mean? According to the guide, a consistent 0% across many trials usually indicates a broken task or grader rather than an incapable agent, so inspect the task before changing the agent.
Why grade outcomes instead of what the agent says? Because an agent can claim success without having changed anything. Checking the final state, such as whether a record exists, measures what actually happened.
Evaluating AI systems
Your next step
Reading is the start. Turn it into skill: read the chapter, practise on something real, check the numbers, then follow a path.
More on Evaluation
- How to Evaluate AI Agents: Beyond Final-Answer AccuracyHow to evaluate AI agents that take many steps: outcome, trajectory, tool use, policy adherence and cost, with a task-based golden set and regression checks.
- LLM Evaluation Fundamentals for Production SystemsHow to evaluate a production LLM system: golden sets from real traffic, retrieval and generation metrics, calibrated LLM judges, CI gates and online monitoring.
- MCP Server Security Checklist for the 2026-07-28 SpecificationA practical MCP security checklist drawn from the official security best practices: confused deputy, token passthrough, SSRF, local servers and scopes.
Discuss this article
Got a question, a counter-example or a correction? Bring it to the community.
Prefer a feed reader? Follow by RSS.