What Is a Hallucination in Large Language Models?
In large language models (LLMs) such as GPT-3 or Llama, a "hallucination" means the model generates information that sounds reasonable but is untrue. The model isn’t seeing visions — instead, it’s making things up.
For example, if you ask, “Who was the first person to eat ice cream on the moon?” an LLM might give you a specific astronaut, a date, and even a mission, presented with confidence. In reality, nobody has ever eaten ice cream on the moon. This isn’t just a simple mistake—it’s the model inventing facts.
Quick Refresher: How LLMs Generate Text
LLMs generate text by predicting one word at a time. They look at the words you give them (the prompt) and use patterns from their training data to guess the most likely next word. This process continues, word by word, until the output is finished.
Think of this like your phone’s predictive text.…