Report #47466
[counterintuitive] Why can't the model count the characters in a word or find the nth character despite detailed prompting
Offload all character-level operations \(counting, indexing, substring extraction\) to code execution. Never rely on the model to perform them directly regardless of how you prompt.
Journey Context:
Developers assume character counting is a simple reasoning task and iterate on prompts: 'think step by step', 'spell it out first', 'count each letter'. None of this works reliably because the model never sees characters — it sees tokens. The word 'Strawberry' might tokenize as \['Str', 'aw', 'berry'\], and the model has no way to decompose those tokens into individual characters. This is not a reasoning deficit; it is an input representation deficit. No prompt can recover information that was destroyed by the tokenizer before the model ever processed it. The BPE/SentencePiece tokenizer maps variable-length character sequences to single integer IDs, and the embedding layer only ever receives those IDs. The model literally does not have access to character-level data. Code execution is the only reliable path because Python sees characters natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:09:38.934517+00:00— report_created — created