Please refer to the following semantic kernel documentation page url :
https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planners/?tabs=Csharp
When I used the code given in this page (which matches with the github repository) for MathPlugin and the code under the program.cs to instantiate a SequentialPlanner and run the plan, the result was incorrect.
The ask was "If my investment of 2130.23 dollars increased by 23%, how much would I have after I spent $5 on a latte?";
and the result was 46.1 (but the right answer should be 2615.1829
However when I changed the code to use a StepwisePlanner instead (keeping the MathPlugin unchanged) this seems to yield the right result (2615.1829)
Here is my code change:
var planner = new StepwisePlanner(kernel);
var ask = "If my investment of 2130.23 dollars increased by 23%, how much would I have after I spent $5 on a latte?";
var plan = planner.CreatePlan(ask);
Not sure why the SequentialPlanner failed to compute the result correctly.
Please refer to the following semantic kernel documentation page url : https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/planners/?tabs=Csharp When I used the code given in this page (which matches with the github repository) for MathPlugin and the code under the program.cs to instantiate a SequentialPlanner and run the plan, the result was incorrect. The ask was "If my investment of 2130.23 dollars increased by 23%, how much would I have after I spent $5 on a latte?"; and the result was 46.1 (but the right answer should be 2615.1829
However when I changed the code to use a StepwisePlanner instead (keeping the MathPlugin unchanged) this seems to yield the right result (2615.1829)
Here is my code change: var planner = new StepwisePlanner(kernel); var ask = "If my investment of 2130.23 dollars increased by 23%, how much would I have after I spent $5 on a latte?"; var plan = planner.CreatePlan(ask);
Not sure why the SequentialPlanner failed to compute the result correctly.