How it works
Hallucinations come from the model's training: it learns to produce plausible-sounding text, not to verify facts. When asked about topics underrepresented in training, the model fills in plausible-but-wrong details. Mitigations: ground answers in retrieved context (RAG), require source citations, run automated fact-checks, and route low-confidence answers to humans.
Example
An agent without RAG asked 'What's the new feature in our v2.5 release?' might invent a feature based on what 'v2.5 release' typically contains. Same agent with RAG retrieves the actual release notes and answers correctly with a citation.
