Why Generative AI Hallucinates and How to Design Around It
How large language models produce answers, why they invent facts with confidence and which workflow lets organizations use them safely
Key takeaways
A large language model writes by predicting the next token, one at a time. The same question can produce different answers, so one correct test run proves very little.
Hallucination is a by-product of how models are built and evaluated: training and most benchmarks reward a confident guess over an honest "I don't know".
Hallucinations cluster where information is rare and specific: names, detailed figures, citations, internal policies and recent events. That is exactly the information business work depends on.
Prompting, retrieval-augmented generation (RAG) and fine-tuning are three ways to bring company knowledge into a model. RAG suits facts that change often, but a Stanford study found commercial RAG legal tools still hallucinated in 17% to 33% of answers.
The durable defense is a workflow, not a tool: people frame the task before AI runs and verify the output after it, and responsibility never moves to the machine.
In 2023, a New York lawyer with more than thirty years of practice needed precedents for a personal injury suit against an airline. He asked ChatGPT. The tool returned a list of decisions complete with case names, courts, years and quotations that sounded thoroughly professional. He put them into a brief filed in federal court. Opposing counsel and the judge could not find any of those decisions, because they did not exist. The judge fined the lawyers and their firm a total of US$5,000 (Mata v. Avianca, Inc., 2023).
The most instructive part of the ruling is not the fine but the reasoning. The court did not ban AI. It said plainly that using an AI tool for assistance is not inherently improper. The lawyers' fault was abandoning their role as gatekeepers responsible for the accuracy of what they filed (Mata v. Avianca, Inc., 2023). In other words, the problem was not handing work to AI; it was handing it over and then not checking.
Similar stories have since appeared in courts, newsrooms and customer service desks around the world. They raise three questions every organization using these tools needs to answer: how does the technology produce its answers, why does it invent things and what can be done about it? Section 1 explains how a large language model works, in enough depth to predict most of its behavior. Section 2 examines hallucination: its mechanism, where it tends to appear and the forms it takes in organizations. Section 3 compares three ways of bringing company knowledge into a model: writing it into the prompt, retrieval-augmented generation and fine-tuning. Section 4 proposes a three-stage workflow for getting the benefits of AI without repeating the New York lawyers' mistake.
1. How large language models work
This section explains three ideas about large language models that are enough to see why they can make things up.
Generative AI refers to models that create new content such as text, images, audio or code, rather than only classifying data or making predictions about it. For text, the core technology is the large language model (LLM).
1.1. Everything is next-token prediction
A language model splits text into tokens, fragments that are often shorter than a word, and learns a single task: given a sequence of tokens, which token is most likely to come next. When it answers, the model generates one token at a time, appending each new token to the context before predicting the following one. The architecture that makes this efficient at scale is the Transformer, published in 2017, with its attention mechanism: when predicting, the model weighs every token in the context at once and works out which ones matter most (Vaswani et al., 2017). Parallel processing makes training on enormous amounts of text possible, and that scale produces abilities smaller models lack.
The practical consequence: because the model chooses each token according to probabilities, the same question can produce different answers each time it is asked. That is a design choice, not a bug, but it means that one correct test run proves very little.
1.2. An assistant trained in three stages
A model that has only learned to predict the next word is not yet an assistant. Ask it "What is the capital of France?" and it may reply with another question, because on the internet questions often come in lists. To turn it into an assistant, AI labs add two more stages of training, as shown in Figure 1.

In instruction tuning, the model learns from tens of thousands of sample questions and answers written by people. In reinforcement learning from human feedback (RLHF), human raters rank several of the model's answers and the model learns to produce answers that rank highly. The effect of these two stages is surprisingly large. In OpenAI's original study, raters preferred the answers of a 1.3-billion-parameter model that had been through this training over the answers of the 175-billion-parameter GPT-3 (Ouyang et al., 2022). These stages also shape how confidently the model answers, a point that returns in Section 2.
1.3. A model knows only what it has read
A model's knowledge is frozen at the moment its training data was collected. It does not know a company's return policy, this week's prices or the email a customer sent this morning, unless that information is placed in the context, the text a user supplies together with the question.
Language is a further limit. Models trained mainly on English data tend to perform worse in languages with less text online and in local business settings. This is one reason research groups in many countries build their own models; in Vietnam, for example, PhoGPT, a 3.7-billion-parameter model, was trained from scratch on 102 billion tokens of Vietnamese text (Nguyen et al., 2023). Organizations working outside English should test a tool in the language and on the material it will actually handle.
2. Hallucination: why machines are confidently wrong
This section explains the mechanism behind hallucination and then classifies the forms it most often takes in organizations.
Hallucination occurs when a model produces content that sounds plausible but is false: a court case that does not exist, an invented figure, a quotation attributed to the wrong author. It is the most important limitation of generative AI in business because false information arrives in exactly the same confident voice as true information.
2.1. The mechanism: models are rewarded for guessing
A 2025 analysis by researchers at OpenAI and Georgia Tech compares the model to a student taking a multiple-choice exam with no penalty for wrong answers: guessing may earn points, while a blank certainly earns nothing. The authors argue that both training and most model evaluations reward guessing over admitting uncertainty (Kalai et al., 2025). They also show that when a kind of fact appears very rarely in the training data, such as the birthday of a little-known person, the model statistically cannot tell a true statement from a false one, so hallucination arises naturally.
This mechanism gives a useful rule for predicting where trouble will appear: hallucinations cluster where information is rare and specific, such as uncommon names, detailed figures, citations with page numbers, internal regulations and recent events. Widely known facts and general reasoning are less prone to hallucination. Specific case law for an aviation lawsuit belongs squarely in the first group. Unfortunately, that is also the kind of information organizations need most.
The authors suggest changing how models are scored so that a well-placed "I don't know" earns more than a wrong guess (Kalai et al., 2025). Until that happens across the industry, users should assume the model will answer whether or not it knows.
2.2. Five forms of hallucination in organizations
Not all hallucinations look alike, and each form calls for its own method of detection. Table 1 lists five forms that are common when AI is used for office work.
The first three forms in Table 1 are easy to catch for anyone willing to open the source. The last two are harder: an invented policy sounds exactly like a real one, and a wrong step buried in a fluent explanation is easy to skim past.
3. Bringing company knowledge into the model
This section describes three ways of giving a model the internal information it lacks and then corrects a common misunderstanding about the second.
3.1. Three approaches: prompt, RAG and fine-tuning
The simplest approach is writing it into the prompt: pasting the return policy together with the question. The second is retrieval-augmented generation (RAG): the system searches the organization's document store for passages relevant to the question and places them in the context before the model answers. The idea was proposed in 2020 on the argument that combining a model's internal memory with an external knowledge store makes answers more specific and more factual (Lewis et al., 2020). The third approach is fine-tuning: training the model further on the organization's data to change how it writes or how it performs a particular kind of task. Figure 2 shows how RAG works.
The key point of Figure 2 is that RAG separates knowing from writing. The document store holds the facts and can be updated daily; the model only handles expression. Answer quality therefore depends heavily on retrieval: fetch the wrong passage and the answer is wrong, delivered with complete confidence. Table 2 compares the three approaches on five criteria.
The common mistake that Table 2 helps avoid is using fine-tuning to "teach" a model facts. Fine-tuning is good for teaching how to write and how to perform a task; for making a model know specific facts that change often, RAG is the right tool. For much everyday office work, the first approach is enough: a prompt with the relevant policy or price list attached solves most problems without any engineering.
3.2. RAG does not eliminate hallucination
Many vendors market RAG-based tools as "hallucination-free". A Stanford study tested commercial legal research tools built on RAG and found that they hallucinated less than GPT-4 used directly, but still hallucinated in 17% to 33% of answers (Magesh et al., 2025). The misunderstanding works like this: users see an answer accompanied by sources and assume the sources have been checked. In practice, the model can cite the right document and still misread its content, or the retrieval step can fetch the wrong passage. The way to avoid this trap is to treat the attached sources as addresses to check, not as evidence already checked.
4. Working with AI in three stages: Frame, Delegate, Verify
This section proposes a workflow that puts people at the two points where hallucination can be prevented or caught.
The fabricated case law and the mechanism of hallucination lead to the same conclusion: the value of a person working with AI does not lie in producing content, which machines do quickly and cheaply, but in the two stages around it. This workflow can be called Frame → Delegate → Verify.
Frame is a human task done before opening the tool: defining the problem, the criteria for success, the business context, the constraints and the internal information the AI will need. This is the moment to ask whether the task lies within AI's capability at all.
Delegate is the stage where AI executes against a clear brief: a role, the context, the documents it may use, a task broken into steps and an output format, together with an instruction for the AI to list its own assumptions and flag where it is uncertain. These instructions do not make AI stop being wrong, but they expose the places that need checking.
Verify is a human task done after the output arrives: checking every figure and source against the original documents and comparing the result with the criteria set during framing. The most important rule is never to verify an AI's answer by asking the same AI again, because that measures consistency, not truth. Table 3 summarizes the three stages.
Applied to the Avianca case, the workflow in Table 3 would have stopped the error at the Verify stage: it would have taken a single search of one of the case citations in a legal database. Verification matters even more when AI does not just draft text but answers customers directly. In 2022, an Air Canada chatbot gave a customer wrong information about the airline's bereavement fare policy. Before a tribunal, the airline argued that the chatbot was a separate entity responsible for its own words. The tribunal rejected this and ordered compensation, because a company is responsible for all information on its website, whether from a static page or a chatbot (Moffatt v. Air Canada, 2024).
When no person stands between the model and the customer, verification must move into the design: limiting the chatbot to approved documents, handing over to a person when a policy is not found and sampling conversations regularly. Delegating work to AI does not delegate responsibility.
Conclusion
Hallucination is not a bug that will soon be fixed but a consequence of how large language models are built: they predict the next token, they are rewarded for answering rather than staying silent and they know only what they have read. The practical rule is that hallucinations cluster in rare and specific information, precisely the information business work needs most.
Organizations have three ways to bring their own knowledge into a model. RAG is the best fit for facts that change often, but it does not eliminate hallucination. The most durable defense therefore lies in the workflow rather than the tool: people frame the task before opening the tool and verify the result afterward, while AI does the delegated work in between. The New York lawyers did not lose because they used AI; they lost because they skipped the last stage.
References
Kalai, A. T., Nachum, O., Vempala, S. S., & Zhang, E. (2025). Why language models hallucinate (arXiv:2509.04664). arXiv. https://arxiv.org/abs/2509.04664
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-T., Rocktäschel, T., Riedel, S., & Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in Neural Information Processing Systems, 33. https://arxiv.org/abs/2005.11401
Magesh, V., Surani, F., Dahl, M., Suzgun, M., Manning, C. D., & Ho, D. E. (2025). Hallucination-free? Assessing the reliability of leading AI legal research tools. Journal of Empirical Legal Studies, 22(2), 216–242. https://doi.org/10.1111/jels.12413
Mata v. Avianca, Inc., 678 F. Supp. 3d 443 (S.D.N.Y. 2023). https://www.courts.ri.gov/PDF/Mata%20v.%20Avianca%20Inc.pdf
Moffatt v. Air Canada, 2024 BCCRT 149. https://decisions.civilresolutionbc.ca/crt/crtd/en/525448/1/document.do
Nguyen, D. Q., Nguyen, L. T., Tran, C., Nguyen, D. N., Phung, D., & Bui, H. (2023). PhoGPT: Generative pre-training for Vietnamese (arXiv:2311.02945). arXiv. https://arxiv.org/abs/2311.02945
Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C. L., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35. https://arxiv.org/abs/2203.02155
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30. https://arxiv.org/abs/1706.03762



Discussion about this post