Learn & Build Agents

    ↑ ↓ to choose · Enter to open · Esc to close

    01 FoundationsLesson 2 of 610 minBeginner

    What an LLM is, and why it makes things up

    What it knows about 4821nothing
    Where the answer comes from—
    • + customer
    • + text of the call
    • + LLM
    Customerin the store chatThe text of the calleverything the model readscustomerWhere is my order 4821?store▍This is all it has to work with.LLMpredicts the next piecewhere is 4821?
    LLMcodedataperson

    Step 1 of 9: "Where is my order 4821?"

    You will learn
    • 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
    In the lab

    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.
    1. "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?

    2. 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.

    3. 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.

    4. 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.

    5. 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.

    6. 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.

    7. 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.

    8. 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.

    9. 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.