Get an overview of structured output generation, its importance, and the different approaches to generating them.
We'd like to know you better so we can create more relevant courses. What do you do for work?
Instructors: Will Kurt, Cameron Pfiffer

Get an overview of structured output generation, its importance, and the different approaches to generating them.
Build a social media agent using structured output and learn how to use re-prompting libraries like instructor.
Understand the concepts behind constrained decoding and how the LLM logits are modified to get a particular output structure.
Welcome to Getting Structured LLM Output, built in partnership with DotTxt, and taught by Will Kurt, Founding Engineer, and Cameron Pfiffer, Developer Relations Engineer at DotTxt.
When building production-ready software, itâs challenging to parse through and rely on freeform text outputs. Structured outputsâlike JSONâsolve this by converting natural language into consistent, clear, and programmable data that a machine can read and process.
In this course, youâll learn how to generate structured outputs while building several use cases, including a social media analysis agent.
Youâll gain a fundamental understanding of structured outputs and learn efficient ways to generate outputs in your defined schema or format. Youâll begin by using structured output APIs, then follow it up by utilizing re-prompting libraries like âinstructorâ to generate structured output. Afterward, youâll learn how constrained decoding works, in which constraints are applied on each subsequent token generated, blocking any tokens that donât fit your defined schema.
In detail, youâll:
By the end of this course, youâll have broadened your knowledge of the approaches you can use to get structured outputs from your LLM applications.
Itâs helpful to be familiar with Python, the basics of LLM prompting, and LLM application development.
Introduction
Introduction to Structured Output Generation
How To Use Structured Outputs
Retry-based Structured Output
Structured Generation with Outlines
Structured Generation: Beyond JSON
Conclusion
Quiz
Gradedă»Quiz
ă»10 minsCourse access is free for a limited time during the DeepLearning.AI learning platform beta!
Keep learning with updates on curated AI news, courses, and events, as well as Andrewâs thoughts from DeepLearning.AI!