In Chapter 1, we talked about AI guessing the next word. That's a great mental picture — and now it's time for a delightful plot twist: Large Language Models don't actually read words. And they don't read individual letters either.
Wait — why not? Imagine designing the vocabulary box for an AI:
- If you chop text into individual letters (c a t), your box is tiny, but every sentence turns into a giant parade of tiny meaningless fragments. The model has to work way too hard just to assemble basic words.
- If you store every whole word in the world, your dictionary explodes. Worse, the moment someone types a brand-new compound word like unfriendliness, a typo, or a line of code, the model hits a wall and sees "UNKNOWN".
So engineers found a brilliant middle ground called tokenization. Common words stay intact as a single puzzle piece (apple, the). Longer, rarer, or unfamiliar words split neatly into reusable subword chunks (un + believe + able).
Type anything you like into the live tokenizer below — or click the presets to see how differently plain English, compound words, code, and numbers get sliced.
How Does the AI Invent Its Puzzle Pieces?
Nobody sits down and hand-writes a list of 50,000 subword chunks. Instead, the tokenizer discovers the best puzzle pieces automatically from a giant pile of text using a wonderfully simple recipe called Byte-Pair Merging.
Think of it like snapping Lego bricks together:
- Start by splitting all text into individual characters.
- Count which pair of neighboring pieces shows up together most often.
- Fuse that winning pair into a brand-new single brick and add it to your vocabulary box.
- Repeat thousands of times until your box is full!
Watch this happen step-by-step on the short phrase "the other there". Pay attention to how the total piece count shrinks with every single merge.
The "Strawberry" Illusion
Now we can solve the mystery from the start of the chapter: why did so many powerful AI models famously insist that "strawberry" only has two R's instead of three?
Because the model never sees the letters. By the time your question reaches the AI's brain, the tokenizer has already sealed the word into 3 solid token bricks — each represented by a single ID number. Asking an LLM to count the R's inside strawberry is like handing someone three locked boxes labeled #496, #675, and #15717 and asking them to count how many letter R's are painted on the inside!
Flip the switch below to jump back and forth between Human Eyes and LLM Eyes across three classic AI blind spots.
Now our text has been sliced into clean, reusable puzzle pieces, each with its own ID number. Wait: ID numbers like #496 and #15717 are just arbitrary labels — they don't tell the model what anything means. In Chapter 3, we turn those bare IDs into glowing points on a Map of Meaning.
Check Your Intuition
Why do modern LLMs split text into subword tokens instead of using individual letters or whole words?