Web4Guru AI Operations

Structured Output

Structured output is a model response constrained to a schema — JSON, XML, or a grammar — so downstream code can parse it reliably.

In plain English

Structured output means forcing the model to emit text that obeys a shape you can parse. Instead of "respond with the author's name somewhere in prose," you say "respond with JSON matching this schema — a name field of type string and a confidence field of type number." Modern APIs enforce the constraint during sampling so the output is valid by construction — no regex heroics on your end.

Structured output is how agents stop being fragile. A downstream step that reads a loose "please put the title at the top" prompt breaks the first time the model improvises. A downstream step that reads a schema-validated JSON object is boring and reliable. Most production agent systems lean heavily on structured output for every inter-step contract.

Why it matters for Black Box

Black Box's CEO agent delegates using structured tool calls, and specialists return structured results. Plans are typed, evaluator verdicts are typed, the Action Feed's event stream is typed NDJSON. The whole system's reliability rests on contracts the model cannot accidentally break.

Examples

  • An evaluator returning a JSON object with a verdict string ("pass" or "fail") and an issues array, instead of prose.
  • A planner returning an array of subtasks with ids, goals, and assignees.
  • A scraper returning a rows array matching a CSV schema.

Related terms