Your RAG assistant gives fluent, confident answers that are wrong. How do you find out whether retrieval or generation is at fault?
What they're testing: Whether you separate the pipeline into measurable stages instead of tweaking the prompt.
Worked answer
Split the failure in two with a small labelled set: 30 to 100 real questions where you know which document (or passage) holds the answer.
First, measure retrieval alone. For each question, check whether a correct passage appears in the top-k results (recall@k). If it doesn't, the generator never had a chance and prompt changes won't help.
Second, measure generation given perfect context. Feed the known-correct passage directly and grade the answer. If answers are still wrong, the problem is the prompt, the model, or the context format (passages too long, conflicting, missing metadata such as dates).
Then read the failures by hand and bucket them: the right chunk wasn't retrieved, it was retrieved but ranked below k, it was retrieved but cut off by chunking, or it was there and the model ignored or contradicted it. Each bucket has a different fix: embeddings or hybrid search, reranking, chunking, or grounding instructions and citations.
Finish by saying you'd keep that labelled set as a regression suite, so every later change is measured against it.
Likely follow-ups:
- How would you build the labelled set if you have no users yet?
- What k would you evaluate at, and why does it depend on the context budget?









