Appendix to "Show Your Work"

In the previous post I used a plan and execute agent to discuss the use of an LLM with an orchestration. An action agent is more elegant admittedly. Using a variant prompt (“What is 2+2? Provide an explanation of how the final answer was obtained.") the output is more condensed, and honestly a lot more concise a point:

Entering new  chain...
 I need to use a calculator to solve this math problem.
Action: Calculator
Action Input: 2+2
Observation: Answer: 4
Thought: I now know the final answer.
Final Answer: 2+2 is equal to 4. The final answer was obtained by using a calculator to solve the math problem.

The explanation at the end is a perfect encapsulation of LLMs answering math questions without doing math.

You can find the Python file here used to run this

Thomas Lodato @deptofthomas