Instructor
Library for getting reliable, structured data output from LLMs using function-calling APIs and Pydantic models for validation.
Overview
Instructor wraps an LLM's native function-calling or tool-use capability so a developer can request a response that matches a Pydantic model, and automatically retries the request if the model's output doesn't validate against that schema - turning unreliable free-text LLM output into dependable structured data. It supports OpenAI, Anthropic, and many other model providers through one consistent interface.
Instructor is a fit for teams that need structured data extraction from LLMs, achieving that through function-calling APIs and retry logic - a different technical approach than Outlines (also in this catalog), which constrains generation at the token level instead.
- Categories
- AI & Machine Learning
- Languages
- Python
- License
- MIT
Related Projects
Docling
MITDocument parsing library that converts PDFs, Word docs, and other formats into clean, structured data ready for LLM and RAG pipelines.
- AI & Machine Learning
Guidance
MITProgramming paradigm and library for controlling LLM generation with interleaved prompting, control flow, and constrained output in one program.
- AI & Machine Learning
Haystack
Apache-2.0Open-source framework for building production-ready search and RAG (retrieval-augmented generation) applications with LLMs.
- AI & Machine Learning
LlamaIndex
MITData framework for connecting large language models to your own data - documents, databases, APIs - for retrieval-augmented applications.
- AI & Machine Learning
Spotted an error? Suggest an edit on GitHub.