Why AI Can't Count the Letters in "Strawberry"

I keep seeing people ask a chatbot how many r’s are in “strawberry.”

Ripe red strawberry fruit with green leaves

Strawberry fruit. Photo: Paolo Neo / Wikimedia Commons. Public domain. Commons file.

The answer is three. A kid can count them.

The bot still gets it wrong a lot. Often enough that it became a meme.

So what is going on?

Chatbots do not read one letter at a time like you do.

They break words into chunks first. Those chunks are called tokens. A token is just a small piece of a word, not a single letter.

“Strawberry” might get split into pieces like “st,” “raw,” and “berry.”

The bot then works with those pieces.

That is the problem. Inside “berry” there are already two r’s. The bot was not built mainly to count letters inside each piece. It was built to guess what comes next.

Ask it to count letters and you ask it to do something it is not good at.

We see letters. It often sees pieces.

If you need an exact count, do not ask the chatbot. Spell it out. Use a simple counter. Or open a text editor and search.

Save the chatbot for work that needs judgment. Not finger-counting.

Stay tuned… I will keep explaining AI quirks in plain English when they show up.

More from Blog