← back
Pydantic is STILL all you need: Jason Liu
Takeaway
Pydantic plus structured outputs remains the durable abstraction for LLM apps; validators with retries do the heavy lifting that prompt tricks cannot.
Summary
- One-year sequel: Pydantic + Instructor still the right primitive; Instructor 1.0 ships across Python, TypeScript, Ruby, Go, Elixir, Rust with 40% MoM growth.
- API surface stayed tiny: one client patched with three verbs (create, create_iterable, create_partial) plus response_model — works across OpenAI, Anthropic, Cohere, Gemini, Groq, Ollama, llama.cpp.
- Validators with retry loops (e.g., regex+HEAD for URL validity, total/quantity reconciliation on receipts) turn hallucinations into catchable, fixable errors.
- RAG example: model emits a Search object (query, date range, source enum) so retrieval routing becomes structured, and iterable mode handles multi-query comparisons.
- Lesson: nothing about Pydantic changed; engineers just had to relearn to program with data structures instead of prompts.
pydanticinstructorstructured-outputs
Original description
PLEASE ONLY RETURN JSON It's been a year after Jason's most popular talk at the AI Engineering Summit. I wanted to come back with all the learnings I've had in the past year. How I've learned that Pydantic is still all you need, and bring more applications and use cases that I've seen in businesses and my thoughts on where the space will be heading in the future. Recorded live in San Francisco at the AI Engineer World's Fair. See the full schedule of talks at https://www.ai.engineer/worldsfair/2024/schedule & join us at the AI Engineer World's Fair in 2025! Get your tickets today at https://ai.engineer/2025 About Jason Jason is an independent AI consultant, advisor, writer, and educator. His main interests are structured outputs, search and retrieval for RAG as well as understanding how to leverage AI to build scalable and valuable businesses.