hallucination

When an AI model generates factually incorrect, fabricated, or nonsensical information with apparent confidence. A key reliability challenge in LLMs.

Syntax

generative-ai
Mitigation: RAG + grounding + citations + temperature 0 + verification

Example

generative-ai
// Hallucination example:
// Prompt: "What did Einstein say about computers?"
// Hallucination: "Einstein said 'Computers are the new frontier of physics'"
// (He never said this — died 1955 before modern computing)

// Mitigation strategies:
// 1. Use RAG to ground answers in real documents
// 2. Ask model to cite sources
// 3. Use lower temperature for factual tasks
// 4. Add verification: "Only answer if you are certain"
// 5. Check against external knowledge bases