Skip to content

Math Planner in the Semantic Kernel documentation Computes the value incorrectly when a sequential planner is used #57

Open
@sramaswami11

Description

@sramaswami11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions