microsoft / semantic-kernel

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

.Net: Reporting a few problems (Filters, Handlebars, general design, etc.) #5937

Open zsogitbe opened 5 months ago

zsogitbe commented 5 months ago


   Notice the following problems:
  - the parameters for each function number1 and number2 are added (### number1-number, ### number2-number:), but the description gets the description from one of the functions. This will confuse the ML model. It is better to remove the description or replace it with a general description about the parameter itself, for example, "a double precision number".
  - notice that for each function the return type is added which causes an endless list of definitions and filling the context and confusing the ML model. Should replace this logic with only one general definition per return type (number, text, ...).

- [ ] the parameters of the above simple functions are simple types (double), but they are defined as complex types in the GetAvailableFunctionsManual() function => {{> ComplexTypes }}. Why? The complex types section should be empty in this case, but it lists endless double value definitions.
zsogitbe commented 5 months ago

I am trying to test the Phi model from Microsoft with Semantic Kernel, but it generates garbage probably because it needs "<|user|>" instead of "User: ", "<|assistant|>" instead of "Assistant: " and I am not sure about the "System: " role because Phi does not seem to have one.

I have tried to find a way to replace SK roles with Phi roles, but without success. Is this possible? If, yes how, please. Thank you.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 90 days with no activity.

rosieks commented 6 days ago

I fully agree on that:

HandlebarsPlannerOptions: the design should be changed to have generic options for HandlebarsPlanner which do not depend on the model. For example, this is not OK: ExecutionSettings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions }, this should not be OpenAI dependent here!

And it's not only regarding HandlebarsPlanner but in all cases. What's the point of having abstraction for IChatCompletion if I have to pass implementation specific settings anyway.