# Pass@k

> The share of coding tasks a model solves within k tries. Pass@1 means one try.

**Field:** Artificial Intelligence  
**Category:** Evaluation & Benchmarks  
**Also known as:** Pass at k, pass@1, pass@10

## Think of it like

It is like getting three shots at a basketball hoop. You win if any one goes in.

## Definition

Pass@k is a score for code models. The model gets k tries at each task, and the task counts as solved if any try passes all the tests. Pass@1 means one try, which is closest to real use. Pass@10 gives ten tries, so its score is never lower. Benchmarks such as HumanEval report it as the share of tasks solved. To get a steady number, many tries are made and the chance is worked out from them.

## Formula

```
pass@k = share of tasks where at least one of k tries passes every test
```

## Example

A model solves 60% of tasks with one try and 85% with ten. So its pass@1 is 60% and its pass@10 is 85%.

## Why it matters

It shows how often you can trust the first answer, and how much trying again helps.

## Common mistake

Comparing a pass@10 score with a pass@1 score. More tries always look better.

## Three principles

- **k tries.** Any one pass counts.
- **Pass@1 is strict.** One shot, like real use.
- **Same k only.** Compare like with like.

## Related terms

- [HumanEval](https://learn.benibix.com/term/ai/humaneval)
- [SWE-bench](https://learn.benibix.com/term/ai/swe-bench)
- [AI Benchmark](https://learn.benibix.com/term/ai/ai-benchmark)
- [Unit Test](https://learn.benibix.com/term/development/unit-test)
- [LLM Sampling](https://learn.benibix.com/term/ai/sampling)

![One coding task, and a model's three tries at it. Each try runs through the same unit tests. The first two fail and the third passes.](https://learn.benibix.com/diagrams/ai5-pass-at-k.svg)

---

Source: https://learn.benibix.com/term/ai/pass-at-k
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
