Home / GenAI Tutorial / Day 5
Day 5 — Controlling the output format
The difference between an answer you paste into your work and one you have to rewrite.
Ask for the shape you actually need
Left alone, a model returns prose with a preamble, headings and a closing summary. If you wanted three values for a spreadsheet, you now have editing to do.
"Nothing before or after the table"
That one clause removes the "Certainly! Here is a comparison..." opener and the "Let me know if you would like..." closer. If you are pasting the output somewhere, it saves an edit every single time.
The formats worth knowing
| Ask for | When |
|---|---|
| Markdown table with named columns | Anything you will paste into a doc or sheet |
| CSV, no header | Straight into Excel |
| JSON with a named shape | Feeding another tool or script |
| Numbered steps | A process someone will follow |
| Exactly N bullets, under M words | Summaries for busy readers |
| Code only, no explanation | When you already know what you asked for |
Give it a template to fill
The most reliable way to control output is to show the skeleton and tell it to fill it in.
"Use only the numbers given, do not invent causes"
Without that line the model will happily explain that North grew "due to strong festive demand and improved channel partner engagement" - which it made up. A template controls the shape; that constraint controls the truthfulness.
Length control that works
"Be brief" means nothing. These do:
- Exactly five bullets - a countable instruction
- Under 20 words each - checkable at a glance
- One paragraph, no lists - blocks the default bullet habit
- Two sentences maximum - the tightest useful limit
Iterating on format
You rarely get it right first time, and you do not need to. Ask again with the fix:
Same answer, but:
- drop the intro line
- make it a table instead of bullets
- add a column for "effort"
- cut it to five rows
Refining beats rewriting
The model keeps the conversation in view, so a short correction is usually better than starting again with a longer prompt. Say what to change, not everything you wanted from the start.
Try these yourself
- Write a prompt that returns a markdown table and nothing else.
- Write one that returns exactly three bullets under 15 words each.
- Build a template prompt for a weekly status update.
- Explain why "be brief" fails and "under 40 words" works.
- Write a one-line refinement that turns bullets into a table.
