You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Every AI tool you use — ChatGPT, Claude, Gemini, or any other — will sometimes produce output that is confidently, fluently, and completely wrong. This is not a bug that will be fixed in the next update. It is a fundamental characteristic of how large language models work.
Understanding when and why AI gets things wrong is arguably the most important skill in prompt engineering. A user who trusts AI blindly is more dangerous than a user who does not use AI at all — because they will act on false information with the confidence that a sophisticated AI tool has validated it.
In the AI context, a hallucination is when the model generates output that is not grounded in reality — fabricated facts, invented citations, made-up events, or incorrect information presented with the same fluency and confidence as accurate information.
The term "hallucination" is somewhat misleading because it implies the model is "seeing things that are not there." What is actually happening is simpler: the model is predicting the most statistically likely next tokens, and sometimes the most likely-sounding text is not factually accurate.
Remember the core mechanism: LLMs predict the next token based on statistical patterns. They do not:
When the model encounters a prompt about a topic, it generates a response based on patterns in its training data. If the training data contains many examples of confident, detailed text about similar topics, the model will generate confident, detailed text — even if the specific details are fabricated.
Think of it this way: The model is not trying to be accurate. It is trying to produce text that looks like the kind of text a helpful, knowledgeable assistant would produce. These are not the same thing.
The model states something specific that is simply not true.
Example: "The Eiffel Tower was designed by Alexandre Gustave Eiffel and completed in 1887."
The architect is correct, but the completion date is wrong — it was completed in 1889. The model generated a plausible-sounding year that is close to the real one.
As discussed in Lesson 4, the model generates academic-looking citations for papers that do not exist. This is one of the most common and dangerous types of hallucination.
The model generates text that sounds reasonable and uses correct-seeming logic, but the underlying claims are wrong.
Example: If asked about a fictional law or policy, the model might generate a detailed analysis of its provisions, history, and implications — all fabricated but internally consistent and convincing.
LLMs have a knowledge cutoff — a date beyond which they have no training data. If you ask about events after the cutoff, the model will either say it does not know (if properly aligned) or generate a plausible-sounding but fabricated answer.
Even for events before the cutoff, the model's information may be outdated. Scientific consensus evolves, laws change, statistics are updated, and companies rebrand.
The model may present uncertain or debated information as settled fact. If researchers disagree about a topic, the model might present one position as the definitive answer without acknowledging the debate.
The model blends real information from different sources, creating a composite that is inaccurate. For example, it might attribute a real quote to the wrong person, or combine details from two different studies into a single fabricated study.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.