OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Program Of Thoughts

Program Of Thoughts is a Python research-code repository for numerical reasoning with language models. It contains prompting and evaluation scripts that have a model express a solution as Python code, then rely on an external Python interpreter for computation.

Independent OpenViST project profile, based on linked sources.

Program Of Thoughts — Reproducing the documented GSM8K and AQuA runs
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Set the OPENAI_KEY environment variable as shown in the repository README.

  2. 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.

    Documented command
    python run_gsm8k.py --greedy
    Documented command
    python run_gsm8k.py
    Documented command
    python run_gsm8k_zs.py
  3. Use the prediction file produced in the outputs/ directory as the input to evaluation.

  4. From outputs/, run the command below.

    Documented command
    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.
Evidence and transparency

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