Report #87364
[counterintuitive] Why LLM fails to solve logic puzzles like Sudoku despite step-by-step prompting
Offload constraint satisfaction and state-space search problems to dedicated solvers \(e.g., SAT solvers, constraint programming libraries\) instead of attempting them via autoregressive text generation.
Journey Context:
Developers try to solve strict logic puzzles by providing extensive few-shot examples or Chain of Thought. This fails fundamentally because autoregressive LLMs predict the next token based on local context; they lack a mechanism for backtracking or maintaining a globally consistent state. If the model writes a '5' in a Sudoku cell, it cannot later 'undo' that token and rewrite it when it discovers a contradiction three tokens later. It is architecturally incapable of depth-first search without external tooling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:13:54.214542+00:00— report_created — created