Skip to content
Blog

How large language models work, in one hour, without maths

Teaching notes for a one-hour explanation of large language models for executives: six ten-minute blocks, each with one idea, one analogy, one exercise and one misconception.

Mohamad Al Assaad10 min read

This is how I would structure one hour on large language models for people who decide about AI but will never train a model: six blocks of about ten minutes, each with one idea, one analogy, one exercise for any chat assistant, and the misconception it corrects. No equations.

1. Tokens and next-token prediction

The idea. A model does not read words. It reads tokens: frequent words, pieces of rarer words, punctuation. Its whole job is to predict which token comes next. Writing a paragraph is that prediction repeated, one token at a time, with each new token added to the text it reads.

Here is a real example, produced with OpenAI’s open-source tokenizer tiktoken and its o200k_base encoding, the one tiktoken assigns to GPT-4o:

Text Words Tokens How it is split
Our churn rate fell after the onboarding redesign. 8 9 Our churn rate fell after the onboarding redesign .
Le chiffre d’affaires trimestriel était étonnamment solide. 7 13 Le chiffre d 'affaires trimes tr iel était éton nam ment solide .
strawberry 1 3 st raw berry

Three lessons follow. Usage is priced and limited in tokens, not words. French costs more tokens than English here, so multilingual workloads cost more. And the model never sees the letters of “strawberry”, only three chunks, which is one reason letter-counting questions used to trip models up. Tokenizers differ between vendors, so these counts apply to this encoding only.

Analogy. The word suggestions on your phone keyboard, scaled up enormously.

Exercise. Type: “Complete ‘The board approved the…’ with five different next words and say how likely you think each one is.” You are watching a ranked list of candidates, which is what the model computes at every step.

Misconception corrected. “It looks the answer up.” It does not. Unless it is connected to a search tool or a database, it generates text from patterns learned during training.

2. Training: read everything, then learn manners

The idea. Training happens in stages. Pre-training has the model predict the next token across a vast amount of text. The result knows grammar, facts and styles, but continues text rather than answering. Instruction tuning then shows it thousands of examples of good answers written by people. Preference training shows it pairs of answers ranked by people and pushes it towards the preferred kind.

The standard reference is OpenAI’s InstructGPT paper: fine-tune on human demonstrations, collect human rankings of outputs, then use reinforcement learning from human feedback (RLHF). Its striking result was that people preferred answers from a 1.3-billion-parameter tuned model over those from the 175-billion-parameter GPT-3 (Ouyang et al., 2022). Simpler alternatives now exist. Direct Preference Optimisation (DPO) learns from the same rankings without a separate reward model or a reinforcement learning loop (Rafailov et al., 2023).

The sentence to repeat: pre-training gives knowledge, instruction tuning gives format, preference training gives judgement.

Analogy. A new graduate. Years of reading, then onboarding with worked examples, then a manager who says “this draft is better than that one”.

Exercise. Ask the same question in two fresh chats. Paste both answers into a third and ask which is better and why. That is a preference rater’s job.

Misconception corrected. “It learns from me as we chat.” The model’s parameters are fixed when training ends. Within a conversation it only uses the text in front of it. Whether your chats feed a future model is a separate policy question, set by the provider and your account settings.

3. Attention and the context window

The idea. The transformer, introduced in “Attention Is All You Need” (Vaswani et al., 2017), lets every token look at every other token to decide what matters for its meaning. In “the bank raised its rates”, “bank” attends to “rates” and means a lender. In “we walked along the bank of the river”, it attends to “river”.

The context window is how much text the model can consider at once: instructions, documents, conversation history and its own answer. As of October 2026, the official documentation lists 1 million tokens for Anthropic’s Claude Opus 5.5, 1.05 million for OpenAI’s GPT-6 Astra and 1,048,576 for Google’s Gemini 4 Argon. Anthropic estimates 1 million tokens at roughly 555,000 English words on its current tokenizer.

Long context costs more for three reasons. First, if every token looks at every other one, doubling the text roughly quadruples the comparisons, as the original paper’s complexity table shows. Second, you pay for every input token every time you send it. Third, quality drops: Anthropic’s documentation says that “as token count grows, accuracy and recall degrade”, which it calls context rot.

A worked example. At Anthropic’s list prices for Claude Opus 5.5 in October 2026 ($4 per million input tokens), you paste a 400,000-token document and ask ten questions. Each question resends the document: 10 × 0.4 million × $4 = $16. With prompt caching, the first write costs $2 and the nine cache reads cost $0.08 each, about $2.72 in total. If retrieval sends only the eight relevant passages, around 4,000 tokens, the ten questions cost about $0.16. A hundredfold difference.

Analogy. A meeting where everyone listens to everyone. Ten people make 45 pairs of conversations; twenty people make 190.

Exercise. Paste a long report and ask about a detail buried in the middle. Then paste only the relevant page and ask again.

Misconception corrected. “A million-token window means it reads everything equally well.” Capacity is not attention.

4. Why models hallucinate

The idea. A hallucination is a fluent, confident, wrong statement. Researchers at OpenAI and Georgia Tech argue in “Why Language Models Hallucinate” (Kalai et al., September 2025) that this is unsurprising. During pre-training, facts that appear rarely cannot be learned reliably: if 20% of birthday facts appear only once in the training data, expect a base model to get at least 20% of birthdays wrong. They opened with a test: asked for the lead author’s birthday “if you know”, a model gave three different wrong dates on three attempts.

Their main argument is about incentives. Most benchmarks score one point for a correct answer and zero for “I don’t know”, so on average guessing beats admitting doubt. In their words, models “are optimized to be good test-takers”. OpenAI’s GPT-5 system card shows the trade-off on a factual quiz (SimpleQA, no web): gpt-5-thinking-mini was right 22% of the time and wrong 26% of the time, abstaining on the rest; o4-mini was right 24% of the time but wrong 75% of the time. The second wins on accuracy and loses on trust. The proposed fix is to change scoring: state a confidence target, for example: answer only if you are more than 75% confident, because a wrong answer costs two points.

Analogy. A multiple-choice exam with no penalty for wrong answers. Every sensible student guesses on every blank.

Exercise. Ask for three academic papers on a narrow topic, with authors, year and link. Check each one. Then ask again with: “Answer only if you are more than 75% confident. A wrong answer costs two points; ‘I don’t know’ costs nothing.” Compare.

Misconception corrected. “The next version will fix hallucination.” Models improve, but the paper argues some error is statistically unavoidable and benchmarks keep rewarding the guess.

5. Grounding: retrieval and tools

The idea. If the model’s memory is unreliable for specific facts, give it the facts when you ask. Retrieval-augmented generation (RAG) searches your documents first, puts the most relevant passages into the context window, and asks the model to answer from them and cite them. Tools go further: the model can call a search engine, a database, a calculator or an internal system, read the result and continue. A model that calls tools in a loop until a task is done is what most people mean by an agent.

Grounding turns “does the model know?” into “did we find the right passage?”, a search problem that needs measuring; see Hybrid RAG in production.

Analogy. An open-book exam instead of a closed-book one. The student still needs to find the right page.

Exercise. Paste an internal policy and write: “Answer only from this text. Quote the sentence you rely on. If the answer is not there, say ‘not in the document’.” Ask one question it covers and one it does not.

Misconception corrected. “RAG removes hallucination.” It narrows the problem. Retrieval can miss the right passage, and the model can still misread the one it gets.

6. Reasoning models and test-time compute

The idea. “Thinking” models generate a long chain of intermediate tokens before the final answer. This is test-time compute: spending more computation at the moment of answering instead of only during training. DeepSeek’s R1 paper (DeepSeek-AI, January 2025) showed that reinforcement learning on problems with checkable answers, such as maths and code, can teach this behaviour. Its R1-Zero variant, trained without supervised examples first, rose from 15.6% to 71.0% on a competition maths benchmark and learned by itself to spend more time thinking.

OpenAI’s reasoning guide says reasoning tokens are not shown to you, are billed as output tokens and take space in the context window; you control them with an effort setting. Anthropic also bills thinking tokens as output. Output is the expensive side: $20 per million tokens against $4 for input on Claude Opus 5.5. A 500-token answer preceded by 4,000 tokens of thinking costs nine times as much as the answer alone, and takes longer.

A note on planning. Anthropic’s interpretability team (Tracing the thoughts of a large language model, March 2025) found that when writing a rhyming couplet ending “grab it”, Claude had already picked “rabbit” before writing the second line. When the researchers suppressed that concept, the line ended in “habit”. The same work found that written reasoning does not always match the internal computation, and the method captures only a fraction of what happens.

Analogy. A consultant who works things out on paper before replying. Better answers on hard problems, billed by the hour.

Exercise. Ask a multi-step planning question (a three-city trip with fixed meetings and train times) with thinking off, then on. Check whether the constraints hold.

Misconception corrected. “The visible reasoning is exactly how it got the answer.” Treat it as a useful explanation, not an audit log.

Five sentences to remember

  1. A model predicts the next token, one at a time, from patterns learned in training.
  2. Pre-training gives knowledge; instruction and preference training give manners and judgement.
  3. Attention lets every token weigh every other token, which is why long context costs more and is read less carefully.
  4. Models hallucinate partly because we score them like exams that reward guessing.
  5. For facts that matter, ground the model in your documents and tools, and pay for thinking only where the problem needs it.

Glossary

Term Plain meaning
Token A piece of text, often a word or part of a word, that the model reads and writes. Usage is priced in tokens.
Context window The maximum text the model can consider in one request, including its own answer.
Parameter One of the billions of numbers learned in training that encode what the model knows.
Fine-tuning Further training of an existing model on a smaller, targeted set of examples.
RAG Retrieval-augmented generation: search your sources first, then answer from what was found.
Agent A model that calls tools in a loop, deciding the next step from each result, until a task is done.
Hallucination A fluent, confident statement that is false.
Inference Running a trained model to produce an answer; what you pay for per token.

Sources