567-labs/instructor

structured outputs for llms

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 46 minutes ago
Added to GitGenius on September 4th, 2026
Created on June 14th, 2023
Open Issues & Pull Requests: 39 (+0)
GitHub issues: Enabled
Number of forks: 1,226
Total Stargazers: 13,835 (+0)
Total Subscribers: 55 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Instructor is a Python library that extracts structured outputs from language models by wrapping LLM API calls to return validated Pydantic models instead of raw text or JSON.

The core problem Instructor solves is the difficulty of reliably getting structured data from LLMs. Without it, developers must write JSON schemas manually, handle validation errors, implement retry logic, parse unstructured responses, and manage different provider APIs. Instructor eliminates this complexity by letting you define a Pydantic model and automatically handling validation, retries with error messages, and response parsing. It works with any major LLM provider using the same code, supports streaming partial objects as they generate, and can extract nested data structures.

Instructor suits projects that need fast, schema-first extraction workflows where simplicity and cost matter. The README positions it as lighter and easier to debug than LangChain or LlamaIndex, which are broader frameworks, and more capable than raw JSON mode since it adds automatic validation and retries. For applications requiring richer agent capabilities, built-in observability, or shareable traces, the README recommends PydanticAI instead, which extends Instructor-style workflows with typed tools, replayable datasets, and production dashboards.

The project maintains active engagement with its community through a Discord server and labeled good first issues for contributors. Development appears focused on keeping the core extraction functionality simple and reliable rather than expanding scope.