AI agent
An AI agent is an AI system that autonomously plans and executes multiple steps to reach a goal. It uses a language model as its brain and c...
Read definitionStructured output means making a model return machine-readable data that fits a schema, usually JSON, instead of free text. Modern APIs can enforce the schema while the model generates, so the response parses. The shape is guaranteed, but the values still need checking.
Structured output means making a model return data in a fixed shape that software can read directly, instead of a paragraph of prose. In practice that shape is almost always JSON with named fields, set types, and a list of allowed values.
Free text is fine when a person reads the answer, but it breaks down when the next step is code. If a workflow has to act on an LLM reply, you want a category field and a confidence field back every time, not a sentence you have to parse.
There is a real difference between a prompt that says "reply in JSON" and an API that guarantees the reply fits your schema. A line in a prompt template is a request: the model usually complies, but it can still drop a field or return a value that was never allowed.
Structured output closes that gap while the answer is generated. You hand the API a JSON schema, and platforms such as OpenAI and Azure OpenAI compile it into a grammar that constrains decoding, so at each step the model can only pick a token that keeps the output valid against the schema. OpenAI states the model "will always generate responses that adhere to your supplied JSON Schema", and Anthropic gives the same promise through strict tool use. A finished response parses and fits the shape you defined.
A schema names the fields, their types, and the allowed values. Enums matter, since they force the model to pick from a fixed set instead of writing its own labels:
{
"type": "object",
"properties": {
"category": { "type": "string", "enum": ["bug", "billing", "other"] },
"confidence": { "type": "number" }
},
"required": ["category", "confidence"],
"additionalProperties": false
}Extraction. Turn an invoice email into supplier, amount, due_date, and po_number that flow straight into your system.
Classification. Route a ticket into one of five categories with a confidence score, so a workflow branches on a field instead of a sentence.
Agent tool calls. When an AI agent uses tool use (function calling), it must emit arguments that match the tool schema exactly, and structured output makes that call dependable.
Valid is not the same as correct. The schema controls the shape, not the truth of the values. Ask a weather tool for a forecast without naming a city and the model may still fill location with "New York, NY": schema-valid and invented. Checking that the values are right stays your job, which is where validation and evals come in.
The guarantee assumes the response finishes. A refusal or the token limit can end a reply before the schema is satisfied, so handle the case where nothing valid comes back.
Keep the schema lean and legal. Structured output supports only a subset of JSON Schema. Every object needs additionalProperties set to false and every field must be required, with optional fields modelled as a type that also allows null. Fewer fields also means less for the model to get wrong.
An AI agent is an AI system that autonomously plans and executes multiple steps to reach a goal. It uses a language model as its brain and c...
Read definitionAn AI harness is the software layer around a language model that turns it into a working agent. It manages the loop, tools, context, permiss...
Read definitionAI literacy is the knowledge and judgement people need to use AI responsibly: understanding what a model can do, checking its output, protec...
Read definitionAn API, or Application Programming Interface, is a contract that lets software talk to other software. In a data context, APIs are how conne...
Read definitionArtificial intelligence is technology that teaches computers to learn, reason, and make decisions from data instead of following hand-writte...
Read definition
The June 2026 Power BI Desktop Bridge lets an agent build and verify reports. Here is how to enable it and install the two CLIs the docs lea...
Simple guide to set up version control for Power BI using PBIP, Git and clean repo structures. Learn branching, deployments and safe AI work...