Report #36336
[counterintuitive] Model can't follow my algorithm — I need to specify the steps more clearly in the prompt
Implement novel or complex algorithms in actual code executed externally, not in natural language prompts; have the model write and run code rather than execute procedures in its own reasoning
Journey Context:
When an LLM fails to follow a specified algorithm, developers assume the instructions were not clear enough and add more detail. The fundamental issue: LLMs do not 'execute' algorithms — they pattern-match. For well-known algorithms \(binary search, BFS\), the model approximates the output because it has seen many examples in training. For novel, modified, or complex algorithms, the model will deviate because it is generating what 'following an algorithm' looks like statistically, not actually computing each step. Each step is independently predicted and can introduce compounding errors. This is why 'prompt programming' \(specifying algorithms in natural language\) is fundamentally different from actual programming. The key insight for coding agents: the model can write code that implements an algorithm far more reliably than it can execute the algorithm in its own chain-of-thought.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:28:14.816893+00:00— report_created — created