Why Chatbots Stumble on Counting Letters and Other Simple Puzzles
How tokens, learned habits and one-pass answering explain odd chatbot mistakes on tasks that look easy to people.
Key takeaways
- Language models process tokens, which are chunks of text, and that hides the individual characters of many words.
- Puzzles that resemble well-known ones can draw out the familiar answer even when a key detail has changed.
- Asking for the work in explicit steps, or having the system run code, often fixes counting and ordering errors.
- A puzzle failure does not show that a tool is useless, and puzzle success does not show it is reliable elsewhere.
Chatbots stumble on letter counting mainly because they do not read letter by letter. Text is chopped into chunks called tokens before the model ever sees it, so a common word may arrive as one unit or a few, with its spelling only indirectly available. Other simple puzzles trip them for related reasons: the task needs careful step-by-step work, or it resembles a famous puzzle closely enough that a learned answer takes over.
This explains a strange pattern. The same system may draft a decent cover letter and then insist that a short word contains the wrong number of a given letter. Ease for a person and ease for a model are different things.
What the model actually receives
Before processing, software called a tokenizer splits your text into pieces from a fixed list. Frequent words often become a single token. Rarer words break into several parts. Each token is then represented as a number, and the model works with those. What tokens are goes into more detail.
Take the word "strawberry". Spelled out, it is s, t, r, a, w, b, e, r, r, y, which contains three letters r. A model may receive it as just a few chunks. The exact split differs between systems. Either way, "this chunk contains two r's" is something the model has to have learned about the chunk, not something it can see.
Imagine being asked how many times a certain pen stroke appears in a word you only ever heard spoken. You could work it out if you knew the spelling well, but you would have to reconstruct it first.
Tasks that tokens make awkward
Anything that depends on characters can be affected:
- counting a letter in a word or sentence;
- spelling a word backward;
- finding words with a set number of letters;
- making anagrams, where the same letters are rearranged;
- writing lines that obey a strict character limit;
- noticing a single swapped letter in a long string.
Models often manage these for common words, because spellings are discussed in their training material. Performance tends to get shakier with long, rare or made-up strings. Character limits are a practical case: if a form allows 160 characters, count with a word processor or the form itself rather than trusting the chatbot's report.
Answering too fast
A basic language model produces its reply one token after another, with a fixed amount of computation for each. If the first thing it writes is the final number, it has had no written working in which to count.
Prompting it to spell the word out, one letter per line, and then tally changes the situation. Each letter becomes its own visible item, and the running count can be built from them. Many newer systems, often marketed as reasoning models, do some of this intermediate work automatically. That helps on many puzzles but does not make errors impossible. See what reasoning models do differently.
Here is a clear hand version for the letter s in "Mississippi":
M i s s i s s i p p i (11 letters in all)
s s s s s appears at positions 3, 4, 6 and 7
count of s = 4 The pull of a familiar puzzle
Some failures have nothing to do with spelling. Many riddles are repeated endlessly online, along with their solutions. If you present a version with one change, a model may answer the original.
For example, a well-known type of puzzle asks you to get a farmer, a wolf, a goat and a cabbage across a river with a small boat. Suppose your version says the boat is large enough to carry everything at once. The correct answer is one trip. A system leaning on memory might still produce the long shuffle of crossings.
The same applies to trick questions turned inside out. When a puzzle looks like a trap, a learned "clever" answer can appear even though your version has no trap. People do this too, when they answer the question they expected to hear.
You can test for it. Change one condition that alters the solution and see whether the reply notices. Ask the system to restate the conditions before solving.
Comparisons, order and bookkeeping
Another family of errors involves keeping track.
- Comparing decimals. Which is larger, 9.9 or 9.11? Written with equal decimal places, 9.90 and 9.11, the first is clearly larger. Systems have sometimes answered otherwise, perhaps influenced by contexts such as software version numbers, where 9.11 does come after 9.9.
- Positions. "What is the fifth word of your previous sentence?" requires exact counting over text.
- Constraints. "Write a paragraph without the letter e" must be enforced on every word, while fluent habits push the other way.
- Changing states. Following who holds which object after a long series of swaps invites a slip, and one slip carries into every later step.
Each looks trivial because a person with paper can check it mechanically. Mechanical checking is something ordinary software does perfectly and a text predictor does only as well as its learned behavior allows.
What reliably helps
| Problem | Try this | Best check |
|---|---|---|
| Letter counts | Spell out the word first | Your own count |
| Character limits | Ask for a shorter draft with margin | A character counter |
| Modified riddles | Ask it to list the conditions | Walk through the solution |
| Sorting a long list | Ask it to use code if available | A spreadsheet sort |
| Tracking many steps | Request a table of states | Verify a few rows |
When a product can write and run code, a short program counts characters exactly. The model's job becomes writing the program and passing it the right text, which it can still get wrong, so glance at what was run.
Do not rely on a correction you typed. If you say "it is actually three" and the model agrees, it has accepted your claim, true or not.
Why the explanation afterward can mislead
When a chatbot gets a count wrong and you ask how it arrived there, it will usually give a tidy account: it went through the word, noted each letter and added them up. That account is another piece of generated text. It need not describe what actually happened inside the system, which has no simple way to inspect its own processing and report it faithfully.
You may also see a correct list of letters followed by a total that contradicts the list. The list and the total were each produced in sequence, and nothing forced them to agree. Reading the working, and not only the last line, catches this quickly.
The wider question of whether stated reasons match the real process is covered in whether an AI explanation reflects how it reached the answer. For everyday purposes, judge the working by whether each step is right, and do not treat it as a confession or a diary.
What these failures do and do not show
Some people point to letter-counting errors as proof that language models understand nothing. Others reply that the errors reflect an input format, rather like a human limit of perception, and say little about other abilities. Both observations contain something worth weighing, and the larger debate is covered in do language models understand anything.
A modest conclusion is safe. Ability in these systems is uneven, and your intuition about which tasks are hard is a poor guide. A tool can be strong at explaining a tax concept and weak at counting the items in your list, or the reverse on another day. The related puzzle of high exam scores beside basic slips is taken up in passing hard exams and failing easy tasks.
Specific famous examples also have a short shelf life. Developers notice them, and newer systems may handle the well-known cases while stumbling on a fresh variation. Make up your own version instead of reusing a viral one.
A quick experiment you can run
Pick five words, including one long invented one. Ask a chatbot to count a letter in each, first with no instructions and then asking it to spell each word out before counting. Score both rounds yourself.
Five words cannot measure a system precisely, but the exercise shows how wording changes results. It also builds a useful reflex: when a task depends on exact characters, exact order or exact tallies, verify it or hand it to a tool made for exactness.