instructor

Extract structured data from LLM responses with Pydantic validation and retries.

Updated May 3, 2026
One-click install
npx skills add https://github.com/Yangel-hide/video-production-planner-agent --skill instructor-yangel-hide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instructor
Source: https://github.com/Yangel-hide/video-production-planner-agent/tree/main/optional-skills/mlops/instructor
Command: npx skills add https://github.com/Yangel-hide/video-production-planner-agent --skill instructor-yangel-hide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires instructor, pydantic, openai, anthropic, and includes references (resource) components.

What problem does it solve?

This skill enables reliable extraction of structured data from LLM responses and validates results with Pydantic, offering automatic retries and streaming for real-time updates.

Core Features & Use Cases

  • Structured output validation with Pydantic schemas and automatic retry on validation failures.
  • Multi-provider compatibility (OpenAI, Anthropic, local models) and streaming of partial results.
  • Real-world use cases include extracting user profiles, classifications, and multi-entity information from unstructured text.

Quick Start

Prompt the agent to extract a structured profile from a messy text and validate it against a Pydantic model.

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 LLM responses with Pydantic validation?

You can extract structured data from LLM responses by defining a Pydantic model as your response schema, which validates the extracted output and automatically retries on validation failures to ensure correctness.

Can I use this to get structured output from Anthropic and OpenAI models?

Yes, structured output extraction supports multi-provider compatibility across OpenAI, Anthropic, and local models, allowing you to apply the same Pydantic validation schemas regardless of the LLM provider.

What happens when LLM structured output fails Pydantic validation?

When structured output fails Pydantic validation, the system applies automatic retry logic, prompting the LLM again to correct the formatting errors and ensure the response matches the defined schema.

Does this support streaming partial structured results for real-time updates?

Yes, it supports streaming partial results for real-time updates, allowing you to process multi-entity information and structured data progressively as the LLM generates the response tokens.

What is the best way to extract user profiles and classifications from unstructured text?

The best way to extract user profiles and classifications from unstructured text is using Pydantic schemas to map the LLM output into structured data, ensuring strict validation and automatic retries for malformed responses.