Why Most AI Models Can't Count the Letter "R" in Strawberry
A non-technical guide to Tokenization: why AI fails at simple math and spelling.
Why Most AI Models Can't Count the Letter "R" in Strawberry
A non-technical guide to Tokenization: why AI fails at simple math and spelling.

If you want to break a supercomputer worth billions of dollars, you don't need a hammer. You just need to ask it a very simple question:
"How many letter' r's are in the word 'Strawberry'?"
If you ask most language models, they will often confidently tell you, "There are two 'r's in Strawberry."
You count them: S-t-r-a-w-b-e-r-r-y. There are three. You tell the AI, "No, count again." It pauses, then says, "My apologies. You are correct. There are two 'r's in Strawberry."
How is this possible? This machine can pass the Bar Exam, write Python code, and translate Swahili into French. Yet it can't count to three for a simple fruit.
The answer comes from how computers "read." We see letters, but the computer sees Lego bricks.
The Lego Castle (Tokenization)
To a human, language is fluid. We see S-T-R. To an AI, language is a construction project made of rigid, pre-fabricated blocks called Tokens.
Imagine building a castle out of Legos. You can't get a special curved wall unless Lego makes that exact piece. You have to use the standard bricks they offer.
In AI, every word is made from these standard bricks.
Common words like "Apple" or "Table" each get their own single Lego brick.
More complex words are split into smaller pieces.
Take the word "Unbelievable." You see 12 letters, but the AI sees three tokens: un, believ, and able.
The Strawberry Problem
That's why the AI fails the "Strawberry" test.
To the AI, "Strawberry" is usually a single, solid Lego brick, or sometimes two tokens: Straw + berry. When you ask, "Count the 'r's in Strawberry," it's like holding up a single red Lego brick and asking someone, "How many atoms are inside this plastic?”
You can't see the atoms, only the brick. The AI can't "look inside" the token to count letters because, for the model, letters don't exist—only ID numbers do.
Why This Matters for Business
You might wonder, "Who cares if it can't spell Strawberry?" But this limitation causes real headaches in engineering:
Bad Math: This is why AI struggles with arithmetic. It doesn't see numbers as digits; it sees them as unique tokens. It memorized that2 + 2 = 4, but it struggles to "carry the one" on large numbers it hasn't seen before.
Coding Errors: It explains why AI sometimes hallucinates variables or messes up strict formatting, such as JSON or YAML. It is predicting chunks, not characters.
The "Space" Trap: It explains why trailing spaces in your prompt can sometimes break the output, because "Prompt " (with a space) is a completely different token ID from "Prompt" (without a space).
How to Fix It
As a prompt engineer, your job is to make the AI break the bricks. If you need it to do something at the character level, like counting letters, writing an acrostic poem, or reversing a word, you have to make it separate the tokens.
The Fix: "Spell the word Strawberry with spaces between the letters, then count the 'r's."
By making it generate "S t r a…", you're swapping the "Big Brick" for a pile of "Tiny Bricks." Once it does that, it can count them perfectly.
This is what prompt engineering is all about. It's not magic. It's about understanding how the machine works so you can guide it rather than fight it.
By Joshua McDonald on January 15, 2026.
Exported from Medium on August 26, 2026.
Reader discussion