Python

Instructor

Reliable structured outputs from LLMs
by 567-labs · MIT
13 813stars1 214forksPythonlanguage9 days agolast push
LLM / RAG frameworkStructured outputs libraryMITCloud-optionalPythonBeginner

From the README

Install
pip install instructor

Excerpts from the project README on GitHub. Copyright and licensing remain with the respective authors.

A high count usually means the project is heavily examined. A low count usually means it is little examined — not that it is safe.
No public activity signals for this tool — it has no open repository we can measure.
Olud Pulse ⓘ ★★★★★★★★★★ /100 signals tracked
🐳 Docker pulls 📦 PyPI downloads / month 📦 npm downloads / month 🚀 Latest release ·
Visit website →View on GitHub

What is Instructor?

Instructor makes LLMs return validated, typed structured data using Pydantic models, with automatic retries when validation fails.

Why people choose Instructor

Instructor at a glance

CategoryLLM / RAG framework
TypeStructured outputs library
LicenseMIT
Runs locallyCloud-optional
Built withPython
Skill levelBeginner
Best fordevelopers extracting structured data from text
See GitHub stats & activity

Open-source alternatives to Instructor

Other open-source llm / rag framework tools worth comparing:

LangChainCompose chains, tools and agentsLlamaIndexThe data framework for RAGHaystackProduction pipelines for search and RAGDSPyProgram — not prompt — language modelstxtaiAll-in-one embeddings databaseRAGFlowDeep-document-understanding RAGSemantic KernelMicrosoft's enterprise agent frameworkGraphRAGRAG that builds a knowledge graph firstLiteLLMOne API for 100+ LLM providersOutlinesGuarantee valid JSON and grammarsGuidanceInterleave control and generationLLMWareEnterprise RAG with small specialised modelsFlashRankUltra-light reranking for better RAGSentence TransformersThe standard way to make embeddingsRagasMeasure whether your RAG is any goodPromptfooUnit tests for your promptsLangfuseSee what your LLM app actually didPhoenixTrace, evaluate and debug LLM apps

Instructor head-to-head

Instructor vs LangChainInstructor vs LlamaIndexInstructor vs HaystackInstructor vs DSPyInstructor vs txtaiInstructor vs RAGFlowInstructor vs Semantic KernelInstructor vs GraphRAGInstructor vs LiteLLMInstructor vs OutlinesInstructor vs GuidanceInstructor vs LLMWareInstructor vs FlashRankInstructor vs Sentence TransformersInstructor vs RagasInstructor vs PromptfooInstructor vs LangfuseInstructor vs Phoenix

FAQ

Is Instructor free?

Instructor is free and open-source (MIT license), so you can use, self-host and modify it at no cost.

Can I run Instructor locally?

Instructor can be used locally or in the cloud depending on your setup.

What is the best alternative to Instructor?

Popular open-source alternatives include LangChain, LlamaIndex, Haystack. See the comparisons above to choose.

Explore more open-source AI

Browse the full directory of open-source AI tools, models and projects — updated daily.

Browse all tools →