Citations and Grounding
Citations
Part of: Build a RAG System
Your RAG system gives a correct answer. A user asks, "Where did that come from?" If you can't point to the exact chunk, you don't have a trustworthy system, you have a confident black box that happened to be right this time. What it is A citation is a pointer from a claim in the answer back to the specific retrieved chunk that supports it. Grounding isn't just feeding the model context, it's making the answer traceable , so every fact can be checked against its source. Without citations, "the model used my documents" is an act of faith. With them, it's an auditable fact: claim - chunk - original document. This is the difference between a demo and a product. Lawyers, doctors, and analysts will not act on an answer they can't verify. Citations turn "trust me" into "here, look." How it works The trick: don't just paste chunks into the prompt, label each chunk with an ID , then instruct the model to tag every sentence with the ID of the chunk it drew from. After the model answers, you parse out those tags and verify each one points to a real, retrieved chunk. If the model emits a citation tag for a chunk it was never given, that is a citation hallucination : the answer invented its own
Challenge: The Citation Validator