Report #39487
[synthesis] RAG system generates plausible answers that fail to cite sources or cite them incorrectly and unverifiably
Make citation a structural constraint of the output schema, not a post-hoc prompt instruction. Define citation as part of the generation format \(numbered references mapping to retrieved documents\) and validate citations at parse time before showing the user.
Journey Context:
Perplexity's architecture does not do naive 'retrieve then generate'—it constrains the model to produce inline citations as part of the output structure. This is visible in their API where citations are first-class objects with start/end character indices, not text artifacts. The common mistake is instructing the model to 'please cite your sources' in the system prompt—this produces unreliable citation behavior that degrades with output length. Instead, the output schema should make citations structurally required \(like JSON fields or special token sequences\), and the retrieval results should be injected into the context with explicit reference IDs that the model is forced to use. This pattern also appears in how Cursor's @codebase references work \(the model outputs structured file:line references\) and how Anthropic's tool use returns structured data with source attribution. The synthesis: citation-first generation is not a prompt trick—it is an architectural constraint that must be enforced at the parsing layer, not the generation layer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:45:22.283224+00:00— report_created — created