Skip to content
Klay

Why LLMs hallucinate

After this lesson you can: Explain hallucination as a property of the objective, not a bug to be patched.

First: Pretraining, fine-tuning and RLHF

Watch

Notes

An LLM is trained to predict likely next tokens, not to maintain a database of true statements. During pretraining it learns statistical patterns in text; during SFT and RLHF it is shaped to produce answers humans prefer. None of those objectives directly says “only answer when you know” or “verify every claim against reality.” So hallucination is not a surprising edge case. It is a natural failure mode of a system optimized to generate plausible continuations.

Unlock the full lesson notes, the exercises and the graded checkpoint - ₹5,000 once.