Field Guide · Artificial Intelligence

How an AI Like Claude Actually Works

No code required — just the real machinery, explained in plain language.

At its heart, a model like Claude does one humble thing astonishingly well: it predicts the next chunk of text. Everything else — the essays, the explanations, the jokes — grows out of that single trick, repeated thousands of times. To see how, let's follow it from birth to the moment it answers you.

Training: reading the library, then taking notes

Imagine a student locked in a vast library who reads an enormous slice of human writing — books, articles, conversations — and plays one relentless game: cover the next word and guess it. "The cat sat on the ___." Guess "mat," check the real answer, and nudge your instincts a hair closer next time.

The "instincts" being nudged are billions of numbers called weights — think of them as tiny adjustable dials. Each wrong guess turns some dials a fraction. Do this trillions of times and the dials settle into a configuration that has quietly absorbed grammar, facts, reasoning patterns, and the shape of how ideas connect. Nobody programs these rules in; they emerge from the practice, the way a tennis player's muscle memory emerges from millions of swings, not from a rulebook.

From words to numbers

The model can't read letters directly, so text is sliced into tokens — common word-pieces, roughly ¾ of a word each. Every token becomes a long list of numbers, an embedding, which acts like a coordinate placing that word on a giant map of meaning. On this map, "king" and "queen" sit near each other; "Tuesday" sits far away. Meaning becomes geometry.

Your prompt “Why is the sky…” Why is sky tokens the model — stacked layers attention: words weigh each other refine the meaning …repeat, layer after layer probabilities for next token “ blue” next token, chosen the new word is fed back in, and the whole loop runs again for the next word
One word at a time: your prompt is split into tokens, every layer lets the words reconsider one another, and the model emits a single next token — then reads its own output and repeats.

Answering: attention, one word at a time

When you ask a question, your words flow up through dozens of stacked layers. The key mechanism in each is attention: every word gets to look at the others and decide which ones matter for it right now. In "the trophy didn't fit in the suitcase because it was too big," attention is what lets the model figure out that "it" means the trophy, not the suitcase — by weighing the relationships, not following a hard-coded rule.

After all that weighing, the model produces a probability for every possible next token — maybe 71% "blue," 4% "vast," and so on. It picks one, appends it to your text, and runs the entire process again to choose the word after that. The fluent paragraph you read is really this loop firing over and over, each word chosen in the context of all the words before it.

The finishing school

Raw prediction makes a model knowledgeable but unruly — it will happily continue text in any direction. So a second stage, fine-tuning, acts like a finishing school: humans show it good and bad responses and reward the helpful, honest, harmless ones. This is what turns a raw next-word engine into an assistant that tries to actually answer you.

So when Claude replies, there's no lookup of a stored answer and no little person inside. There is a galaxy of tuned dials, turning your question into numbers, weighing every word against every other, and predicting its way forward — one token at a time.