Glossary

Structured outputs

Constraining a language model to produce output that conforms to a specific schema (e.g. valid JSON matching a defined shape). Removes the guesswork from parsing AI responses.

Structured outputs (sometimes called “JSON mode” or “constrained decoding”) is the technique of forcing a language model to produce output that strictly conforms to a schema you define, typically JSON matching a specific shape.

Without structured outputs, you ask the model for JSON in plain English and hope it complies. Often it does. Sometimes it adds explanatory text before or after. Sometimes it produces almost-valid JSON with a trailing comma or quoted-wrong key. Parsing breaks.

With structured outputs, the model is constrained at decode time to only produce tokens that match the schema. The result is guaranteed-valid JSON of the exact shape you specified.

Why this matters for Australian SMB AI work

If you’re using AI to extract structured data from unstructured input, categorising transactions from a Xero export, parsing customer emails into ticket records, normalising supplier invoices into a standard format, structured outputs are the difference between “this works 95% of the time” and “this works 100% of the time.”

A 5% failure rate sounds small until you’re processing 1,000 records overnight and waking up to 50 broken ones.

How it works

Most modern AI providers support some form:

  • Anthropic API: tool use with JSON schema validation. Define the function’s input_schema precisely and Claude’s emitted arguments conform.
  • OpenAI API: response_format: { type: "json_schema", schema: {...}, strict: true }. Strict mode forces conformance.
  • Gemini: similar response_schema option.

The pattern is the same: declare the schema, the model decodes within those constraints, you get back exactly what you asked for.

What this enables

  • Reliable data extraction pipelines (Xero categorisation, email parsing, document field extraction)
  • Multi-step agent loops where the next step depends on parsing the previous step’s output
  • Audit-able outputs (you know exactly what the model can and can’t produce)
  • Cleaner integrations with downstream systems that expect rigid input

What it doesn’t help with

  • Quality of the actual reasoning (you still need a good prompt)
  • Hallucinations (the model can still produce schema-valid but factually wrong output)
  • Anything that legitimately needs free-form text
Related terms

Want this built for your business?

Book a free 30-minute AI audit. We'll map your business and show you exactly which systems we'd build first. No pitch deck, no scoping fee.

Book my free AI audit