semantic-kernel
semantic-kernel copied to clipboard
Input confusion when ActionPlanner works with substep
Describe the bug Input will show up in state. And then it will not be captured correctly into substep for action planner.
For example, for function name below, workspaceName could not be passed with correct input. It will get input from upstream. For example, user intent in chatapp. We need to do custom coding to make it work.
public string GetDatasetName(string workspaceName)
User intent: I want to retrieve the names of datasets within a Power BI workspace named High_Memory.
{"state":[{"Key":"INPUT","Value":"High_Memory"}],"steps":[{"state":[{"Key":"INPUT","Value":""}],"steps":[],"parameters":[{"Key":"INPUT","Value":""}],"outputs":[],"next_step_index":0,"name":"GetDatasetName","skill_name":"PowerBI","description":"Return dataset name of my power bi workspace"}],"parameters":[{"Key":"INPUT","Value":""}],"outputs":[],"next_step_index":0,"name":"","skill_name":"Microsoft.SemanticKernel.Planning.Plan","description":"User intent: I want to retrieve the names of datasets within a Power BI workspace named High_Memory."}
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Windows]
- IDE: [e.g. Visual Studio, VS Code]
- NuGet Package Version [e.g. 0.1.0]
Additional context Add any other context about the problem here.
This problem might comes from a general design issue. Need a contract between skills.
This is related to #998 right @poweihuang0817 ?
yes, related
This seems like an ActionPlanner bug. It is placing SoP_High_Memory
into the Plan.State which gets overridden by the input when the plan is executed (Yes, proceed
). LIke SequentialPlanner
, this should be a Parameter
on the step where this should be input.
https://github.com/microsoft/semantic-kernel/blob/f1448c9a0759947256af7f4c6b940c9eab06ea91/dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs#L127