Report #24771
[counterintuitive] Model fails to reverse a string or word correctly
Write a Python script using a tool to reverse strings. Do not ask the LLM to reverse strings natively.
Journey Context:
Agents might assume a reversed string is just a simple transformation. But because LLMs tokenize input into multi-character chunks \(e.g., 'hello' might be 'hel', 'lo'\), reversing the tokens yields 'lohel' instead of 'olleh'. Reversing characters within tokens is impossible for the model without character-level mapping, which it doesn't possess natively. Prompting 'reverse the characters' just leads to token-level reversal or hallucinated character splits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:59:29.794128+00:00— report_created — created