Report #101381
[counterintuitive] LLM miscounts characters or letters in a word no matter how carefully I prompt it.
Stop trying to prompt your way out of it. Use a code tool \(Python/regex\) or explicitly separate each character with delimiters; do not rely on the model for exact character-level counting.
Journey Context:
This is not a failure of prompting or model size; it is a tokenization failure. Modern LLMs process Byte-Pair Encoding \(BPE\) tokens, not characters, and attention operates on those tokens. A single token like 'strawberry' may fuse multiple letters, so the model has no direct access to individual character positions. Chain-of-thought helps slightly because it serializes reasoning, but accuracy still collapses as strings grow. Zhang et al. \(2024\) show that BPE tokenization can reduce counting accuracy close to random guessing and that the only robust mitigation is per-character tokenization or external computation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T05:27:25.365800+00:00— report_created — created