"The model makes things up" is close, but it is not precise enough to be useful. A hallucination is confident output that is not supported by the facts or by the source the model was given. Getting the definition right helps you pick the right fix later.
The key word is confident#
The model does not signal doubt. It states something wrong in the same calm tone it uses for something right.
That is why hallucinations are risky. A hedged answer warns you to check it, but a confident wrong answer looks the same as a correct one. The cause sits in next-token prediction: the model picks a likely-sounding continuation, and a likely-sounding falsehood reads just as smoothly as a truth.
Two flavors#
There are two kinds of hallucination, and they fail against different things.
| Faithfulness | Factuality | |
|---|---|---|
| What it means | The model contradicts or goes beyond the source it was given | The model is wrong about the world, with no source involved |
| Example | You ask for a summary of a document and it adds claims the document never makes, or contradicts what it says | It invents a fact, a person, a citation or a function that does not exist |
| Who cares most | Anyone building on documents, especially a RAG system | Anyone using a general-purpose assistant |
Faithfulness#
Faithfulness is about staying inside the text you handed over. You give the model a document and ask for a summary. If the summary includes a claim the document does not contain, that is a faithfulness hallucination, and so is a claim that contradicts the document.
In a RAG (retrieval-augmented generation) system, you retrieve relevant documents and put them in the prompt. Faithfulness is what you mostly care about there: did the model stay within what the retrieved documents actually say?
Factuality#
Factuality is about the world, independent of any source. The model invents something that does not exist, such as a person, a citation or a function name. Nothing in the prompt caused the error, so you cannot find it by comparing against a document.
In a general-purpose assistant, factuality matters too, since users ask open questions with no source attached.
Short line#
A hallucination is confident output that the facts or the given source do not support. Faithfulness means staying within the source, and factuality means being right about the world.
Key takeaways#
- A hallucination is confident output not supported by the facts or by the source the model was given.
- Confident is the defining word: the model gives no signal that it is unsure.
- Faithfulness hallucination: the model contradicts or goes beyond the source you gave it.
- Factuality hallucination: the model is wrong about the world, such as an invented fact, person, citation or function.
- In a RAG system, faithfulness matters most. In a general assistant, factuality matters too.