Recall at K
What Is Recall at K?
Recall at K, also written Recall@K, measures the share of all relevant items found in the top K results. It evaluates ranked results from search engines, recommendation systems, code search, and retrieval-augmented generation, or RAG. A relevant item helps answer a query, and K is the number of top-ranked results checked. Recall@K does not measure irrelevant results or whether a useful item ranks first.
How to Calculate Recall at K
Calculate the score using a known set of relevant results for each query.
- Define the documents, code files, products, or chunks relevant to a test query.
- Retrieve and rank results, then keep the first K items.
- Count relevant items in those results. These are true positives.
- Divide that count by all known relevant items. If a RAG question has four supporting chunks and the top five contain three, Recall@5 is 3 divided by 4, or 0.75.
Relevant items not retrieved are false negatives, which lower recall.
Recall at K vs Precision at K vs Hit Rate
These metrics answer different questions about ranked retrieval.
| Metric | Denominator | Question answered | Best use |
|---|---|---|---|
| Recall@K | All relevant items | Did the system find enough relevant results? | RAG, semantic search, code search |
| Precision@K | K retrieved items | How clean are the top results? | Search and recommendations |
| Hit@K | One query outcome | Did at least one relevant item appear? | Single-answer lookup tasks |
Recall@K treats a relevant item at rank 1 the same as one at rank K, so it does not reward better ordering within the window.
Benefits of Recall at K for Search and RAG Evaluation
Recall is useful when missing source material could produce an incomplete answer.
- It identifies relevant documents or chunks a retriever misses.
- It helps teams tune embeddings, query rewriting, filters, and candidate limits.
- It supports evaluation for recommendations, semantic search, code search, and RAG.
- It makes retrieval testing concrete before evaluating generated answer quality.
Practical Limits of Recall at K
A strong score does not guarantee a good user result.
- It depends on complete, accurate relevance labels, which can be difficult for broad queries.
- Increasing K can raise recall simply by returning more items.
- It ignores ordering among relevant items within K.
- High recall can add noisy context, slow retrieval, and use excess model tokens.
Choosing K and Reading the Score
Choose K based on the results a user sees or the chunks a downstream model can use well. Report several values, such as Recall@3, Recall@5, and Recall@10. Segment results by query type, and pair recall with precision and answer-quality checks. This approach helps when planning app design and development for AI features.
Recall at K in Emergent Apps
Teams building AI-powered search, knowledge bases, recommendation features, or RAG workflows in Emergent can define relevant test results before measuring Recall@K. This creates a repeatable way to validate retrieval as an app evolves. Explore related concepts in the Emergent glossary, then use recall with user testing to improve AI retrieval.
on Emergent today


