What problem does it solve? Language models often produce malformed JSON or free-form text that breaks downstream parsing. This Skill guarantees structurally valid outputs by constraining token generation against Pydantic models, JSON schemas, regex patterns, or fixed choice lists. ## Core Features & Use Cases - Grammar-Constrained Generation: Uses finite state machines to filter invalid tokens at each generation step, guaranteeing outputs match the target schema. - Pydantic Integration: Define output structures as Pydantic models with field constraints, enums, nested models, and optional fields. - Multiple Backends: Works with Transformers, llama.cpp, and vLLM for local inference, plus limited OpenAI API support. - Use Case: Extract structured company information (name, founded year, industry, employee count) from unstructured text paragraphs into validated Pydantic objects, with zero parsing failures. ## Quick Start Ask the agent to extract structured data from a text passage into a Pydantic model using Outlines with a local Transformers model.