Instructor
Structured data extraction from LLMs using Pydantic models with automatic validation and retries
Instructor is a Python library for extracting structured, validated data from Large Language Models. It uses Pydantic models to define output schemas and automatically handles validation, retries, and streaming. Define a Pydantic model for the shape of data you want, and Instructor handles getting the LLM to return matching data with no manual JSON parsing needed. It supports 15+ providers including OpenAI, Anthropic, Google Gemini, Mistral, Cohere, and Ollama. With 11k+ GitHub stars and 6M+ monthly PyPI downloads, it is one of the most widely used structured output libraries.
Pricing: Free
Choosing an LLM framework right now?
One click, anonymous. Helps us know our visitors.
Thanks, that helps.
Choosing an LLM framework right now?
One click, anonymous. Helps us know our visitors.
Thanks, that helps.
Instructor Alternatives
Explore 49 products in the Frameworks & Stacks category. View all Instructor alternatives.
LangChain
LangChain gives developers a framework to construct LLM‑powered apps easily.
TanStack AI
Framework-agnostic TypeScript library for AI chat, streaming, tools, and structured outputs
DSPy
Framework for programming, not prompting, language models with automatic prompt optimization
vLLM
High-throughput LLM inference engine with PagedAttention for efficient GPU memory usage
LangGraph
Low-level framework for building stateful, long-running AI agents with graph-based orchestration
Vercel AI SDK
Open-source TypeScript toolkit for building AI applications with streaming, tool calling, and agents
Work on Instructor? Feature it at the top of Frameworks & Stacks.
Is your product missing?