Skip navigation
Structured output is all you need!
0:00 / 1:31

Structured output is all you need!

elvis

@omarsar0332K followers

Visit on X
362 likesDownloadOriginal post

35,153 views

Structured output is all you need! Structured outputs can help to improve the performance and reliability of your LLM application. OpenAI just announced that they are now supporting structured outputs in the API. You can use it with function calling and defining your own JSON schema. Here is the FULL video if you are interested: The idea is to constrain the outputs based on defined schemas. There are many tools that can perform this for you such as instructor, outlines, and guidance. Very excited to use this in many of our use cases. I am working on a part 2 tutorial to dive deep into this feature and apply it to other common and creative use cases.

14 Comments

Comments from the original post on X (Twitter)

  • Kru (building with Codex)'s profile picture

    @krutosh

    I have literally just finished writing my agents with @langchain, utilizing structured output, and now Sam just shared this...🤦🏽‍♂️

    6 likes

  • elvis's profile picture

    @omarsar0

    @langchain I have also used the LangChain functionality for this along with other open-source tools like outlines. Having this capability supported via the APIs is super convenient.

    5 likes

  • Kru (building with Codex)'s profile picture

    @krutosh

    @langchain Agreed, although the benefit of having a middle layer is that it provides us with a common API for various LLMs. Most of the time, we require a “fallback model” pattern. It gives us the flexibility to hot-swap GPT or Claude with ease. Learn Ince, Write for All 😅

    2 likes

  • elvis's profile picture

    @omarsar0

    @langchain Agree. I expect other LLM providers will probably follow up with a similar offering if they don't have it already.

    2 likes

  • Rémi 🌳's profile picture

    @remilouf

    Use the OG @OutlinesOSS to get structured outputs with open source models :)

    5 likes

  • Emerson Macedo's profile picture

    @emerleite

    Arena for text-to-video AI

    4 likes

  • sam's profile picture

    @samuelRcrider

    Bro must not know about Forge ML lol

    2 likes

  • Jake Zegil 🗽's profile picture

    @JakeZegil

    Forge makes structured AI output 10x faster and easier - don't wrestle with these giant ugly json objects

    2 likes

  • Alexander De Ridder's profile picture

    @adridder

    Cool, digging the analysis. Clear explanations are key.

    1 like

  • Nishanth's profile picture

    @wanderer_nish

    Gemini already has this kinda response schema and it's doing great...

    1 like

  • kourosh hakhamaneshi's profile picture

    @CyrusHakha

    I just did a quick write up about this:

    1 like

  • Eamonn Doyle's profile picture

    @eamonnedwardo

    @readwise save thread @SaveToNotion #thread #chatgpt #structuredoutput

  • Farid's profile picture

    @Farid_j_m

    it means that from now, there is no need to output parser of langchain?

  • Louis | AI Bullshit's profile picture

    @LL_AIlo

    Structured outputs aren't magic; they still need clean data and smart prompts to work well.