PromptisePromptise
Why PromptiseUse casesRoadmapDocs
GitHubGet started
Promptise - AI Framework LogoPromptise

The foundation layer for agentic intelligence. Build, secure and operate autonomous AI systems with Promptise Foundry.

pip install promptise

[01] Foundry

  • MCPcast
  • The Promptise Agent
  • Reasoning Engine
  • MCP
  • Agent Runtime
  • Prompt Engineering
  • Execution Engine
  • Agent Identity

[02] Resources

  • Documentation
  • GitHub
  • Guides
  • Learning Paths
  • Questions

[03] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

Open source · Python

← Learning paths> Mental Models: How to Think with LLMs
Lesson 07 / 19
37%

Why LLMs Fail Modified Puzzles: Pattern-Matching Bias

Why LLMs answer the famous version of a changed puzzle: training-data priors, research on counterfactual tasks, a real failure and how to prompt around it.

Intermediate5 minLLM Mental ModelsHow LLMs WorkBias and Sycophancy
All 19 lessons↓
  1. ✓Are LLMs Stochastic Parrots? What the Term Gets Right
  2. ✓Can LLMs Simulate Users? Role-Play, Personas and Limits
  3. ✓Why LLMs Get Niche Facts Wrong: Popularity and Training Data
  4. ✓Prompts as Code: The LLM as a Probabilistic Compiler
  5. ✓Are LLMs Black Boxes? What You Can and Can't Inspect
  6. ✓Why LLM Output Is Untrusted Input: Design for Injection
  7. 07Why LLMs Fail Modified Puzzles: Pattern-Matching Bias
  8. 08LLMs as Lossy Compression: Why They Can't Quote Exactly
  9. 09How LLMs Generate Text: Next-Token Probabilities Explained
  10. 10How to Brief an LLM: Context Gaps and Clarifying Questions
  11. 11How LLM Tool Calling Works: The Model Never Runs Tools
  12. 12Why Can't LLMs Count Letters? Tokens and Probability
  13. 13Does AI Boost Productivity? The LLM as Cognitive Multiplier
  14. 14How Context Shapes LLM Output: The Model Continues It
  15. 15Prompts as Interfaces: Design Prompts Like API Contracts
  16. 16LLM as a Judge vs a Jury: Making AI Evaluations Reliable
  17. 17AI Code Hallucinations: Why Plausible Output Fools You
  18. 18Why LLMs Give Similar Answers (and How to Get Variety)
  19. 19Why LLMs Mirror You: Sycophancy, Bias and Leading Prompts

Lessons in this path

  1. ✓Are LLMs Stochastic Parrots? What the Term Gets Right
  2. ✓Can LLMs Simulate Users? Role-Play, Personas and Limits
  3. ✓Why LLMs Get Niche Facts Wrong: Popularity and Training Data
  4. ✓Prompts as Code: The LLM as a Probabilistic Compiler
  5. ✓Are LLMs Black Boxes? What You Can and Can't Inspect
  6. ✓Why LLM Output Is Untrusted Input: Design for Injection
  7. 07Why LLMs Fail Modified Puzzles: Pattern-Matching Bias
  8. 08LLMs as Lossy Compression: Why They Can't Quote Exactly
  9. 09How LLMs Generate Text: Next-Token Probabilities Explained
  10. 10How to Brief an LLM: Context Gaps and Clarifying Questions
  11. 11How LLM Tool Calling Works: The Model Never Runs Tools
  12. 12Why Can't LLMs Count Letters? Tokens and Probability
  13. 13Does AI Boost Productivity? The LLM as Cognitive Multiplier
  14. 14How Context Shapes LLM Output: The Model Continues It
  15. 15Prompts as Interfaces: Design Prompts Like API Contracts
  16. 16LLM as a Judge vs a Jury: Making AI Evaluations Reliable
  17. 17AI Code Hallucinations: Why Plausible Output Fools You
  18. 18Why LLMs Give Similar Answers (and How to Get Variety)
  19. 19Why LLMs Mirror You: Sycophancy, Bias and Leading Prompts
← Path overview

LLMs are good at problems they have seen many times, and that strength becomes a bias when your problem only looks like a famous one. Change one detail of a well-known riddle and the model often answers the original. This essay explains why that happens, what research says about it, and how to work around it when your real task resembles a common template but differs in a way that matters. It's for anyone who uses models for reasoning, code or analysis.

[01]

Why do LLMs fail modified puzzles?

Because a model predicts the most likely continuation, and for a familiar-looking problem the most likely continuation is the familiar answer. When your version changes a detail, the pull of the memorized pattern can outweigh the words you actually wrote. McCoy et al., Embers of Autoregression (2023), found that GPT-4 decoded a simple cipher with 51% accuracy when the answer was a high-probability sentence and 13% when it was low-probability, on the same task.

Key takeaways:

  • Familiar surface, familiar answer. The closer your problem looks to a common one, the stronger the pull toward the common solution.

  • Explicit text doesn't always win. In the example below, the model quotes the changed detail and still gives the classic answer.

  • More reasoning isn't a guaranteed fix. Higher reasoning effort didn't help in the example.

  • Change the surface. Restating the problem in neutral terms, without the famous framing, helps more than warnings do.


[02]

Why it happens

Pretraining rewards predicting text as it usually appears. A riddle that shows up thousands of times online, always with the same answer, becomes a strong pattern: the opening sentences make the classic answer very likely before the model reaches your changed detail. McCoy et al. call this sensitivity to probability: models do better when the task, the input or the output is common in training data, even when the logic is identical.

Wu et al., Reasoning or Reciting? (2023), tested "counterfactual" versions of tasks: arithmetic in base 9 instead of base 10, chess with the knight and bishop starting positions swapped, code in a variant of Python with 1-based indexing. Performance dropped on the variants across tasks, which suggests part of what looks like reasoning is recall of the default case.

None of this means models can't reason. It means they reason best on the version of a problem they saw most, and you can't see from the output which mode you got.


[03]

Example: the surgeon riddle, changed

The classic riddle has a surgeon say "I can't operate, he's my son" after the father dies; the answer is that the surgeon is the boy's mother. This version states outright that the surgeon is the father. Run on gpt-5-mini; results vary by model.

Text
A man and his son are in a car crash. The man dies at the scene. The boy is rushed to
hospital. The surgeon, who is the boy's father, looks at him and says: 'I can't operate
on this boy, he's my son.' How is this possible? Answer in two sentences.

The model gave the classic answer every time, contradicting the text:

Output
The surgeon is the boy's mother. The surgeon could be female, so she is both the boy's
parent and the surgeon.

Higher reasoning effort gave the same answer. Asking it to quote the relevant sentences first didn't help either:

Output
"The surgeon, who is the boy's father, looks at him and says: 'I can't operate on this
boy, he's my son.'"
…
Answer (two sentences): The surgeon is the boy's mother. The apparent paradox arises
from the assumption that surgeons are male.

What helped was removing the famous surface and stating the facts neutrally:

Text
Facts: (1) Person A and child C were in a crash. (2) Person A died. (3) Person B is C's
father. (4) Person B is a surgeon and refuses to operate on C because C is his son.
Question: how can facts 1-4 all be true at once? Answer in two sentences.

Most answers now kept B as the father, for example:

Output
Person B is the surgeon who refuses to operate because the child C is his son — and
Person A, who died in the crash, is C's other parent (the child's mother). …

That's better, not perfect, which is the honest state of things.

In the famous framing, the riddle states that the surgeon is the boy's father, yet the model answers that the surgeon is the boy's mother, even with more reasoning or after quoting the sentences. Restated as neutral facts about persons A, B and C, the model mostly keeps B as the father.
FigureThe changed surgeon riddle in its famous framing and as neutral facts, and what the model answered

[04]

What it changes in practice

Riddles are a clean demonstration. The same pull shows up in real work whenever your task is a near-copy of a common one: a fiscal year that starts in April, a week that starts on Sunday, an API that looks like a popular one but takes different arguments, a contract clause that differs from the standard template.

  • Lead with the difference. Put what's unusual about your case first and state it plainly ("Unlike standard X, ours does Y"), instead of burying it in the middle of a familiar description.

  • Strip the template when it matters. If the problem has a famous shape, restate it in neutral terms: plain facts, renamed entities, no well-known framing.

  • Check the deviation specifically. When you review output, look first at the one place your case differs from the default. That's where errors cluster. A test that exercises the unusual rule catches this quickly.

Explicit instructions usually do work for ordinary tasks. A FizzBuzz request that said "Buzz for multiples of 7" used 7 every time. The risk is highest when the famous pattern is strong and your change is small.


[05]

Frequently asked questions

Do reasoning models still fall for modified riddles?

Less often, but yes. In the example above, a reasoning model with medium effort still answered the classic version. Reasoning helps when the model notices the conflict; it doesn't help if the familiar reading wins before reasoning starts.

Is this the same as the model being biased?

It's a statistical bias, not a social one: a pull toward high-probability answers from training data. It can overlap with social bias, as in the surgeon riddle, where the classic answer is itself about a stereotype.

Does chain-of-thought fix this?

Sometimes. Step-by-step reasoning helps the model notice a stated fact, but its reasoning can also follow the familiar path. Restating the problem in neutral terms is more reliable than asking for more steps.

How do I test whether a model is reasoning or reciting?

Make a counterfactual variant: change one rule or detail that would change the answer, and see whether the answer changes. That's the method in Wu et al. If the answer stays the same, the model is likely recalling the common case.


[06]

Next steps

  • Why the default answer is the typical one: are LLMs stochastic parrots?

  • Get the reasoning out before the answer: LLM as a probability map.

  • Step-by-step prompting: chain-of-thought lite.

  • Break problems into sub-questions: self-ask and decomposition prompts.

  • Why a model's own explanation can mislead: LLM as a glass box.

← PreviousWhy LLM Output Is Untrusted Input: Design for InjectionNext lesson →LLMs as Lossy Compression: Why They Can't Quote Exactly