Skip to content
AI-Native PM

Why hallucinations are context failures, not model failures

Chapter 1 of 8 in Context & Memory · 18 min

Your support bot answers a refund question with complete confidence: returns accepted within 60 days, full refund, no questions asked. The policy changed last quarter to 30 days, and the customer posts a screenshot of the bot's answer next to the checkout page that says otherwise. In the postmortem someone says the model hallucinated, so the team swaps in the newest model, its demo answers look sharper, and everyone agrees the problem is fixed. Within days the bot makes the same 60-day promise to another customer, who also posts a screenshot. The swap changed nothing about last year's help-center export, which the product's lookup step still pulls up for every policy question, so each new model is handed the same out-of-date document and answers from it, more fluently each time.

This chapter opens the part of The Frontier about what your product knows and remembers, and it starts with the most familiar failure in AI products, which teams usually blame on the wrong component.

Three kinds of hallucination: fabrication, staleness, and loss

A hallucination, the industry word for a confident answer with no basis in fact, comes in three kinds. The diagram below calls them three costumes, because they look like three different failures while all three usually have the same cause. Telling them apart is the first diagnostic skill in this part.

  • Fabrication: the model produced an answer when none of the facts it needed were in its context. The context is everything your product sends the model on one call. Ask a research assistant for papers on a narrow topic, and it can return a citation for a paper that does not exist, with a plausible author list and a real-sounding journal. Its context held nothing about any real paper, so it produced the text that was statistically most likely for the request.
  • Staleness: the model was given facts that used to be true. The support bot in the opening scene is the standard example. The lookup worked, the document was real, and the 60-day policy in it was accurate on the day the help center was exported. The model has only the text it was given and no way to check whether a fact is still current, so it treats a fact that was true last year exactly like one that is true today.
  • Loss: the product had the right fact, but it never made it into the answer. A meeting notetaker processes a ninety-minute meeting in which the group reverses a decision in the final ten minutes, and the summary reports the earlier decision. Either the reversal was left out of the text sent to the model call that wrote the summary, or it sat so deep in a long transcript that it had no effect on the summary. Research on long contexts supports this: models use facts placed at the start and end of a long context far more reliably than facts in the middle.

All three get filed in the bug tracker as "the model got it wrong," but each needs a different fix, and none of those fixes is a different model. The research assistant needed a real index of published papers to search, the support bot needed last quarter's policy instead of last year's, and the notetaker needed the reversal included in what the final summary call was given.

A hallucination is usually a supply problem: your product did not give the model the facts it needed, and the model produced an answer anyway.

Fix the supply of facts, not the model

Of everything in your product, the model is the component you control least. The provider trains it, versions it, and retires it, and you choose from the models it offers, a decision we covered in Choose the model you ship. The context is the opposite. Models read text in tokens, small chunks a few characters long that providers also bill by, and every token the model reads on a call is there because your product put it there: the sources you connected, the records the product stored, the documents retrieval selected, the instructions you wrote. When an answer goes wrong, the model is the part you can only swap, and the context is the part you can actually fix.

This difference is why it pays to treat hallucinations as context failures. A team that treats them as model failures keeps upgrading to newer models and keeps its bugs. A team that treats them as context failures repairs the supply of facts, and that reduces all three kinds at once, because in each kind the model was given the wrong material on that call.

The knowledge supply chain

To repair the supply, it helps to picture it as a chain. A fact starts at a source (a policy page, a CRM record, a meeting transcript). It is prepared for lookup in an index (the structure that makes a large pile of documents searchable in an instant). When a user asks a question, retrieval (the lookup step, labeled RETRIEVE in the diagram) picks the facts that look relevant. Those facts go into the window next to the user's question (window is short for context window, the space that holds the context for one call), and the model writes the answer from what is in the window. Each kind of hallucination is a break at a specific link, which is why sorting them is useful: once you know the kind, you know which link to check.

  • Fabrication is a break at the source or at retrieval. Either the fact was never recorded anywhere the product can reach, or the lookup missed it and the product answered anyway.
  • Staleness is a break at the source or the index. The fact was recorded once, then it changed in the real world, and nothing recorded the new version.
  • Loss is a break at the window. The fact made it into the window but was pushed out by newer material, or it sat in the middle of a long context, where models use facts least reliably.

The diagram marks one break for each kind: STALE at the source (staleness), MISSED at retrieval (fabrication), and LOST in the window (loss).

Every answer built from your product's facts depends on a knowledge supply chain, the path a fact takes from source to index to retrieval to window to answer, and each kind of hallucination is a break at one specific link.

Context engineering: deciding what the model is given on each call

The industry has settled on a term for managing this supply: context engineering, which means deciding what the model is given on every call. The term covers two kinds of work, and this part teaches one of them. The technical half (embeddings, chunk sizes, vector databases) belongs to your engineers, and the chapters ahead explain enough of it for you to take part in those conversations. The decisions half belongs to you: which documents count as the truth, what the product stores about a user and for how long, which fact wins when two sources disagree, how much of the window each kind of material gets, and what evidence shows that an answer is based on the facts the model was given. Those are product decisions with consequences customers can see, and they are yours to make.

If you worked through Give the model the facts it wasn't trained on, you have already run the entire supply chain by hand, pasting the document into the prompt yourself. In this part you build the version that runs without you, at production volume.

What this part covers

The chapters follow the supply chain link by link. In Retrieval: let the product look things up before it answers you build the basic lookup step, and in The search stack: match the retrieval method to the question you choose the search method behind it. Memory: decide what your product remembers covers what the product stores across sessions, Context budgets: fit the right facts into a finite window covers how to manage the window itself, and Freshness and conflicts: govern the knowledge you answer from covers how to keep the sources current and consistent. In Grounding evals: prove the answer stands on the facts you measure whether answers are supported by the sources the model was given, and the part ends when you write your Knowledge Charter and ship a product that knows its facts.

Try it now

In this drill, which takes about 15 minutes, you practice the diagnosis you will use for the rest of the part.

Get a wrong answer to study. Pick one wrong answer you have personally seen a real AI product give with confidence. If nothing comes to mind, produce one: ask a product you use about its own newest feature, released in the last month or two, and there is a fair chance the answer describes the product as it stood when the model was trained.

Reconstruct what the model was probably given. List what was likely in the window on that call: the system instructions, any retrieved documents, and the conversation up to that point. You are estimating from the outside instead of checking logs, and an estimate is enough for this drill.

Decide which kind it is. If nothing relevant could have been available, call it fabrication. If something relevant was available but outdated, call it staleness. If the correct fact appeared earlier in the conversation, or is clearly in the product's own records, but it did not make it into the answer, call it loss.

Find the broken link. Place the failure on the chain (source, index, retrieval, window, or answer) and write one sentence explaining why.

Write the supply fix. Write one sentence that says what the supply chain should have delivered and how, for example "re-export the help center on a weekly schedule" or "retrieve the release notes before answering any feature question." Keep the sentence, because in the next chapter you start building the machinery that carries it out.

Chapter Summary

  • A hallucination is a confident answer the model produces without the facts it needed, and it is usually a failure to supply those facts, not a failure of the model.
  • Hallucinations come in three kinds: fabrication (the model had none of the facts it needed), staleness (the model was given facts that used to be true), and loss (the product had the right fact, but it never made it into the answer).
  • The model is the component you control least, and the context is the component you control most, so fixing the supply of facts fixes all three kinds at once.
  • Every answer depends on a knowledge supply chain, from source to index to retrieval to window to answer, and each kind of hallucination is a break at a specific link.
  • Swapping models does not repair a broken supply chain, so read the exact context a failing answer was built from before you blame the model.
  • Deciding what the model is given on every call is called context engineering. In this part you learn the half of it that is product decisions, not the technical half.
  • You build the first link, the lookup step, in Retrieval: let the product look things up before it answers.

Sources

  • Lewis, P., Perez, E., Piktus, A., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS 2020.
  • Liu, N. F., Lin, K., Hewitt, J., et al. (2023). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics.
  • Anthropic engineering blog (2025). Effective context engineering for AI agents.
  • Anthropic and OpenAI context window and retrieval documentation (last verified July 2026).