Semantic Kernel Planners: Stepwise Planner

Nilesh Acharya

Lee Miller

Image skpatternlarge

Welcome to the third and final blog post in this series about Semantic Kernel Planners. In the previous blogs we touched on discussed the action planner and sequential 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.

Image StepwisePlan copilotImage StepwisePlan1

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!

Next Steps:

  • Learn more about planner concept here and view Step Wise Planner example.
  • Join the community and let us know what you think.

 

Image skpatternsmallbw

0 comments

Discussion is closed.

Feedback usabilla icon