Retrieval quality measures whether the system found the right information for a user query. It can be scored with metrics like Recall@K, Precision@K, MRR, NDCG, context relevance, or human review.
Retrieval quality is often the ceiling for RAG quality. If the relevant source never appears in the context window, prompt changes can only do so much. Evaluate retrieval before blaming the generator.
It is a property of one step. Not the pipeline, not the answer, just the search: given this query against this index, how good is the set of passages that came back. Keeping that scope tight is what makes the number useful, because it is the only measurement in a RAG stack that is unaffected by which model you generate with.
Key takeaways
- Retrieval quality describes the retrieval step alone, which is why it is diagnostic. Answer quality mixes retrieval and generation together and cannot be.
- It has two halves that fail independently: did the needed passage come back at all, and how much irrelevant text came back with it.
- The ceiling argument is literal. Accuracy on questions whose answer was never retrieved is capped at whatever the model guesses correctly, and those guesses are the dangerous ones.
- Retrieval quality is measured over a query distribution, not a query. A retriever can be excellent on paraphrase and useless on identifiers, and the average hides it.
- The levers have an order. Confirm coverage first, then fix the query, then ranking, then chunk shape, and touch
klast.
Two halves of the same property
Sufficiency. Does the returned set contain what is needed to answer? For a single-fact question that means one passage. For “compare the 2024 and 2025 policies” it means two, and returning one is a partial retrieval that reads as a complete answer downstream. This half is recall-flavored and it sets the ceiling.
Precision. How much of what came back is actually about the question? Irrelevant passages consume the token budget a needed passage would have used, and they give a model material to answer from when it should have declined. Per-chunk scoring of this half is what context relevance measures.
The two trade against each other through k. Raising k almost always raises sufficiency and lowers precision. That trade is not symmetric in cost, which is why retrieve-many-then-rerank is the standard shape: retrieve wide enough to make the miss unlikely, then let a cross-encoder cut the set back down before it reaches the prompt.
How it is measured
With relevance labels, the ranking metric families do the work. Set-based metrics ask whether the right documents are in the top k at all. Order-aware metrics also reward putting them near the top, which matters because models attend unevenly across a long prompt and a correct passage in position nine is not worth one in position one. Precision@K, Recall@K, MRR, and NDCG each answer a different version of that question, and choosing among them is a separate topic.
Labels are the hard part. Building them means a human deciding, per query, which documents in a large corpus are relevant. Most teams label a few hundred queries as a fixed regression set and accept that it will not cover the tail.
Without labels, a judge model scores each retrieved chunk against the query directly. This scales to production traffic and needs no reference set, at the cost of inheriting the judge’s own error rate, so it wants calibration against human labels before you trust the trend. Knowing when an LLM judge is the right instrument matters more here than the specific prompt, because reference-free scoring is easy to run and easy to over-trust.
One caveat that undercuts both approaches: neither can tell you about a document that should exist and does not. Judges score what was retrieved. Ranking metrics score against a labeled set built from the corpus you have. Coverage gaps are invisible to both and only surface as a cluster of unanswerable questions in production traffic.
Levers that move it, in order
- Coverage. Confirm the answer is in the index before tuning anything. A surprising share of “bad retrieval” is a document that was never ingested, failed to parse, or is filtered out by a permission rule.
- Query construction. Rewriting a conversational fragment into a standalone question, or splitting a compound question into two searches, often beats swapping the embedding model.
- Ranking. A cross-encoder reranker over a wide candidate set is usually the largest single improvement available, since it reads query and passage together instead of comparing two independent vectors.
- Hybrid search. Dense embeddings handle paraphrase well and exact strings badly. Keyword search recovers the error codes, part numbers, and proper nouns that vector search rounds off.
- Chunk shape. If passages arrive truncated mid-argument or stripped of the heading that gave them meaning, the fix is upstream in chunking strategy.
kand the token budget. Worth tuning, but last. Raisingkto paper over a ranking problem buys accuracy with latency, cost, and dilution.
Why it belongs in production monitoring
Offline retrieval scores measure against a snapshot. Indexes go stale, documents get republished, and the questions users ask move with product launches and seasons. A retriever that scored well in March can degrade by June without a line of code changing.
That makes retrieval something to watch rather than certify. Scoring sampled live traffic and grouping by query intent surfaces the specific cluster that fell off, which is the level of detail an agent observability platform is built to expose. The alternative is finding out through support tickets. The stakes are why this gets attention: when retrieval returns nothing useful and the model answers anyway, the output is a hallucination that looks well-sourced, which is the failure mode RAG hallucination benchmarks exist to characterize.
FAQ
Is retrieval quality the same as context relevance?
They overlap and are not identical. Context relevance scores whether each retrieved chunk is relevant to the question, which is the precision half. Retrieval quality also covers sufficiency: whether everything needed came back. A retrieval that returns three perfectly relevant chunks and misses the fourth one the question required scores well on context relevance and poorly on retrieval quality.
What is a good Recall@K score?
There is no portable number, and any target quoted without a corpus attached is noise. What is comparable is your own retriever against itself over time, and your candidate configurations against each other on one fixed query set. What matters more than the score is the shape of the misses: a retriever at 0.85 that fails uniformly is a different problem from one at 0.85 that fails on every question about one product line.
Can I fix bad retrieval with a better prompt?
Only at the margin. Prompting can stop a model from answering when the context is insufficient, which converts a wrong answer into an honest refusal. That is a real improvement in safety and no improvement in coverage. If the passage is not in the context window, no instruction puts it there.
Should I raise k if retrieval is missing things?
Try it as a diagnostic before adopting it as a fix. If raising k from 5 to 20 makes the misses disappear, the needed passages were being retrieved and ranked poorly, which points at a reranker. If they are still missing at 50, the problem is embeddings, chunking, or coverage, and a larger k only adds noise and cost.