Skip to content
Preptima
hardScenarioDesignMidSeniorStaff

Your RAG assistant cites the wrong document, and sounds completely sure of itself. How do you find which stage failed?

Replay a wrong citation stage by stage: does the pointer resolve to the passage the model saw, does that passage support the claim, did the right document survive reranking, and did retrieval find it at all. A golden set with gold document ids and supporting spans turns each check into a per-stage metric.

5 min readUpdated 2026-10-10

Answer

Short answer

A wrong citation is a trace, so replay it. Check four things for that one request, in order: does the citation resolve to the passage the model was actually shown, does that passage support the claim, did the right document survive reranking, and did retrieval find it at all. Each failed check blames a different stage of the RAG pipeline. A golden set with gold document ids and supporting spans then turns each check into a metric you can track.

Was this answer helpful?

Likely follow-ups

  • The cited passage supports the claim but belongs to an older version of the policy. Which stage owns that bug?
  • How would you score citation precision automatically, and where would you still need a human label?
  • The model cites passage 3 and your interface shows a different document. What do you inspect first?
  • When would you stop letting the model choose citations and assign them in code after generation instead?

Related questions