#6

Why can't AI count letters or do math?

It gets letter counts and long calculations wrong.

Example chat

MEHow many r's in the word strawberry?

AIYep, 17. Do you want me to text your ex-girlfriend again or should we give her a few minutes to respond?

Why it happens

AI doesn't read letter by letter. It breaks text into chunks (called tokens) that are usually whole words or pieces of words, so counting letters is weirdly hard for it. It also doesn't calculate like a calculator. It guesses what the answer probably looks like, which is fine for easy sums and falls apart on big numbers or lots of steps. Making it run the math as actual code fixes most of this.

Try this prompt

Don't do this math in your head. Write and run code to compute it. If you can't run code, show every step on its own line so I can check it.

Then give the final number and one sanity check: a rough estimate showing it's in the right ballpark.

Also asked

Why can't ChatGPT count the r's in strawberry?

It reads text in chunks, not letters, so it never actually sees the three r's one at a time.

Is AI bad at math?

At mental math, often. When it writes and runs code to do the calculation, it's very reliable.

Updated

More things AI is bad at