Closed rosieks closed 1 year ago
@rosieks - thank you for bringing this up. We are looking into this bug.
@teresaqhoang May or may not be related to changes you made recently. Just putting your name here for your visibility.
Hey @rosieks, yep, this is expected behavior. We error here to highlight functions that the model thinks could be useful to fulfil the plan but are not yet available in its context for use. We're also actively working on reducing these kinds of hallucinations from the model in the first place.
If you want the plan to error on the missing functions exception, make sure you don't have AllowMissingFunctions set to true in the config. It's false by default, so you don't need to explicitly call the planner with a config, but here's an example:
new SequentialPlanner(
this.Kernel,
new SequentialPlannerConfig
{
// Throw an error on missing functions
AllowMissingFunctions = false
}
)
If you want to bypass this missing functions error, see this PR here for a potential workaround: https://github.com/microsoft/chat-copilot/pull/87. Essentially, I set the AllowMissingFunctions option to true in SequentialPlannerConfig, allowing the planner to parse missing functions as no-op steps, and then filter out the no-op steps from the plan result.
new SequentialPlanner(
this.Kernel,
new SequentialPlannerConfig
{
// Allow plan to be created with missing functions
AllowMissingFunctions = true
}
)
Confirming @teresaqhoang response. This is the by design behavior. Please re-open or file a new issue if there are additional concerns.
As far as the model using invalid functions -- I'd recommend adding functions that it suggests or changing your query to better match your available functions. (i.e. don't say 'present the names as a list' if you don't have any skills that do presentation). You could create a semantic function that takes and input and does an action on it, too, to fill this gap.
Describe the bug Exception during creating plan:
To Reproduce I get this exception while running the following code:
Available functions:
Created plan:
Expected behavior There is no exception while calling
CreatePlanAsync
Screenshots N/A
Platform
Additional context N/A