Output Formatting

Output formatting tells the model exactly what structure to return, such as JSON, tables, markdown sections, or XML-like blocks.

Beginner Behavior control

When to use

Use it when downstream code must parse the result, when repeated calls need a stable structure, or when a document format matters.

Prompt example
Task: Apply Output Formatting to the user's request.

Context: describe the input, constraints, target audience, and desired format.

Instruction: be explicit, keep the output structured, and state any assumptions.
Output example
Structured answer based on the requested technique.

Key result: the model follows the stated task and format.
Notes: validate the output before using it in production.

Best practices

Common pitfalls