Ask someone to explain how a large language model works and you’ll usually get one of two answers: either an intimidating wall of math, or a hand-wave that says “it’s just predicting the next word.” Both are technically true and both leave out the interesting parts. The reality sits somewhere in between — simple enough to grasp without a PhD, and strange enough that even the people who build these systems are still discovering new things about how they behave.
Let’s start with the boring-but-true version, because it’s the foundation everything else builds on.
The Next-Word Machine
At its core, a large language model is trained to do one job: given a sequence of text, predict what comes next. Feed it “The capital of France is” and it should assign a high probability to “Paris” and a low probability to “banana.” That’s it. That’s the entire training objective for most of these systems, at least in their initial training phase.
What makes this deceptively powerful is scale. To get really good at predicting the next word across billions of sentences pulled from books, websites, code repositories, and everything else humans have written down, a model can’t just memorize patterns. It has to develop something more like internal representations of grammar, facts, logic, and even rudimentary reasoning. You can’t reliably predict the next word in a math proof or a legal argument or a piece of working code without implicitly encoding some structure about how those things function. The prediction task is simple; what’s required to get good at it is not.
This is the central irony of the field: a wildly simple training goal, applied at enormous scale, gives rise to behavior that looks a lot like understanding — even though understanding was never explicitly the target.
Tokens, Not Words
One detail that trips people up: models don’t actually process “words” the way we think of them. Text gets broken into chunks called tokens, which might be whole words, parts of words, or even single characters, depending on how common that chunk is in the training data. “Unbelievable” might become “un,” “believ,” and “able.” This tokenization step is why models sometimes stumble on things like counting letters in a word or doing precise arithmetic — they’re not seeing the text the way we see it on screen. They’re seeing a string of numeric IDs representing chunks, and everything downstream is built on top of that.
The Architecture That Changed Everything
For years, language models processed text roughly in order, one word after another, trying to remember what came before using increasingly strained mechanisms. The breakthrough that made today’s models possible was an architecture that allowed a model to look at an entire passage of text at once and decide, dynamically, which earlier words mattered most for understanding or predicting any given word. This mechanism is often called “attention,” and it’s a fitting name — the model learns to pay attention to relevant context rather than processing everything with equal weight or strict left-to-right memory.
This turned out to be both more accurate and far more efficient to train on modern hardware, since it could be parallelized rather than computed strictly step by step. That efficiency gain is arguably as important as the accuracy gain — it’s part of why it became feasible to train models on datasets and computing budgets previously unthinkable.
Two Very Different Training Phases
Raw next-word prediction on internet text produces a model that’s fluent but not necessarily helpful. Left to its own devices, such a model might continue a question with more questions, or ramble in the style of whatever web page it thinks it’s imitating, rather than actually trying to assist a user.
That’s why there’s usually a second training stage layered on top. Human reviewers rate or rank model responses, and the model is nudged — through various techniques broadly grouped under “alignment” or “fine-tuning” — toward outputs that are judged more helpful, honest, and safe. This is why a raw, freshly pretrained model and the assistant-style chatbot built from it can feel like completely different products, even though the underlying network is largely the same.
It’s worth sitting with the fact that this second stage is fundamentally about human judgment, applied at scale. The values embedded in a model’s responses aren’t discovered by the model independently; they’re shaped by whoever designed the training process and the criteria used to rate outputs. This is one reason debates about bias and behavior in these systems are less about a rogue machine and more about the choices — and blind spots — of the humans steering the process.
Why It Sometimes Feels Like Magic (and Sometimes Doesn’t)
None of this involves the model looking things up in a database in real time, unless it’s explicitly connected to external tools. Everything it “knows” is compressed into billions of numerical parameters adjusted during training. This explains a lot of the model’s quirks:
- It can produce confident-sounding but false statements, because it’s generating plausible text, not consulting a source of truth.
- It has no built-in sense of time passing after its training data was collected, unless told otherwise.
- It can struggle with tasks that require exact, step-by-step manipulation of symbols, like arithmetic or letter-counting, since that’s not what the underlying prediction task optimizes for.
And yet, the same mechanism that produces those failures also produces genuinely impressive feats of synthesis: summarizing dense material, drafting code, explaining a concept from multiple angles, or connecting ideas from disparate fields. It’s the same next-word engine doing both — which is exactly why intuitions about “understanding” versus “mimicry” remain genuinely contested even among researchers who study these systems for a living.
Understanding that tension — a simple mechanism producing both remarkable competence and confident errors — is probably the single most useful mental model for anyone trying to use these tools wisely rather than either worshipping or dismissing them.
