01 FoundationsLesson 2 of 610 minBeginner
What an LLM is, and why it makes things up
- + customer
- + text of the call
- + LLM
The diagram shows: Customer (in the store chat), The text of the call (everything the model reads) and LLM (predicts the next piece).
Highlighted: The text of the call.
Customer sends to The text of the call carrying "where is 4821?".
The text of the call sends to LLM.
Added: customer. Added: text of the call. Added: LLM.
Step 1 of 9: "Where is my order 4821?"
- Where what the model knows comes from
- How it writes: one piece at a time
- Why the same question gives different answers
- Why data in the text changes the answer
- Why it makes things up with confidence
Answers about orders with and without the order data in the text: how many make up a status, in the store's simple conversations
Coming soon: I will measure this on the example agent and publish the number with the report.
The whole lesson as textEvery step, to read at once, search or print.
"Where is my order 4821?"
A customer writes in the store chat. On the other side there is no support rep and no system: just an LLM, the same kind of model behind ChatGPT and Claude.
The panel shows everything it has to work with: the text of the call. For now, one line. It writes very well, but does it know anything about this order? Take a guess before moving on.
Before trusting the answer, ask: where did it get that from?
It learned by reading
An was trained on a mountain of text for one task: predict the word that comes next. Doing that billions of times, it learned grammar, facts about the world and how customer support sounds. Then it was tuned to behave like an assistant.
What it learned lives in the model's numbers, not in a database it looks up. Training stops at a cutoff date and never saw your store. Order 4821 is not there.
It knows what it read in training and what it receives now. Nothing else.
One piece at a time
To answer, the model reads the whole text and works out the odds of each possible piece coming next. These pieces are called . One of them is drawn from the most likely ones, goes into the text, and the math starts over.
After "Your order", words common in customer support compete for the slot. Nothing in this math queries the store system: it only looks at the text already there.
The answer is the likely continuation of the text, not a lookup.
Same question, another answer
Since each piece is a draw, the same text can produce different answers. That is why you ask the same question twice and the answer changes.
This holds for the right answer and for the wrong one. For the store agent, it means a single test proves nothing: you need to run it many times.
The answer is one among many possible ones.
Put the data in the text
The data does not change the model. It changes the text the model reads, and so it changes the odds of each piece.
This is how every agent knows things: someone, almost always your code, fetches the data and puts it in the text before calling the model.
Whoever builds the text decides what the model knows.
It makes things up with the same confidence
Without the data, the sentence comes out as fluent as with it. The model does not flag what is a guess: "your order was already delivered" comes in the same tone as a right answer.
This is called . The customer has no way to notice, and neither do you, if nobody checks.
Fluency is not a sign of truth.
The bot that made up a rule
What the sources say: in April 2025, the support bot for Cursor, an AI code editor, told a user that a "new policy" limited use to one device per subscription. The policy did not exist. Users canceled, and one of the founders apologized in public.
Our reading: the answer looked official because the model writes like a support agent, not because it read the policy.
Without the real rule in the text, the model writes a likely rule.
So what goes in the text?
Everything the model uses in an answer comes from two places: what remained from training and the text that goes in the call. The first you cannot change. The second is all yours: instructions, store policy, order data, the conversation so far.
This text has a maximum size, the , and the API keeps nothing between one call and the next: your code sends everything again each time. The next lesson opens up this math.
Building an agent is, above all, deciding what goes in the text.
What to take from this lesson
An LLM writes one piece at a time, drawn from the most likely ones. It knows what it read in training and what it receives in the call.
When the data is missing, it writes a likely continuation, with the same confidence. The question that remains: how much text fits in a call, and how much does it cost?
Questions in this lesson
- Where does the model get the status of order 4821 from?
- From the text that goes in the call. Training does not have the store's orders, and the model looks nothing up on its own. The data has to be in the text.
- The answer came out clear and confident. Does that mean it is right?
- No, it writes in the same tone with or without the data. The model does not flag guesses. Fluency and truth are separate things.
- What is the strongest defense against a made-up status?
- Putting the right data in the text and checking the answer in code. The instruction helps, but does not guarantee it. Data in the text and a check in code guarantee more.
- Claude Docs, Glossary ↗
- Claude Docs, Models overview ↗
- Claude Docs, Context windows ↗
- Claude Docs, Working with messages ↗
- Claude Docs, Reduce hallucinations ↗
- Claude Docs, sampling parameters ↗
- 3Blue1Brown, But what is a GPT? (Apr 2024) ↗
- Stephen Wolfram, What is ChatGPT doing (Feb 2023) ↗
- Anthropic, Tracing the thoughts of a large language model (Mar 2025) ↗
- Tecnoblog, IA de atendimento inventa política da empresa (Apr 2025) ↗
- eWeek, Cursor users misled by fabricated policy (Apr 2025) ↗