Forward-deployed / Learning zone
RAG & vector databasesa Generative AI module
Lesson 05

Retrieval quality

TL;DR

The model's answer can only ever be as good as the passages it's handed — so retrieval quality is RAG quality. Two numbers frame it: recall (of the passages that could answer the question, how many did we retrieve?) and precision (of the passages we retrieved, how many were actually relevant?). They trade off, and which you favour is a product decision. Three techniques do most of the lifting to raise both: hybrid search (run keyword and semantic search together so each covers the other's blind spot), reranking (a slower, smarter model re-scores the top candidates so the genuinely-best passages rise to the top), and filtering (use metadata — recency, permissions, tenant — to exclude the wrong-but-similar). The non-negotiable underneath all of it: you cannot improve what you don't measure. A retrieval eval set — real questions with known-good passages — turns "the answers feel off" into "recall dropped on multi-part questions," which is the difference between a demo and a product.

🎯 For the product leader

Why it matters — This is where RAG features quietly succeed or fail. Two teams with the same model and vector DB ship wildly different products depending on retrieval quality — and the gap is invisible until you measure it or a customer hits it.

What it changes in your decisions — You make a retrieval eval set a launch requirement, not a nice-to-have; and you spend the improvement budget on hybrid + reranking + filtering before ever reaching for a bigger model.

Ask yourself — "What's our retrieval recall on real, hard questions — and is it on a dashboard, or are we guessing from a few demos?"

Risk if ignored — Silent, uneven quality: great on the questions you tested, confidently wrong on the ones you didn't, with no way to catch a regression before users do.

The mental model: two ways to be wrong

Retrieval fails in two opposite directions, and confusing them leads to fixing the wrong thing.

Retrieval quality

Two ways retrieval fails · each with its own downstream damage

A "good hit" isn't the only outcome — recall misses and precision misses fail differently.

A question · retriever returns top-k
Judge each passage: relevant & retrieved? relevant & missed? irrelevant & retrieved?
✓ Good hit
Relevant, retrieved

The answer is in the context, ready to use

✗ Recall miss
Relevant, MISSED

The answer existed in your data — retrieval didn't fetch it

→ Model says "I don't know" (best case) or hallucinates a fill-in
✗ Precision miss
Irrelevant, retrieved

Junk passages distract the model from the real answer

→ Model answers from the wrong passage — confidently, with a citation

You want high recall (don't miss the answer) and high precision (don't drown it in junk), and the techniques below push both — but when they conflict, you choose based on stakes.

Recall vs. precision: the product call

Retrieve more passages (bigger top-k, looser matching) and recall rises but precision falls — you catch the answer but also more junk. Retrieve fewer/tighter and precision rises but you risk missing the answer. Which to favour depends on the feature:

The full treatment — including grounding and citation metrics — lives in the retrieval evals spoke.

The three levers

A typical strong pipeline: hybrid retrieve ~50 candidates → filter by metadata → rerank to the top 5 → hand those to the model. Each stage is cheap relative to the trust it buys.

Why you must measure it

Retrieval quality is invisible to inspection — a feature can look great across every query you happen to try and fail on the long tail you didn't. The remedy is an eval set: a curated list of real questions, each tagged with the passage(s) that should be retrieved. Run it on every change and you get recall/precision as tracked numbers, catch regressions before users do, and can finally answer "did that change help?" objectively. This is the eval-driven discipline applied to retrieval, and it's the practice that most separates teams who think their RAG is good from teams who know.

Failure modes

Practitioner checklist