# Structured output

> Structured output: Model output in a fixed machine-readable format, such as JSON with known keys or one label from a list, so code can parse and use it.

Canonical: https://llmdojo.dev/glossary/structured-output

Also called structured outputs.

Model output in a fixed machine-readable format, such as JSON with known keys or one label from a list, so code can parse and use it.

Learn it in the lesson: [Asking for a format](https://llmdojo.dev/learn/prompt-context-engineering/examples-and-structured-outputs/asking-for-a-format) (Prompt and Context Engineering · Few-Shot Examples and Structured Outputs).

## Interview questions about Structured output

- [Design an LLM API pipeline that prompts for structured output and validates what comes back.](https://llmdojo.dev/interview/q/design-an-llm-api-pipeline-that-prompts-for-structured-output-and-validates)
- [Should you turn on grammar-constrained decoding for every structured output? What would you watch?](https://llmdojo.dev/interview/q/should-you-turn-on-grammar-constrained-decoding-for-every-structured-output-what)
- [Your LLM writes documents that must follow a strict Word formatting schema: styles, heading levels, tables. How do you make its output conform?](https://llmdojo.dev/interview/q/your-llm-writes-documents-that-must-follow-a-strict-word-formatting-schema)
- [Design an enterprise research assistant where every claim in the answer carries a citation the user can verify.](https://llmdojo.dev/interview/q/design-an-enterprise-research-assistant-where-every-claim-in-the-answer-carries)

## Related
- [In-context learning](https://llmdojo.dev/glossary/in-context-learning)
- [Glossary of every term](https://llmdojo.dev/glossary)
