Instructor Structured Data Extraction from LLMs
Instructor is a multi-language library for extracting structured, validated data from LLM outputs. It patches LLM client libraries to return Pydantic models (Python) or Zod schemas (TypeScript) instead of raw text, supporting 15+ providers including OpenAI, Anthropic, and Google.
Installation
Use the upstream install or setup path that matches your environment:
- pip install instructor
- uv add instructor
Requirements and caveats from upstream:
- python
- Python - The original
- Documentation - Comprehensive guides
Basic usage or getting-started notes:
bash
Or with your package manager:
poetry add instructor
Extracted from upstream docs: https://raw.githubusercontent.com/567-labs/instructor/HEAD/README.md
Source
Source: agentskillexchange/skills — distributed by TomeVault.