Mark Levy/Writing/The Word Machine

[ Floor 1 of 3 ] The monster itself
How a large language model actually works, one guessing game at a time.
Every impressive thing a large language model does, from answering questions and drafting emails to writing code and passing exams, is one act, repeated: given some text, predict a plausible next word. That's it. The chat window, the personality, the apparent memory: all of it is built by running that single trick in a loop.
Two words you already use every day have exact meanings here. What you type is the prompt, and the full block of text the machine actually reads, your prompt plus the rules and chat history the app quietly adds, is the context. Every room below touches one or both, and each room ends with a note tying the mechanism back to the vocabulary of daily AI work.
One useful way to picture it: an un-deletion machine. Take real sentences, delete words, and train a circuit to restore them. Do that across roughly everything ever written, and the circuit gets eerily good at continuing text it has never seen.
This floor has six rooms. Every demo is a hand-built toy with illustrative numbers; the point is the mechanism, not the measurements. You don't need to know how to build an engine to drive well. You do need to know it isn't a horse.
Room 1 of 6The Cartographer's Table
The machine never sees letters. Each word is converted to a long list of numbers, its coordinates in a huge space (real models use thousands of dimensions; this map flattens it to two). On day one those coordinates are random noise. Training slowly drags words that get used the same way to the same neighborhood.
Hover or tap a word to see its nearest neighbors, then press Day one to see the same words before training.
Meaning is location. "Similar words" just means "nearby numbers." No definition of cat is stored anywhere, only where cat sits relative to everything else.
Room 2 of 6The Golem
Inside, the machine is a circuit: numbers flow in, get multiplied and added according to adjustable knobs (the "parameters"; frontier models now run from hundreds of billions into the trillions), and scores flow out, one score per possible next word. No memory. No loops. Same input, same knobs, same output, every time. A golem, in the old sense: a body that does exactly what its inscription says, and nothing else.
Here's a three-knob golem trying to finish "The cat sat on the ___." Fresh from the workshop, its knobs are wrong; it likes moon. Tune the knobs until mat clears 70%, or press auto-train and watch a trainer do it.
"The cat sat on the moon"
GOLEM: MISCALIBRATED
You just trained a language model by hand. Real training does exactly this, nudging knobs so the right word scores higher, except with trillions of knobs, nudged a hair at a time, once per example, across trillions of words. No single knob means anything. The arrangement is the knowledge.
Room 3 of 6The Sphinx's Riddles
Where do the training examples come from? Free, from any text: delete a word, and the original text itself is the answer key. No humans writing quizzes; the internet is the quiz. The sphinx at this door asks a few of them. After each guess, the machine's own candidate list is revealed.
The output is a bet, not a fact. Riddle 3 is the important one: when many continuations are common, no answer gets a high score. The machine's "confidence" measures typicality in text, never truth.
Room 4 of 6The Scrying Pool
Predicting the next word means knowing which earlier words matter right now. That's the job of attention heads. Think of them as scrying eyes: each position in the text gets to look back at every other position and decide how much to care.
In the sentence below, what does "it" refer to? Flip the last word and watch where the eyes go.
Attention is a budget. Long-range coherence, like remembering your instructions from 40 lines ago, is attention doing its job. And tasks that need too many simultaneous look-backs (sort 300 unique items, track every letter in a long word) are exactly where the machine predictably falls apart.
Room 5 of 6The Endless Stair
The circuit outputs exactly one word. So how do you get an essay? Plumbing outside the machine: predict a word, staple it to the text, feed the whole thing back in, repeat. Every step of this stair is one word, and to take the next step the machine climbs the entire stair again from the bottom. Press the button and watch: the flash across every chip is the machine re-reading the whole transcript from scratch, every single pass.
The machine has no memory. The context is the memory. Your chat is just an ever-longer input re-read on every pass. That's also why long chats degrade: the re-read gets harder, and past a certain length the oldest text isn't read at all.
Room 6 of 6The Mimic's Den
Now the payoff. The machine's only job is plausible continuation. Nothing in the circuit checks truth; there is no wire for it. Every dungeon has a mimic: a monster that looks exactly like a treasure chest until you open it. This room has two chests. Ask about a real book and a book that doesn't exist, and the machine produces the same confident shape either way.
> Summarize the novel Moby-Dick.
Herman Melville's 1851 novel follows Ishmael aboard the whaler Pequod, whose captain, Ahab, is obsessed with the white whale that took his leg. The hunt destroys the ship; Ishmael alone survives to tell it.
> Summarize the novel The Lighthouse at Pelican Reef.
Marion Voss's 1974 novel follows a keeper's daughter who discovers her father has been falsifying the light's logbook for decades. A storm forces the truth ashore; the ending is often read as an allegory of institutional decay.
Every word above is fabricated: author, year, plot. There is no such book. It scores high because it's the shape a book summary takes.
You'll hear this failure called "hallucination," as if the machine mis-perceived something. It perceived nothing. Fabrication is the honest word: constructing plausible text is all the machine ever does. It's just that the most plausible continuation is usually true, and when it isn't, nothing inside notices.
Confidence carries no information. The tone is constant whether the content is Melville or Marion Voss. Judge the output the way you'd judge an unsigned memo: by checking it.
InventoryProduct words, machine parts
The vocabulary of daily AI work, the words on the box, all have exact addresses in the rooms you just walked:
Notice what every item has in common: except for model and token, they're all just ways of putting text into the context, or plumbing that does it for you. The machine only ever does the one thing from the top of this page.
Floor clearedWhat this buys you
You now hold roughly the mental model a good driver has of a combustion engine: not enough to build one, plenty to avoid ruining one. Four rules fall straight out of the six rooms:
Not a mind, not magic: an un-deletion machine with trillions of well-tuned knobs, run in a loop. Used with that in mind, it's one of the best tools ever built for working with words.
Stairs down. Floor 2 is behind the glass: how your question becomes the start of a completion, what "inference" means, how thinking and effort work, and how images ride the same loop. Same monster, more plumbing.
Descend to Floor 2 Back to the mapThe mental model here follows John Mount's "A Simplified Mental Model of LLMs" (Win-Vector): the un-deletion framing, knobs, look-backs, and the case for saying fabrication.
The teaching style, poking the simulation instead of reading the bullet list, follows Laurentiu Gabriel's "How I Use LLMs to Learn". The dungeon framing owes a debt to every LitRPG that ever announced a new achievement in a box. All demos on this page are illustrative toys, not real model outputs.