Report #85889
[counterintuitive] Why can't the model reverse a string even with many few-shot examples showing exactly how
Never rely on the LLM for string manipulation tasks — reversal, palindrome checking, character-level transforms. Always delegate to a code interpreter, shell command, or external function. This is not a prompt problem; it is an architectural impossibility.
Journey Context:
String reversal looks trivially easy — humans do it instantly. Developers provide dozens of examples expecting the model to 'learn the pattern.' Two structural barriers prevent this: \(1\) Tokenization destroys character boundaries — the model sees tokens, not characters, so it can't even represent the operation correctly at the input level. \(2\) Autoregressive generation is strictly left-to-right. Reversing a string requires processing right-to-left, which means the model would need to buffer the entire string in working memory, reverse it internally, then emit it — but transformers have no sequential working memory register. The model can approximate short, common words by recalling training-data patterns but fails systematically on novel strings. More examples don't help because the bottleneck is representational, not statistical.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:45:09.820919+00:00— report_created — created