What is Structured Output?
Structured output refers to LLM responses formatted in machine-readable schemas like JSON or typed objects, enabling reliable integration with downstream systems and APIs.
WHY IT MATTERS
Raw LLM output is free-form text — great for humans, terrible for code. Structured output constrains the model to produce data in a specific format, making it possible to reliably parse agent decisions and route them to the right systems.
Modern approaches include JSON mode, function calling (tool use), and constrained decoding that guarantees schema compliance at the token level. Each trades some flexibility for parsing reliability.
For financial agents, structured output is non-negotiable. A transaction intent needs to be a parseable object with amount, recipient, token, and chain — not a natural language description.
HOW POLICYLAYER USES THIS
PolicyLayer relies on structured transaction intents from agents. When an agent outputs a well-typed spending request, PolicyLayer validates it against policies deterministically. Structured output is the interface between probabilistic AI and deterministic policy enforcement.