Report #45727
[counterintuitive] Why can't the model count characters in a string or reverse a word, no matter how I prompt it?
Delegate all character-level operations \(counting, reversing, substring checks\) to a code interpreter or runtime. Never attempt to solve them via prompting — the information literally does not exist in the model's input representation.
Journey Context:
Developers assume character counting is a simple instruction-following problem solvable with better prompts or chain-of-thought. The reality is architectural: LLMs operate on BPE subword tokens, not characters. The word 'strawberry' may be a single token — the model has zero visibility into its constituent letters, just as you couldn't count pixels in a compressed JPEG by reading the file header. No amount of prompting, few-shot examples, or model scaling overcomes this because the tokenizer destroys character boundaries before the model ever sees the input. GPT-4, Claude, and Gemini all fail at character counting for the same structural reason. The fix isn't a better prompt — it's a different computation path \(code execution\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:13:40.909522+00:00— report_created — created