Skip to content
FindOpenSource

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
Keywords
structured-outputllm-frameworkdata-extraction
Languages
Python
License
MIT

Spotted an error? Suggest an edit on GitHub.