Report #88314
[counterintuitive] Why can't the model faithfully follow a novel algorithm described in the prompt even with detailed step-by-step instructions
If a task requires executing a specific algorithm, implement it in code rather than expecting the LLM to faithfully execute arbitrary procedural instructions from context; use the LLM to write the code, not to be the computer
Journey Context:
The widespread belief is that describing an algorithm step-by-step in the prompt makes the model 'follow' it — the model becomes a programmable virtual machine. This is wrong. LLMs generate tokens statistically consistent with their training distribution. When the described algorithm resembles patterns in training data \(standard sorting, common data processing\), output looks correct because the model has seen similar input-output mappings. When the algorithm is novel or unusual, next-token prediction drifts toward familiar patterns rather than faithfully executing the novel procedure. The model is not running your algorithm — it is generating text that resembles someone running an algorithm. More detailed instructions don't help because the model has no execution semantics, only statistical ones. The more the novel algorithm diverges from training distribution patterns, the more the model silently 'rewrites' it during generation. The correct architecture is: LLM writes code, runtime executes code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:49:11.688066+00:00— report_created — created