Planner-Worker-Solver
Last updated
Last updated
This paradigm combines a multi-step planner and variable substitution for efficient tool use. It improves upon the ReACT-style agent architecture by reducing token consumption, execution time, and simplifying the fine-tuning process. It was introduced in .
Planner-worker-solver architecture consists of three main modules:
The Planner module generates a plan in the following format:
The Planner generates the full chain of tools used in a single pass, thereby reducing the number of LLM calls and avoiding redundant prefixes (system prompt and previous steps) required for each reasoning step in ReACT-style architectures.
The Worker module executes the tools with the provided arguments generated by the Planner. It performs the actual tool invocations and returns the observations.
The Solver module generates the answer for the initial task based on the tool observations obtained by the Worker. This module depends on an LLM call to produce the final answer.
By generating the full chain of tools in a single pass, this paradigm reduces the number of LLM calls and eliminates the need for redundant prefixes (system prompt and previous steps) at each reasoning step. This leads to reduced token consumption and faster execution compared to ReACT-style architectures.
The planning data does not depend on the outputs of the tools. This allows for fine-tuning the models without actually invoking the tools, simplifying the fine-tuning process compared to ReACT-style architectures.
This paradigm employs variable substitution to avoid redundant calls to the Planner LLM. The arguments for subsequent tools can reference the outputs of previous tools using variables (e.g., step#1), which are substituted with their actual values during execution.
For comparison, see .