Why you'd want it
Instructor lets you pass a Pydantic model as response_model and get back a typed, validated object instead of parsing JSON or tool calls yourself. instructor.from_provider uses the same API for OpenAI, Anthropic, Google, Ollama, Groq and other providers. Failed validations are retried with the error message, partial objects can be streamed as they are generated, and nested models work without extra code. Ports exist for TypeScript, Ruby, Go and Elixir.
Best for
- Structured extraction from text
- Pydantic-based Python apps
- Typed outputs across providers
Use it when
You need reliable structured data from an LLM call and want validation and retries handled for you.
Skip it if
You need full agent runs, built-in observability or shareable traces; the Instructor README itself points to PydanticAI for that.