Recall@k (recall at k) is an evaluation metric that measures the fraction of all relevant items for a query that appear among the top k results returned by a retrieval system. If a query has four relevant passages and three of them appear in the first ten results, Recall@10 equals 0.75. In Retrieval & knowledge work within artificial intelligence, it is the standard way to ask whether a retriever finds what a downstream reader or language model needs.
The metric is especially important for retrieval-augmented generation (RAG), where a generator can only use passages that the retriever actually delivers. A missing passage at the retrieval stage usually cannot be recovered later, so high recall at a realistic k is often the first target when a team tunes chunking, embeddings or hybrid search.
How Recall@k is calculated
For a single query, Recall@k divides the number of relevant items in the top k by the total number of relevant items in the collection. The result ranges from 0 to 1. The score for a test set is normally the mean over all queries, sometimes called mean Recall@k.
The formula is Recall@k = |relevant ∩ top_k| / |relevant|. Queries with no relevant items are usually excluded, because the denominator would be zero. The order of items inside the top k does not affect the score: a relevant passage at rank 1 and one at rank 10 count the same.
| Cutoff k | Relevant items retrieved | Recall@k |
|---|---|---|
| k = 1 | 1 | 0.25 |
| k = 5 | 2 | 0.50 |
| k = 10 | 3 | 0.75 |
| k = 100 | 4 | 1.00 |
Recall@k is monotonically non-decreasing in k. Adding more results can never remove a relevant item that is already present, so a curve of recall against k always rises or stays flat.
Variants and related definitions
Several definitions share the name, and papers do not always state which one they use. Before comparing numbers, it is essential to confirm which variant was computed.
- Standard Recall@k uses the full count of relevant items as the denominator, as described above.
- Hit rate@k, also called success@k or top-k accuracy, scores 1 if at least one relevant item appears in the top k and 0 otherwise. Many question answering benchmarks report this under the label of recall.
- R-precision sets k equal to the number of relevant items R, which makes precision and recall equal at that cutoff.
- Capped recall divides by min(k, R) so that a perfect system can reach 1.0 even when a query has more relevant items than k.
The difference between standard recall and hit rate becomes large when queries have many relevant passages. A system can show a hit rate of 0.95 while its standard Recall@10 stays near 0.60, because it finds one good passage but misses the supporting evidence.
Recall@k compared with other ranking metrics
Recall@k answers a coverage question, while other metrics answer ranking and precision questions. Practitioners typically report it together with Precision@k, mean reciprocal rank and normalized discounted cumulative gain.
| Metric | Question it answers | Sensitive to order | Typical use |
|---|---|---|---|
| Recall@k | Did we find all relevant items? | No | First-stage retrieval, RAG candidate sets |
| Precision@k | How much of the top k is relevant? | No | Result pages, context budget |
| Mean reciprocal rank | How early is the first relevant item? | Yes | Single-answer search |
| nDCG@k | Are the best items ranked highest? | Yes, with graded relevance | Reranking, benchmarks such as BEIR |
A useful rule is that first-stage retrievers are judged mainly on recall at a generous k, such as 100, while rerankers are judged on order-sensitive metrics at a small k, such as nDCG@10. The reranker cannot promote a passage that the first stage never retrieved.
Choosing k and interpreting the score
The right cutoff depends on what consumes the results. In RAG, k should match the number of chunks that actually reach the prompt, not an arbitrary benchmark value. In a two-stage pipeline, the first-stage k should match the reranker input size.
| Situation | Typical k | Reason |
|---|---|---|
| Candidate generation for reranking | 50-1,000 | Reranker needs a broad pool |
| Context for a language model | 3-20 | Limited by context window and cost |
| Human search result page | 10 | Users rarely look beyond page one |
| Approximate nearest neighbor audit | 10-100 | Compares ANN output with exact search |
In vector databases, Recall@k has a second meaning: it measures how many of the true nearest neighbors an approximate index such as HNSW, IVF or DiskANN returns compared with exact search. This ANN recall says nothing about semantic relevance; it only measures index accuracy for a given speed and memory budget.
Pitfalls when using Recall@k
The metric is only as trustworthy as its relevance judgments. Incomplete labels are the most common problem: if annotators marked only a few relevant passages, a system that finds unlabeled but correct passages is penalized unfairly.
- Ignoring precision: raising k always improves recall, but it also adds noise and cost to the prompt.
- Chunking changes the denominator: splitting documents differently changes how many relevant units exist, so scores from different chunking schemes are not directly comparable.
- Mixing variants: comparing hit rate from one paper with standard recall from another produces misleading conclusions.
- Small test sets: with fewer than a few hundred queries, differences of a few points are often within random variation.
In everyday language
Imagine you ask a librarian for every book about a topic. Five good books exist in the library. The librarian brings you a stack of ten books. Four of the five good books are in that stack.
Recall at ten is then four out of five, or 80 percent. It tells you how much of the useful material you actually received. It does not care whether the good books sit at the top or the bottom of the stack.
For AI assistants that look things up before answering, this number matters a great deal. If the right page is never found, the answer cannot use it.
Seen in the real world
An internal support assistant at a software company answers employee questions from about 40,000 documentation chunks. Users complain that answers often miss important steps. The engineering team builds a test set of 300 real questions, each labeled with every chunk that contains part of the correct answer.
Measurement shows that pure dense retrieval reaches a Recall@5 of 0.58, because procedures are split across several chunks. The team adds BM25 in a hybrid search, fuses the lists with reciprocal rank fusion and retrieves 50 candidates for a cross-encoder reranker, which then passes the top 5 to the model.
With these changes, Recall@50 for the candidate pool rises to 0.93 and Recall@5 after reranking reaches 0.81. Support staff report noticeably fewer incomplete answers, and the team keeps the test set to catch regressions whenever embeddings or chunking change.