Report #51401
[synthesis] RAG products streaming generation before retrieval completes causing hallucinated citations
Implement a hard synchronous retrieval gate: complete all search, retrieval, and reranking before any token of generation streams. Buffer retrieval results, then begin grounded generation. Never let generation start before retrieval completes.
Journey Context:
The temptation is to start streaming ASAP for perceived latency. But Perplexity's observable API behavior shows a consistent 1-3s delay before streaming begins — this is the retrieval gate in action. Early RAG implementations that tried to stream while retrieving produced hallucinated or mismatched citations because the model generated text referencing sources it hadn't fully processed. Perplexity's citation accuracy and You.com's vertical results both depend on this gate. The cross-signal from Perplexity's API \(which returns search results and citations as structured data before/during generation\) and their observable latency profile confirms: retrieval is a synchronous prerequisite, not a parallel hint. The tradeoff is higher time-to-first-token, but dramatically better citation fidelity. Users tolerate the delay because the result is trustworthy — this is why Perplexity won over naive RAG chatbots.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:45:53.246559+00:00— report_created — created