research31 min studyLesson 905 in Engineering

Repeated trials estimate reliability only under a stated task and sampling unit

Separate one-of-k success from all-k consistency, derive finite-sample estimators, and preserve task clusters and repeated-run configuration in uncertainty analysis.

On this page

What you’ll understand

  • Calculate pass@k and all-k success estimators from a fixed task's repeated samples.
  • State the conditional iid assumptions and distinguish trial count from task coverage.
  • Explain oracle selection, environment reset, and clustered uncertainty limits.

One execution can succeed by chance or fail through an unlucky path. Repeated trials reveal variability, but they do not turn one task into many independent task domains. The metric also matters: at least one success among several attempts rewards search, while succeeding in every attempt measures consistency. State which event is estimated, what constitutes an attempt, and how outcomes are observed. A high one-of-k score is not automatically the reliability of a single deployed run or proof that the system can identify its successful candidate.

Define the repeated event before aggregating results

Record policy revision, model sampling settings, tool and user-simulator versions, seed information, budgets, reset procedure, and stopping rules. Independent resets are needed to avoid carrying solved state into later attempts, but equal seeds alone do not guarantee identical remote-service or hardware behavior. If a system adapts after each failed attempt, it defines a sequential policy different from independent draws of one fixed policy. Evaluate that adaptive procedure explicitly instead of treating its dependent attempts as interchangeable samples for a formula derived under fixed conditions.

The original code-model evaluation paper uses pass@k for the probability that at least one of k sampled candidates passes its checks. The original tau-bench paper introduces an all-k consistency measure commonly written pass^k. These events move in opposite directions as k grows under a nontrivial fixed success probability. Neither notation should be silently substituted for the other. A one-of-k evaluation can use a hidden grader to recognize success, while a deployed agent may lack that oracle and must pay for its own selection or verification mechanism.

pass@⁡k^=1−(n−ck)(nk),1≤k≤n\widehat{\operatorname{pass@}k}=1-\frac{\binom{n-c}{k}}{\binom nk},\qquad 1\le k\le n
For one task, n is sampled attempts and c their passing count, with 0≤c≤n and binomial coefficients zero when the upper count is smaller than k. This equals the successful fraction of size-k subsets of the observed pool. It is unbiased for new iid fixed-policy one-of-k success under the conditional Bernoulli model, not for arbitrary dependent retries.↔ Scroll wide equations horizontally.

All-k consistency has a different estimator and interpretation

Among size-k subsets, all attempts pass only when every chosen member comes from the c successful observations. The corresponding ratio estimates a different reliability event from finding at least one pass. Under conditional iid success probability p, the target events are 1−(1−p)^k and p^k respectively. Plugging an observed c/n into those nonlinear expressions is generally different from the finite-sample unbiased estimators. Do not call the discrepancy an arithmetic error: one conditions on the observed pool, while unbiasedness concerns expectation over repeatedly sampled pools under the stated model.

Tasks usually have different difficulty. Compute the intended per-task quantities before averaging across a declared task distribution; pooling successes across unrelated tasks can answer another question. Repeated attempts within a task can be correlated through shared fixtures, user behavior, or policy state. For uncertainty about new tasks, preserve task clusters in a suitable analysis or resampling design rather than pretending every trial is an independent new task. More attempts help characterize within-task variability but do not expand coverage to unseen environments, languages, or action contracts.

all⁡k^=(ck)(nk),P(all k)=pk under iid attempts\widehat{\operatorname{all}k}=\frac{\binom ck}{\binom nk},\qquad P(\text{all }k)=p^k\ \text{under iid attempts}
The subset estimator uses the same fixed task and n,c,k conventions as pass@k. The p^k target additionally assumes k independent identical Bernoulli outcomes for that task. All-k is a consistency event, not the probability of at least one success or a guarantee that the grader matches the real goal.↔ Scroll wide equations horizontally.

Keep the complete trial population and uncertainty visible

Predeclare how timeouts, invalid actions, setup failures, missing outputs, and grader errors are reported. Excluding unsuccessful or expensive attempts after observing outcomes inflates reliability estimates. Report single-attempt success, repeated-trial metrics, trial counts per task, budgets, and relevant uncertainty together. If a task has fewer than k valid sampled attempts under the metric protocol, do not pretend the combinatorial estimator is defined there without a stated missing-data rule. Preserve the failure traces so variability can be attributed to actions and environment conditions rather than dismissed as model randomness.

The probability lab displays a hypothetical count distribution. Reset, explicitly set BOTH p=0.6 and n=5, predict mean three, then Play or Step. Reset and re-set BOTH p=0.6 and n=10; predict mean six. Edits retain t and playback highlights exact iid outcomes. There are no task clusters, adaptive retries, hidden graders, or pass@k calculators. Its assumed p is not inferred from the observed count, and it does not show that real repeated agent trials meet the independence or fixed-policy conditions needed by the estimators.

One success somewhere and success every time differ

For one fixed task, five independently sampled and reset attempts yield three passes. Compute the observed-pool subset estimators for k=2. Keep this realized count separate from an assumed true success probability.

  1. There are C(5,2)=10 unordered pairs. Only C(2,2)=1 pair contains two failures, so estimated pass@2 is 1−1/10=0.9.

  2. Exactly C(3,2)=3 pairs contain two successes, so the all-two estimator is 3/10=0.3. The single-attempt observed pass fraction is 3/5=0.6.

  3. The estimators describe different events and are not guarantees. Plug-in calculations from 0.6 would give 0.84 for one-of-two and 0.36 for all-two; their difference from 0.9 and 0.3 is expected for these nonlinear finite-sample quantities.

The result

Report the event, task, attempt count, and assumptions alongside the metric rather than treating every multi-attempt score as deployment reliability.

Explore the model

Interactive lab

Interactive lab · probability

A repeated-count model needs an assumed fixed probability

For EACH run Reset, set BOTH p and n, predict, then Play or Step. At p=0.6, n=5 gives mean 3 and n=10 gives mean 6. Edits retain t. This exact iid count model has no tasks, adaptive policy, clustered analysis, candidate-selection oracle, or combinatorial pass@k implementation.

A repeated-count model needs an assumed fixed probabilityThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forRepeated trials measure a specified event under assumptions and do not substitute for task coverage or a real selection policy.

Check your understanding

What distinguishes pass@k from an all-k consistency metric for the same task?

Try it yourself

Ten attempts on one task yield six passes. For k=3, compute the one-of-three and all-three subset estimators using C(10,3)=120, C(4,3)=4, and C(6,3)=20. May these counts be pooled with another task before applying the formula without changing the target?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Apply the complement of all failures for pass@3 and all successes for all-three.

Compare with the solution

Pass@3 is 1−4/120=29/30≈0.9667 and all-three is 20/120=1/6≈0.1667. Pooling attempts from a different task generally changes the sampling target and can mix difficulty; compute the declared per-task metric and task-weighted summary rather than silently treating the pool as one fixed task.

Take it with you

  • One-of-k search success and all-k consistency are different events.
  • Finite-sample estimators need fixed-task sampling assumptions and correctly defined attempts.
  • Task clustering, complete cohorts, and candidate-selection costs constrain interpretation.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.