Liu argues that relying on strings and `json.loads` makes APIs brittle. Schemas and structured responses help preserve compatibility, composability, and reliability when software interacts with external systems, including LLMs.
Pydantic is STILL all you need
Speaker
Jason Liu presents a talk for AI Engineer about using Pydantic and structured outputs to make language model applications behave more like reliable, typed software.
Liu says the core approach has barely changed: define a Pydantic response model and pass it to a client. The API offers `create`, `create_iterable`, and `create_partial` for regular, streaming, and partial results. He says the library reached version 1.0, supports several languages and model providers, and has seen about 40% month-over-month growth in Python.
Validators let developers define what counts as correct and return errors that a model can use to fix its output on a retry. Liu demonstrates checking that names are uppercase and verifying that receipt prices and quantities add up to the total. He says one retry is often enough for OpenAI and Anthropic models when the error messages are informative.
Liu shows how response models can return follow-up questions, validate links, and turn a question into one or more search requests with dates, limits, and a selected source. Those requests can run in parallel before the results are passed to an answer function. He also describes models for spam classification, meeting summaries and action items, and extracting tables into a DataFrame.
Liu frames structured output as a way to define the types, objects, and control flow that an application owns, while treating prompting and constrained sampling as implementation details. For enterprise RAG, he points to report generation; for agents, he describes generating workflows or DAGs for an execution engine instead of relying on an open-ended ReAct loop.
Takeaways
- Define response schemas so downstream code can rely on typed data instead of parsing arbitrary text.
- Use validators to encode business rules and provide clear error messages that models can act on during retries.
- Model search requests as structured objects so an application can validate and parallelize retrieval.
- Treat LLMs as producers of data structures, while keeping application control flow in ordinary code.
Mentioned in this talk
Search inside this talk
What was claimed 14
- feature
Pydantic AI: Supports nested models and validators for structured outputs
“nested objects and nested models for modular structures, and we can also use validators”
YouTube Unverified1 source· Talk
- usesJason Liu uses Instructor
“It's still pip install instructor”
YouTube Unverified1 source· Talk
- metricInstructor: Python library growth of about 40% month over month
“we've seen about 40% growth month over month”
YouTube Unverified1 source· Talk
- featureInstructor: Available in Python, TypeScript, Ruby, Go, and Elixir; a Rust version was built
“launched in five languages: Python, TypeScript, Ruby, Go, and Elixir. We just built a version in Rust”
YouTube Unverified1 source· Talk
- launchedInstructor: Version 1.0
“Since then, we've released 1.0”
YouTube Unverified1 source· Talk
- integrates withInstructor integrates with
Groq
“We support Anthropic, Cohere, Gemini, Groq”
YouTube Unverified1 source· Talk
- integrates withInstructor integrates with
Gemini
“We support Anthropic, Cohere, Gemini, Groq”
YouTube Unverified1 source· Talk
- integrates withInstructor integrates with
Cohere“We support Anthropic, Cohere, Gemini, Groq”
YouTube Unverified1 source· Talk









