Structured Output #7082
-
I found it rather surprising that there is kernel function like "ExtractJson" in the core_plugins. That left me wondering whether i am pursuing a wrong approach. My problem is that my kernel function (from prompt) works best with Chain of Thought or going step by step etc. However this makes extracting YAML from the response much harder. The output occasionally is contaminated with artifacts from examples or input and returns e.g. bolded YAML like this "key: value". Of course i can just create another kernel function, but is there a better approach? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Is the output necessary in between these steps or are you trying to get the output formatted as Json for the final answer? Thanks! |
Beta Was this translation helpful? Give feedback.
-
With the scenario mentioned above we recommend you learn more here: https://learn.microsoft.com/en-us/dotnet/api/microsoft.semantickernel.connectors.openai.openaipromptexecutionsettings.responseformat?view=semantic-kernel-dotnet#microsoft-semantickernel-connectors-openai-openaipromptexecutionsettings-responseformat |
Beta Was this translation helpful? Give feedback.
With the scenario mentioned above we recommend you learn more here: https://learn.microsoft.com/en-us/dotnet/api/microsoft.semantickernel.connectors.openai.openaipromptexecutionsettings.responseformat?view=semantic-kernel-dotnet#microsoft-semantickernel-connectors-openai-openaipromptexecutionsettings-responseformat