Inferensys

Glossary

Recall@K

Recall@K is an evaluation metric for retrieval and recommender systems that quantifies the fraction of all truly relevant items successfully surfaced within the top K positions of a ranked list.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
RETRIEVAL EVALUATION METRIC

What is Recall@K?

Recall@K quantifies a retrieval system's ability to surface all relevant items within the top K positions of a ranked list, measuring coverage rather than precision.

Recall@K is an evaluation metric that measures the proportion of all relevant items in a corpus that appear within the top K positions of a model's recommended list. It answers the question: "Of all the items the user would find useful, how many did we actually show them?" The metric is calculated by dividing the number of relevant items retrieved in the top K results by the total number of relevant items available, yielding a value between 0 and 1.

In deep learning recommender systems, Recall@K is the primary metric for evaluating the candidate generation stage, where the goal is to narrow a catalog of millions of items down to hundreds of viable candidates. A high Recall@K ensures the downstream ranking model has access to all potentially relevant items, while a low score indicates the retrieval model is missing good candidates entirely—a failure that no amount of ranking sophistication can recover from.

EVALUATION METRIC

Key Characteristics of Recall@K

Recall@K is a fundamental metric for evaluating retrieval and recommendation systems. It quantifies the proportion of all relevant items that appear within the top K positions of a ranked list, measuring a model's ability to surface all good candidates rather than just the best one.

01

Core Definition and Formula

Recall@K measures coverage—the fraction of all relevant items successfully retrieved in the top K results.

Formula: Recall@K = |{Relevant Items} ∩ {Top K Items}| / |{Relevant Items}|

  • Numerator: Number of relevant items that appear in the top K positions
  • Denominator: Total number of relevant items in the ground truth
  • Range: 0 to 1 (or 0% to 100%)
  • A score of 1.0 means all relevant items were surfaced within the top K
02

Recall vs. Precision at K

Recall@K and Precision@K are complementary metrics that trade off against each other.

  • Recall@K: "Did we find all the good stuff?" — prioritizes completeness
  • Precision@K: "How much of what we showed was good?" — prioritizes accuracy

A system returning 100 items to guarantee capturing all 5 relevant items has high recall but low precision. Conversely, a conservative system returning only 2 highly-confident items may have high precision but low recall.

03

Choosing the Right K Value

The choice of K dramatically impacts interpretation and should align with the user interface constraints.

  • K=5 or K=10: Common for top-N recommendation lists where screen real estate is limited
  • K=20 or K=50: Used in candidate retrieval stages before re-ranking
  • K=100+: Relevant for search engines measuring first-page recall

Rule of thumb: Match K to the number of items a user can realistically consume in a single viewport or interaction.

04

Relationship with NDCG

Recall@K treats all positions within K as equally valuable, unlike Normalized Discounted Cumulative Gain (NDCG) which applies a logarithmic position discount.

  • Recall@K: Binary relevance within top K — position 1 and position K are weighted identically
  • NDCG@K: Position-sensitive — a relevant item at rank 1 contributes more than one at rank K

When to prefer Recall@K: When the primary goal is ensuring no relevant item is missed, regardless of ordering within the retrieved set.

05

Use in Two-Stage Retrieval

Recall@K is the primary metric for candidate generation in two-stage recommender architectures.

Stage 1 (Candidate Retrieval):

  • Goal: Maximize Recall@K (typically K=100 to K=1000)
  • Model: Two-tower networks, ANN indices like HNSW
  • Tolerance: High recall is critical; precision is secondary

Stage 2 (Ranking):

  • Goal: Optimize NDCG or CTR
  • Model: Deep crossing networks, attention mechanisms
  • The ranker can only work with what the retriever surfaces — making Recall@K a hard upper bound on final system performance.
06

Limitations and Pitfalls

Recall@K has several known limitations that practitioners must account for:

  • Ignores ranking quality: A relevant item at position 1 and position K are treated identically
  • Requires complete relevance judgments: Missing annotations inflate the denominator, artificially lowering recall
  • Doesn't capture user satisfaction: A list with perfect recall may still deliver poor user experience if top positions are irrelevant
  • Scale sensitivity: As the total number of relevant items grows, achieving high recall becomes harder

Mitigation: Pair Recall@K with position-aware metrics like MRR or NDCG for a complete evaluation picture.

RETRIEVAL METRIC COMPARISON

Recall@K vs. Precision@K vs. NDCG

A technical comparison of three core ranking evaluation metrics used to assess the quality of top-K retrieved item lists in recommender systems and information retrieval.

MetricRecall@KPrecision@KNDCG

Primary Focus

Coverage of all relevant items

Density of relevant items in top-K

Quality of ranking order

Core Question

How many relevant items did we find?

How many items in the list are relevant?

How good is the ordering of relevant items?

Formula Essence

Relevant items in top-K / Total relevant items

Relevant items in top-K / K

DCG / IDCG with graded relevance

Sensitivity to K

Increases monotonically with larger K

Decreases as K grows if recall is low

Stabilizes as K approaches total relevant count

Handles Graded Relevance

Positional Weighting

Best Use Case

Candidate generation evaluation; ensuring no relevant items are missed

Top-of-funnel ranking; measuring list purity for limited display slots

Full-page ranking; evaluating overall ordering quality with multi-level relevance

Ignores Irrelevant Items

Common Thresholds

Recall@10, Recall@20, Recall@50

Precision@1, Precision@5, Precision@10

NDCG@5, NDCG@10, NDCG@20

METRIC DEEP DIVE

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Recall@K, its calculation, trade-offs, and role in evaluating retrieval systems.

Recall@K is an evaluation metric that measures the proportion of all relevant items that appear within the top K positions of a recommended list. It answers the question: "Of everything relevant, how much did we surface?"

The calculation is straightforward:

Recall@K = (Number of relevant items in top K) / (Total number of relevant items)

For example, if a user has 10 truly relevant items in the catalog and your model returns 6 of them in the top 20 results, the Recall@20 is 0.6 or 60%.

Key characteristics:

  • Range: 0 to 1 (or 0% to 100%)
  • Higher is always better
  • Monotonically increases with K — larger K values always yield equal or higher recall
  • Ignores the exact ranking within the top K positions

Recall@K is particularly critical in candidate generation stages of two-stage recommender systems, where the goal is to pass a comprehensive set of potentially relevant items to a downstream ranker. Missing a relevant item at this stage means it can never be recovered later.

Prasad Kumkar

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.