program-aided-computation TEC-0016Offload arithmetic to code
Have the model write a short program for the numeric part and run it, instead of computing in text.
The model reads the problem and produces code that performs the calculation, then an interpreter executes it. The model does the decomposition it is good at and the interpreter does the arithmetic it is bad at. Works with any tool-calling setup that can run Python.
Requires: Requires a sandboxed interpreter.
Contexts: Math, Data analysis
Does it work?
argued, not measured1 supporting · 0 contesting source · last moved 2026-09-04
Efficacy claims — what this technique actually moves, under which conditions, and whether that has been contested.
Needs: an environment where code can run
Fails when:
- The error is in translating the problem into a program, which is now the only thing the model does. Verification has to move there with it. (helps, narrowly)
- mechanismmechanism reasoningOffloading the calculation to generated code removes the arithmetic as a source of error but does not remove error — what remains is the translation from problem to program, which is now the only thing the model is doing. Verification has to move there with it.
- supports PAL: Program-aided Language Models (2022)
Code
- https://github.com/reasoning-machines/pal — Reference implementation with prompts and evaluation on math word problems.verified 2026-09-02
Sources
Whether a technique works is a claim. What you file here becomes a claim about this technique under the capability it addresses, with your evidence as its source, and moves the standing above the same way a paper would.