Practical overview
When it fits
Use it when you want research scripts for testing program-of-thought prompting on numerical or quantitative question-answering tasks, rather than a ready-made consumer math app.
Who it is for
- Researchers studying language-model numerical reasoning and prompting.
- Developers reproducing or adapting the repository’s dataset-specific experiments and scoring scripts.
Documented uses
- Run few-shot or zero-shot numerical-reasoning experiments.
- Compare greedy decoding with self-consistency runs.
- Generate prediction files and calculate exact-match scores.
Requirements & limits
The documented runs require an OpenAI key. The repository specifies an MIT license.
- The approach depends on an external Python interpreter to execute model-generated programs.
- The repository provides separate scripts for few-shot, zero-shot, greedy and self-consistency configurations.
- The README reports results on datasets including GSM8K, AQuA, SVAMP, TabMWP, FinQA, ConvFinQA and TATQA.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run a documented GSM8K experiment and score predictions
Use the repository’s documented few-shot or zero-shot GSM8K script and evaluate its prediction file.
Before you start
- Python
- An OpenAI key set as OPENAI_KEY
- The repository’s scripts and required dataset files
Steps
Set the OPENAI_KEY environment variable as shown in the repository README.
For few-shot greedy decoding, run the command below; for few-shot self-consistency, run the command below; for zero-shot, run the command below.
python run_gsm8k.py --greedypython run_gsm8k.pypython run_gsm8k_zs.pyUse the prediction file produced in the outputs/ directory as the input to evaluation.
From outputs/, run the command below.
python compute_score.py --inputs
Expected outcome
The run produces a prediction file, and the scoring script evaluates that file.
Guide limitations
- The documented evaluation command assumes a prediction file has already been produced.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- TIGER-AI-Lab/Program-of-Thoughts · Official homepage title · retained in its source language

