WhoBuilt

Instructor

An open-source library for generating structured, validated outputs from language models.

Also known as pip install instructor

Key facts

Built by
Ivan Leo, core contributor
Launched
version 1.0
By the numbers
Python library growth of about 40% month over month
Capabilities
supports create, create_iterable, and create_partial response modes
available in Python, TypeScript, Ruby, Go, and Elixir; a Rust version was built
structured outputs using schemas and function-call patterns
Supports validation retries by sending validation errors back to the language model

Timeline 9

Dated events, newest first. Open the sources under any item.

How we verify
Launch1Release1Built2Capability4Metric1
20245 events
September
  1. as of Sep 2024Capability
    Supports create, create_iterable, and create_partial response modes
    “you have one noun, the client, and three verbs: create, create_iterable, and create_partial” 4:10
    Unverified1 source· Talk
  2. as of Sep 2024Metric
    Python library growth of about 40% month over month
    “we've seen about 40% growth month over month” 2:04
    Unverified1 source· Talk
  3. as of Sep 2024Capability
    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” 2:04
    Unverified1 source· Talk
  4. as of Sep 2024Launch
    Version 1.0
    “Since then, we've released 1.0” 2:04
    Unverified1 source· Talk
April
  1. Apr 1, 2024Release
    Released Instructor v1 for structured LLM output and streaming
    “Show HN: Instructor v1, for LLM structured output and streaming”
    Source changed1 source· Hacker News· archived
20233 events
  1. as of Nov 2023Capability
    Structured outputs using schemas and function-call patterns
    “This is a pattern in a library called Instructor” 31:15
    Unverified1 source· Talk
  2. as of Nov 2023Capability
    Supports validation retries by sending validation errors back to the language model
    “append the message you had before, capture all the validations in one shot, send them back to the language model, and try again” 8:07
    Unverified1 source· Talk
  3. reported 2023-11Built
    Jason Liu built Instructor
    “That's why I built a library called Instructor” 5:02
    Verified2 sources· Talk, Web· archived
See all 9 events on the full timeline

Talks 5

19:28
Optimizing LLMs in Insurance with DSPy

Jeronim Morina argues that building useful LLM systems starts with clearly defined real-world problems, domain input, and a program structured into understandable steps. He recommends inspecting what tools send to models, tracing system behavior, and preparing clean evaluation data before trying to optimize prompts with DSPy. DSPy can compile modular programs against a chosen metric, but it has a steep learning curve and often requires custom modules and evaluators, especially for German text. His takeaways are to begin with hand-written prompts and simple evaluations, make small changes, and use first-principles thinking throughout.

Feb 16, 2025· 19 minMentioned 6:44
2:21:53
Architecting and Testing Controllable Agents

Lance Martin explains how to build more reliable LLM agents by combining fixed developer-defined steps with LLM-controlled routing in LangGraph. He contrasts this approach with rigid chains and open-ended ReAct agents, and demonstrates patterns for corrective RAG, self-reflection, and code generation with in-app checks. He also covers evaluating answers and tool-use trajectories with test datasets, evaluators, and LangSmith, then discusses production monitoring and feeding failures back into evaluations. The workshop closes with practical guidance on routing, state, retrieval, multi-turn conversations, and choosing between chains and agents.

Oct 11, 2024· 2 h 22 minMentioned 2:04:16
15:21
Pydantic is STILL all you need

Jason Liu argues that Pydantic remains a useful foundation for building reliable applications with language models because it turns model responses into validated, typed data structures. He demonstrates Instructor’s API for generating single, iterable, and partial responses, and shows how validators can catch errors and prompt models to correct them. Examples cover retrieval-augmented generation, search query generation, classification, transcript extraction, and converting model output into DataFrames. His broader lesson is that structured outputs let developers keep control of types, validation, and application flow as models improve.

Sep 6, 2024· 15 minDiscussed 1:46
56:56
AI Engineering 201: The Rest of the Owl

The talk argues that inference alone does not make a useful AI product: language model systems also need thoughtful interfaces, access to relevant information, reliable structured outputs, and ways to improve from production use. It surveys language interfaces, retrieval-augmented generation, hybrid search, grammar-constrained generation, tool use, and agent architectures. The final section focuses on engineering feedback loops through monitoring, observability, and evaluation, including user behavior, latency, cost, and human or model-assisted review. Its central lesson is that building dependable AI products requires experimentation across the whole system, not just improving the model.

Nov 8, 2023· 57 minMentioned 31:15
17:55
Pydantic is all you need

Jason Liu explains how Pydantic type hints and structured prompting can make language model outputs easier to validate, parse, and use in software. He introduces OpenAI function calling and shows how his Instructor library connects Pydantic models to model responses, with Marvin as another option for broader model support. The examples cover validation and retries, reusable nested data structures, uncertainty handling, RAG search plans, knowledge graphs, and checking that quoted facts appear in source text. His central lesson is to model prompts, data, and behavior together in code so language model workflows are easier to maintain.

Nov 1, 2023· 18 minDiscussed 1:13