Output Formats
50%
Lesson 5 of 10

Output Formats

A clear output schema makes AI results easier to review, reuse and automate.

Active reading
Why this matters

A clear output schema makes AI results easier to review, reuse and automate.

Human-readable

Bullets, sections and concise prose.

Machine-readable

JSON or fixed fields.

Validation

Check required fields before use.

Understand the working model

If a result will be copied into a document, specify headings and length. If software will consume it, prefer a strict schema with named fields. The format should match the next step in the workflow.

Structured output reduces cleanup, but it does not guarantee semantic correctness. You still need to validate required fields and business rules.

Example
Return JSON with exactly these keys: summary, risks, next_steps. risks must be an array. If no risk is found, return an empty array.
Practice

Apply the pattern above to one real task you already do. Keep the first version small enough that you can inspect every input and output.

Common mistake

Do not ask for JSON and then mix free-form commentary outside the JSON.

Key takeaway

Choose an output format based on who or what consumes the result next.

Next lesson

Examples and Few-shot

Continue to the next lesson.

Continue →