Summary
A citation system grounds the model's answer in specific retrieved chunks and surfaces them to the user. Citations do three things: they let users verify, they make hallucinations visible, and they set the norm that outputs are traceable.
Objectives
- 01Design a citation schema (chunk_id → span).
- 02State the difference between inline and appended citations.
- 03Explain why unclickable citations are worse than none.
The Lesson
The design
Every retrieved chunk has an id and a source URL/page. The prompt instructs the model to cite chunk ids inline ([1], [2]). Post-process: replace ids with links back to sources. Users can click through to verify every claim.
Failure mode
Fake citations. Ungrounded models will invent chunk ids that look plausible. Mitigation: validate every citation the model outputs against the actual retrieved set; strip or flag anything that does not match.
Key Ideas
- Citations require both linking and validation.
- Unclickable, unvalidated citations are worse than none.