vibedonaldsvibedonalds.com
Term

Structured extraction

Using an LLM to pull structured data — JSON fields, table rows, knowledge-graph triples — from unstructured input. Powered by structured output / function calling. The most common production AI pattern after RAG.

Background

Structured extraction is the use of an LLM to turn unstructured or semi-structured input such as free text, an email, a PDF, or a transcript into a defined machine-readable shape like JSON matching a schema. Instead of returning prose, the model populates named fields, so an invoice becomes an object with vendor, date, line items, and total, or a resume becomes structured work history. Mechanically, you give the model the source content plus a target schema, usually a JSON Schema, a Pydantic or Zod model, or an explicit field list, and it fills in the values, inferring where the data lives, normalizing formats, and leaving fields null when the information is absent. Reliability comes from constraining the output rather than trusting the model to format itself: many providers support a structured-output or function-calling mode that guarantees responses conform to the schema, often via constrained decoding that only permits tokens keeping the output valid against the grammar. The extracted object is then validated against the schema, and failures can be retried or flagged. It matters because it is the bridge between messy human-produced content and ordinary software: databases, APIs, and business logic need typed fields, not paragraphs. Structured extraction lets you build pipelines that ingest documents, classify and pull key data, and feed it downstream deterministically, replacing brittle regex and hand-written parsers while handling the variation and ambiguity of real-world inputs that rule-based systems choke on.