Semantic Kernel Planners: Stepwise Planner
In this blog we will discuss Semantic Kernal’s latest generation of planner called Stepwise Planner. The Stepwise Planner is a powerful planning object based on a neuro-symbolic architecture, dubbed as Modular Reasoning, Knowledge and Language (MRKL, pronounced “miracle”). This planner has a unique approach to planning, which enables developers to execute step-by-step plans for achieving complex goals within their applications. The Stepwise planner is a great choice when you have a scenario which requires dynamic selection of plug-ins and dealing with complex asks with interconnected steps. This planner can learn from its mistakes while exploring available a function or plugin when determining how to solve a problem.
For example, asking questions such as “What is the capital of France? Who is that city’s current mayor? What percentage of their life has been in the 21st century as of today?”. Executing a response to these types of questions requires several plugins such as a web search plugin and calculator plugin. The Stepwise planner generates a “thought”, evaluating the available pathways, then performs an “action”, evaluates the response and produces a “final_answer”, all dynamically evaluated based on the available assets. See below example of a Stepwise plan from Chat Copilot.
The Stepwise Planner offers a sophisticated yet accessible way to meet your goals. Here’s an example of how you can use Stepwise Planner in your project.
var planner = new FunctionCallingStepwisePlanner();
FunctionCallingStepwisePlannerResult result = await planner.ExecuteAsync(kernel, question);
Please share with the community in the comments below what how you are using Stepwise planner for your needs!
- Learn more about planner concept here and view Step Wise Planner example.
- Join the community and let us know what you think.