Citations turn a RAG answer from "trust me" into "check for yourself". They also expose hallucinations.
Prompting for Citations
- Label each retrieved chunk with an identifier and source details.
- Instruct the model to cite the identifier after each claim.
- Ask it to quote the supporting passage for important facts.
- Tell it to say when the sources don't contain the answer.
Structured Citations
For reliability, ask for structured output — each claim paired with the IDs of supporting chunks — and render citations in the interface from that structure.
Verifying Citations
Models sometimes cite a source that doesn't actually support the claim. Checks include:
- confirming cited IDs exist in the provided context;
- checking quoted text appears verbatim in the source;
- using a second model to judge whether each cited passage supports its claim.
Display Matters
Link citations to the exact document and section, show the source title and date, and make it easy to open the original.
Measure Attribution Quality
In evaluation, score citation precision (cited sources support the claim) and recall (supported claims have citations).
Limits
A citation proves where text came from, not that the source is correct or current. Encourage users to check authoritative, up-to-date sources for important decisions.