567-labs/instructor
structured outputs for llms observed · 2026-08-28
Health v2 · maintenance only
92/100
- Activity 96
- Release rhythm 90
- Longevity 84
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 7
- age_days: 1176
- days_rel: 66
- days_push: 24
- n_releases_24m: 44
Adoption not part of the score
13782 stars · 1205 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Instructor is a Python library that patches LLM clients to return validated, type-safe structured data using Pydantic models, with automatic retries and streaming. It supports 15+ providers including OpenAI, Anthropic, Google Gemini, Mistral, Cohere, and local models via Ollama and llama.cpp.
Use cases
- extract structured data from llm responses
- get validated from gpt-4 or claude
- parse resumes or documents into pydantic models with an llm
- retry llm calls automatically when validation fails
- stream partial structured outputs from a language model
- use function calling across multiple llm providers with one interface
When to choose
- you need schema-first structured extraction from any LLM with type safety
- you want Pydantic validation and automatic reasking on failed outputs
- you need a unified interface across OpenAI, Anthropic, Gemini, and other providers
When to avoid
- you need full agent frameworks with tools, traces, and observability (consider PydanticAI)
- you want raw unstructured LLM text generation
- you are not working in Python or another supported language runtime
Facets
library · maturity stable
llm-inference serialization sdk middleware large-language-models artificial-intelligence developer-tools python cross-platform structured-outputs pydantic openai function-calling data-extraction validation retries multi-provider natural-language-processing
10 sources
- readme: https://github.com/567-labs/instructor · fetched 2026-08-28 · 6f1fb687b0f2
- homepage: https://python.useinstructor.com/ · fetched 2026-08-29 · a5c4f6548e67
- site_page: https://python.useinstructor.com/learning/getting_started/installation · fetched 2026-08-29 · b8179c5ec873
- site_page: https://python.useinstructor.com/getting-started · fetched 2026-08-29 · 920e815ad85d
- site_page: https://python.useinstructor.com/installation · fetched 2026-08-29 · 0364db8a18a9
- registry_pypi: https://pypi.org/pypi/instructor/json · fetched 2026-08-29 · c430633aa726
- site_page: https://python.useinstructor.com/integrations · fetched 2026-08-29 · 3a80e78b3d25
- site_page: https://python.useinstructor.com/faq · fetched 2026-08-29 · d57b3d29787c
- site_page: https://python.useinstructor.com/concepts/reask_validation · fetched 2026-08-29 · e89d5453376e
- site_page: https://python.useinstructor.com/integrations/openai · fetched 2026-08-29 · abb99fe81f59
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| 567-labs/instructor | main | 92 |
For agents
markdown · JSON · MCP: product_card(name="567-labs/instructor")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem