When RAG Sounds Right but Retrieves Wrong
The answer may be fluent and confident while the system retrieved the wrong evidence. Retrieval quality is not reliably visible in the final prose—it has to be measured.
The risk
Retrieval-augmented generation gives an LLM external context before it answers. The common mental model is simple: retrieve relevant evidence, provide it to the model, then generate a grounded answer.
But there is an uncomfortable failure mode hidden inside that pipeline. The retriever may return a chunk that is highly similar to the question while still being the wrong evidence. The LLM can then do exactly what it was asked to do: reason carefully over that context and produce a polished answer.
A fluent answer is not evidence of good retrieval.
This matters because the user normally sees the answer—not the ranking behavior that produced its context. A response can therefore look trustworthy while hiding an upstream retrieval defect.
A simple example
Imagine an automotive knowledge system answering this question:
Question: What is the torque specification for this component on a 2020 vehicle with Engine A?
The knowledge base contains two service documents:
- Chunk A: 2020 model, Engine A — the correct specification.
- Chunk B: 2020 model, Engine B — nearly identical wording, but a different specification.
If Chunk B ranks first because its text is semantically similar, the model may faithfully summarize the wrong specification. The generation step can be excellent while the system-level answer is unsafe or incorrect.
Anatomy of the hidden failure
User Question
│
▼
Query / Embedding
│
▼
┌───────────────────┐
│ Retriever / Ranker│
└─────────┬─────────┘
│
│ selects wrong but similar chunk
▼
┌───────────────────┐
│ Wrong Evidence │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ LLM │
│ reasons fluently │
└─────────┬─────────┘
│
▼
Confident Answer
│
▼
Looks correct to the user
Why final-answer evaluation is not enough
Many teams evaluate RAG by looking only at the final answer. That is useful, but incomplete. A production RAG system contains at least two distinct systems that need evaluation:
- Retrieval: Did the system find the right evidence?
- Generation: Given that evidence, did the model produce the right answer?
There are additional dimensions too: groundedness, completeness, citation correctness, safety, latency, cost, and policy compliance. But retrieval deserves its own explicit scorecard.
The 2×2 matrix every RAG team should inspect
| Retrieval | Final Answer | Interpretation |
|---|---|---|
| Correct | Correct | Desired behavior. |
| Correct | Wrong | Generation, reasoning, prompt, or answer-composition problem. |
| Wrong | Wrong | Visible end-to-end failure. |
| Wrong | Correct | Dangerous coincidence. The system may pass an answer-only eval while the retrieval layer remains broken. |
The dangerous case: wrong retrieval, correct answer
The last row deserves special attention. A sufficiently capable model may answer correctly from prior model knowledge even when the retrieved evidence is irrelevant or incorrect. If your test checks only the final string, the test can pass.
That creates false confidence. The next question may involve a fact the model does not already know, a newly changed policy, a proprietary document, or a domain where small differences matter. The hidden retrieval defect then becomes a production incident.
Make retrieval measurable with a labeled set
A retrieval evaluation dataset gives you an expected evidence target for each test question. A simple record might look like this:
{
"question": "What is the approved procedure for condition X?",
"expected_document_ids": ["doc-2026-017"],
"expected_chunk_ids": ["chunk-017-04", "chunk-017-05"],
"relevance_labels": {
"chunk-017-04": 3,
"chunk-017-05": 2
},
"expected_facts": [
"step A",
"limit B"
],
"reference_answer": "..."
}
The exact schema will vary. The core principle does not: the test must know what evidence counts as relevant before it evaluates what the retriever returned.
Metrics that expose retrieval behavior
Hit Rate / Success@K
Did at least one relevant item appear in the top K results? This is easy to understand and useful for a first retrieval dashboard.
Recall@K
Of all relevant chunks for this question, how many appeared in the top K? This matters when the answer requires multiple pieces of evidence.
Precision@K
Of the K chunks retrieved, how many were actually relevant? Low precision wastes context and can distract generation.
MRR — Mean Reciprocal Rank
How high does the first relevant result appear? Retrieving the right chunk at rank 1 is usually more useful than retrieving it at rank 20.
NDCG
Useful when relevance is graded rather than binary. It rewards ranking the most useful evidence above merely related evidence.
Practical point: no single metric proves that retrieval is "good." Choose metrics based on the task. A question that needs one authoritative document behaves differently from a synthesis question that legitimately needs five chunks.
Retrieval failures are not only embedding failures
When retrieval quality drops, it is tempting to blame the embedding model. But the actual failure surface is much larger:
- Chunk boundaries split the evidence incorrectly.
- Metadata filters select the wrong product, tenant, date, jurisdiction, model year, or document type.
- Documents are stale or duplicated.
- The query transformation removes an important constraint.
- Hybrid weighting favors lexical similarity over the needed semantic distinction—or the reverse.
- Reranking prefers a near-match over the authoritative source.
- Top-K is too small to recover all required evidence.
- Access-control filtering silently removes the correct document.
Evaluation should become a release gate
Once retrieval has a labeled suite, it can become part of engineering change control. Before shipping a modification to chunking, embeddings, metadata, query rewriting, reranking, or knowledge ingestion, rerun the retrieval suite.
Code / KB / Retrieval Change
│
▼
Run Labeled Retrieval Suite
│
┌────┴────┐
│ │
Metrics Failure Analysis
│ │
└────┬────┘
▼
Run Generation / Groundedness Evals
│
▼
Compare Against Baseline
│
┌────┴────┐
│ │
PASS FAIL
│ │
Release Investigate
The point is not to freeze a system forever. The point is to make architectural changes observable. If a new chunking strategy improves one class of questions but destroys another, you should know before users discover it.
A practical evaluation stack
| Layer | Question | Example measurements |
|---|---|---|
| Retrieval | Did we find the right evidence? | Recall@K, Precision@K, MRR, NDCG, Hit Rate |
| Context | Is the supplied context relevant and sufficient? | Context relevance, coverage, duplication |
| Generation | Did the model answer correctly? | Correctness, completeness, task-specific scoring |
| Grounding | Is the answer supported by retrieved evidence? | Faithfulness, unsupported-claim rate |
| Citation | Do citations point to the evidence that actually supports the claim? | Citation precision, citation coverage |
| System | Can this operate in production? | Latency, cost, failure rate, safety, access control |
Production monitoring still matters
A labeled offline suite cannot represent every future user question. Production systems therefore need both offline evaluation and online signals. Useful signals include retrieval score distributions, zero-result queries, repeated reformulations, citation engagement, feedback, latency, document freshness, filter behavior, and query clusters that are underrepresented in the labeled set.
Those signals should feed the next version of the evaluation dataset. Evaluation is not a one-time project artifact; it is part of the system lifecycle.
Production Signals
│
▼
Failure Discovery
│
▼
New Labeled Examples
│
▼
Evaluation Dataset Improvement
│
▼
Future Release Testing
The engineering principle
If you cannot distinguish a retrieval failure from a generation failure, you do not yet have enough observability to trust the system.
RAG evaluation becomes much more useful when we stop asking only, "Did the model give the right answer?" and start asking:
- Did we retrieve the right evidence?
- Was the evidence ranked correctly?
- Was the context sufficient?
- Did the model stay grounded in it?
- Would the system still pass after an embedding, chunking, or architecture change?
Companion Repository
Reproduce the experiment
This article has a public engineering companion containing the labeled evaluation dataset, deterministic retriever, Recall@K, MRR, and NDCG implementations, automated tests, baseline results, and correct-vs-wrong retrieval examples.
| Metric | Score |
|---|---|
| Recall@3 | 1.000 |
| MRR | 0.938 |
| NDCG@3 | 0.964 |
These are toy baseline results from the included deterministic example corpus. They demonstrate the evaluation methodology and are not production RAG benchmark claims.
Perfect Recall@3 does not imply perfect ranking. The relevant evidence can appear somewhere in the top three while a distractor is ranked ahead of it—MRR and NDCG expose that ranking-quality problem. The companion repository's support-002 case shows this directly: the question concerns a "non-critical" incident, but the intentionally simple lexical retriever has no notion of negation, so it ranks the semantically similar "critical incident" chunk first. Recall@3 still succeeds because the right chunk appears somewhere in the top three, but MRR and NDCG@3 fall because it isn't ranked first. This toy retriever is a teaching example of why ranking-aware metrics matter, not a claim about production RAG performance.
Production checklist
- Maintain a labeled retrieval evaluation set.
- Version the dataset with the system.
- Track retrieval and generation metrics separately.
- Include hard negatives and near-duplicate documents.
- Test metadata and entitlement filters explicitly.
- Include temporal and version-sensitive cases.
- Compare changes against a stable baseline.
- Inspect regressions by query class, not only aggregate score.
- Add newly discovered production failures to the eval set.
- Use evaluation results as evidence in release decisions.
Closing thought
The strength of RAG is that an AI system can reason over external knowledge. That same architecture creates an important responsibility: we must test whether the right knowledge reached the model in the first place.
The answer may sound right. The citations may look professional. The model may be confident. None of those observations tells us whether retrieval worked.
Measure the evidence path, not just the final sentence.
References & further reading
- Claude Certified Architect – Professional Prep Course — inspiration for the evaluation question explored in this article.
- Future Terkeka articles in this series will cover labeled dataset design, Recall@K, MRR, NDCG, retrieval regression testing, citation evaluation, and CI/CD integration in more depth.
Article 02 — Why Answer Accuracy Is Not Retrieval Accuracy
A correct answer does not prove that retrieval worked. A reproducible experiment separates retrieval correctness, evidence support, answer correctness, and the overall RAG result.
Terkeka