FundamentalsBeginner
Hallucination
When an AI generates confident-sounding facts that are simply wrong.
Hallucination is when a language model produces output that is fluent and confident but factually incorrect, fabricated, or unsupported by its training data or context.
LLMs generate text by predicting the most plausible next token โ they have no internal fact-checker. The model doesn't "know" it's wrong; it's completing a pattern. This produces plausible-sounding citations, statistics, names, and dates that don't exist.
Common forms:
- Factual errors โ wrong dates, misattributed quotes, invented statistics
- Source fabrication โ citing papers, URLs, or people that don't exist
- Confident gaps โ answering questions outside its training with false certainty
- Intrinsic contradictions โ saying opposite things in the same response
Mitigation strategies:
- Ground the model with retrieval (RAG) โ give it real documents to cite
- Ask it to say "I don't know" when uncertain (works better than it sounds)
- Lower temperature for factual tasks
- Request sources and verify them independently
- Use models with web search or citations for current events
In plain terms
A very confident student who studied hard but misremembers details during the exam โ not lying, just pattern-matching to what 'sounds right' based on everything they've read.