ProgramOfThought is a DSPy module that prompts a language model to write Python code for a response, executes the code with retry logic, and returns its output. section 2.6
It takes a signature, such as question-to-answer, and can be swapped independently of that signature. DSPy executes modules through forward() internally; explicitly calling forward() produces a warning as of DSPy 3.0. section 2.6
prog = dspy.ProgramOfThought("question -> answer")
prediction = prog(question="What is 8383.33 times 8228.11?")
A question-to-answer ProgramOfThought call using a multiplication question. section 2.6
