Instructor

Small library for getting validated, structured outputs (Pydantic models) from LLMs, with retries on validation errors.

Instructor patches popular LLM clients so you pass a response model and get back a validated object instead of raw text. When validation fails it can re-ask the model with the error message. Versions exist for Python, TypeScript and other languages.

Type
Library
Category
AI & ML
Maintainer
567 Labs and community
First released
2023
License
Open source (MIT)
Pricing
Open source
Level
Beginner
Technologies
python, llm
GitHub stars
14,169
Weekly downloads
2,286,001 (pypi)
Latest release
[object Object]
Last verified
26 Nov 2026

What Instructor is used for

  • Data extraction into schemas
  • Classification with typed labels

Strengths

  • Minimal surface
  • Works across providers

Limitations

  • Focused on structured output only

Instructor alternatives

How it relates to other tools

Built with the same technologies

Official links

Sources

Explore