OpenAI Introduces Structured Outputs in API! #OpenAI's latest innovation: Structured Outputs in the API. This game-changing feature ensures model outputs precisely match developer-supplied JSON Schemas, revolutionizing how we build AI applications. Key Takeaways: 🎯 100% reliability in matching output schemas with gpt-4o-2024-08-06 🛠️ Two implementation options: Function calling and response_format parameter 🔒 Enhanced safety measures with new refusal string value 🐍 Native SDK support for Python (Pydantic) and Node.js (Zod) 📊 Perfect for generating structured data from unstructured inputs ⚡ Improved efficiency for developers, reducing workarounds and retries This update marks a significant leap forward in AI application development. By ensuring model outputs conform to specific schemas, OpenAI is addressing one of the core challenges developers face when integrating AI into their systems. I'm particularly impressed by the 100% reliability score in complex JSON schema following. This level of precision opens up new possibilities for creating robust, AI-powered applications across various industries. #openai #ai #artificiaiIntelligence #apidevlopment #structureddata #ml #machinelearning https://lnkd.in/g3tTyimS
Todd Nist’s Post
More Relevant Posts
-
OpenAI - Introducing Structured Outputs in the API OpenAI has introduced Structured Outputs in its API, ensuring that model outputs adhere strictly to developer-supplied JSON Schemas. This new feature enhances the reliability of generating structured data from unstructured inputs, a core use case for AI in application development. Structured Outputs solve previous limitations by constraining models to match schemas exactly and improving model training to understand complex schemas. The new gpt-4o-2024-08-06 model achieves 100% reliability in matching output schemas, outperforming earlier versions. Developers can use Structured Outputs via function calling or a new response_format parameter, compatible with OpenAI's latest models and SDKs for Python and Node. This update not only simplifies building robust applications but also integrates safety measures and native SDK support for easier implementation. Structured Outputs are now generally available in the API, offering significant cost savings and efficiency improvements. Read more here: https://lnkd.in/eRjv5hUP #OpenAI #API #AI #JSON #APIDevelopment #StructuredData #JSONSchema #AIIntegration #SoftwareDevelopment #GPT
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
Introducing Structured Outputs in the API 🎉 OpenAI has introduced Structured Outputs in the API, a new feature that ensures model-generated outputs will exactly match JSON Schemas provided by developers. This advancement solves the problem of generating structured data from unstructured inputs, a core use case for AI in today's applications. 🧩 Key points: - With Structured Outputs, the new model gpt-4o-2024-08-06 achieves 100% reliability in matching output schemas. 💯 - The feature is available in two forms: 1. Function calling: Structured Outputs via tools is available by setting strict: true within the function definition, working with all models that support tools. 🔧 2. Response format parameter: Developers can supply a JSON Schema via json_schema, a new option for the response_format parameter, working with the newest GPT-4o models. 📝 - The Python and Node SDKs have been updated with native support for Structured Outputs, making it easy to supply schemas and deserialize JSON responses into typed data structures. 🐍🟢 Additional use cases for Structured Outputs include: - Dynamically generating user interfaces based on user intent 🖥️ - Separating final answers from supporting reasoning or commentary 🤔💭 - Extracting structured data from unstructured data 📜➡️📊 Under the hood, OpenAI trained gpt-4o-2024-08-06 to understand complicated schemas and produce matching outputs. They also use constrained decoding, converting JSON Schemas into context-free grammars to determine valid tokens during sampling. 🔍 Structured Outputs has some limitations, such as only allowing a subset of JSON Schema and potentially incurring additional latency on the first request with a new schema. However, it is generally available today in the API, with function calling available on all supporting models and response formats available on gpt-4o-mini, gpt-4o-2024-08-06, and their fine-tunes. 🚀 #StructuredOutputs #OpenAIAPI #JsonSchema #ConstrainedDecoding #NLPAdvancements Read more about Structured Outputs here: https://lnkd.in/geX_gN82
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
The team at Upwell has been playing with OpenAI's Structured Outputs for GPT-4o since its release last week and I'm impressed! This solved my biggest frustration with OpenAI's API since we rely on JSON in the response to be valid and consistent. Previously, we just hoped it would be correct, it usually was but there are always those edge cases where you have to handle weird situations where the JSON comes back invalid, missing parameters, etc. This is because the response was just "text" instead of a JSON. It was also quite annoying dealing with "any" types in the response since we work TypeScript. Great job OpenAI! This is a major improvement for our team! https://lnkd.in/g4APzVc6 #openai #gpt4o #ai #structuredoutputs #api #typescript #json
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
Introducing Structured Outputs: Enhancing Reliability in the OpenAI API. In a significant advancement for developers leveraging the OpenAI API, the company has introduced Structured Outputs, a groundbreaking feature designed to ensure reliable and consistent model outputs. This innovation addresses a critical need in the AI development landscape, where generating structured data from unstructured inputs is a core use case. Ensuring Adherence to Developer-Supplied Schemas: Structured Outputs enable developers to supply JSON Schemas that OpenAI models must adhere to when generating outputs. This feature is available in two forms: function calling via `tools` and a new `response_format` parameter option. By constraining models to match developer-specified schemas, Structured Outputs eliminates the need for workarounds and ensures seamless integration with existing systems. Improved Model Performance and Reliability: OpenAI's latest model, `gpt-4o-2024-08-06`, achieves a perfect 100% score on complex JSON schema following evaluations when using Structured Outputs, compared to less than 40% for the previous `gpt-4-0613` model. This significant improvement in reliability allows developers to build applications with greater confidence, knowing that model outputs will precisely match their requirements. Prioritising Safety and Usability : Structured Outputs maintains OpenAI's commitment to safety, with models still able to refuse unsafe requests. To simplify development, a new `refusal` string value is included in API responses, enabling developers to programmatically detect when a model has generated a refusal instead of output matching the schema. Native SDK Support for Seamless Integration : OpenAI's Python and Node SDKs have been updated with native support for Structured Outputs, making it easy for developers to supply schemas and automatically deserialise JSON responses into typed data structures. This integration ensures a smooth development experience and accelerates building reliable AI-powered applications. Structured Outputs represent a significant advancement in the OpenAI API, empowering developers to build more reliable and efficient applications. By ensuring consistent adherence to developer-supplied schemas, this feature addresses a critical need in the AI development landscape and sets a new standard for model output reliability. As the demand for structured data generation continues to grow, Structured Outputs position OpenAI as a leader in enabling developers to harness the power of AI with confidence. For more information, visit : https://lnkd.in/eFTSCC4X. #StructuredOutputs #OpenAIAPI #AIReliability #DeveloperTools #JSONSchema
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
🚀 OpenAI recently released a game-changing feature that developers have been eagerly anticipating: Structured Outputs in the API. This new functionality ensures that model-generated outputs match JSON Schemas, addressing a major pain point for developers who have struggled with large language models (LLMs) producing inconsistent or incorrect JSON data. JSON, a text-based format for storing and exchanging data, is highly popular due to its simplicity, flexibility, and compatibility with various programming languages. However, LLMs often produce JSON outputs that are incomplete or incorrect, requiring developers to use workarounds and multiple prompts to ensure interoperability. OpenAI's Structured Outputs feature aims to solve this issue by constraining models to adhere strictly to JSON Schemas. This ensures that the content, structure, types of data, and expected constraints in a given JSON document are met. According to OpenAI, this feature is the number one request from developers and allows for greater consistency across applications. The new feature is available on GPT-4o-mini, GPT-4o, and fine-tuned versions of these models. It can be used on the Chat Completions API, Assistants API, and Batch API, and is also compatible with vision inputs. #AI #JSON #Developers #OpenAI #MachineLearning #APIs #TechInnovation
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
OpenAI introduced Structured Outputs this week which is a powerful add-on to their API making it easier to constrain the large language model to generate outputs in an expected format (schema) by instructing it with those constraints in the input prompt. For those in the know, you already had this feature with the great Instructor library. In fact, OpenAI heavily borrowed (and properly credited) Instructor and other similar open source structured output / constraints frameworks. The magic really happens when you combine Pydantic models with OpenAI’s Structured Outputs (or alternatively Pydantic+Instructor with LiteLLM, Ollama, vLLM inference engines for other closed and open weight models) 🪄 In my experience, this approach helps provide guardrails, create more predictable outputs and simplify processing and validation logic while keeping code clean and “pythonic” More info on Instructor: https://lnkd.in/gHW4nQV4 #genai #llm #openai #instructor #ai
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
New OpenAI "Structured Output" feature announced In order to integrate GPT-4 with actual applications, the use of json output is usually required, to go from natural language to something deterministic your application can consume. Now OpenAI has added some support for this more explicitly. Prior to this, you would have to define interfaces and types as part of your system prompt, which gets sent and processed on every request (and yes - even if you build a GPT assistant API that's still what's happening at the completion processing even if you add "custom instructions"). You also had to worry about extraneous preambles such as "Here is the output you are looking for:```json" , forcing you to skip over it and extract the json blocks. OpenAI had previously introduced a "json" output but without being able to actually define the json so not all that useful, in this dev' opinion. Now you can create a pydantic or Zod schema definition like you would for your own API or form data and plug it in using the latest OpenAI SDK - pretty cool! The bottom line is that the new feature looks like it might save your some tokens and be more reliable - perhaps a sign that app developers are starting to create more structured integrations into apps? More to follow once I put it through its paces. https://lnkd.in/gcZWdx4W
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
Developing artificial intelligence systems capable of consistently producing structured output from diverse large language models (LLMs) presents significant technical challenges. Consider developing a generative user interface (UI) system that allows users to describe desired interfaces using natural language input. This application would then procedurally generate the specified UI based on the user's textual description. How can we ensure that the language model consistently produces structured data output with sufficient reliability to be parsed and utilized by our system for rendering the user-specified UI elements? Contemporary language model APIs, such as those provided by OpenAI, have implemented the ability to guide model outputs towards developer-specified output schemas. While this approach has significantly enhanced output reliability, until today, it still presented reliability issues. Today, these limitations are no more. OpenAI has introduced a new feature called Structured Outputs, a feature designed to ensure model-generated outputs will exactly match a JSON Schema provided by developers. As OpenAI Says, “Structured Outputs solves this problem by constraining OpenAI models to match developer-supplied schemas and by training our models to better understand complicated schemas.” This feature allows developers to define schemas through two primary methods: JSON Schema for API-based implementations, or validator libraries such as Pydantic (Python) or Zod (JavaScript/TypeScript) when utilizing the SDK within application code. Depending on the approach, the model will generate responses in that exact response structure 100% of the time. This is significant because it allows developers to build applications without worrying about inconsistent output structures that could lead to system failures. Furthermore, it removes the necessity for third-party tools and software to ensure output reliability, thereby streamlining the development process. This is a very big release for the OpenAI API and will certainly help drive the development of much more reliable applications moving forward. Here is a link to the full blog post which shows various examples, including an in depth look at the problem I mentioned about generative UI. If you’d like to continue getting more content from me around AI/ML and Software, please let me know and I’ll do my best to start creating a consistent content schedule. https://lnkd.in/gqdFyzET
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
-
🎉 OpenAI enhances its #API with structured outputs adhering to JSON schemas. Perfect for developers seeking reliable and precise data formats directly from models. Discover more: https://lnkd.in/giAAefEp OpenAIDevs #AI #AI #Development #JSON #developer
OpenAI Adds Structured Outputs to API—Models Follow JSON Schemas
https://web3universe.today
To view or add a comment, sign in
-
OpenAI just dropped a feature for developers called structured outputs https://lnkd.in/dVu_896E Some developers are calling this the feature they've been desperately waiting for, but I don't get it. I have several production applications in place using OpenAI api's and they all rely on structured output. JSON mode + a well defined schema definition in the output give me extremely reliable results. As in, an error rate (incorrect schema) of less than .01%. Have others not experienced this? Share your thoughts! cc Will Blackburn Sergio Tapia Jordan McCoy #ai #llms #openai
Introducing Structured Outputs in the API
openai.com
To view or add a comment, sign in
https://analyticsindiamag.com/ai-origins-evolution/wait-did-openai-just-solve-jagged-intelligence/