Skip to content
mentoor

Topic 2 of 5 · 3 min read

Tokens and prediction, not calculation

Goal: Explain why a model can miscount letters or misadd a column while writing convincing working.

A language model does not calculate. It reads text in chunks and predicts the most likely next chunk, so a number it writes is a prediction that looks like an answer.

Check yourself · 1 of 3

Why can a chat assistant miscount the letters in a word?

Choose one answer

Why it matters

If you know the cause, you can predict where the model will slip. You also stop being surprised when a tool that writes a clean essay gets "how many r's are in strawberry" wrong.

Two ideas to hold

  1. Chunks, not letters. Models read text as tokens: pieces of words, often a few characters long. A word like "strawberry" may arrive as two or three pieces, and the model never sees it as ten separate letters. Counting letters means reasoning about something it was not shown directly. Numbers get split into pieces too, so a long number is several chunks, not one value.
  2. Prediction, not computation. The model produces the next piece that fits the pattern. For "17 x 23" it has seen similar patterns many times and often lands on the right answer. For a rare or long sum, the pattern is weaker, and it can produce something that looks right but is not.

Anthropic's research on how Claude does arithmetic found that the model uses several parallel paths: one for a rough estimate and one for the last digit. It also found that when asked, the model describes the school method of carrying digits, which is not what happened inside it. So the written explanation is not a faithful record of the calculation.

What this explains

  • Neat working, wrong answer. The steps are text written to fit the pattern of a worked solution. They are not a log of a calculation.
  • Strong on common sums, weak on rare ones. Familiar patterns are easy to predict.
  • Letters and word counts fail. The units the model sees are not the units you are counting.
  • Confidence does not track correctness. The model writes a number in the same tone either way.

Before and after

Before: How many times does the letter "e" appear in this paragraph?

The model sees chunks and guesses a count.

After: Write a short script that counts the letter "e" in the paragraph below, run it, and report the result.

Now a program does the counting on exact characters, and the model only writes the instructions.

What goes wrong

  • Asking the model to "double-check" in the same chat. It re-reads its own prediction and often agrees with it.
  • Believing the explanation. A clear explanation of a method is not proof the method ran.
  • Assuming a better model never slips. Newer models improve a lot, but the cause is the same, so exact work still needs a check.

Examples

Letters it never sees

Ask a chat assistant how many times "r" appears in "strawberry". The word reaches the model as a few chunks, not as ten letters, so the count is a guess about something it cannot see directly. A script that loops over the characters gets it right every time.

Working that does not match the method

Anthropic's research on Claude (see references) found the model describes carrying digits like a school pupil, while its internal process used different paths. The lesson is not that the model lies. It is that the written steps are not proof of how the number was produced.

Key points

  • Models read tokens, which are chunks of text, not single letters or whole numbers.
  • A number from a model is a prediction of what fits, not the result of a calculation.
  • Written working can look like a calculation without being a record of one.
  • Familiar sums are often right, while long or rare ones are where predictions drift.
  • Asking the model to double-check in the same chat often just repeats the first guess.

Common mistakes

  • Believing that shown working proves the answer was calculated.
  • Asking the same chat to double-check instead of using an independent method.
  • Expecting a model to count letters or words as precisely as a text editor does.
  • Assuming a newer model has removed the problem rather than reduced it.

Check yourself · 2 of 3

An assistant shows step-by-step working for a sum and ends on a wrong total. What does this tell you?

Choose one answer

Check yourself · 3 of 3

You ask a chat model to 'double-check' its own total in the same conversation. How useful is that?

Choose one answer

Practice items, not counted towards your mastery.

Start here