wunder beta

📘 Why doesn’t an LLM look things up?

You type “The capital of Australia is” and watch the next word appear. Sydney. The cursor does not hesitate. There is no drawer labeled capitals. Jurafsky and Martin put it simply: given the tokens already in view, a language model assigns

4
lessons
~20 min
to learn
Adults
level
Start the course →

What you’ll learn

  1. What a Large Language Model Actually IsDefine a language model as a next-token probability distribution, and explain tokens and the context window as operational limits rather than as a filing cabinet.A language model assigns a probability to each next token given the tokens in view. The chain rule turns a whole sequence into a product of those bets. Text is tokenized into a fixed subword vocabulary; the model conditions only on a bounded window. Knowledge absorbed in training lives in the weights as statistics, not in a drawer you can query. That picture explains both the fluency and the characteristic misses.
  2. How LLMs Are Built: Transformers, Pretraining, and AlignmentTrace a usable LLM from self-attention and self-supervised pretraining through instruction tuning and RLHF, and say what each stage does not add.Self-attention lets every token in the window weigh every other token and trains in parallel, which is why the transformer scaled. Pretraining is next-token prediction on raw text. Instruction tuning on a relatively small set of demonstrations — about 13k SFT prompts in InstructGPT — teaches the model to answer. RLHF then ranks outputs, trains a reward model, and optimizes the policy. Alignment reshapes which continuations win. It does not install a fact store.
  3. Generation, Prompting, and Failure ModesExplain how decoding and prompt structure steer a next-token distribution, and why hallucination follows from the training objective.Decoding turns a distribution into text. Temperature sharpens or flattens the logits. Nucleus sampling, for open-ended generation, drops the unreliable tail. The prompt is the specification for this turn; a few in-context examples can specify a format without touching the weights. Because the objective rewards plausible continuations, fluent text can be ungrounded. Check anything you will use.
  4. Guided Project: Build a Grounded Q&A Assistant SpecWrite a small grounded Q&A spec: a boundary, a walled prompt, a refusal example, conservative decoding, and a quote check.The artifact is a specification, not a deployed system. You define a job that may answer only from a supplied source, structure a prompt with a marked-off passage, include a worked refusal, pick a low temperature, and reject any answer whose quoted span is not in the source. Completing it shows you can use tokens, context, prompting, decoding, and failure modes as one design.

Questions this course answers

Using the chain rule of probability, how does a language model represent the probability of an entire token sequence?

The chain rule factors the joint probability of a sequence into a product of conditional next-token probabilities P(wi | w1…w(i−1)). Modeling each of those conditionals is what a language model learns to do. There is no extra term for being true.

Why do LLMs operate on subword tokens rather than whole words?

Sennrich, Haddow, and Birch introduced BPE so a fixed vocabulary can still represent rare and unknown words as sequences of subword units. Byte-level BPE can compose any byte string. Token counts, not word counts, then drive the window and the cost.

What is the most accurate characterization of an LLM's context window?

The context window is the bounded number of tokens the model can attend to when producing the next token. Content outside the window does not enter that forward pass. A product may stuff a summary back into the window; the model itself is not silently remembering last Tuesday.

What does the self-attention mechanism allow a transformer to do that recurrent sequential models did not do efficiently?

Self-attention computes weights connecting each token to all others in one step and processes positions in parallel. That long-range routing and that hardware-friendly parallelism are the reasons Vaswani et al. could scale the architecture where recurrence struggled.

Why is the pretraining objective described as self-supervised?

In next-token prediction the target at each position is simply the actual next token in the corpus. The supervision signal is generated from unlabeled text, which is why the stage is called self-supervised.

According to the InstructGPT approach, what is the role of the reward model in RLHF?

Humans rank outputs, a reward model is trained to predict those rankings, and the policy is optimized — InstructGPT used PPO — to raise the reward model's scores. RLHF reshapes which continuations the model favors. It does not add a filing cabinet of facts.

Grounded in trusted sources

  • [object Object]
  • [object Object]
  • [object Object]
  • [object Object]
  • [object Object]
  • [object Object]
  • [object Object]
  • [object Object]

Every Wunder lesson is built from real, reputable sources — never invented.

Related courses

Wunder is a personalized learn-anything platform — tell it any topic and it builds a beautiful, fact-checked course in minutes, with narration, a knowledge check, and a college-style University track.

All topics · Home

© 2026 Wunder Learning LLC · Terms & Privacy