Closed Cotspheer closed 9 months ago
Hi @Cotspheer,
Support for complex types was addressed here: https://github.com/microsoft/semantic-kernel/issues/3258; we had a bug but it should be fixed now, so in the prompt, the definition for your function should list the output as a List
We currently don't include the description for the return type in the Create Plan prompt. The expectation is that the description of the function should be sufficient in communicating what will be returned, but I can do a quick POC to see if we can enable the Returns
field easily.
Closing this issue as resolved. If you're still running into issues, please re-open and provide the following:
It would be great to have the Handblebars Planner Template to include what the function returns and the parameters default values. Currently there seems to be no way to include additional information for the LLM/Agent and I have to include this information in the function description but I would like to seperate that. Like in C# where we can describe the functions return value with
<returns></returns>
. For the default values we could use the DefaultValue annotation (it seems that its support was removed) but for the Return-Value there is no equivalent.Also I'd like to propose additional changes to the yaml structure so we can extend the information we can transfer to the LLM/Agent.
Core issue: The LawLookupPlugin-Find returns multiple different chunks to one single law (thats by design to enhance the recall and to provide accurate citations). All those chunks are important but the plan generated only forwards the first single chunk. My assumption is that the LLM thinks the first entry is the most relevant and so only decides to forward the first entry.
Current output:
An example output that would be great:
An example output that would be awesome:
Example Plan (First attempt):
Example Plan (Second attempt):
Currently the LLM overlooks / has no way to know with certainty that the result of LawLookupPlugin is in fact an array / list of string chunks. To some degree this is an issue on my side and I have to improve the documentation / description and variable names but my hypothesis is that with a more structured output the planner prompt would perform better.