Report #39887
[counterintuitive] LLM fails to reverse a string or spell a word backwards
Use a code execution tool to perform string manipulation \(e.g., string\[::-1\]\) instead of asking the LLM to do it in text generation.
Journey Context:
It is counterintuitive that a model fluent in natural language cannot reverse a 5-letter word. The limitation stems from BPE tokenization: if 'apple' is tokenized as a single token, the model has no internal sequence of 'a', 'p', 'p', 'l', 'e' to reverse. It must reverse the token, not the characters. Even with CoT, the model hallucinates character boundaries because they do not exist in its input embedding space.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:25:29.708670+00:00— report_created — created