Term
pass@k
Meaning
A coding metric giving the probability that at least one of k sampled programs passes the unit tests for a problem. It is estimated from a larger set of samples per problem, so that it reflects how often a correct program appears among k attempts.
Source PaLM 2 Technical Report
How papers use it 14 papers
PaLM 2 Technical Report
Use Reported for HumanEval (pass@1 and pass@100), MBPP (pass@1 and pass@80) and ARCADE (pass@1 and pass@30). Samples are drawn with p = 0.95 for all pass@k evaluations and executed in a code sandbox. PaLM 2-S* reaches 88.4 at pass@100 on HumanEval, matching PaLM-Coder-540B.
Random Selection Reveals Implicit Knowledge Consensus in Code Generation
Use It is the test metric, with n = 10 samples at temperature 1.0, used to compare selectors.
Meaning A code-evaluation metric giving the chance that at least one of k sampled programs passes all tests, estimated without bias from n samples.
Competition-Level Code Generation with AlphaCode
Use Used on CodeContests to measure how well sampling searches the solution space without a submission cap, mainly in the sample-budget ablations. Following Chen et al. (2021), it is treated as an upper-bound measure for using k samples, since it assumes every sample can be submitted.
Meaning A metric giving the percentage of problems solved when all k samples drawn for each problem are submitted for evaluation on the hidden tests. A problem counts as solved if any of its samples passes.
Negative-Only Policy Optimization for One-Sided Verifiable Rewards
Use Used to track how Qwen3-4B's solve rate changes as k grows from 1 to 512 on CodeContests and LiveCodeBench. The reported table shows NOPO's advantage over the baselines growing at larger k, while GRPO falls below the base model at k=512.
Meaning An inference-time metric giving the fraction of problems solved when k sampled attempts are drawn for each problem, so it shows how success grows with the sampling budget.
Evaluating Large Language Models Trained on Code
Use The paper's main metric for functional correctness. It uses n = 200 samples per task with k up to 100, and computes the estimator with a numerically stable product over terms. The paper notes that estimating it as 1 minus (1 minus the single-sample rate) to the power k is biased. Reported values include GPT-Neo at 6.4% pass@1 and 21.3% pass@100 on HumanEval.
Meaning A metric giving the fraction of problems solved when k samples are drawn per problem. It is estimated without bias from n generated samples, of which c pass the unit tests, using the formula \( 1-\binom{n-c}{k}/\binom{n}{k} \), averaged over problems. Higher values mean more problems are solved.
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
Use Reported alongside Maj@K for the SFT and RL DeepSeekMath 7B models on GSM8K and MATH at temperature 0.7. The RL model does not show a gain on this metric, and the authors use that pattern to argue that RL mainly improves the selection of correct answers rather than the underlying capability.
Meaning A metric that gives the fraction of problems for which at least one of K sampled outputs is correct. It rises with K and reflects whether a model can produce a correct answer somewhere within its sample set.
PerfArena: Ranking LLMs by Code Performance
Use PERFARENA counts a rejected program as a miss in pass@k rather than charging it a performance penalty.
Meaning A functional correctness metric for code generation that estimates how often a sampled program passes the tests.
Edit Recommendation: Can LLMs Anticipate Edit Requests from Users, and When?
Use Here it is the share of test samples where one of the first k predicted edit requests matches the actual request.
Meaning The fraction of samples for which at least one of the first k candidate outputs is judged correct.
Large Language Models: A Survey
Use Appears as an evaluation metric for HumanEval, MBPP and APPS in the paper's overview table of LLM datasets. The table lists the metric without numerical results.
Meaning A code-generation evaluation metric that estimates whether at least one of k sampled programs passes all test cases for a problem.
MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
Use Used as the functional accuracy metric on HumanEval and MBPP, reported as Pass@1.
Meaning An estimate of the chance that at least one of k generated programs passes the tests.
Code Llama: Open Foundation Models for Code
Use Reports pass@1, pass@10 and pass@100 on HumanEval and MBPP. Pass@1 uses greedy decoding in the main table, while pass@10 and pass@100 use nucleus sampling with p=0.95 and temperature 0.8. In the infilling comparison, pass@k is measured at temperature 0.1. On APPS, pass@5, pass@10 and pass@100 are computed with nucleus sampling at temperature 0.6.
Meaning A sampling-based metric for code generation that estimates the chance that at least one of k generated solutions to a problem passes its unit tests. Higher values indicate that more problems are solved within the sample budget.
AuXSpec: Learning to Autoformalize Program Specifications via Executable Postconditions
Use It is the main metric for SpecGen and CodeGen at k equal to 1 and 4 on AUXSPEC-Test and Verina.
Meaning The fraction of problems for which at least one of k samples meets the criteria, computed with the unbiased estimator.
How Many Sources, Not Just How Many Problems: Planning the Precision of LLM Evaluations from Earlier Results
Use The target and measured score in the GSM-Symbolic and SWE-bench experiments, with the score over a draw being the mean of the per-problem estimates. The paper reports pass@1, pass@4 and pass@16, and its design prediction, coverage results and recipe are restricted to pass@1, with pass@16 handled as an open case.
Meaning A benchmark score that estimates the chance of at least one correct answer when k attempts are drawn for a problem, computed with the unbiased per-problem estimator from n attempts and averaged over the problems in a draw.
Escaping the Mode: Multi-Answer Reinforcement Learning in LMs
Use In this paper, pass@K is the special case of the multi-answer set reward where a question has one ground-truth answer and the model outputs K candidates (N=1, K>1). The HotPotQA-Modified setting is the case where this applies, because its single gold answer is hard to pin down from incomplete context, so producing several candidates raises the chance of including it.
Meaning A pass@K objective scores a problem as solved when at least one of K generated candidate answers is correct. It measures whether a model's set of K attempts covers the correct answer, rather than whether a single attempt is right.