Instructor

library active open-source

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:

  • Core purpose is extracting Pydantic models from LLM responses. Automatic retry on validation failure. Type-safe outputs.

  • Uses function calling under the hood to constrain outputs. Works with OpenAI, Anthropic, and other providers.

Integration Surfaces

  • Python SDK

Details

Vendor
Jason Liu (community)
License
MIT
Runs On
local, cloud
Used By
system

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.