awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
instructor-ai avatar

instructor-ai/instructor

0
View on GitHub↗
13,181 stars·1,082 forks·Python·MIT·5 vuespython.useinstructor.com↗

Instructor

Instructor is a schema enforcement and validation library designed to transform language model outputs into structured, type-safe data formats. It functions as a validation layer that uses Pydantic to ensure model responses conform to specific data models, acting as a tool for forcing large language models to return data in predefined schemas.

The project differentiates itself through a recursive error-feedback loop that automatically retries requests when structural errors occur, passing validation failure messages back to the model to guide corrections. It also includes a streaming parser capable of processing partial fragments of structured objects in real time as they are generated.

The library covers broad capabilities for structured data extraction, including the parsing of complex hierarchical information and nested structures into machine-readable formats. It utilizes prompt injection to translate type definitions into schema instructions and provides a type-safe wrapper interface to map raw responses directly into typed objects.

Features

  • Structured Output Enforcements - Forces language model outputs to adhere to strict data models for reliable programmatic processing.
  • Error-Correction Feedback Loops - Sends structural validation failures back to the model to guide the correction of malformed data.
  • Model Output Formatting - Ensures model responses conform to strict schemas for seamless integration with other software.
  • Schema Enforcement Layers - Utilizes a validation layer to force model outputs to adhere to specific JSON schemas.
  • Validation-Based Retries - Automatically retries requests when model outputs fail to conform to the required structural schema.
  • Schema Enforcement Tools - Provides a system for validating model outputs and automatically retrying requests on structural errors.
  • Structured Data Extraction - Provides a framework for extracting structured data from language model outputs using predefined schemas.
  • Structured Output Converters - Forces large language models to return data in predefined schemas and type-safe formats.
  • Model Response Validation Wrappers - Uses Pydantic as a validation layer to ensure LLM responses conform to specific Python data models.
  • Incremental JSON Parsing - Parses incomplete JSON fragments from a stream into structured objects in real time.
  • Data Serialization and Parsing - Transforms nested and hierarchical information from language models into structured lists and objects.
  • LLM JSON Constraints - Injects JSON schema instructions into prompts to constrain the model's output format.
  • Structured Collection Streams - Processes fragments of structured objects incrementally as they are generated by the model.
  • JSON - Provides a parser that processes partial JSON fragments in real time as they are generated by a language model.
  • Structured Object Streaming - Enables real-time processing of structured objects by parsing partial fragments as they are generated.
  • Type-Safe Response Parsers - Wraps client calls to map raw model responses directly into type-safe objects.
  • Structured Output Generation - Library for extracting structured data using Pydantic schemas.
  • Data Pipelines - Extracts structured data from LLMs for downstream processing.

Historique des stars

Graphique de l'historique des stars pour instructor-ai/instructorGraphique de l'historique des stars pour instructor-ai/instructor

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Instructor

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Instructor.
  • microsoft/typechatAvatar de microsoft

    microsoft/TypeChat

    8,666Voir sur GitHub↗

    TypeChat is a schema enforcement library and framework for building natural language interfaces. It ensures that responses from large language models strictly adhere to predefined TypeScript type definitions, translating unstructured human language into predictable, structured data. The project functions as both a prompt generator and an output validator. It automatically creates model instructions by extracting requirements from type schemas to replace manual prompt engineering and verifies that model outputs match the required format. The system handles structured output generation and res

    TypeScript
    Voir sur GitHub↗8,666
  • microsoft/pomlAvatar de microsoft

    microsoft/poml

    4,853Voir sur GitHub↗

    Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering structured prompts for large language models. It uses a semantic markup language to organize prompts into reusable templates, combining them with dynamic context and data to generate formatted inputs. The system distinguishes itself by decoupling core prompt logic from final presentation through a stylesheet-based approach. It provides a dedicated JSON schema output generator to enforce strict, machine-parsable model responses and a configuration interface for managing function tool s

    TypeScriptllmmarkup-languageprompt
    Voir sur GitHub↗4,853
  • 567-labs/instructorAvatar de 567-labs

    567-labs/instructor

    13,176Voir sur GitHub↗

    Instructor is a framework designed for structured data extraction, validation, and language model integration. It functions as a library that transforms unstructured text into validated, type-safe objects by leveraging schema definitions and model-specific tool-calling capabilities. By acting as a validation middleware, the project ensures that language model outputs strictly conform to defined data structures. The library distinguishes itself through a robust validation-based retry loop that automatically re-submits failed responses with error feedback to iteratively correct schema complianc

    Pythonopenaiopenai-function-calliopenai-functions
    Voir sur GitHub↗13,176
  • microsoft/guidanceAvatar de microsoft

    microsoft/guidance

    21,502Voir sur GitHub↗

    Guidance is a control framework and generation orchestrator for large language models. It provides a programming layer to steer model outputs through structured templates, schema enforcement, and logical flow management. The framework distinguishes itself by interleaving model generation with local code execution, enabling the use of loops and conditional branching within a single session. It employs grammar-based token constraints and regular expressions to force models to sample only from tokens that satisfy a specific structural format, ensuring strict adherence to predefined data models.

    Jupyter Notebook
    Voir sur GitHub↗21,502
Voir les 30 alternatives à Instructor→

Questions fréquentes

Que fait instructor-ai/instructor ?

Instructor is a schema enforcement and validation library designed to transform language model outputs into structured, type-safe data formats. It functions as a validation layer that uses Pydantic to ensure model responses conform to specific data models, acting as a tool for forcing large language models to return data in predefined schemas.

Quelles sont les fonctionnalités principales de instructor-ai/instructor ?

Les fonctionnalités principales de instructor-ai/instructor sont : Structured Output Enforcements, Error-Correction Feedback Loops, Model Output Formatting, Schema Enforcement Layers, Validation-Based Retries, Schema Enforcement Tools, Structured Data Extraction, Structured Output Converters.

Quelles sont les alternatives open-source à instructor-ai/instructor ?

Les alternatives open-source à instructor-ai/instructor incluent : microsoft/typechat — TypeChat is a schema enforcement library and framework for building natural language interfaces. It ensures that… microsoft/poml — Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering… 567-labs/instructor — Instructor is a framework designed for structured data extraction, validation, and language model integration. It… microsoft/guidance — Guidance is a control framework and generation orchestrator for large language models. It provides a programming layer… pydantic/pydantic-ai — PydanticAI is a Python framework designed for building production-grade autonomous agents. It provides a unified… jxnl/instructor — Instructor is a library designed to parse, validate, and map unstructured language model responses into strongly…