microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
22.13k stars 3.3k forks source link

.Net: StepwiserPlanner: Final Answer is empty #5869

Closed elagunas closed 7 months ago

elagunas commented 7 months ago

Describe the bug I have an application that use StepwisePlanner. The plan is generated correctly but the final answer is empty, becasuse never require me the mandatory parameters or sometimes openai asumme the values of thes parameters.

To Reproduce Have a function like this:

 [KernelFunction]

 [Description("Gets the information to install an extractor bell in a location")]
 [return: Description("Installation information for an an extractor bell in a location")]
 public async Task<string> GetInformationToInstall(
     [Description(@"Location of installation. Required.")] string location,
     [Description(@"Type of extractor bell. Required.")] string extractorType)
 {
     var result = await Task.FromResult($"Installation information is location: {location} - extractorType: {extractorType}");
     return result;
 }

Expected behavior Final answer must to be contain a message with required parameters

Screenshots The plan is generated OK image The plan loop until max iterarions, and never answer with the final answer image Finally FinalAnswer is empty image

Platform

Additional context Add any other context about the problem here.

matthewbolanos commented 7 months ago

If you need the LLM to respond back to you to ask questions to get additional details (e.g., required input parameters), we would recommend that you not use the stepwise planner. Instead, we recommend that you use automatic function calling within Semantic Kernel.

Let us know if that addresses your need, and if not, please reopen the issue.

elagunas commented 7 months ago

Thanks @matthewbolanos, it works as expected.