1. Home
  2. Glossary
  3. Structured output
AI glossary · Agents & automation

Structured output

Structured output: Structured output is an AI model's answer returned in a fixed, machine-readable format such as JSON or a table with defined fields, rather than free-form prose, so other software can use the result directly without a person re-typing it.

A paragraph that says 'the invoice is from Acme for $4,200, due March 3' is fine for a human and useless for a spreadsheet. Structured output asks the model to return the same information as named fields: vendor, amount, due date. Once the answer has a predictable shape, an automation can drop it into a database, a CRM record, or the next step of a workflow with no human in between.

In a chat tool, you get this by describing the format: 'Return a table with these columns' or 'Respond only with JSON using the keys vendor, amount, and due_date.' Through an API, most major vendors now offer a structured-output or JSON mode where you supply a schema and the model is constrained to match it exactly, which removes the occasional stray sentence or missing field that plain prompting produces. Automation tools like Zapier, Make, and n8n rely on this to pass AI results between steps.

Structure guarantees shape, not truth. A model can return a perfectly formatted record with the wrong amount in it. For anything that feeds a financial or customer-facing system, add validation: check that required fields are present, that numbers fall within plausible ranges, and that low-confidence items get routed to a person.

Example at work

A bookkeeper receives supplier invoices as PDFs by email. An automation sends each one to a model with instructions to return JSON containing vendor, invoice number, line items, tax, and total. The output flows into the accounting system as a draft bill. She approves each draft after a glance, and any invoice where the line items do not add up to the total is flagged for her to open by hand.

Why it matters

Structured output is the bridge between 'AI can read this' and 'AI can do something with it.' It is the foundation of nearly every practical automation, and understanding it helps you design workflows that are reliable rather than merely impressive in a demo.

Related terms