AI engineering glossary · Evaluation metrics

What is precision at k?

Precision at k (also called P@k, precision@k): Among the top k results returned, the fraction that are relevant. It is easy to interpret and matches how users look only at the first page, but it ignores the order within the top k and the total number of relevant items.

Level: beginnerTopic: Evaluation metrics

Precision at k: an example

If 3 of the top 5 search results are relevant, precision at 5 is 3 / 5 = 0.6.

Related terms

More Evaluation metrics terms

Where you learn it

Precision at 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.