Training pipeline, tokens, and next-token prediction — what's actually under the hood, and why prompting matters.
The model reads trillions of words from books, websites, and code. It learns next-word patterns by predicting blanks, billions of times over.
Output: raw linguistic capability — fluent text, latent knowledge — but no instruction-following, and no taste.
Humans write thousands of ideal answers to example questions — the kind of careful, structured replies you'd want from a thoughtful colleague.
The model learns to imitate that style: to follow instructions, to format, to refuse, to explain its reasoning.
Humans rank multiple model answers side by side. The model learns what humans prefer — tone, helpfulness, safety, whether an answer feels right.
This is also where most of the model's caution lives — and where its sycophancy creeps in.
LLMs don't read whole words. They read tokens — three- to four-character chunks. "hospital" might be one token; "hospitalization" is usually three. Common medical abbreviations sometimes get split in awkward places, which is why models occasionally mangle them.
Try it — type a clinical sentence and watch how the model would chop it up.
A real tokenizer (BPE) is more sophisticated, but the lesson is the same: the model never sees your sentence as letters or words. It sees a sequence of integer IDs.
Given everything so far, the model assigns a probability to every possible next token, then samples one. That's it. There is no plan, no outline, no lookup — just a probability distribution, conditioned on the text in front of it.
The model picks one of these stochastically — with some randomness governed by a parameter called temperature. Then it conditions on that choice, predicts the next next-token, samples again, and so on. One word at a time. That's how an entire H&P, an entire essay, an entire wrong answer gets generated.
At T = 0 the model always picks the top token — deterministic, dull, sometimes brittle. At higher temperatures it explores — more creative, more wrong.
LLMs don't look up answers. They generate the most plausible continuation of your text. Plausible is not the same as true.