Recall@k quantifies a retrieval system's ability to find all relevant items, defined as the number of relevant items retrieved in the top k positions divided by the total number of relevant items for that query. It is a recall-oriented metric, prioritizing the completeness of the result set over the exact ranking order. A score of 1.0 indicates all relevant documents were found within the top k, while 0.0 indicates none were. It is crucial for applications where missing a relevant document is costly, such as in legal e-discovery or comprehensive literature reviews.
Glossary
Recall@k

What is Recall@k?
Recall@k is a ranking evaluation metric that measures the proportion of all relevant documents that are successfully retrieved within the top k results.
In Retrieval-Augmented Generation (RAG) systems, high Recall@k is essential for ensuring the language model's context window contains the necessary information to generate a factually correct answer. It is often evaluated alongside Precision@k, which measures result purity. The choice of k is application-dependent; a larger k (e.g., @100) assesses broad recall in initial retrieval phases, while a smaller k (e.g., @5) evaluates the final user-facing ranking. It is a core metric in benchmarks like TREC and BEIR for assessing zero-shot retrieval performance.
Key Characteristics of Recall@k
Recall@k is a ranking evaluation metric that measures the proportion of all relevant documents that are successfully retrieved within the top k results. It is a core metric for assessing the completeness of a retrieval system.
Core Definition & Formula
Recall@k quantifies the retrieval system's ability to find all relevant items, not just the most likely ones. It is defined as:
Recall@k = (Number of relevant documents in top k results) / (Total number of relevant documents for the query)
- A score of 1.0 indicates all relevant documents were found within the top k.
- A score of 0.0 indicates none were found.
- It is query-dependent and must be averaged over a test set of queries.
Trade-off with Precision@k
Recall@k and Precision@k represent a fundamental trade-off in information retrieval.
- High Recall@k, Lower Precision@k: The system retrieves most relevant documents but also includes many irrelevant ones in the top k.
- High Precision@k, Lower Recall@k: The top k results are mostly relevant, but many other relevant documents are missed entirely.
Optimizing a system requires balancing these based on the use case. Recall is prioritized in tasks where missing a relevant document is costly, such as legal e-discovery or systematic literature reviews.
The Role of 'k' (Cut-off Rank)
The parameter k defines the scope of evaluation and is chosen based on the application's context window or user patience.
- Small k (e.g., k=1, 3, 5): Measures performance for applications where only the first few results are examined, like a voice assistant answer or a search engine snippet. It evaluates immediate utility.
- Large k (e.g., k=50, 100): Measures performance for exhaustive search tasks, such as feeding a Retrieval-Augmented Generation (RAG) system with a large context window. It evaluates comprehensiveness.
Plotting Recall@k for increasing values of k shows the system's cumulative recall curve.
Interpretation and Use Cases
Recall@k is interpreted differently depending on the system's goal.
High-Recall Critical Use Cases:
- Medical Diagnosis Support: Missing a relevant research paper could be critical.
- Enterprise RAG Pipelines: The language model's answer quality depends on retrieving all necessary grounding documents.
- Patent Search: Failing to find a prior art document has legal consequences.
Lower-Recall Tolerable Use Cases:
- Web Search: Users often reformulate queries if the first page lacks relevance.
- Recommendation Systems: Diversity and novelty can be as important as exhaustive recall.
Calculation and Ground Truth
Accurate calculation of Recall@k requires a labeled test set where all relevant documents for each query are known.
Process:
- For a given query, the system retrieves and ranks documents.
- The evaluator counts how many of the ground-truth relevant documents appear in the top k positions.
- This count is divided by the total number of ground-truth documents for that query.
Key Challenge: Establishing a complete ground truth is often expensive and imperfect, especially for large corpora. In practice, pooling methods (like those used in TREC evaluations) are used to approximate it.
Relationship to Other Metrics
Recall@k is one component in a suite of retrieval evaluation metrics.
- Mean Average Precision (MAP): Summarizes precision across all recall levels; a single high Recall@k score can boost MAP if precision is also high at that rank.
- Normalized Discounted Cumulative Gain (NDCG@k): Extends the concept by weighting relevant documents by their position (gain) and usefulness, not just binary relevance.
- Hit Rate@k: A simpler, related metric that measures the proportion of queries where at least one relevant document is found in the top k (binary per query).
- R-Precision: Precision calculated after retrieving exactly R documents, where R is the total number of relevant documents for that query. It aligns recall and precision at a natural cutoff point.
Recall@k vs. Precision@k: The Fundamental Trade-off
A direct comparison of two core information retrieval metrics, highlighting their definitions, calculation, interpretation, and the inherent trade-off between them when evaluating a system's top-k results.
| Feature / Characteristic | Recall@k | Precision@k |
|---|---|---|
Core Definition | Proportion of all relevant documents found in the top k results. | Proportion of the top k retrieved documents that are relevant. |
Primary Focus | Completeness of retrieval. Maximizing coverage of the relevant set. | Purity of the retrieved set. Minimizing noise in the results. |
Mathematical Formula | (# of relevant docs in top k) / (Total # of relevant docs for query) | (# of relevant docs in top k) / k |
Ideal Score | 1.0 (All relevant documents are within the top k). | 1.0 (Every document in the top k is relevant). |
Sensitivity to k | Non-decreasing. Adding more results (increasing k) can only improve or maintain recall. | Variable. Can increase or decrease as k changes; generally decreases as k grows beyond the number of relevant docs. |
Business Goal Alignment | Critical when missing a relevant document is costly (e.g., legal e-discovery, comprehensive research). | Critical when user attention is limited and result quality is paramount (e.g., web search, product recommendations). |
Trade-off Relationship | Can often be improved by retrieving more documents (increasing k), but this typically reduces Precision@k. | Can often be improved by retrieving fewer, higher-confidence documents, but this may reduce Recall@k. |
Evaluation Context | Assessed against a known, fixed set of relevant documents for the query (the "ground truth"). | Assessed against the same ground truth, but only considers the subset defined by k. |
Practical Applications of Recall@k
Recall@k is a critical metric for assessing the completeness of a retrieval system. These cards detail its primary applications in building and monitoring production-grade search and RAG systems.
Benchmarking Search & RAG Systems
Recall@k is the primary metric for evaluating the retrieval completeness of search engines and Retrieval-Augmented Generation (RAG) pipelines. It answers: "Does my system find all the relevant information?"
- System Comparison: Used to A/B test different retrieval models (e.g., BM25 vs. dense vector search vs. hybrid search) by measuring which one retrieves more relevant documents within the top
k. - Component Tuning: Guides the optimization of individual components, such as the embedding model, chunking strategy, or indexing parameters, by quantifying their impact on finding all relevant context.
- Establishing Baselines: Provides a quantitative performance baseline before deploying a system to production, setting a target for future improvements.
Optimizing for High-Recall Domains
In domains where missing information is costly, Recall@k is prioritized over Precision@k. The goal is to ensure no critical document is missed, even if it means reviewing more results.
- Legal e-Discovery & Compliance: Systems must retrieve all case-relevant documents from millions of records. A high Recall@100 is essential to avoid sanctions or losing a case.
- Medical Literature Search: Clinicians and researchers need comprehensive results when reviewing drug interactions or treatment protocols. Missing a single relevant study can have serious consequences.
- Academic Research: Systematic literature reviews require exhaustive retrieval of all papers on a topic to ensure the review's validity.
- Security Threat Detection: Log analysis systems aim to flag all potential security incidents, where a false negative (a missed threat) is far worse than a false positive.
Informing Reranker & Pipeline Design
Recall@k is used to design multi-stage retrieval pipelines. A high-recall first stage ensures all relevant documents are passed to more precise, computationally expensive stages.
- First-Stage Retrieval Goal: The initial vector search or keyword search is optimized for high Recall@100 or Recall@200. This "casts a wide net" to ensure the reranker has all necessary candidates.
- Reranker Efficiency: A high-recall first stage allows the use of a powerful but slow cross-encoder model (e.g., BGE-Reranker) on only the top
kcandidates, balancing accuracy with latency. - Pipeline Validation: Monitoring Recall@k at the first stage is a key health check. A drop indicates the embedding model has drifted or the index is corrupted.
Setting k for Production Guardrails
The choice of k is an engineering trade-off between recall, latency, and cost. Recall@k analysis directly informs this critical production parameter.
- Context Window Limits: In RAG,
kis often set by the LLM's context window. Recall@k measures how much of the needed information fits into that window (e.g., Recall@10 for a 4k-token window). - Latency Budgets: Retrieving more documents (
k) increases latency. Engineers analyze the Recall@k curve to choose the smallestkthat achieves acceptable recall (e.g.,k=20for 95% recall). - Cost Optimization: For paid APIs or high compute costs per document processed, minimizing
kwhile maintaining recall directly reduces operational expenses.
Monitoring Retrieval Drift & Degradation
Recall@k serves as a key performance indicator (KPI) for continuous monitoring of a live retrieval system, detecting degradation before it impacts end-users.
- Data Distribution Shift: As new documents are added or user query patterns change (concept drift), Recall@k on a held-out test set can drop, signaling the need to retrain embeddings or re-index.
- Embedding Model Decay: The semantic understanding of an embedding model can become outdated. A sustained decrease in Recall@k is a primary signal for model refresh.
- Index Corruption: Gradual drops in recall can indicate issues with the vector database index, such as corruption or inefficient scaling, triggering operational alerts.
Human-in-the-Loop Evaluation & Data Curation
Recall@k is calculated using human-annotated ground truth. This process is foundational for creating high-quality evaluation datasets and improving systems.
- Creating Test Sets: Annotators label documents as relevant/irrelevant for a set of queries. Recall@k is then computed against this gold standard to benchmark systems.
- Active Learning for Retriever Training: Queries with low Recall@k identify hard negatives—relevant documents the model missed. These are valuable samples for contrastive learning to improve the retriever.
- Identifying Knowledge Gaps: If Recall@k is consistently low for a specific query type (e.g., about a new product), it reveals a gap in the indexed knowledge base that needs to be filled.
Frequently Asked Questions
Recall@k is a fundamental metric for evaluating the retrieval component of search and RAG systems. These questions address its definition, calculation, trade-offs, and practical application for engineers and architects.
Recall@k is an information retrieval evaluation metric that measures the proportion of all relevant documents for a query that are successfully retrieved within the top k results returned by a system.
It is calculated as:
codeRecall@k = (Number of relevant documents retrieved in top k) / (Total number of relevant documents for the query)
A score of 1.0 (or 100%) indicates that all relevant documents are present in the top k results, while a score of 0.0 means none were retrieved. This metric is crucial for applications where finding all pertinent information is critical, such as in legal e-discovery, comprehensive literature reviews, or the retrieval phase of a Retrieval-Augmented Generation (RAG) pipeline, where missing a key document can lead to an incomplete or incorrect generated answer.
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
Recall@k is one of several core metrics used to quantitatively assess the performance of information retrieval systems. These related terms define complementary perspectives on retrieval quality, system speed, and ranking effectiveness.
Precision@k
Precision@k measures the exactness of a retrieval system by calculating the proportion of relevant documents among the top k retrieved results. It answers the question: "Of the k documents I retrieved, how many were actually useful?"
- Core Trade-off: Often evaluated alongside Recall@k. A system can have high Recall@k (finding all relevant docs) but low Precision@k (returning many irrelevant ones), and vice versa.
- Use Case: Critical for user-facing search where screen space is limited; returning irrelevant results in the top 5 (low Precision@5) degrades user experience.
- Formula: Precision@k = (Number of relevant documents in top k) / k
Mean Average Precision (MAP)
Mean Average Precision (MAP) is a single-figure metric that summarizes ranking quality across multiple queries by averaging their Average Precision scores. It rewards systems that rank relevant documents higher.
- Average Precision (AP): For a single query, AP calculates the average of the precision values at each rank where a relevant document is found.
- Interpretation: A higher MAP indicates better overall retrieval performance, balancing both recall and the rank position of relevant items.
- Standard Benchmark: Extensively used in academic evaluations like the Text REtrieval Conference (TREC).
Normalized Discounted Cumulative Gain (NDCG)
Normalized Discounted Cumulative Gain (NDCG) is a ranking metric that evaluates the quality of the result order when relevance is graded (e.g., highly relevant, somewhat relevant, not relevant), not just binary.
- Gain and Discount: Each document contributes a "gain" based on its relevance grade, which is "discounted" logarithmically based on its rank position (lower ranks contribute less).
- Normalization: The score is normalized by the ideal DCG, the best possible ranking for that query.
- Practical Use: The standard metric for evaluating web search engines and recommendation systems where user satisfaction depends on the ranking of multi-level relevant items.
Hit Rate
Hit Rate (or Success@k) is a binary, query-level metric that measures the proportion of queries for which at least one relevant document is found within the top k results.
- Calculation: Hit Rate@k = (Number of queries with ≥1 relevant doc in top k) / (Total number of queries).
- Difference from Recall@k: Recall@k measures coverage of all relevant documents per query. Hit Rate simply measures whether the system found any relevant document, making it a stricter pass/fail test for basic utility.
- Application: Useful for evaluating if a retrieval system provides a useful starting point for RAG, as missing all relevant context for a query guarantees a poor or hallucinated answer.
Retrieval Latency
Retrieval Latency is the critical performance metric measuring the time delay between submitting a query and receiving the complete ranked list of results. It is typically measured in milliseconds (ms) at specific percentiles (e.g., p95, p99).
- Components: Includes time for query encoding (if using embeddings), ANN (Approximate Nearest Neighbor) or keyword search, and any reranking.
- Trade-off with Recall: Higher Recall@k often requires more exhaustive or complex search strategies (e.g., larger k, hybrid retrieval), which can increase latency.
- Production Impact: Directly affects user experience in real-time applications like chatbots and search interfaces; systems must balance recall goals with strict latency Service Level Agreements (SLAs).

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