An agent benchmark runs every task several times, because the same agent on the same task can succeed in one trial and fail in the next. Two metrics summarize the trials in opposite ways. pass@k is the probability that at least one of trials on a task succeeds; it rewards an agent that gets lucky once. pass^k (read "pass hat k"), introduced by the tau-bench paper, is the probability that all trials succeed; it measures reliability, which is what matters when the agent is deployed and each user sees one trial.
results is a list with one row per task; each row holds the outcomes (truthy for success) of trials, the same for every task. For a task with successes out of , choose of its trials uniformly without replacement. Counting the choices gives the two estimates
where when . Each metric is the mean of its per-task value over the tasks.
pass_hat_k(results, k): the mean over tasks of , a float rounded to 4 decimals.
pass_at_k(results, k): the mean over tasks of , rounded to 4 decimals.
reliability_curve(results): a dict {"pass_hat_k": [...], "pass_at_k": [...]} with the two metrics for in order.
All three raise ValueError when results is empty, when a row is empty, or when rows differ in length. The first two also raise ValueError unless .