Recall@K measures the fraction of total relevant documents successfully captured in the first K positions of a ranked result list. For a query with R total relevant items in the corpus, if r of those appear in the top K results, Recall@K equals r / R. This metric is critical for answer engine architecture because it directly assesses whether a retrieval pipeline is missing essential information that a language model needs for factual grounding, regardless of ranking order within the top K.
Glossary
Recall@K

What is Recall@K?
Recall@K is a fundamental evaluation metric in information retrieval that quantifies the completeness of a search or recommendation system by measuring the proportion of all relevant items that appear within the top K retrieved results.
Unlike precision, which penalizes irrelevant results, Recall@K focuses exclusively on completeness, making it the primary safeguard against hallucination in RAG systems. A high Recall@K ensures the generative model has access to all necessary source documents. However, optimizing for recall often requires trading off latency and precision, as exhaustive search strategies like increasing K or using brute-force k-NN over approximate nearest neighbor (ANN) indexes can degrade P99 latency and violate Service Level Objectives (SLOs).
Key Characteristics of Recall@K
Recall@K is a foundational evaluation metric for retrieval systems that quantifies completeness—measuring how many of the total relevant items were successfully captured within the top K results returned to a user or downstream agent.
Core Definition and Formula
Recall@K measures the proportion of relevant items retrieved in the top K results relative to the total number of relevant items that exist in the corpus.
- Formula:
Recall@K = (Number of Relevant Items in Top K) / (Total Relevant Items in Corpus) - Range: Always between 0.0 and 1.0, where 1.0 indicates perfect completeness.
- Contrast with Precision@K: While Precision@K measures the purity of the top K results, Recall@K measures their coverage.
- Example: If 10 relevant documents exist for a query and a system returns 7 of them in the top 20 results, Recall@20 = 0.7.
The K Parameter Trade-off
The choice of K fundamentally changes what the metric evaluates and must align with the user experience being designed.
- Small K (e.g., K=5): Evaluates the quality of the first screen or snippet. Critical for answer engines where only the top few chunks are fed to a generator.
- Large K (e.g., K=100): Evaluates the system's ability to find all relevant items, often used during evaluation-driven development to tune ANN index parameters.
- Trade-off: A larger K makes it easier to achieve high recall but increases latency and the computational cost of downstream re-ranking.
Relationship with ANN Search
Approximate Nearest Neighbor (ANN) algorithms like HNSW or DiskANN introduce a direct recall-performance trade-off.
- ANN Recall: In vector search, "recall" often refers to the proportion of true nearest neighbors found by the approximate algorithm compared to an exact brute-force search.
- Tuning: Increasing the
ef_searchparameter in HNSW improves ANN recall but increases query latency. - Impact: Low ANN recall directly caps the maximum achievable Recall@K for the overall retrieval pipeline, as relevant vectors are lost before any re-ranking occurs.
Limitations and Blind Spots
Recall@K has critical limitations that must be understood to avoid misleading evaluation results.
- Total Relevant Count Problem: The denominator requires knowing the absolute number of relevant items in the corpus, which is often unknown in large-scale production systems.
- Binary Relevance Assumption: The metric treats all relevant items as equally important, ignoring graded relevance where one document might be far more authoritative than another.
- Ignores Ranking Order: A system that places all relevant items at positions 90-100 receives the same Recall@100 score as one that places them at positions 1-10, masking poor ranking quality.
Role in Hybrid Retrieval Pipelines
Recall@K is the primary metric for evaluating the retrieval stage of a pipeline, before re-ranking and generation.
- High-Recall Retrieval: Modern Retrieval-Augmented Generation (RAG) systems often combine dense vector search and sparse BM25 using Reciprocal Rank Fusion (RRF) to maximize recall before a final cross-encoder re-ranker.
- Cascading Architecture: The retrieval stage optimizes for high recall (e.g., K=100), while the re-ranking stage optimizes for high precision at a smaller K (e.g., K=5).
- Evaluation: Recall@K is measured at the retrieval output, while metrics like Faithfulness or Answer Correctness evaluate the final generated output.
Practical Calculation Example
Consider a user query: "How do I configure a circuit breaker for a vector database connection?"
- Ground Truth: 8 relevant documents exist in the index covering circuit breaker patterns, connection pooling, and backpressure.
- System Output (Top 10): Returns 6 of the 8 relevant documents, plus 4 irrelevant ones.
- Result:
Recall@10 = 6 / 8 = 0.75 - Interpretation: The system found 75% of the available relevant information. The missing 2 documents might be due to poor chunking or an embedding model that failed to capture the semantic relationship between "circuit breaker" and "fault tolerance."
Recall@K vs. Related Retrieval Metrics
A comparison of Recall@K against other core information retrieval metrics used to evaluate the quality and completeness of search results.
| Metric | Recall@K | Precision@K | Mean Reciprocal Rank (MRR) | Normalized Discounted Cumulative Gain (NDCG) |
|---|---|---|---|---|
Primary Focus | Completeness of retrieval | Purity of top results | Rank of first relevant item | Overall ranking quality with graded relevance |
Core Question Answered | What fraction of all relevant items did I find? | What fraction of the top K results are relevant? | How high is the first relevant result ranked? | How good is the ranking, weighted by position? |
Sensitivity to K | Increases monotonically with K | Decreases as K grows if irrelevant items outnumber relevant ones | Insensitive to K beyond the first relevant hit | Sensitive to K; discounts contributions at lower ranks |
Handles Graded Relevance | ||||
Penalizes Irrelevant Items in Top K | ||||
Ideal Use Case | Legal e-discovery, literature review, high-recall search | Web search first page, featured snippets | Question answering, FAQ retrieval | Recommendation systems, search with multi-level relevance labels |
Value for K=10, 1 relevant doc in corpus of 100, retrieved at rank 5 | 1.0 (100%) | 0.1 (10%) | 0.2 (1/5) | 0.43 (IDCG-normalized) |
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.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the Recall@K evaluation metric, its calculation, and its role in optimizing retrieval-augmented generation and search systems.
Recall@K is an evaluation metric that measures the proportion of all relevant items within a dataset that are successfully retrieved in the top K results. It quantifies the completeness of a retrieval system. The calculation is straightforward: Recall@K = (Number of relevant items in top K results) / (Total number of relevant items in the entire dataset). For example, if a knowledge base contains 10 truly relevant documents for a query and a search system returns 6 of them within the top 20 results, the Recall@20 is 0.6 or 60%. This metric is critical in Retrieval-Augmented Generation (RAG) architectures, where failing to retrieve a relevant document means the language model can never see it, guaranteeing a poor or hallucinated answer regardless of the model's reasoning capabilities.
Related Terms
Core metrics and concepts used alongside Recall@K to evaluate the performance and completeness of retrieval pipelines.
Precision@K
The complementary metric to Recall@K, measuring the proportion of retrieved items that are relevant within the top K results. While Recall@K quantifies completeness, Precision@K quantifies signal-to-noise ratio. A system with high recall but low precision retrieves all relevant documents but buries them in irrelevant results, frustrating users and wasting context window tokens. The F1-Score is the harmonic mean of Precision and Recall, providing a single balanced metric.
Mean Reciprocal Rank (MRR)
An evaluation metric that focuses on the rank position of the first relevant item. MRR is calculated by averaging the reciprocal of the rank at which the first relevant document appears across a set of queries. A score of 1.0 means the first result was always relevant. This metric is critical for answer engine architectures where the top result is used directly for synthesis, making the position of the first correct answer more important than the total number of correct answers.
Normalized Discounted Cumulative Gain (NDCG)
A ranking-aware metric that accounts for graded relevance, not just binary relevance. NDCG assigns higher scores to relevant documents appearing at the top of the list and discounts documents further down. This is essential when relevance is not binary—for example, a document that perfectly answers a query is more valuable than one that is tangentially related. NDCG normalizes the score against an ideal ranking to produce a value between 0 and 1.
Hit Rate
A binary metric measuring whether at least one relevant document appears in the top K results. Unlike Recall@K, which counts all relevant documents, Hit Rate only checks for the presence of any relevant item. A Hit Rate of 1.0 at K=10 means every query had at least one relevant result in the top 10. This is a useful pass/fail signal for answer generation systems where a single good document is sufficient for synthesis.
ANN Recall Trade-off
The fundamental engineering tension between search speed and result accuracy in approximate nearest neighbor algorithms. Tuning ANN parameters like HNSW ef_search or IVF nprobe directly impacts Recall@K. A higher ef_search traverses more graph nodes, improving recall at the cost of increased latency. Production systems must balance this trade-off within their latency budget, often accepting 99% ANN recall to achieve sub-10ms query times.
Reciprocal Rank Fusion (RRF)
An algorithm for combining multiple ranked result lists into a single unified ranking. RRF scores each document by summing 1/(k + rank) across all retrieval sources, where k is a constant (typically 60). This elegantly handles the fusion of dense vector results, sparse BM25 results, and metadata-filtered results without requiring score normalization. The fused ranking directly impacts Recall@K by aggregating diverse retrieval signals.

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