← All popular talks

Popular talk #17

Pydantic is all you need: Jason Liu

Jason Liu17:55

Synced transcript

Follow the talk

Intro
JSON Pain
Function Calling
Pydantic
Instructor
Validation
Escape Hatch
Modularity
RAG
Graphs
Anti-Hallucination
Outlook

Community discussion

What did you agree with—or push back on?

Specific reactions make these talks more useful. Draft here, add the moment you’re discussing, then choose the direct-post pilot or the YouTube handoff.

Automated overview

What this talk covers

Jason Liu argues that Pydantic is the key to building reliable LLM applications by using structured prompting with OpenAI function calling. He introduces Instructor, a library that patches OpenAI's API to return Pydantic objects instead of raw JSON, ensuring type safety and validation. Liu demonstrates how Pydantic's 70 million downloads make it a trusted tool for defining data models with type hints, field validators, and even LLM-powered validators that catch errors like "don't say mean things" and retry via max retries. He shows concrete examples: decomposing user queries into structured search objects for RAG, generating a query plan DAG with parallel dependencies, extracting knowledge graphs for visualization, and verifying facts by requiring substring quotes from source text. Liu emphasizes that structuring prompts as code moves development from string manipulation to domain modeling, enabling cleaner, more maintainable systems that integrate easily with existing software.

This overview is derived from the transcript and has not been independently fact-checked by AI Engineer.

Chapters

  1. 0:00Intro
  2. 0:42JSON Pain
  3. 1:29Function Calling
  4. 3:43Pydantic
  5. 5:12Instructor
  6. 7:20Validation
  7. 9:02Escape Hatch
  8. 9:50Modularity
  9. 12:10RAG
  10. 13:22Graphs
  11. 15:02Anti-Hallucination
  12. 16:35Outlook