What is recall@k? Retrieval metrics for RAG explained
Also called recall at k, R@k, retrieval recall
Definition
Recall@k is a retrieval metric that measures the fraction of a query's relevant documents that appear in the top k results, averaged over a set of test queries.
Recall@k is a retrieval metric that measures how many of the relevant documents for a query appear in the first k results. It is the relevant documents found in the top k divided by all relevant documents for that query, averaged across a test set. In a RAG pipeline, recall@k caps answer quality, because a passage that never reaches the top k never reaches the model. It is the first number to compare when choosing between chunking strategies, embedding models, or retrieval settings on the same labeled queries.
How to compute recall@k#
Recall@k is computed per query and then averaged. For each test query, count the labeled relevant documents that appear in the top k results and divide by the total number of relevant documents for that query. With one relevant passage per query, recall@k reduces to the hit rate, the share of queries with at least one hit.
For example, a query has four relevant chunks, and the retriever's top 10 contains three of them, so recall@10 for that query is 3 / 4 = 0.75. A second query with two relevant chunks, both in the top 10, scores 1.0. Recall@10 for the two-query set is 0.875.
Recall rises as k grows, so compare systems at the same k and the same token budget. A first-stage retriever that feeds a reranker is judged at a large k, such as 50 or 100, because the reranker can only reorder what it receives.
A query with more relevant documents than k can never reach 1.0. The BEIR benchmark (Thakur et al., 2021) calls plain recall counterintuitive in this case and caps it.
Anthropic's contextual retrieval study reported its results as a failure rate, defined as 1 minus recall@20.
Recall@k vs precision@k, MRR, and nDCG#
Recall@k asks whether the relevant documents made the list. Precision@k asks how much of the list is relevant. MRR asks how high the first relevant result ranks. nDCG@k scores the whole ordering, giving more credit to relevant results near the top. Track recall@k alongside at least one rank-aware metric.
The Elasticsearch ranking evaluation API implements all four and notes that precision and recall at k ignore where in the top k a relevant result sits.
| Metric | What it measures | Rank-aware | Typical use in RAG |
|---|---|---|---|
| Recall@k | Share of relevant documents found in the top k | No | First-stage retrieval, chunking comparisons |
| Precision@k | Share of the top k that is relevant | No | How much context budget goes to noise |
| MRR | Average of 1 / rank of the first relevant result | Yes | Questions with one right passage |
| nDCG@k | Graded relevance discounted by position, normalized to the ideal order | Yes | Final ranking after reranking |
BEIR reports nDCG@10 as its main metric because it handles both binary and graded relevance judgments, and the late chunking paper uses the same measure.
Retrieval recall@k differs from the recall of an approximate nearest neighbor index, which compares the index with exact vector search and needs no relevance labels. Pair retrieval metrics with a generation metric such as faithfulness to see whether a bad answer started in retrieval or in generation. The chunking strategies guide includes a short Python evaluator for recall@k and MRR.
Related terms
Guides that cover recall@k
- Chunking strategies for RAG: how to choose, tune, and evaluate them
- LLM evaluation: a practical guide to evals, metrics, and judges
- What is retrieval-augmented generation (RAG)? How RAG works
- What is context engineering? A practical guide for AI agents
- AI engineer roadmap: skills, projects, and resources by stage
Cite this definition
The AI Engineering Editors. "What is recall@k? Retrieval metrics for RAG explained." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/recall-at-k
- Title
- What is recall@k? Retrieval metrics for RAG explained
- Author
- The AI Engineering Editors
- Publisher
- The AI Engineering
- Updated