"The RAG system is bad."

Fine, which part? A single end-to-end quality score is a diagnosis-free diagnostic. It tells you something is wrong and nothing about where, so teams default to fixing the layer they can see, which is the prompt. Weeks of prompt iteration later, retrieval was broken the whole time.

It fails in parts, so measure it in parts

A RAG pipeline is at least four systems wearing one interface, and they fail independently.

LayerThe question it answersExample metric
IngestionDid the right knowledge ever enter the index?source coverage
RetrievalDid the correct passage make the candidate set?recall@k
RankingDid it make the cut the model actually reads?MRR / precision@k
GroundingDid the answer stick to that evidence?supported-claim rate
CitationCan a reviewer verify each claim?valid citation rate

Diagnose in order, because failures masquerade

This is the part that saves the most time. Upstream failures disguise themselves as downstream ones.

If the right passage was never retrieved, everything after is irrelevant, and the symptom will look exactly like hallucination, because the model had nothing correct to work from and produced something plausible instead. A large share of "the model is making things up" tickets resolve to "recall was low and nobody was measuring it."

So work upstream to downstream. Was it in the index? Was it retrieved? Was it ranked highly enough to be read? Did the answer use it? Only when all four pass is a generation problem actually a generation problem.

The minimum viable setup

Fifty labelled questions. Each one records the question, the passage that should answer it, and what a good answer contains. Label the passage by document and section, or by the answer text, never by chunk ID, which changes every time you re-chunk.

The setup is fifty questions and per-layer metrics, run on every meaningful change (chunking strategy, embedding model, retrieval config, prompt). It takes an afternoon to build and it converts every subsequent argument into a measurement.

What it buys you specifically is that re-chunking stops being a gamble. Change the strategy, run the set, read the diff. Without it, every structural change to your pipeline is a leap of faith you find out about from users.

Where a small eval set misleads

At fifty questions each one is worth two percentage points, so a small delta between runs is noise: read which questions flipped before trusting the headline number. The set also ages, so add real production failures each time you run it and retire questions whose source document has gone.

About this explainer

Format
Explainer
Level
Practitioner
Read
2 min read
Published
Jun 21, 2026

Short mental models: one idea, why it matters, what to do about it.

Article · · 2 min read

Write the eval before you build the feature

With a model in the loop, you cannot tell whether a change helped unless you have defined what a good answer looks like first. Start with real cases and a check you can rerun.

Checklist · · 12 checks

RAG production-readiness checklist

Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.