Structured LLM Outputs

Output Schemas

Define structured JSON outputs for consistently formatted, parseable LLM responses

Get Started

What are Output Schemas?

Output schemas are JSON Schema definitions that let you define exactly what structure you want from your LLM. Instead of parsing free-form text, you specify the fields, types, and format upfront.

Train your LoRA adapters to follow these schemas for best results, making outputs predictable and ready for downstream processing.

Raw LLM Output
The customer's name is John Smith and you 
can reach him at [email protected] 
or call (555) 123-4567. He works at Acme 
Corp as a Senior Engineer.
Structured Output
{
  "name": "John Smith",
  "email": "[email protected]",
  "phone": "5551234567",
  "company": "Acme Corp",
  "job_title": "Senior Engineer"
}

Why Use Schemas?

Structured Format

Reduce parsing errors by training models to follow your defined JSON structure consistently.

Type Definitions

Define types, enums, and validation rules to guide your models toward more structured, predictable outputs.

Faster Processing

Skip regex parsing and error handling. Deserialize directly into your application's data structures.

Reusable Patterns

Define once, use across multiple adapters. Build a library of validated output formats.

Example Schema

Here's a schema for extracting contact information from text

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Full name of the person"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "phone": {
      "type": "string",
      "pattern": "^[0-9]{10}$"
    },
    "company": {
      "type": "string"
    },
    "job_title": {
      "type": "string"
    }
  },
  "required": ["name", "email"]
}

Train your adapter with this schema to consistently extract contact data in this structured format.

Common Use Cases

Structured Extraction

Transform unstructured text into structured JSON with defined fields, making data queryable and ready for processing.

Classification

Categorize text into predefined buckets with confidence scores and reasoning chains.

Entity Recognition

Identify people, places, organizations, and dates in a consistent, structured format.

Structured Analysis

Generate reports, summaries, or insights in consistent, structured JSON formats.

Ready to Define Your Schemas?

Create reusable output schemas and pair them with your LoRA adapters