Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Glossary › Hallucination

What is hallucination?

A fluent, confident statement from a model that is not true. It follows from always choosing a likely next token, whether or not the facts are known.

Where it is taught

Why models make things up. A language model is built to continue text plausibly, not to check facts. Four pieces of maths from this course explain why a confident wrong answer is a natural result.

What the lesson leaves you with

  • A softmax must always choose something, so the model answers even when it has nothing to go on.
  • Training rewards likely text. Likely and true agree for common facts and part ways for rare ones.
  • Errors compound, because each token is conditioned on the ones before it.
Open the lesson

Questions

What is hallucination?
A fluent, confident statement from a model that is not true. It follows from always choosing a likely next token, whether or not the facts are known.
Where is hallucination used in AI?
A language model is built to continue text plausibly, not to check facts. Four pieces of maths from this course explain why a confident wrong answer is a natural result.
What is the key idea to remember about hallucination?
A softmax must always choose something, so the model answers even when it has nothing to go on.
Where can I learn hallucination step by step?
In the lesson “Why models make things up” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.

Related terms

  • Context window
  • Fine-tuning
  • Pre-training
  • Prompt
  • Retrieval