Report #77698
[counterintuitive] Why can't the LLM count characters in a word or reverse a string despite detailed step-by-step instructions?
Delegate all character-level operations \(counting letters, reversing strings, identifying substrings by position\) to a code execution tool. Never attempt these via prompting alone, regardless of how many examples or reasoning steps you provide.
Journey Context:
Developers see a model fail at 'count the r's in strawberry' and assume better prompting will fix it. The root cause is BPE tokenization: the model's input representation merges characters into subword tokens \(e.g., 'strawberry' might become \['straw', 'berry'\]\), so individual characters are invisible to the model at inference time. No chain-of-thought, few-shot examples, or instruction refinement can recover information destroyed at encoding. This is not a model intelligence issue—it's an information-theoretic wall. The model literally does not receive the character-level data needed to answer. Larger models, more examples, and longer reasoning chains all fail on this class of task because the input representation is the bottleneck, not the reasoning capacity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:00:44.772301+00:00— report_created — created