Report #71328
[counterintuitive] LLM fails to count characters or find specific letters in a word
Offload character-level tasks to a code interpreter or Python REPL. If forced to use the LLM directly, instruct it to write a Python snippet to evaluate the string, rather than guessing the count.
Journey Context:
Developers assume character counting is a trivial reasoning task and try to fix failures with step-by-step prompting. In reality, LLMs do not see characters; they see BPE tokens. The word 'strawberry' might be tokenized as \['str', 'aw', 'berry'\], making it architecturally impossible to count 'r's by just 'looking' at the input. Prompting cannot grant sub-token granularity because the underlying representation lacks it entirely. The model is functionally blind to the letters inside a single token.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:18:19.663522+00:00— report_created — created