program-aided language model
In plain wordsA technique in which an AI solves a math or logic problem by writing a small computer program and letting a computer run it, instead of doing the arithmetic in its head.
A prompting approach in which a language modellanguage model, n.: A system that has learned how likely different sequences of words are, so it can predict the next word in a text and, by doing that repeatedly, write text of its own. translates a reasoning problem into an executable program — typically Python that sets up variables and computes the answer — and an interpreter runs the program to produce the final result. The split plays to each side's strengths: the model reads the problem and works out the steps, the computer does the exact arithmetic, and the slips that creep into purely textual chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate. are avoided. The idea extends to symbolic solvers and calculators, and it underlies the code-interpreter and code executioncode execution, n.: Letting an AI write a small program and actually run it — to do math, analyze a spreadsheet or test its own code — then use the real output instead of guessing. tools that models now call routinely while reasoning; reasoning modelsreasoning model, n.: An AI model trained to work through a problem step by step in hidden 'thinking' text before it answers. Letting it think longer generally makes it better at math, coding and planning. trained with tools learn for themselves when to write such code.
Switching to program-aided prompting fixed the rounding errors, because the interpreter now does the sums.
Origin
Introduced as PAL by Luyu Gao, Aman Madaan and colleagues at Carnegie Mellon University (November 2022), whose CodexCodex, prop. n.: A name OpenAI has used twice: first for a 2021 AI model that wrote code and powered the original GitHub Copilot, then from 2025 for its family of coding agents.-based system beat PaLM-540B with chain-of-thought prompting on GSM8K by 15 percentage points. Wenhu Chen and colleagues' concurrent 'Program of Thoughts' prompting (2022) made the same move.
Related
- chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.
- code executioncode execution, n.: Letting an AI write a small program and actually run it — to do math, analyze a spreadsheet or test its own code — then use the real output instead of guessing.
- code generationcode generation, n.: Having an AI write computer code from a description in plain language, from finishing a single line as you type to building whole programs.
- tool usetool use, n.: An AI model's ability to reach beyond its own knowledge by operating outside tools — searching the web, running code, using a calculator or an app — and folding the results into its work.
- augmented language modelaugmented language model, n.: A language model hooked up to extras — a search engine, a calculator, a memory store or other tools — so it can do things a model working only from its training cannot.
- neuro-symbolic AIneuro-symbolic AI, n.: AI that combines neural networks, which learn patterns from data, with symbolic methods, which follow explicit rules and logic, aiming for systems that both learn flexibly and reason reliably.
Sources
- Gao, L., Madaan, A., Zhou, S., Alon, U., Liu, P., Yang, Y., Callan, J. & Neubig, G. (2023). PAL: Program-aided Language Models. ICML 2023. arxiv.org/abs/2211.10435
- Chen, W., Ma, X., Wang, X. & Cohen, W. W. (2023). Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks. Transactions on Machine Learning Research.
Mentioned in
neuro-symbolic AIneuro-symbolic AI, n.: AI that combines neural networks, which learn patterns from data, with symbolic methods, which follow explicit rules and logic, aiming for systems that both learn flexibly and reason reliably.