Instructor

Lightweight

Structured extraction library that patches LLM clients to return Pydantic models. Simple API for reliable structured output with automatic retries and validation.

by Jason Liu9.6k starsMITUpdated Apr 2026

Installation

Install
pip install instructor

Language support

PythonTypeScriptRubyGoElixir

Supported LLMs

OpenAIAnthropicGoogleMistralCohereOllama

Features (8)

structured_output
retries
validation
streaming
partial_responses
multi_modal
hooks
batch

Details

Author
Jason Liu
Category
Lightweight
Languages
5
Features
8
Stars
9.6k
License
MIT
Status
Community