Skip to main content

Overview

How can we leverage external code execution to generate intermediate reasoning steps? Program of Thought aims to leverage an external code interpreter to generate intermediate reasoning steps. This helps achieve greater performance in mathematical and programming-related tasks by grounding our final response in deterministic code. The approach involves:
  1. Generate Code: Create a solver function that implements step-by-step logic
  2. Execute Code: Run the generated code to get deterministic results
  3. Extract Answer: Use the computed result to make final predictions

Example

References

  1. Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks