Mark Levy/Writing

A torchlit stone archway with steps descending into darkness. Three adventurers pause at the threshold, seen from behind. Above the keystone a single glowing rune is shaped like a blank waiting to be filled.

[ An interactive explainer in three floors ]

The Word Machine

How a large language model actually works, one guessing game at a time. Told as a dungeon crawl.

System
Welcome, crawler. This dungeon has one monster, and it cannot hurt you: it guesses the next word. Three floors, seventeen rooms, seventeen hand-built toys you can poke. No math degree required. Loot sits at the far wall of every room. Your progress is kept in this browser and nowhere else.

Every impressive thing these models do is one act, repeated: given some text, predict a plausible next word. The chat window, the personality, the tools, the agents: all scaffolding around that trick. The floors go down in that order. Floor 1 is the trick itself. Floor 2 is the plumbing that turns it into a chat. Floor 3 is the harness that turns a chat into an agent, and it's where the vocabulary of current AI development lives.

Start at Floor 1 unless you've been here before. Each floor stands on the one above it.

[ Floor 1 of 3 ]

The monster itself

Words become numbers, a trillion knobs, a fill-in-the-blank school, attention, the loop, and why fabrication is the machine working as designed.

The Cartographer's Table·The Golem·The Sphinx's Riddles·The Scrying Pool·The Endless Stair·The Mimic's Den

Not yet enteredEnter Floor 1

[ Floor 2 of 3 ]

Behind the glass

How a question becomes the start of a completion, what inference is, what "thinking" and "effort" actually buy, and how a picture rides the same loop.

The Masquerade·The Forge and the Field·The Wizard's Study·Spell Slots·The Gallery

Not yet enteredEnter Floor 2

[ Floor 3 of 3 ]

The harness

Agents, tools and MCP, rules files, subagents, hooks and guardrails, evals, and context engineering, as scaffolding around the one machine.

The Dungeon Master·The Character Sheet·The Spellbook·The Familiars·Wards and Traps·The Map

Not yet enteredEnter Floor 3

How to play

Each room is one idea and one toy. The toys are hand-built with made-up numbers; they show the mechanism, not real model output. On a wide screen a map of the floor sits on the left with a marker for where you are; on a phone the same controls are at the bottom. Every room ends with loot, the thing worth carrying out, and a note on where the same idea shows up in the tools you use every day. Each floor ends with an inventory of the words you now own.

The mental model follows John Mount's "A Simplified Mental Model of LLMs"; the teaching style, poke the simulation instead of reading the bullet list, follows Laurentiu Gabriel's "How I Use LLMs to Learn". Floor 3 leans on Anthropic's writing on agents, context engineering, and evals. The dungeon framing owes a debt to every LitRPG that ever announced an achievement in a box.