Each glowing blue point is a "grounded fact" — a chunk of verified knowledge the model could retrieve (RAG corpus / ground truth). The traveling particle is the model's current generation step: at every token it takes a small step that is part random (creativity) and part pulled toward the nearest grounded fact (retrieval grounding). When the path strays too far from every known fact, that segment is unsupported by evidence — a hallucination — and turns red.
Δp = T·rand_dir − G·(p − f_nearest)
faithful if |p − f_nearest| ≤ R
hallucinating if |p − f_nearest| > R
fact-check (on): every few tokens, pull a hallucinating p toward f_nearest by 60%
- Temperature (T) — scales the random component of each step; higher temperature means more creative, less predictable output, and a higher chance of drifting away from grounded facts.
- RAG grounding strength (G) — how strongly retrieval-augmented generation pulls each step toward the nearest verified fact; raising it keeps the path close to the knowledge base, the way real RAG systems reduce hallucination by conditioning on retrieved documents.
- Fact-checking — simulates a Constitutional-AI / RLHF-style self-critique pass: every few tokens it checks whether the current point is hallucinating and, if so, snaps it back toward the nearest verified fact.
- Grounding score — a live faithfulness estimate, ≈ 100%·e^(−d/R) where d is the distance to the nearest grounded fact.
Real-world relevance: this is exactly the trade-off behind modern LLM reliability work — sampling temperature controls how far a model is willing to wander from evidence, RAG anchors generation to retrieved sources, and RLHF / Constitutional AI / fact-checking passes act as a correction step that pulls ungrounded claims back toward what can actually be verified.