Semantic Kernel Planner not working properly

P, Pioline (Cognizant) 215 Reputation points
2024-04-05T08:48:36.6066667+00:00

Hi
I have a Semantic Kernel C# code implementation with Planners and Plugins. I don't want to use persona.
Two native functions are within this plugin and one planner method to call or not call the native functions in order based on user input

Basically, what I want to implement is: When a User send a query to SK, to fetch data from MS SQL database, two steps happens:
Step1:
First Native function within the plugin fetches all the stored procedures in the DB by establishing a connection with database.
Step2:
Second native function (which gets the name of a stored procedure as input param and returns data using the stored procedure name) returns data to the user.

Note: I want to fetch DB data only using the stored procedures in the database and not SK/model writing its own query to fetch data.

So for implementing the above, I created a Planner Named: DbConnectPlanner.
Inside this planner, i created a method with [kernelFunction] annotation and this prompts the LLM using this code:

var result = await kernel.InvokePromptAsync();

Inside this method, i gave the following instructions: To call native function 1 and 2 mentioned above in order and provide response.

But the issue is methods are not getting invoked as mentioned in planner.
Why is planner steps not working properly.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Developer technologies | .NET | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 54,011 Reputation points Moderator
    2024-04-06T05:42:00.62+00:00

    @P, Pioline (Cognizant)

    Thanks for reaching out to us, Semantic Kernel has its own community which includes the product team and experts.

    Please refer to below GitHub - https://github.com/microsoft/semantic-kernel

    You can post question in Issues forum of this GitHub.

    There is also a Discord community you may want to join - https://aka.ms/sk/discord

    I hope this helps! We are happy to answer other questions regarding to other Services.

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.