Structured output means getting a model to return data in a fixed shape, usually JSON that matches a schema, instead of free prose.
Some providers can constrain generation to a schema. In every case you should still validate the result in code, because a valid shape does not mean correct values.
Typed output turns a model call into something the rest of your program can use. Define the schema once, with required fields and allowed values, and share it between the prompt and the validator.
Common mistake. Parsing JSON with a regular expression and hoping. One extra sentence before the opening brace breaks the pipeline in production.
In practice. Validate with a schema library, return a clear error to the model or the caller when it fails, retry once with the error message, and count validation failures as a quality metric.
Tool calling, also called function calling, lets a model request that your code run a named function with structured arguments. The model never executes anything itself. It returns a request, your code validates and runs it, and the result goes back into the conversation for the next step.
A prompt is everything you send to a model in one request: instructions, examples, the conversation so far, retrieved documents and the user's input. The model produces its reply from this text alone. Because outputs depend entirely on the prompt, it deserves the same version control and testing as code.
An eval is a repeatable test for software that uses a model. It has a set of inputs, a way to run your feature on them and a grader that scores each output, and it returns a rate instead of a pass or fail. Run it on every change to a prompt, model or retrieval setting.
Cite this page
Eldan Abdrashim. "Structured output." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/structured-output.
The date you read it is added when you copy.
BibTeX
@online{abdrashim2026structured,
author = {Eldan Abdrashim},
title = {Structured output},
organization = {Eldan.ai},
date = {2026-11-23},
year = {2026},
month = nov,
url = {https://eldan.ai/glossary/structured-output},
langid = {english}
}