instructor

Extract structured data from LLM responses and validate against Pydantic schemas.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill instructor-supporter09
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instructor
Source: https://github.com/Supporter09/Face_Anti_Spoofing_Biometric/tree/main/.claude/skills/instructor
Command: npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill instructor-supporter09

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Instructor makes LLM outputs reliable when you need structured information instead of free-form text. It helps you avoid brittle parsing, repeated manual cleanup, and silent schema mismatches by validating responses against typed models.

Core Features & Use Cases

  • Structured extraction: Convert responses into typed records for entities, articles, reviews, company profiles, and other schema-driven data.
  • Automatic validation and retry: Catch invalid fields with Pydantic, feed errors back to the model, and retry until the output matches the schema.
  • Streaming and iteration: Handle partial objects and iterable results for live dashboards, incremental processing, and real-time applications.
  • Multi-provider support: Use the same structured-output workflow across Anthropic, OpenAI, and local JSON-mode providers.
  • Use case: A product team can extract sentiment, key points, and action items from customer feedback while ensuring every record conforms to the same validated format.

Quick Start

Ask the assistant to extract your target data into a Pydantic schema and return only the validated structured result.

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 and validate it against a schema?

Structured data extraction from LLM responses validates output against Pydantic schemas automatically. It catches invalid fields, feeds errors back to the model, and retries until the output matches your defined schema.

What's the best way to handle invalid fields when parsing LLM output into Pydantic models?

Handling invalid fields in LLM output uses automatic validation and retry mechanisms. Pydantic catches schema mismatches, feeds the validation errors back to the model, and retries automatically until the response conforms to the typed model.

Does this structured output workflow support multiple LLM providers like Anthropic and OpenAI?

This structured output workflow supports multiple LLM providers including Anthropic, OpenAI, and local JSON-mode providers. It enables provider-agnostic data extraction, ensuring consistent structured results across different models.

Can I stream partial structured results from LLMs for real-time applications?

Streaming partial structured results from LLMs is supported for real-time applications. You can handle partial objects and iterate through results, enabling live dashboards and incremental processing of validated data as it generates.

How do I parse nested entities and classify text using LLM output validation?

Parsing nested entities and classifying text uses schema-driven data extraction. By defining typed response models, the LLM output is automatically parsed and validated, ensuring complex nested structures conform to your Pydantic schema.

Why does my structured LLM output fail schema validation and how do I fix it?

Structured LLM output fails schema validation due to mismatched data types or missing fields. Automatic error handling fixes this by feeding validation failures back to the model and retrying until the output matches the typed Pydantic schema.