# Instructor

> Structured outputs from LLMs, validated with Pydantic

Source: https://talira.ai/catalog/instructor-nxkr8x7t
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [ai / llm / structured output](https://talira.ai/categories/ai/llm/structured-output)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT); you pay your model provider.
- Free tier: yes[^1]
- Backed by: [Jason Liu](https://talira.ai/orgs/jason-liu.md)

Instructor is a Python library for getting structured data out of large language models. You describe the output you want as a [Pydantic](https://talira.ai/catalog/pydantic-5as3qf1q.md) model, and Instructor sends it to the model, validates the reply against it and retries automatically when validation fails, with streaming of partial objects and lists. One interface, `instructor.from_provider`, works with more than 15 providers, including OpenAI, Anthropic, Google Gemini, DeepSeek and local models through Ollama, and it supports async code and hooks. Its docs point to [Pydantic AI](https://talira.ai/catalog/pydantic-ai-qty4m7j7.md) for agents and keep Instructor for schema-first extraction.

## Links

- Website: https://python.useinstructor.com/
- GitHub: https://github.com/567-labs/instructor
- Docs: https://python.useinstructor.com/

## Problems it solves

- get my LLM to return valid JSON that matches a schema every time
- extract typed fields from text with an LLM in Python
- retry the model call automatically when its output fails validation

## Features

- extract structured data from LLM replies into Pydantic models
- validation with automatic retries
- streaming of partial objects and lists
- one interface for 15+ providers, including local models via Ollama
- async support and hooks
- CLI that opens and searches the docs

## Trust

Overall: 0.73 out of 1.
Signals: maintenance 1.00, adoption 0.83, momentum 0.77, community 0.97, backing 0.30, extensibility 0.00.

- last commit 5 days ago
- 290 commits in the last 90 days
- latest release v1.17.0 2 months ago
- 14.1k GitHub stars
- 270 contributors
- accepts sponsorship (Github)
- backed by Jason Liu

## Related

- Based on [Pydantic](https://talira.ai/catalog/pydantic-5as3qf1q.md)
- Works with [Pydantic AI](https://talira.ai/catalog/pydantic-ai-qty4m7j7.md)

## Alternatives

- [LangExtract](https://talira.ai/catalog/langextract-zagt5t0y.md): Extract structured information from unstructured text using LLMs, with precise source grounding

## Sources

[^1]: https://github.com/567-labs/instructor/blob/main/LICENSE (checked 24 Nov 2026)
