Skip to main content
Chapter 2 Five Principles of Prompting

Specify Your Output Format

5 min read Lesson 10 / 221 Preview

Specify Your Output Format

The second principle is format specification. Even a perfect task description can fail if the output arrives in the wrong structure.

Why Format Matters

Without format instructions, the AI will guess what you want. It might return:

  • A wall of text when you wanted bullet points
  • A paragraph when you wanted JSON
  • A casual essay when you wanted a structured table

Common Output Formats

Format When to Use Prompt Phrase
Markdown Documents, reports "Format as markdown with headers"
JSON API responses, data "Return valid JSON matching this schema"
Table Comparisons, schedules "Present as a markdown table"
Bullet List Summaries, action items "List as bullet points"
Numbered Steps Tutorials, processes "Provide numbered step-by-step instructions"
Code Programming tasks "Write a Python function that..."
CSV Data export "Format as CSV with headers"

Format Specification Examples

For a report:

Format the output as a markdown document with:
- An executive summary (3 sentences)
- Three H2 sections with supporting details
- A conclusion with action items as a bullet list

For structured data:

Return the result as a JSON object with these fields:
{
  "title": "string",
  "summary": "string (max 100 words)",
  "tags": ["string array"],
  "difficulty": "beginner | intermediate | advanced"
}

Pro Tips

  1. Show, do not tell — provide an example of the exact format you want
  2. Be explicit about nesting — if you want sub-bullets, say so
  3. Specify delimiters — for CSV, state the separator character
  4. Control length per section — "Each section should be 2–3 paragraphs"

Combining clear direction (Principle 1) with format specification (Principle 2) dramatically improves output quality.