instructor

Extract typed, validated data from unstructured LLM outputs using Pydantic models.

1|1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/BermudaLocals/hermes-agent-lite --skill instructor-bermudalocals
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: instructor
Source: https://github.com/BermudaLocals/hermes-agent-lite/tree/main/optional-skills/mlops/instructor
Command: npx skills add https://github.com/BermudaLocals/hermes-agent-lite --skill instructor-bermudalocals

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Extracts typed, validated data from unstructured LLM outputs.

Core Features & Use Cases

  • Type-safe extraction with Pydantic models to ensure data structure accuracy.
  • Automatic retries on validation failures with feedback to the LLM.
  • Streaming partial results for real-time processing and UX responsiveness.
  • Multi-provider compatibility (OpenAI, Anthropic, etc.) enabling flexible deployments.
  • Real-world use case: extract a User object from text such as "John Doe, 30, john@example.com" into a User model.

Quick Start

Extract a structured User object from text by validating with a Pydantic model and streaming the results.

Frequently Asked Questions about instructor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract structured data from unstructured LLM outputs?▼

To extract structured data from unstructured LLM outputs, you can use Pydantic models for type-safe validation. This ensures data structure accuracy by automatically retrying validation failures and providing feedback to the LLM.

Can I stream partial LLM outputs for real-time processing?▼

Yes, you can stream partial LLM outputs for real-time processing. This capability improves UX responsiveness by delivering incremental structured data results as they are generated and validated.

Does Pydantic validation work with Anthropic and OpenAI models?▼

Pydantic validation works with multiple providers including Anthropic and OpenAI. This multi-provider compatibility enables flexible deployments across different LLM environments for structured data extraction.

What is the best way to handle LLM validation failures automatically?▼

The best way to handle LLM validation failures automatically is to use a retry mechanism that sends validation error feedback back to the LLM. This ensures the subsequent output matches your Pydantic model.

How do I extract a User object from raw text using Pydantic validation?▼

You can extract a User object from raw text using Pydantic validation by defining a User model and passing the text to the extraction process. The system validates the extracted data against your model.

When do I need structured LLM outputs for data extraction tasks?▼

You need structured LLM outputs for data extraction tasks when working across classification and analysis workflows in Python. Structured outputs guarantee type-safe data handling and accurate downstream processing.