Anti-Patterns

Hallucinated Citations

Anti-pattern: let the model emit citations as free text and trust them.

Problem

Language models trained on academic and legal text are particularly fluent at producing authoritative-looking references that do not exist — invented authors, plausible but wrong digital object identifiers, real-sounding case names that no court ever decided. The citations look correct until somebody clicks them, and end users routinely do not click. In regulated domains like law and medicine, a single hallucinated citation that reaches a customer can trigger sanctions, retractions, or loss of trust the product never recovers from.

Solution

Don't. Wire citations to retrieved-source ids. See citation-streaming, naive-rag, contextual-retrieval. Validate URLs before display.

When to use

  • Never use this; cite an example only to label the failure mode.
  • Use citation-streaming, naive-rag, or contextual-retrieval to bind citations to retrieved-source ids.
  • Validate URLs and titles against retrieval results before display.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related