This post explores how to implement a JSON Schema-based structured output using the .NET version of Semantic Kernel with OpenAI models. It details the reasons for using JSON Schema, supported models, and various approaches for structured outputs, including using OpenAI's ChatResponseFormat, System.Type, and function calling.
Table of contents
Why JSON Schema? Copy linkSupported Models for Structured Outputs Copy linkStructured Outputs with OpenAI.Chat.ChatResponseFormat Copy linkStructured Outputs with System.Type Copy linkStructured Outputs with Function Calling Copy linkSort: