Guide
How to Define AI Output Format for Usable Results
Specify AI output formats that fit the next workflow step, with practical list, table, outline, and JSON examples plus validation limits.
An output format tells the model how the result should be organized. It turns a broad answer into something a person or system can use, compare, edit, or validate. Formatting instructions improve usability, but they do not guarantee that every field will be present or valid.
Why format matters#
A useful format reduces manual cleanup and makes omissions visible. Choose the format from the downstream action, not from what looks sophisticated.
| Next action | Useful format | Main risk |
|---|---|---|
| Read quickly | Headings and bullets | Oversimplification |
| Compare options | Table with defined columns | Unsupported precision |
| Draft content | Ordered sections | Missing source boundaries |
| Import into a system | JSON or CSV-like text | Invalid syntax or schema |
| Review a change | Findings with severity and evidence | Mixing assumptions with defects |
Define fields, not just a container#
“Return a table” is incomplete. Name the columns and what belongs in each one.
Return a table with these columns:
1. Risk — a short name
2. Evidence — exact fact or quoted source line
3. Impact — what could happen
4. Recommendation — one practical next step
5. Confidence — high, medium, or low with a reasonField definitions reduce ambiguity and make review easier.
List format#
Use a list for independent items, actions, ideas, or checks.
Return exactly five recommendations. For each, include: action, reason, required input, and one risk. Order them from lowest to highest implementation effort.Avoid asking for a fixed number when the source may not support that many valid items. You can instead say “up to five.”
Table format#
Tables work well for comparison and compact planning.
Create a Markdown table with columns: Task, Owner Role, Required Input, Output, Review Check, and Dependency. Use one row per task. Write “Unknown” rather than inventing a dependency.A table is not automatically more accurate. It can make invented detail look authoritative, so include source and uncertainty rules.
Outline format#
Use an outline when sequence and hierarchy matter.
Return an article outline with H1, H2, and optional H3 headings. Under each heading, add purpose, reader question, required evidence, and suggested internal link. Do not write the full article.This prevents the model from skipping directly to prose when the real need is planning.
JSON-like format#
Return one JSON object with keys:
- title: string
- audience: string
- summary: string, maximum 60 words
- risks: array of objects with name, evidence, and mitigation
- missing_information: array of strings
Use null for an unknown scalar value and [] for an empty array. Do not wrap the JSON in commentary.Prompt wording alone does not guarantee valid JSON. The output may contain syntax errors, extra text, wrong types, or invented values. A consuming application must parse and validate it.
Length and ordering#
State limits in units that can be checked: words, characters, items, rows, or sections. Explain priority when requirements compete.
Keep the body between 120 and 160 words. If the approved facts cannot fit, preserve accuracy and required warnings before brevity.Without a priority rule, the model may satisfy the length requirement by omitting something important.
Handling missing or invalid input#
Tell the model how to respond when the requested format cannot be completed.
If a required field is not supported by the source, use [MISSING] and add the question needed to complete it. Do not infer a value.For iterative workflows, request a repair response:
If your first output does not match the schema, return a corrected version only. Preserve supported content and remove all extra keys.The user or application must still perform actual validation.
Before and after: meeting summary#
Weak prompt
Summarize these meeting notes.Format-defined prompt
Summarize the meeting notes for participants and absent stakeholders. Return: 1) 60-word executive summary, 2) decisions with owner and date, 3) action items with owner, due date, and dependency, 4) unresolved questions, and 5) statements that need confirmation. Use “Not assigned” or “Not stated” rather than guessing.The format distinguishes decisions, actions, and unresolved information.
Before and after: documentation#
Weak prompt
Document this API.Format-defined prompt
Create Markdown documentation with sections: Purpose, Authentication, Request Fields, Response Fields, Error Cases, Minimal Example, and Security Notes. For every field include type, required status, description, and example. Mark information absent from the source as [UNKNOWN].Output-format checklist#
- The format matches the next action.
- Every field has a clear meaning.
- Ordering and length are explicit where necessary.
- Missing values have a defined representation.
- Accuracy takes priority over cosmetic completeness.
- Machine-readable output will be parsed and validated outside the prompt.
FAQ#
Is JSON always the best format?
No. Use JSON only when another system or a structured review process benefits from it. Plain headings are easier for many human tasks.
Can I guarantee valid JSON by saying “valid JSON only”?
No. It improves the instruction but does not replace parsing, schema validation, and error handling.
Should I include an example output?
Include one when field interpretation or nesting is difficult to describe, but keep it representative and avoid values the model may copy blindly.