Report #86677
[counterintuitive] Why can't the model count characters, find the nth letter, or reverse a string reliably no matter how I prompt it?
Delegate all character-level operations to code execution. Never ask an LLM to count, index, or manipulate individual characters — use a Python tool or external function instead. No prompt technique can solve this.
Journey Context:
Developers assume character counting is a reasoning problem that better prompts or bigger models will eventually solve. It is not. LLMs ingest BPE tokens, not characters. The string 'strawberry' may be tokenized as \['straw', 'berry'\], giving the model zero native representation of individual 'r' characters. The information is destroyed at the input layer. Chain-of-thought, few-shot, and 'think step by step' cannot recover information that was never encoded. This is an architectural fact of subword tokenization, not a capability gap. The only fixes are changing the architecture \(character-level models\) or bypassing it entirely \(tool use\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:04:36.964065+00:00— report_created — created