Recall@K quantifies retrieval completeness by calculating the fraction of all relevant documents in a corpus that appear in the top-K returned results. Unlike precision-oriented metrics, it penalizes the system only when relevant items are missed entirely, making it the primary metric for tasks where exhaustive retrieval is critical, such as legal e-discovery or comprehensive literature reviews.
Glossary
Recall@K

What is Recall@K?
Recall@K is an evaluation metric that measures the proportion of relevant documents successfully retrieved within the top-K results, prioritizing the completeness of the retrieval set over the precision of its ranking.
The metric is computed as |Relevant Items ∩ Retrieved@K| / |Total Relevant Items|. A score of 1.0 indicates all relevant documents were captured within the K window. In Retrieval-Augmented Generation (RAG) pipelines, Recall@K is often prioritized over precision to ensure the language model has access to all necessary factual grounding, trusting a subsequent re-ranker or cross-encoder to filter out noise.
Key Characteristics of Recall@K
Recall@K is a fundamental metric for evaluating retrieval systems, measuring the proportion of relevant documents successfully captured within the top-K results. It prioritizes completeness over precision, making it critical for tasks where missing a relevant document is costly.
Core Definition and Formula
Recall@K quantifies how many of the total relevant documents for a query appear in the top-K retrieved results.
- Formula:
Recall@K = (Number of relevant documents in top-K) / (Total number of relevant documents) - Range: 0 to 1, where 1 indicates all relevant documents were retrieved.
- Focus: This metric ignores the ranking order within the top-K and ignores irrelevant documents, focusing solely on coverage.
- Example: If a query has 5 relevant documents in the corpus and the system retrieves 3 of them in the top-10 results, Recall@10 is 3/5 = 0.6.
Contrast with Precision@K
Recall@K and Precision@K are complementary metrics that trade off against each other.
- Recall@K answers: "Of all the relevant items, how many did we find?" It penalizes missed results.
- Precision@K answers: "Of the items we retrieved, how many are relevant?" It penalizes irrelevant results.
- Trade-off: A system can achieve perfect Recall@K by simply returning all documents (K = corpus size), but this destroys precision. Effective systems balance both.
Role in RAG Architectures
In Retrieval-Augmented Generation (RAG), Recall@K is often the primary retrieval metric because the downstream LLM can filter out noise, but it cannot answer correctly if the required fact was never retrieved.
- Generative Filtering: A strong LLM can ignore irrelevant chunks in its context window, acting as a precision filter.
- Factual Ceiling: The quality of the final generated answer is strictly bounded by the recall of the retrieval step. If the fact isn't in the top-K, the LLM will likely hallucinate.
- Tuning: Teams often optimize for high Recall@K (e.g., K=20) and rely on a re-ranker to boost precision before generation.
Limitations and Blind Spots
While essential, Recall@K has critical limitations that must be understood.
- Binary Relevance Assumption: It treats all documents as either fully relevant or irrelevant, ignoring graded relevance (e.g., a partially relevant document counts the same as a perfectly relevant one).
- Total Relevant Count Problem: Calculating the denominator requires knowing the absolute number of relevant documents in the entire corpus, which is often unknown in large-scale, real-world datasets.
- K-Dependency: The metric is highly sensitive to the choice of K. Recall@5 and Recall@100 tell very different stories about system performance.
Practical Calculation with Mean Recall@K
In practice, Recall@K is averaged across a test set of queries to provide a robust evaluation.
- Mean Recall@K: The arithmetic mean of the Recall@K score for each query in the evaluation set.
- Binary Vectors: For each query, a binary relevance vector is created for the top-K results (1 for relevant, 0 for irrelevant).
- Implementation: Libraries like
ranxorpytrec_evalprovide optimized functions to calculate Mean Recall@K against standard benchmarks like MS MARCO or BEIR.
Relationship with Hit Rate
Recall@K is closely related to Hit Rate (or Success@K) , but they measure different things.
- Hit Rate: Measures the percentage of queries for which at least one relevant document is found in the top-K. It's a binary per-query metric.
- Recall@K: Measures the proportion of all relevant documents found. A system can have a 100% Hit Rate but a low Recall@K if it only ever finds one of many relevant documents.
- Use Case: Hit Rate is useful for factoid QA (one answer needed), while Recall@K is better for summarization or multi-faceted research tasks.
Recall@K vs. Precision@K vs. MRR
A comparison of three core information retrieval metrics used to evaluate the quality of ranked result lists in embedding model selection and search relevance engineering.
| Metric | Recall@K | Precision@K | MRR |
|---|---|---|---|
Primary Focus | Completeness of retrieval | Purity of top results | Rank position of first hit |
Core Question | Did we find all relevant items? | How many top-K items are relevant? | How quickly did we find the first relevant item? |
Sensitivity to K | Increases monotonically with K | Decreases as K grows with irrelevant results | Stabilizes once first relevant item is found |
Best Use Case | Legal discovery, patent search, exhaustive literature review | Featured snippets, recommendation widgets, top-5 search results | Question answering, FAQ retrieval, known-item search |
Penalizes Irrelevant Results | |||
Penalizes Rank Position | |||
Ideal Score | 1.0 | 1.0 | 1.0 |
Typical Threshold | Recall@100 or Recall@1000 | Precision@5 or Precision@10 | MRR@10 |
Frequently Asked Questions
Explore the critical nuances of the Recall@K evaluation metric, a cornerstone for measuring the completeness of retrieval-augmented generation and semantic search systems.
Recall@K is an evaluation metric that measures the proportion of total relevant documents successfully retrieved within the top-K search results. It prioritizes the completeness of the retrieval set, answering the question: 'Of all the relevant items that exist in the corpus, how many did the system actually find?'
The calculation is straightforward:
codeRecall@K = (Number of relevant documents in top-K results) / (Total number of relevant documents in the corpus)
For example, if a corpus contains 10 relevant documents for a query and the system returns 7 of them in the top-20 results, the Recall@20 is 0.7. Unlike precision, recall does not penalize the system for returning irrelevant results, making it a critical metric for use cases like legal discovery or medical literature review where missing a single relevant document is unacceptable.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core metrics and retrieval paradigms that contextualize Recall@K within the broader search and evaluation ecosystem.
Precision@K
The complementary metric to Recall@K, measuring the proportion of retrieved documents in the top-K set that are actually relevant. While Recall@K focuses on completeness (finding all relevant items), Precision@K focuses on purity (avoiding irrelevant results).
- Formula: (Number of relevant documents in top-K) / K
- Trade-off: High recall often comes at the cost of lower precision
- Use case: Critical in search UI where users only scan the first page of results
Mean Reciprocal Rank (MRR)
An evaluation metric that measures how quickly the system retrieves the first relevant document. MRR is the average of the reciprocal ranks of the first correct answer across a set of queries.
- Formula: (1/|Q|) * Σ (1 / rank_i)
- Sensitivity: Heavily penalizes systems that bury the correct answer deep in results
- Best for: Question-answering systems and featured snippet evaluation where position matters critically
Normalized Discounted Cumulative Gain (NDCG)
A rank-aware metric that evaluates retrieval quality by considering both the relevance and the position of documents. Unlike Recall@K, NDCG assigns higher weights to relevant documents appearing earlier in the ranked list.
- Graded relevance: Supports multi-level relevance judgments (e.g., highly relevant vs. partially relevant)
- Discount function: Logarithmically reduces the contribution of documents further down the list
- Normalization: Compares against an ideal ranking to produce a score between 0 and 1
F1@K
The harmonic mean of Precision@K and Recall@K, providing a single balanced score that penalizes systems which optimize one metric at the extreme expense of the other.
- Formula: 2 * (Precision@K * Recall@K) / (Precision@K + Recall@K)
- Balance: Prevents gaming by returning all documents (high recall, low precision) or very few (high precision, low recall)
- Threshold: Requires choosing K thoughtfully based on the application's tolerance for missed results
Mean Average Precision (MAP)
A comprehensive retrieval metric that averages precision scores at each position where a relevant document is found, then takes the mean across all queries. MAP provides a holistic view of both precision and recall behavior.
- Binary relevance: Assumes documents are either relevant or not
- Stability: Less sensitive to outliers than MRR for large result sets
- Standard benchmark: Widely used in academic information retrieval evaluations like TREC
Hit Rate (Recall@1)
A special case of Recall@K where K=1, measuring whether the single top-ranked result is relevant. This is the strictest retrieval evaluation, demanding perfect first-attempt accuracy.
- Binary outcome: Either the top result is relevant (1) or not (0)
- Critical for: Voice assistants and single-answer systems where only one response is surfaced
- Relationship: Recall@1 ≤ Recall@K for any K > 1, forming a lower bound on retrieval completeness

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us