Instructor Structured LLM Outputs
Get reliable JSON from any LLM with Instructor. Generates Pydantic response models, validation+retry loops, streaming partial objects, and provider-agnostic clients for OpenAI, Anthropic, Mistral, and local models.
Stop writing regex to parse JSON out of model output. Instructor wraps any LLM client to return validated Pydantic objects, retrying with the validator error as context. This skill writes response schemas, streaming iterators, and patches custom retry strategies.
When to use
Use when you need structured data from LLMs — extraction pipelines, agent tool calls, form filling, classification at scale — and want type safety plus automatic retries when the model returns malformed output.
Examples
Entity extraction pipeline
Pull structured records out of free-form text
Use Instructor with Anthropic to extract Company, Role, and Salary fields from job-posting text into a typed Pydantic model
Streaming partial objects
Render fields to the UI as they arrive
Stream a partial Instructor response so I can render fields progressively in a Next.js app as the model generates them