Browse · Organizations
Instructor
Jason Liu’s open-source structured-output SDK turns language-model responses into typed data, with Pydantic validation and retries.
Instructor is an open-source SDK for extracting typed data from language models. Jason Liu released its predecessor, the “OpenAI Function Call and Pydantic Integration Module,” in June 2023. Its central interface lets developers specify a Pydantic response model and receive a data structure rather than manually parse model-generated text. Instructor is distributed under the MIT License.[1][2][5]
A small SDK developers could build around
Liu recalled writing Instructor on a bullet train in Japan. Function calling allowed him to separate the output schema from the data and instructions, map that schema into Pydantic, and attach validators. He chose a small wrapper around the OpenAI SDK that preserved developers’ access to chat messages. As he put it in his April 2024 interview: “People want to build their own frameworks, but people don't want to build like JSON parsing.”[1]
Version 0.6.3, released March 6, 2024, patched the OpenAI client to accept response_model, max_retries, and validation context. Pydantic defined and validated the returned object; Tenacity handled retries. A documented example required an extracted name to be uppercase and re-asked the model after a validation error. The package also supported streaming lists and partial responses, allowing structured results to arrive incrementally.[2]
Liu identified three major applications: structured-data extraction, such as receipt items, prices, fees, and coupon codes; graph extraction, such as relationships between story characters or dependencies between tasks; and query understanding. In the last case, a question about what happened “this week” could become explicit date constraints for a search system. The output schema made those constraints available to ordinary application code.[1]
Version 1.0: improving typing without changing the role
Instructor 1.0.0 was released on April 1, 2024. Liu’s announcement described the project’s principle as “easy to try, and easy to delete.” The transition from instructor.patch to instructor.from_openai introduced a client that improved type inference while proxying OpenAI’s chat.completions.create and Anthropic’s messages.create methods. Additional methods supported iterables, partial objects, and access to the original completion. Development continued through version 1.17.0, released September 9, 2026.[3][2]
In the April 1 announcement, Liu reported more than 4,000 GitHub stars, more than 100 contributors, and 120,000 monthly downloads. He also reported 20,000 unique monthly visitors and 500,000 monthly requests to the documentation. The April 19 Latent Space introduction reported 150,000 downloads in the preceding month. These figures describe package downloads and documentation traffic, rather than unique product users or paying customers.[3][1]
Consulting, community integrations, and workflow experiments
In April 2024, Liu described Instructor as not venture backed and explained his preference for consulting over building a hosted tooling company. Consulting gave him access to applications involving agents, construction, insurance, supply chains, and private-equity reports. He treated library maintenance as a utility and welcomed community-contributed provider integrations, rather than pursuing a large integration catalog himself. Anthropic support had been added that year.[1]
Liu also advocated using structured outputs to represent plans as directed acyclic graphs, with explicit nodes and dependencies. His proposed workflow presented the entire plan and let individual components be corrected during execution, prompted with examples, or fine-tuned separately. This was a direction for experimentation rather than a demonstrated autonomous-agent platform. The historical package invited contributors to submit pytest evaluations of OpenAI models and Instructor, with a stated plan to run them weekly and publish results.[1][2]
Before Instructor, Liu had already worked on translating natural-language requests into structured search inputs at Stitch Fix. That earlier work supplies a concrete example of the parsing problem Instructor later addressed.[1]
Earlier context: recommendation systems at Stitch Fix
Liu recalled turning clothing request notes—such as requests for skinny jeans in a particular size—into JSON for internal search APIs, then manually parsing the output and checking field types. He also built recommendation frameworks at Stitch Fix, naming Bryan Bischof as one of their main users. Initially skeptical of language models, Liu said ChatGPT prompted him to apologize to colleagues and shift from computer vision and recommendation systems toward LLM work.[1]
From the Latent Space archive
Original posts and separately reviewed explanations.
Sources
- 1High Agency Pydantic > VC Backed Frameworks — with Jason Liu of InstructorAccessed 2026-09-18
- 2instructor 0.6.3 · PyPIAccessed 2026-09-18
- 3Announcing instructor=1.0.0Accessed 2026-09-18
- 4567-labs/instructor: structured outputs for llmsAccessed 2026-09-18
- 5Instructor MIT LicenseAccessed 2026-09-18
Model source and teaching reviews passed. Human editorial review pending. This profile describes the sources as of 2026-09-17.