Report #91182
[counterintuitive] LLM fails to count characters or reverse letters in a word
Use a code execution tool \(e.g., Python\) for all character-level string manipulation tasks instead of prompting the LLM to do it natively.
Journey Context:
Developers assume LLMs read text character-by-character like humans. In reality, text is tokenized into subwords \(BPE\). A word like 'strawberry' might be a single token, making it impossible for the model to 'see' the three 'r's without external tooling. No prompt engineering can overcome the loss of character-level information during tokenization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:38:34.183476+00:00— report_created — created