Instructor
A Python library for structured output extraction from LLMs using Pydantic models. Instructor patches LLM clients to return validated, typed objects instead of raw text—making it easy to extract structured data reliably.
Implements
Concepts this tool claims to implement:
- Structured Output primary
Core purpose is extracting Pydantic models from LLM responses. Automatic retry on validation failure. Type-safe outputs.
- Function Calling secondary
Uses function calling under the hood to constrain outputs. Works with OpenAI, Anthropic, and other providers.
Integration Surfaces
Details
- Vendor
- Jason Liu (community)
- License
- MIT
- Runs On
- local, cloud
- Used By
- system
Links
Notes
Instructor is the go-to library for structured extraction. Its Pydantic integration makes it natural for Python developers. Supports retries, streaming, and partial objects.