Recall@K is an information retrieval metric that measures the proportion of known relevant items successfully retrieved within the top K results returned by a system. It is defined as the number of relevant items found in the top K results divided by the total number of relevant items for that query. Unlike precision-focused metrics, Recall@K directly quantifies a system's ability to find all pertinent information, making it critical for applications like cross-modal retrieval where missing a relevant result is costly.
Glossary
Recall@K

What is Recall@K?
Recall@K is a core evaluation metric for information retrieval and recommendation systems, measuring how effectively a system surfaces all relevant items.
In practice, Recall@K is calculated per query and then averaged across a test set. A higher K value (e.g., Recall@100) evaluates the system's performance in a broader candidate pool, which is essential for assessing the recall stage before reranking. It is a fundamental benchmark for dense retrieval systems using approximate nearest neighbor (ANN) search and is often analyzed alongside precision@K to understand the trade-off between completeness and relevance in the ranked list.
Key Characteristics of Recall@K
Recall@K is a core metric for evaluating the completeness of an information retrieval or recommendation system's results. It answers the question: 'Did the system find all the relevant items?'
Core Definition & Formula
Recall@K measures the proportion of all relevant items in a dataset that are successfully retrieved within the top K results returned by a system. Its formula is:
Recall@K = (Number of relevant items in top K) / (Total number of relevant items in the corpus)
- A score of 1.0 (or 100%) means all relevant items were found in the top K.
- A score of 0.0 means none of the relevant items were in the top K.
- It is fundamentally a completeness metric, not a precision metric.
Interpretation & The K Parameter
The K parameter defines the operational scope of the evaluation, representing the number of results a user or downstream system will realistically consider.
- Low K (e.g., 1, 5, 10): Evaluates a system's ability to surface the most salient items first. This is critical for user-facing applications like search engines or chatbots where only the top few results are viewed.
- High K (e.g., 100, 1000): Evaluates the system's overall retrieval power, assessing whether it can find all relevant items, even if they are ranked lower. This is important for backend data gathering or exhaustive literature review systems.
- The choice of K is a business and UX decision that reflects the practical context of the application.
Relationship with Precision@K
Recall@K must be analyzed alongside its counterpart, Precision@K, to get a complete performance picture. They represent a classic trade-off.
- Precision@K = (Relevant items in top K) / K. Measures correctness or quality of the results shown.
- High Recall, Low Precision: The system finds most relevant items but buries them in many irrelevant ones (noisy results).
- High Precision, Low Recall: The top results are highly relevant, but many other relevant items are missed entirely.
- Optimizing a system often involves finding the right balance on the precision-recall curve for a given K value.
Use in Two-Stage Retrieval (Reranking)
Recall@K is pivotal in designing two-stage retrieval architectures, such as those used in Retrieval-Augmented Generation (RAG).
- First Stage (Retriever): A fast, approximate method (e.g., using a vector database with ANN search) fetches a large candidate set (e.g., top 100 or 1000). The goal here is high Recall@1000—to ensure all potentially relevant documents are in this pool.
- Second Stage (Reranker): A slower, more accurate model (like a cross-encoder) reranks the candidate set. This stage focuses on achieving high Precision@10 for the final presented results.
This architecture separates the recall objective from the precision objective, allowing each component to be optimized independently.
Practical Calculation & Example
Consider a corpus with 50 total relevant documents for a query. A retrieval system returns the following:
- Top 10 results (K=10): Contains 4 relevant documents.
- Top 100 results (K=100): Contains 45 relevant documents.
Calculations:
- Recall@10 = 4 / 50 = 0.08 (8%). The system missed 92% of relevant docs in the top 10.
- Recall@100 = 45 / 50 = 0.90 (90%). The system found 90% of all relevant docs in the top 100.
This shows the system has good overall recall but poor top-rank precision, a typical scenario where a reranking stage would be highly beneficial.
Limitations and Considerations
While essential, Recall@K has limitations that engineers must account for:
- Requires Ground Truth: It depends on a complete, labeled set of relevant items for each query, which can be expensive to create.
- Ignores Rank Order: It does not reward a system for ranking a relevant item at position 1 versus position K. Mean Reciprocal Rank (MRR) is better for measuring rank quality.
- Assumes Binary Relevance: It treats items as simply 'relevant' or 'not,' not accounting for degrees of relevance.
- Corpus-Dependent: The score is relative to the total relevant items in the evaluation corpus, which may not represent all possible relevant items in the world.
It is best used as one component of a multi-metric evaluation suite.
Recall@K vs. Other Retrieval Metrics
A comparison of Recall@K with other core metrics used to evaluate the performance of information retrieval and cross-modal search systems.
| Metric | Recall@K | Precision@K | Mean Average Precision (MAP) | Mean Reciprocal Rank (MRR) |
|---|---|---|---|---|
Core Definition | Proportion of all relevant items found in the top K results. | Proportion of the top K results that are relevant. | Average precision across multiple recall levels for a set of queries. | Average of the reciprocal rank of the first relevant result for a set of queries. |
Primary Focus | Completeness of retrieval (Recall). | Relevance of retrieved set (Precision). | Ranking quality across the entire result list. | Rank of the first relevant result. |
Formula (Single Query) | |Relevant ∩ Retrieved@K| / |Total Relevant| | |Relevant ∩ Retrieved@K| / K | Average of Precision@k values at each rank where a relevant item is found. | 1 / Rank of first relevant item. |
Value Range | 0 to 1 | 0 to 1 | 0 to 1 | 0 to 1 |
Interpretation | Higher is better. 1.0 means all relevant items are in the top K. | Higher is better. 1.0 means every item in the top K is relevant. | Higher is better. Penalizes relevant items that are ranked lower. | Higher is better. Heavily rewards systems where the first result is relevant. |
Use Case Strength | Critical when missing a relevant item is costly (e.g., legal e-discovery, safety-critical search). | Critical when result list space is limited and user attention is scarce (e.g., search engine first page). | Comprehensive measure for ranking tasks where the order of all relevant items matters (e.g., recommendation systems). | Best for tasks where the user's primary goal is to find a single correct answer quickly (e.g., question answering). |
Weakness | Ignores the rank order of relevant items within the top K and the presence of irrelevant items. | Ignores relevant items that are not in the top K. Varies heavily with K. | More computationally complex to calculate than point metrics like Recall@K. | Only considers the first relevant item; ignores the utility of additional relevant results. |
Sensitive to K | Yes. Increasing K generally increases Recall@K. | Yes. Increasing K generally decreases Precision@K. | No. Considers the entire ranking. | No. Based on the rank of the first relevant item, regardless of K (if K >= that rank). |
Common Use Cases for Recall@K
Recall@K is a fundamental metric for assessing the completeness of a retrieval system. It measures the proportion of all relevant items that are successfully found within the top K results returned. This section details its primary applications across machine learning and information retrieval.
Evaluating Search & Recommendation Systems
Recall@K is the primary metric for measuring the completeness of a retrieval system's output. It answers the critical question: "Of all the items the user would find relevant, how many did we actually surface?"
- Search Engines: Used to evaluate if a web search or product catalog search returns a comprehensive set of relevant results on the first page (e.g., Recall@10).
- Recommendation Systems: Measures if a 'Recommended for You' feed captures a user's broad interests, not just a narrow subset.
- Enterprise Document Retrieval: Assesses whether a legal or research database query retrieves all pertinent documents, crucial for compliance and due diligence.
Benchmarking Retrieval-Augmented Generation (RAG)
In Retrieval-Augmented Generation (RAG) pipelines, Recall@K directly measures the quality of the retrieval stage, which grounds the language model's response. Low recall means critical context is missing, leading to potential hallucinations or incomplete answers.
- Context Retrieval: Evaluates if the top K chunks retrieved from a vector database contain the necessary information to answer a user's query correctly.
- Pipeline Tuning: Used to compare different embedding models, chunking strategies, or vector index configurations (e.g., HNSW vs. IVF). Improving Recall@K is often the first step to improving overall RAG answer quality.
Optimizing Two-Stage Retrieval Architectures
Recall@K is essential for designing and tuning efficient two-stage retrieval systems, which use a fast, approximate first stage followed by an accurate, expensive second stage.
- First-Stage Tuning: The goal of the first stage (e.g., using ANN search with Faiss) is to achieve high Recall@100 or Recall@1000, ensuring the expensive cross-encoder reranker in the second stage has all relevant candidates to evaluate.
- Cost-Performance Trade-off: Engineers use Recall@K curves to select the optimal K for the first stage, balancing computational cost against the risk of missing relevant items.
Training & Validating Embedding Models
During the development of dual encoders or models that create a joint embedding space, Recall@K is a core training and validation metric.
- Contrastive Learning: Models trained with InfoNCE loss or triplet loss are validated by computing Recall@K on a held-out test set of query-item pairs.
- Modality Alignment: For vision-language models (VLMs), Recall@K measures how well the model aligns text and image embeddings in a shared space (e.g., text-to-image retrieval).
- Hyperparameter Search: Guides decisions on model architecture, embedding dimension, and the effectiveness of strategies like hard negative mining.
Auditing Vector Database & ANN Index Performance
When deploying a vector database (e.g., Pinecone, Weaviate) or an approximate nearest neighbor (ANN) index (e.g., HNSW, IVF in Faiss), Recall@K is the key operational metric for verifying search quality.
- Index Configuration: Comparing Recall@K for different index parameters (e.g., HNSW's
efConstructionandefSearch, IVF'snlistandnprobe). - Degradation Monitoring: Tracking Recall@K over time can detect performance drift due to data distribution shifts or index corruption.
- Recall vs. Latency Trade-off: Operational dashboards often plot Recall@K against query latency to find the optimal operating point for a production system.
Analyzing Cross-Modal Retrieval Systems
Recall@K is the standard metric for evaluating cross-modal retrieval tasks, where the query and target items are from different modalities (e.g., text-to-image, video-to-audio).
- Benchmark Datasets: Standardized benchmarks like MS-COCO (image captioning) and AudioCaps report text-to-image and text-to-audio retrieval performance using Recall@K (typically @1, @5, @10).
- Bridging the Modality Gap: It quantifies how well a model overcomes the modality gap, the phenomenon where embeddings from different modalities cluster separately. Higher recall indicates better-aligned multimodal representations.
Frequently Asked Questions
Recall@K is a core evaluation metric for information retrieval and recommendation systems, measuring the system's ability to find all relevant items. These questions address its calculation, interpretation, and role in production systems.
Recall@K is an information retrieval evaluation metric that measures the proportion of relevant items successfully retrieved within the top K results returned by a search or recommendation system.
It is calculated as:
codeRecall@K = (Number of relevant items in top K) / (Total number of relevant items for the query)
For example, if there are 10 relevant documents for a query and a system returns 4 of them within its top 5 results, the Recall@5 score is 0.4 (or 40%). This metric is crucial for assessing the comprehensiveness of a retrieval system, especially in applications where finding all relevant information is critical, such as in legal e-discovery, academic literature search, or diagnostic support systems. It is often evaluated alongside Precision@K, which measures the accuracy of the top K results.
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 a core metric for evaluating retrieval systems. Understanding these related concepts provides a complete picture of system performance, trade-offs, and implementation strategies.
Precision@K
Precision@K measures the exactness of a retrieval system by calculating the proportion of relevant items within the top K results. It answers: "Of the K items I retrieved, how many were correct?"
- Formula: (Number of relevant items in top K) / K
- Trade-off with Recall: A system optimized for high Precision@K may sacrifice Recall@K by being overly conservative, returning fewer total items to ensure those it does return are correct.
- Use Case: Critical in user-facing applications where screen space or user attention is limited, and showing irrelevant results damages trust.
Mean Average Precision (MAP)
Mean Average Precision (MAP) is a single-figure evaluation metric that summarizes the ranking quality across multiple queries by averaging the Average Precision for each query. It considers both the recall and precision at every position in the ranked list.
- Average Precision (AP): For a single query, calculates the precision at each rank where a relevant document is found, then averages these values.
- Interpretation: A higher MAP indicates the system consistently ranks relevant documents higher across all queries.
- Comparison to Recall@K: MAP is more sensitive to rank ordering than Recall@K, which only cares if a relevant item appears within the cutoff K.
Mean Reciprocal Rank (MRR)
Mean Reciprocal Rank (MRR) evaluates systems where only the first relevant result matters. It is the average of the reciprocal ranks of the first relevant item for a set of queries.
- Formula: MRR = (1 / |Q|) * Σ (1 / rank_i) where rank_i is the position of the first relevant item for query i.
- Use Case: Ideal for question-answering or factoid retrieval where there is a single, definitive answer. The user's goal is to find that one correct answer as quickly as possible.
- Contrast with Recall@K: MRR is unconcerned with how many other relevant items exist beyond the first. Recall@K is better suited for tasks requiring a set of relevant documents (e.g., research, product search).
Normalized Discounted Cumulative Gain (NDCG)
Normalized Discounted Cumulative Gain (NDCG) is a ranking metric that accounts for the graded relevance of items (e.g., ratings from 0 to 3) and applies a logarithmic discount based on their position in the list.
- Graded Relevance: Unlike Recall@K which treats items as binary (relevant/not), NDCG can handle items with different levels of usefulness.
- Discounting: Gains from relevant documents are reduced the lower they appear in the ranking, reflecting user behavior.
- Normalization: The score is divided by the Ideal DCG (the best possible ranking), producing a value between 0 and 1.
- Application: The standard metric for web search and recommendation systems where user satisfaction decays with rank.
Reranking
Reranking is a two-stage retrieval architecture designed to optimize metrics like Recall@K and Precision@K. A fast, initial retrieval stage (e.g., using a dual encoder and ANN search) fetches a large candidate set (K=1000). A slower, more accurate cross-encoder model then reorders these candidates.
- First Stage (Recall): Maximizes Recall@1000 to ensure all possible relevant items are in the candidate pool.
- Second Stage (Precision): The cross-encoder, which jointly processes the query and candidate, precisely scores the candidates to optimize the final top K ranking.
- System Design: This is the standard pattern for production retrieval systems, balancing the speed needed for large-scale search with the accuracy required for final results.
Hard Negative Mining
Hard Negative Mining is a critical training strategy for improving Recall@K in embedding-based retrieval models like dual encoders. It involves identifying and using in training negative examples that are semantically similar to a query but are not true positives.
- Problem: Random negatives are too easy for the model to distinguish, leading to poor generalization.
- Solution: Actively mine negatives that are close to the query in the embedding space (e.g., from the top of ANN search results during training).
- Impact: Forces the model to learn finer-grained, more discriminative features, directly improving its ability to rank true positives above challenging impostors, thereby boosting recall at critical early ranks.

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