How do I enforce citations and sources in outputs?
Use retrieval and require inline citations linked to source snippets. Tell the model to separate facts from commentary and to refuse unsupported claims. Validate that citations exist wherever claims are made. If missing, auto-retry with stricter instructions.
In practice
Keep source chunks short and relevant so citations are precise.
Where to start
- [01]Implement RAG with snippet IDs.
- [02]Add a ‘facts vs. commentary’ structure.
- [03]Validate citation presence automatically.
- [04]Escalate uncited claims to human review.
citation promptingsource grounded outputsreference enforcement