v0.3 — Multi-strategy extraction is live

Stop parsing AI responses.

Turn any model into a structured-output engine. Extract typed objects, JSON schemas, and validated data from unstructured responses — even when the model doesn't support structured outputs.

Microsoft Copilot · response.txt
Michelle approved the $125,000 migration budget on July 18 and assigned Shawn to lead delivery.
schematic.extract() → Approval
{
  "approver": "Michelle",
  "amount": 125000,
  "date": "2026-07-18",
  "owner": "Shawn"
}
Works with
The problem

LLMs speak prose.
Applications need structure.

Messy Responses

Parsing with regex is fragile. Prompts break. Formats change every model update.

No JSON Mode

Many production models still don't support structured outputs — or do so inconsistently.

Validation Problems

Malformed JSON crashes automations and downstream workflows in production.

The solution

One interface. Any model.

Schematic sits between your model and your application. It normalizes any response into the types you define.

OpenAI Claude Copilot Gemini Llama
Schematic
Pydantic JSON Schema Dataclass TypedDict
extract.py python
from schematic import extract
from pydantic import BaseModel

class Approval(BaseModel):
    approver: str
    amount: float
    date: str
    owner: str

result = extract(
    text=response,
    schema=Approval,
)

# → Approval(approver='Michelle', amount=125000.0, ...)
Features

Everything you need,
nothing you don't.

Schema-Driven

Define your schema once. Reuse it across models, prompts, and pipelines.

Provider Agnostic

Works with any model — hosted or local. Swap providers without changing code.

Validation

Automatic type checking and coercion. Bad data never reaches your logic.

Fallback Strategies

GLiNER → Small LLM → Repair. Graceful degradation when the primary path fails.

Local First

Run extraction locally with Ollama or open weights. No egress, no vendor lock-in.

Production Ready

Retries, auditing, structured logging, and observability hooks built in.

Playground

See Schematic in action.

Paste any AI response. Pick a schema. Watch typed data emerge.

1. Paste AI response
2. Schema
class ActionItem(BaseModel): owner: str task: str due_date: str amount: float | None approver: str | None
3. Structured output
Why Schematic

Better than prompting alone.

Prompt Engineering

"Please respond in JSON with these fields…"

  • Fragile — one model update breaks it
  • No validation — silent failures
  • Inconsistent across providers
  • Manual repair logic per project

Schematic

extract(text, MySchema)

  • Schema enforced at the boundary
  • Typed outputs your IDE understands
  • Automatic correction and repair
  • Provider independent by design
Developer experience

Three lines to production.

invoice_pydantic.pypython
from pydantic import BaseModel
import schematic

class Invoice(BaseModel):
    vendor: str
    total: float
    due_date: str

result = schematic.extract(response, Invoice)
invoice_jsonschema.pypython
import schematic

invoice_schema = {
    "type": "object",
    "properties": {
        "vendor": {"type": "string"},
        "total":  {"type": "number"},
    },
}

result = schematic.extract(response, invoice_schema)
invoice_dataclass.pypython
from dataclasses import dataclass
import schematic

@dataclass
class Invoice:
    vendor: str
    total: float
    due_date: str

result = schematic.extract(response, Invoice)
Use cases

Wherever prose meets pipelines.

Agent Systems

Convert reasoning into deterministic actions your runtime can execute.

Meeting Intelligence

Extract decisions, action items, and owners from transcripts.

CRM Automation

Capture opportunities, contacts, and next steps from every conversation.

Ticket Routing

Classify, tag, and structure support requests with typed fields.

Compliance

Extract regulated information with schemas that encode policy.

Document Processing

Transform contracts, invoices, and reports into structured records.

Open source

Open. Transparent. Developer first.

No SDKs behind a login wall. No telemetry surprises. The library you'd write yourself, already written.

Star schematic on GitHub ★ 4.2k
MIT License GitHub Native Community Driven
From engineers

Built for people who've
written the parsing code before.

"This replaced hundreds of lines of parsing code across three services. The schema is the contract." — Staff Engineer
"Structured outputs without changing our model provider. The fallback chain saved us during an outage." — Platform Architect
Roadmap

Where we're going.

v0.1 · Shipped
Structure extraction
Core Pydantic + JSON Schema extraction pipeline.
v0.2 · Shipped
GLiNER integration
Local entity extraction for zero-shot fields.
v0.3 · Current
Multi-strategy extraction
GLiNER → small LLM → JSON repair fallback chain.
v0.4 · Next
Streaming support
Progressive extraction from token streams.
v1.0
Tool-calling compatibility layer
A unified interface across every provider's tool API.
Get started

Stop parsing.
Start building.

Use any model. Get structured data. Ship in an afternoon.

$ pip install schematic