Most people meet a large language model through a chat box, and the chat box suggests the wrong picture: a search engine that talks, or an expert that remembers you. Both pictures lead to expensive mistakes once a business relies on the answers. An answer that sounds like a lookup is a prediction, and a conversation that feels remembered is being re-sent on every message. This chapter gives the right picture, so the rest of this series makes sense.

Thesis: A large language model is a program trained to predict the next token of text, and everything it produces, an answer, a summary, a block of code, a request to run a tool, is that prediction repeated one token at a time. It does not look facts up, it does not remember you between calls, and it cannot reliably tell you when it is wrong. Those three absences, not its fluency, decide how to use one: give it the facts it needs on every call, and check what it says against something other than itself.

Foundations exists because the words arrive before the understanding. Vendors, colleagues and the news already call systems "AI", "agents" and "agentic", and you may be asked to use, buy, approve or supervise one before anyone explains what is inside. Each misunderstanding has a cost you can name: a guess read as a lookup, a chat that seems to remember you, an agent's "done" taken as proof. The five chapters build one picture, each resting on the last: which kind a system sold as AI is, what a language model is, what makes a system agentic, what sits between a model and an agent, and how to think when you work with one, in the words the rest of the field uses. Each term links to the glossary where it is explained.


Where an LLM Sits

The words around AI nest inside each other, and the news uses them interchangeably. They are not interchangeable, and knowing which layer a product sits in tells you which of the limits in this chapter apply to it. Each row below is, in practice today, a part of the row above it.

Term What it means Example
Artificial intelligence (AI) The whole field: software that does tasks we would call intelligent if a person did them. Includes hand-written rules. A fraud system built from if-then rules
Machine learning AI that learns patterns from examples instead of being programmed rule by rule. A spam filter trained on labelled email
Deep learning Machine learning with large neural networks: layers of numbers adjusted during training. Image recognition, speech-to-text
Generative AI Deep learning that produces new content: text, images, audio, code. Generating an image from a description
Large language model (LLM) Generative AI built mainly for text: a model trained on a very large amount of text to predict what comes next. The model behind any chat assistant

So the chat assistant you use is an LLM with an application around it. That application matters more than it looks: the next chapter gives it a name, and the one after takes it apart.

Next Token, Repeated

Every absence in the thesis follows from one mechanism, so it is worth seeing once before anything else. An LLM does not read letters or words. It reads tokens: pieces of text, often a whole short word, sometimes part of a longer one, a space, or a punctuation mark. Your message is split into tokens by a tokenizer, each token becomes a number, and the model works on the numbers. Many current models also read images and audio, cut into tokens the same way.

On each step the model takes everything in front of it and gives a score to every token in its vocabulary, which typically runs to tens or hundreds of thousands of candidates. The scores become probabilities. One token is picked from them, a step called sampling, appended to the text, and the whole thing goes back in for the next step. After "The capital of France is", the token " Paris" gets most of the probability. The reply you read is that step repeated until the model produces a token that means stop, or hits a length limit.

flowchart TD
    Input["Everything on this call<br/>split into tokens"] --> Score["The model scores every<br/>possible next token;<br/>scores become probabilities"]
    Score --> Pick["One token is picked<br/>from those probabilities"]
    Pick --> Append["The token is added<br/>to the text"]
    Append --> Stop{"A stop token,<br/>or the length limit?"}
    Stop -->|"no: the longer text<br/>goes back in"| Input
    Stop -->|"yes"| Reply["The reply"]

    style Score fill:#5a5a8a

Figure: The generation loop. Everything on the call is split into tokens, the model scores every possible next token, one is picked and added to the text, and the longer text goes back in until a stop token or the length limit ends the reply.

Where do the scores come from? Training. In pretraining, the model reads a huge body of text and adjusts billions of internal numbers, its weights or parameters, to get better at guessing the next piece. Anthropic's glossary puts it plainly: such models are "pretrained to predict the next word, given the previous context of text in the document," and the result is "not inherently good at answering questions or following instructions." A second stage, post-training (fine-tuning on example replies, then feedback from people and from automated graders), is what turns a text predictor into an assistant that answers, follows instructions and asks for tools. A tool is a function, such as search or "read this file", that the application runs when the model asks for it by name.

Two consequences follow. What the model "knows" is whatever patterns training left in its weights, frozen at a knowledge cutoff: it has seen nothing after the date its training data ends. And running the model, called inference, never changes those weights. Whether a vendor later trains a future model on your conversations is a data-use policy, not memory, and worth checking in your contract.

Tokens, training, the context window (more on it below) and how a token is picked each have their own depth, and The Agentic Lifecycle series takes them one at a time, starting with Anatomy of a Turn. This chapter needs only the shape.

Try It: Grow a Reply

The lab below runs that loop by hand (without JavaScript, a table shows its first step). The text so far is the start of a sentence an HR assistant might be asked to finish. At each step it lists the few tokens the model rates most likely, with two numbers each: the model's probability, and the chance that token is picked at the temperature you choose. Temperature is a dial for how adventurous the pick is: at 0 the most likely token always wins, at 1 each token keeps its share, and above 1 the odds flatten. The probabilities are illustrative, written for this lab rather than read from a real model, and the lab picks only among the tokens it lists (top-k sampling, in miniature).

The first step, for the text "New parents at our company get paid leave of" (illustrative probabilities). The five listed tokens hold 74% between them, and every other token shares the rest. The chances are among these five only, so each column adds up to 100%: at temperature 1, " 12" keeps its share of the five (27 ÷ 74 ≈ 36%). The quotation marks show each token with its leading space.

Next token Model's probability Chance at temperature 0 at 0.7 at 1 at 1.5
" 12" 27% 100% 44% 36% 31%
" up" 19% 0% 27% 26% 24%
" 16" 13% 0% 15% 18% 19%
" six" 9% 0% 9% 12% 15%
" 26" 6% 0% 5% 8% 11%

At temperature 0 the reply is "12 weeks." every time. At temperature 1, runs give replies such as "up to 26 weeks at full pay.", "12 weeks in the first year." and "six months at half pay."

Run the lab a few times at temperature 1 and then at 0 (without JavaScript, read the example runs under the table), and three things show up. The same prompt gives different replies, because each token is a draw. Each reply reads as fluent and certain, whichever number it landed on. And no candidate at any step is this company's policy: the model ranks the numbers that are common after text like this. Nothing in the loop looks anything up. That is the leave-policy example at the end of this chapter, in miniature.

What It Is Not

The mechanism rules out five things people commonly assume.

People assume What actually happens What to do about it
It looks facts up. It predicts likely text from patterns in its weights, unless the app runs a search tool and puts the results in its input. There is no record inside the model to look up and no source to cite. Put the facts it needs into its input, and ask it to quote them.
It knows what it doesn't know. Asked something it has no good pattern for, it still produces fluent, confident text, and some of it is false. A confident false answer is a hallucination. Check answers against a source the model did not write.
It remembers the conversation. Each call starts from nothing. The app, or the provider, puts the earlier messages back in every time. Decide what goes into each call; never assume it carries over.
It is current. Its knowledge stops at the training cutoff unless the app gives it something newer. Give it today's data, or a tool that fetches it.
Same question, same answer. A token is picked from probabilities, so wording and sometimes substance vary between runs. Record what it said; don't promise identical output.

Hallucination is not a bug a bigger model removes. A 2025 paper by researchers at OpenAI and Georgia Tech, Why Language Models Hallucinate, argues that models "hallucinate because the training and evaluation procedures reward guessing over acknowledging uncertainty": a test that scores a confident guess above "I don't know" teaches the model to guess. The authors argue that better scoring could teach models to say "I don't know" more often. Until it does, no model reliably flags its own guesses, so the check has to come from outside.

The memory point surprises people most. The most a model can see on one call is its context window, a limit counted in tokens. As of November 2026, each of the latest Claude models has a window of 1 million tokens, roughly 555,000 English words on Anthropic's current tokenizer, of which at most 128,000 can be its reply on a standard call (Anthropic, models overview); other vendors publish their own limits. What fills it is the instructions, the earlier messages, any documents, with room left for the reply. Anthropic's glossary calls it the model's "working memory", but it behaves like an input: rebuilt and re-sent on every call, and gone when the call ends. Chat apps with a "memory" feature save notes about you and put them back into that input; the model itself still keeps nothing. Anatomy of a Turn shows exactly what gets re-sent, and why a long chat costs more per message than a short one.

On determinism, even turning the temperature down does not get you a fixed answer in a real system, though the lab repeats itself at 0. Anthropic's glossary says that even with temperature set to 0, "the results will not be fully deterministic." And on many current hosted models, the reasoning models above all, the dial is no longer yours to turn: Anthropic's API from version 2026-10-21 rejects any call that sets it (migration guide), OpenAI tells you to remove it from GPT-6 calls whenever reasoning is on (GPT-6 guide), and Google ignores it from Gemini 3.6 Flash on (what's new in Gemini 3.6). From Logits to Response explains why. If an audit needs to know what the model said, the record has to be the output itself.

"It's Just Autocomplete"

The strongest objection to this framing is that it undersells the thing. Calling a model that writes working code, explains a contract and translates between languages "a next-token predictor" sounds like calling a novelist "a sequence of keystrokes."

The objection is half right. Predicting the next token well, across a large share of the text people have written, pushes a model to pick up grammar, facts, the structure of code, and the shape of an argument, because all of those make the next token easier to guess. The capabilities are real, and "just autocomplete" is a poor forecast of what a model can do.

But the mechanism is the right guide to what a model cannot promise. It tells you nothing about how capable the model is, and everything about where to put the checks. A highly capable predictor is still a predictor: it has no ledger of where a fact came from, no memory of you, and no reliable way to tell you when it is wrong. Hold both at once. Capable, and unverified.

An Example: The Leave-Policy Question

An HR team puts an internal assistant on the intranet. An employee asks how many weeks of paid parental leave they get. The assistant answers at once, warmly and precisely, with a number that is common in large companies and wrong for this one.

The team's first fix is an instruction: "double-check your figures before answering." It changes nothing. The model cannot reliably tell which number was a guess, and the company's policy was never in its training data or its input. The fix is to change what the model is given:

  1. Retrieve the relevant section of the current handbook and put it into the model's input on every question. This pattern is called retrieval-augmented generation (RAG). Finding the right passage is usually done with embeddings, numbers that place similar meanings near each other (Embeddings: How Vectors Get Meaning).
  2. Require a quote. The answer must cite the section it rests on.
  3. Allow "not found". When the handbook is silent, the assistant says so and names who to ask.

The model has stopped being the source and become the reader. A reader can be checked: the HR team can log which section went in with each answer and compare. The source of a guess cannot be checked at all. That move, from asking the model what it knows to giving it what it needs, is the habit the rest of this series builds on.


What to Do Next

  • Read every model answer as a draft. Fluency is not evidence. Ask what it rests on.
  • Put the facts in the input. For anything specific to your organisation or newer than the model, the model needs to be given it on that call.
  • Keep the input, not just the reply. What went in is what explains the answer.
  • Don't promise identical output. Promise a recorded output and a check.
  • Carry one sentence forward: a model reads what it is given on one call and writes a response, keeps nothing between calls, and does nothing else. The next chapter adds what turns that into something that acts.

Previous: What People Mean by AI. Next in Foundations: What Makes AI Agentic, a model in a loop with tools. Key terms used here are defined in the glossary. For the mechanics in depth, start with Anatomy of a Turn.