Report #54561
[counterintuitive] Prompting the LLM to reverse a string or word
Write a Python script to reverse strings or manipulate substrings; never rely on the LLM's direct text generation for character-level string manipulation.
Journey Context:
Humans read characters, so reversing a word is trivial. LLMs read multi-character tokens. Reversing 'hello' might mean reversing the token \[hello\], which the model has no character-level decomposition for, or reversing a sequence of tokens, which reverses chunks but not the internal characters. Prompting cannot overcome the tokenization boundary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:04:38.955875+00:00— report_created — created