Pass@k
A standardized metric for evaluating the code generation capability of language models, introduced by OpenAI in the HumanEval benchmark. Pass@k measures the probability that at least one correct solution is generated among k sampled attempts, and has been widely adopted in the evaluation of Agent systems.
Core Facts
Pass@1 represents the probability that the model generates a correct result in a single sampling, while Pass@k represents the probability of at least one correct result in k samplings.
The pass@k metric measures the probability that, when the model generates k candidate code snippets, at least one of them passes all test cases.
Timeline (last 90 days)
In E2E evals, Pass@k assumes the k attempts are independent, so the probability of succeeding at least once is 1−(1−p)^k; Pass^k requires all k attempts to succeed, with probability p^k.
Pass@k values extrapolated from small samples should be treated as an upper bound rather than a promise, because multiple attempts by an LLM under the same prompt are often correlated, and the true Pass@k may be lower than estimates based on the independence assumption.
For high-frequency scenarios where failure is costly (such as daily coffee ordering), Pass^k should be the optimization target; for coding agents where failures can be retried, Pass@k is more suitable; for low-cost failures like email drafts, success rate alone is sufficient.
When three out of five trials pass, the success rate is 60%, Pass@5 is about 99%, and Pass^5 is about 8%.
Pass@k is a standardized metric for evaluating the code generation capability of language models, introduced by OpenAI in the HumanEval benchmark.
Pass@1 represents the probability that the model generates a correct result in a single sampling, while Pass@k represents the probability of at least one correct result in k samplings.
All Facts (7)
Pass@1 represents the probability that the model generates a correct result in a single sampling, while Pass@k represents the probability of at least one correct result in k samplings.
75%VerifiedThe pass@k metric measures the probability that, when the model generates k candidate code snippets, at least one of them passes all test cases.
75%UnverifiedPass@k values extrapolated from small samples should be treated as an upper bound rather than a promise, because multiple attempts by an LLM under the same prompt are often correlated, and the true Pass@k may be lower than estimates based on the independence assumption.
50%UnverifiedFor high-frequency scenarios where failure is costly (such as daily coffee ordering), Pass^k should be the optimization target; for coding agents where failures can be retried, Pass@k is more suitable; for low-cost failures like email drafts, success rate alone is sufficient.
50%UnverifiedIn E2E evals, Pass@k assumes the k attempts are independent, so the probability of succeeding at least once is 1−(1−p)^k; Pass^k requires all k attempts to succeed, with probability p^k.
50%UnverifiedWhen three out of five trials pass, the success rate is 60%, Pass@5 is about 99%, and Pass^5 is about 8%.
50%UnverifiedPass@k is a standardized metric for evaluating the code generation capability of language models, introduced by OpenAI in the HumanEval benchmark.
50%