Skip to content
Preptima
hardScenarioDesignMidSeniorStaff

Your RAG system returns confident but wrong answers. How do you debug it?

Debug a RAG system with confident wrong answers by separating retrieval failure from generation failure. Check whether the gold passage was retrieved, then measure recall@k, reranking quality, faithfulness and abstention on a labelled eval set. It also connects retrieval evaluation to the point an interviewer is testing.

5 min readUpdated 2026-08-15

Answer

Short answer

To debug confident wrong RAG answers, first inspect whether the correct source passage was retrieved. If it was absent, fix chunking, hybrid retrieval, metadata filters or reranking. If it was present, fix generation with better context ordering, abstention, citations and faithfulness checks. Score retrieval and generation separately.

Was this answer helpful?

Likely follow-ups

  • How would you build the labelled eval set when you have no annotated queries at all?
  • Where exactly would you put a reranker, and what latency and cost does it add?
  • How do you handle two retrieved passages that contradict each other?
  • What would make you conclude that RAG is the wrong architecture and you need fine-tuning or an agentic tool call instead?

Related questions

Further reading

Related Topics