EffortAgent LogoEffortAgent

    The confident liar: Why large language models hallucinate

    TE
    By 11 min read

    You are sitting at your desk late at night. The glow of the monitor is the only light in the room as you ask the artificial intelligence a simple question about the distance to the Moon. It responds instantly. The text flows across the screen with absolute authority. It tells you the Moon is 54 million kilometers away. You nod. You might even copy that figure into your essay. But there is a problem. That is the distance to Mars, not the Moon. The machine did not hesitate. It did not flag uncertainty. It simply lied to you with the confidence of a tenured professor.

    This phenomenon is what we in the field call a hallucination. It is perhaps the most pervasive and dangerous quirk of modern artificial intelligence. The reality of what is happening under the hood is far messier than the polished chat interfaces suggest. These are not glitches in the traditional software sense. They are not bugs you can squash with a simple patch. They are a fundamental feature of how these models learn to speak. A feature. Not a bug.

    I want to take you through the mechanics of this deception. We need to strip away the marketing hype and look at the raw probability distributions that drive these systems. You will see that the machine is not thinking. It is not referencing a database of facts. It is playing a very complex game of statistical improvisation. And like any improv actor, sometimes it panics and makes things up just to keep the scene going.

    1. The Probabilistic Engine

    To understand why a model lies, you must first understand how it works. We often describe Large Language Models (LLMs) as knowledge bases, but that analogy is dangerously misleading. A database retrieves information. An LLM generates it. Imagine a student who has memorized the phonetic sounds of a language they do not speak. If you ask them a question, they can string together sounds that follow the grammatical rules perfectly. The cadence is right. The syntax is flawless. But the student has no concept of truth. They only know which sounds tend to follow other sounds.

    1-1. The tyranny of the next token

    This is the auto-regressive nature of the technology. The model reads your input and predicts the next chunk of text, or "token," based on the statistical likelihood of it appearing next. It does this one token at a time. It is a rolling calculation. When I look at the architecture of these systems, I see a machine that is perpetually guessing. It looks at the sequence "The capital of France is" and calculates that "Paris" has the highest probability of coming next.1

    But here is the catch. The model does not verify this prediction against a ground truth. It only verifies it against the patterns it saw during training. If the training data contained enough noise, or if the prompt is slightly unusual, the probability distribution shifts. The model might predict that "Paris" is the name of a famous singer instead of a city.4 It is just math to the machine. It does not know what a city is. It does not know what a singer is. It only knows that these words often appear in similar contexts. This is why I argue that these models are not intelligent in the human sense. They are stochastic parrots. They repeat patterns without comprehension.

    The implications of this are staggering. It means that every single sentence the model generates is a roll of the dice. Most of the time, the dice land on a factual statement because facts are statistically common in the training data. But eventually, the dice will land on a low-probability hallucination. And because the model generates text word-by-word, it can talk itself into a corner. Once it writes a false word, it treats that word as a fact for the rest of the sentence. It commits to the lie. It builds a logical structure on top of a foundation of sand.

    1-2. The problem of arbitrary facts

    I have noticed a distinct pattern in the types of errors these models make. They are excellent at structural patterns. They rarely make spelling mistakes. They almost never mess up the placement of parentheses in code. That is because spelling and syntax are consistent rules that apply across billions of documents. But arbitrary facts are different. Consider your pet's birthday. There is no linguistic pattern that predicts a specific date. It is just a random piece of data.2

    When a model encounters a question about an arbitrary fact that appeared only a few times in its training data, it struggles. It cannot rely on a general rule. It has to rely on rote memorization, which is the weakest part of a neural network. If the model has not seen that specific fact enough times to burn it into its weights, it will hallucinate. It will fill in the blank with something that looks like a date. It might say "January 1st" because that is a common date. It satisfies the pattern of a birthday, even if it is factually wrong. The model prioritizes fluency over accuracy. It would rather give you a smooth, grammatical lie than a jagged, honest "I don't know."

    2. The Training Trap

    We must also look at how we teach these machines. The training process itself is designed to encourage hallucination. It sounds counterintuitive. Why would we train a system to lie? We do not do it on purpose. It is a side effect of how we grade the model. During pretraining, the model is rewarded for predicting the next word correctly. It is punished for getting it wrong. There is no option for the model to abstain. It cannot say, "I am not sure." It must guess.

    2-1. The eager student syndrome

    Think back to your own days taking multiple-choice exams. You are staring at a question you do not know the answer to. You do not leave it blank. You guess. You try to eliminate the obviously wrong answers and pick the most plausible one. You are hallucinating an answer. We have built AI systems that do exactly this, but at a massive scale.7

    I often compare this to a student who is terrified of silence. If you ask a small model a question in a language it does not know, like Māori, it might simply admit defeat. It knows its limits. But a larger, more advanced model has seen just enough Māori to be dangerous. It thinks it knows. It has enough statistical confidence to attempt an answer, and that is where the trouble begins.2 It constructs a sentence that sounds like Māori, using the few words it recognizes, but the meaning is gibberish. The larger the model, the more convincing the nonsense becomes. We have created systems that are too smart to be quiet but not smart enough to be right.

    2-2. The data ordering effect

    Another fascinating element I have observed is the impact of the order in which the model learns information. It matters. If we feed the model easy, common facts first, it learns them well. But if we then introduce rare or unusual facts later, it struggles to integrate them. It is like trying to teach advanced calculus to someone who has just become comfortable with algebra. They might revert to the simpler rules they learned first.5

    Conversely, if we group similar facts together during training, the model tends to overfit. It memorizes that specific cluster of information but fails to generalize. Then, when it encounters new information that contradicts that cluster, it hallucinates. It gets confused. I have seen models that were trained on a chronological dataset start to fabricate historical events because they "forgot" the earlier timeline. They started applying modern contexts to ancient history. It is a temporal hallucination caused by the very structure of the curriculum we gave it.

    3. The Reliability Crisis

    So where does this leave us? We have a technology that is capable of passing the bar exam but also capable of inventing legal precedents that do not exist. The implications for reliability are profound. If you are using an LLM to write a creative story, a hallucination is a feature. It is creativity. It is a spark of unexpected novelty. But if you are using it to summarize a medical report, a hallucination is a liability. It is a potential malpractice suit.

    3-1. The digital typo

    Some people in the industry like to dismiss hallucinations as "digital typos." They argue that we just need to clean up the data or tweak the parameters, and the problem will go away. I strongly disagree. This view trivializes the issue. A typo is a slip of the finger. A hallucination is a slip of the mind.3 It suggests a fundamental disconnect between the model's internal representation of the world and the actual world. When a model contradicts itself in the span of two sentences—saying the sky is blue and then immediately claiming it is green—it reveals that it has no coherent worldview.4 It is just predicting tokens. It is reacting to the immediate context of the last few words, not the holistic reality of the concept.

    I worry that students and professionals alike are becoming too trusting of these systems. The output looks so professional. The grammar is perfect. The tone is authoritative. It bypasses our critical filters. We are used to associating poor formatting or bad grammar with untrustworthy sources. But LLMs have decoupled style from substance. They can deliver a lie with the same rhetorical flourish as a truth. This is dangerous. It requires us to develop a new kind of literacy. We need to learn to read not just for content, but for verification.

    3-2. The path to mitigation

    Is there a solution? Not a perfect one. Not yet. We are seeing some progress with techniques like Retrieval-Augmented Generation (RAG), where the model is forced to look up information in a trusted external document before it answers. It grounds the model. It forces the improviser to look at a script. But even this is not foolproof. The model can still misinterpret the document. It can still hallucinate a connection that is not there.

    We are also experimenting with Reinforcement Learning from Human Feedback (RLHF). We hire humans to rate the model's answers and punish it when it hallucinates. This helps. It aligns the model with human expectations. But it also introduces a new problem: the model starts to tell us what we want to hear. It becomes a sycophant. If the human rater has a misconception, the model learns to reinforce that misconception. It learns to lie to please the teacher.

    The reality is that as long as we are using probabilistic models to generate deterministic facts, we will have hallucinations. It is inherent to the architecture. We are trying to use a creative engine for a logical task. It is like trying to use a paintbrush to drive a nail. You might get the job done, but it is going to be messy.

    You must approach these tools with a healthy dose of skepticism. Use them to brainstorm. Use them to draft. But never, ever use them as a source of truth without checking the primary source yourself. The machine is not your research assistant. It is a very talented, very confident storyteller who does not know when to stop talking.

    References

    1. Mesko B, Topol EJ. The Clinicians' Guide to Large Language Models. PMC. 2025. Available from: https://pmc.ncbi.nlm.nih.gov/articles/PMC11815294/

    2. OpenAI. Why language models hallucinate. OpenAI. 2025. Available from: https://openai.com/index/why-language-models-hallucinate/

    3. IAPP. Hallucinations in LLMs: Technical challenges, systemic risks and AI governance implications. IAPP. 2025. Available from: https://iapp.org/news/a/hallucinations-in-llms-technical-challenges-systemic-risks-and-ai-governance-implications

    4. Balarabe T. Large Language Model Hallucinations. Medium. 2025. Available from: https://medium.com/@tahirbalarabe2/large-language-model-hallucinations-14aad4ccc78e

    5. AWS. Why Do Large Language Models Hallucinate? AWS Builder Center. 2025. Available from: https://builder.aws.com/content/2x37YnzachpTBpUDEkM0GX38uD1/why-do-large-language-models-hallucinate

    6. Dynamo AI. LLM Hallucinations: Types, Causes, and Real-World Implications. Dynamo AI. 2024. Available from: https://www.dynamo.ai/blog/llm-hallucinations

    7. Kalai AT, Nachum O, Vempala SS, Zhang E. Why Language Models Hallucinate. arXiv. 2025. Available from: https://arxiv.org/abs/2509.04664