instructor

Extract validated structured data from LLM responses using typed schemas.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/davpatel605-beep/hermusagent --skill instructor-davpatel605-beep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: instructor
Source: https://github.com/davpatel605-beep/hermusagent/tree/main/backend/vendor/hermes/optional-skills/mlops/instructor
Command: npx skills add https://github.com/davpatel605-beep/hermusagent --skill instructor-davpatel605-beep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of extracting reliable structured data from LLM responses by adding schema validation, automatic retries, and type-safe parsing workflows.

Core Features & Use Cases

  • Structured Output Extraction: Convert unstructured LLM responses into validated Pydantic models with predictable schemas.
  • Validation and Recovery: Apply automatic validation, error feedback, and retries when generated data does not match requirements.
  • Multi-Provider Support: Build extraction pipelines across OpenAI, Anthropic, and local models with consistent interfaces.
  • Use Case: Extract customer records, classify documents, analyze reviews, or process business text into validated application-ready data.

Quick Start

Use the instructor skill to extract structured customer information from a text document and validate the result with a Pydantic schema.

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?

To extract structured data from LLM responses, convert unstructured text into validated Pydantic models using typed schemas. This replaces unreliable manual JSON parsing by applying schema validation and automatic retries to ensure the generated data matches your application requirements.

What is the best way to validate LLM JSON output?

The best way to validate LLM JSON output is using Pydantic schemas with automatic validation and error feedback. When generated data does not match requirements, the system applies automatic retries to recover and produce predictable, type-safe structured outputs.

Does this structured output approach work with Anthropic and local models?

Yes, this structured output approach works with Anthropic and local models. It supports building extraction pipelines across OpenAI, Anthropic, and local models using a consistent interface for multi-provider structured output handling.

How do I parse streaming LLM outputs for data extraction?

To parse streaming LLM outputs for data extraction, apply typed schemas and validation rules to real-time streaming scenarios. This handles real-time streaming responses from LLM providers to extract and validate structured data as it arrives.

Why does manual JSON parsing fail for LLM data extraction?

Manual JSON parsing fails for LLM data extraction because it lacks schema validation and automatic recovery. Without typed schemas and validation rules, unstructured LLM responses often produce unpredictable data that breaks downstream application logic.

Can I use Pydantic models for LLM document classification?

Yes, you can use Pydantic models for LLM document classification. Define typed schemas to extract customer records, classify documents, analyze reviews, or process business text into validated, application-ready data.