instructor

Extracts structured data from LLM responses using Pydantic validation.

3|1|Updated May 19, 2026
One-click install
npx skills add https://github.com/Quill-Agent/Quill-Agent --skill instructor-quill-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instructor
Source: https://github.com/Quill-Agent/Quill-Agent/tree/main/optional-skills/mlops/instructor
Command: npx skills add https://github.com/Quill-Agent/Quill-Agent --skill instructor-quill-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps users extract structured data from LLM responses using Pydantic validation, handle failed extractions, parse complex JSON, and stream partial results, ensuring accurate and efficient data processing.

Core Features & Use Cases

  • Structured Data Extraction: Extract and validate structured data from LLM outputs with Pydantic models.
  • Automatic Retries: Retry failed extractions automatically with error handling.
  • JSON Parsing: Parse complex JSON with type safety and validation.
  • Streaming: Stream partial results for real-time processing.
  • Multi-Provider Support: Works with multiple LLM providers like OpenAI, Anthropic, and local models.
  • Use Case: For a user who needs to analyze customer feedback from LLM responses, this Skill can automatically extract structured data like customer sentiment, product issues, and other relevant information.

Quick Start

Use the instructor skill to extract user information from the LLM response: "John Doe is 30 years old. His email is [email protected]".

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 using Pydantic validation?

You extract structured data from LLM responses by defining Pydantic models to validate the output, automatically retrying failed extractions to ensure the parsed JSON matches your required schema.

What is the best way to parse complex JSON from LLM outputs for real-time processing?

Parsing complex JSON for real-time processing is handled by streaming partial results as they are generated, allowing you to process structured data incrementally rather than waiting for the full response.

Does this structured data extraction approach work with both OpenAI and Anthropic models?

Yes, structured data extraction works with multiple LLM providers including OpenAI and Anthropic, allowing you to apply Pydantic validation and JSON parsing across different model APIs.

How do I handle failed data extractions when an LLM response doesn't match my schema?

Failed data extractions are handled through automatic retries with error handling, prompting the LLM to correct its output until the response successfully validates against your Pydantic model.

Can I use Pydantic to validate customer sentiment and product issues from LLM feedback analysis?

Yes, you can use Pydantic to validate customer sentiment and product issues by defining a structured schema that the LLM feedback must conform to during the data extraction process.