AI engineering glossary · Evaluation metrics

What is pass@k?

pass@k (also called pass at k): A metric for code generation: the probability that at least one of k sampled programs passes all unit tests for a problem. It is usually estimated from n samples with c correct as 1 - C(n-c, k) / C(n, k), then averaged across problems.

Level: intermediateTopic: Evaluation metrics

pass@k: an example

If 3 of 10 generated solutions pass, pass@1 is 0.3, and pass@5 is higher because any of five attempts may succeed.

Related terms

More Evaluation metrics terms

Where you learn it

pass@k is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.