How It Works

What's actually happening when Claude answers you

No code required — just a clear look at how a pile of numbers learns to talk, and what it's really doing the instant you hit enter.

The model is a number machine, not a brain

Strip away the mystique and a model like Claude is a giant mathematical function: you feed in numbers, it spits out numbers, and in between are billions of adjustable dials called parameters. Think of an audio mixing board with a billion sliders instead of sixteen. Move the sliders one way and the board produces noise. Move them the right way, and it produces music. Training is the long, automated process of finding slider positions that turn "noise" into "useful answers."

Words become coordinates

Before any of that math can happen, words have to become numbers. Each word or word-fragment (a token) gets mapped to a long list of numbers — a point in space, but a space with thousands of dimensions instead of three. Picture a giant 3D map where "dog" and "puppy" sit close together, "dog" and "kite" sit far apart, and "king" minus "man" plus "woman" lands near "queen." That's the real geometry, just with way more directions than we can picture. This number-list is called an embedding, and it's how raw language enters the machine.

Training: a fill-in-the-blank game played trillions of times

Here's the part that surprises people: the core training task is almost embarrassingly simple. Take a huge pile of text from books, websites, and articles, hide the next word, and have the model guess it. At first the guesses are random. But after each guess, an algorithm called backpropagation checks how wrong the guess was and nudges every slider — all billion-plus of them — a tiny bit in the direction that would have made the right answer more likely. Do this trillions of times, on trillions of words, and the sliders gradually settle into positions that capture grammar, facts, reasoning patterns, and style — not because anyone programmed in a rule for "facts," but because predicting text accurately turns out to require understanding it.

Then it's taught to be helpful, not just fluent

A model trained only to predict text is a fluent mimic, not a helpful assistant — it'll happily continue a sentence in any direction, including bad ones. So there's a second phase: humans rate pairs of responses ("this one's more honest and useful than that one"), and the model is nudged again — using a technique called reinforcement learning — toward producing answers people actually rate highly. This is closer to training a dog with treats than to programming: you're not specifying the rules, you're rewarding the outcomes you want until the behavior sticks.

How a prompt flows through the model Your question is split into tokens, converted to number-coordinates, passed through layers that mix context, then decoded one word at a time, with each new word feeding back in to predict the next. "Why is the sky blue?" your prompt split into tokens mapped to coordinates layers weigh context "Because" next word one prediction fed back in to predict the next word, and the next...

Your prompt is broken into tokens, turned into coordinates, weighed against everything that came before it through dozens of layers, then decoded one word at a time — each new word looping back in as context for the next.

Answering you: one word at a time, with no lookup table

When you type a question, the model doesn't search a database for the answer — there isn't one stored anywhere. Instead, your text is tokenized and embedded just like during training, then passed through dozens of stacked layers. Inside each layer sits a mechanism called attention, which is really just a weighting system: for every word it's about to produce, the model asks "which of the earlier words matter most for this decision?" and blends them accordingly — the way you weigh certain clues more than others when finishing someone else's sentence. After passing through all the layers, the model produces a probability for every possible next word, picks one (usually the most likely, sometimes a close second for variety), and adds it to the conversation. Then it does the entire process again to pick the word after that — and the one after that — building your answer one token at a time, each new word becoming part of the context for the next.

There's no single moment of "understanding." There's just this loop — predict the next token, append it, repeat — running fast enough and trained well enough that the result reads like thought.

So what is "intelligence" here, really?

It's pattern continuation at a scale and precision that makes the patterns useful: grammar, logic, code, explanation, even step-by-step reasoning, all emerge because they were the patterns embedded in how humans actually write. The sliders don't store sentences; they store statistical tendencies shaped by an almost unimaginable number of small corrections. That's the whole machine — embeddings to give words a position, attention to weigh context, layers to combine it all, and a training process that spent enormous compute nudging billions of sliders until the output sounds like understanding.