Pre-launch · Training and the free Foundations exam are open now. Levels 1–5 open soon. Get notified on any level page.
20 min read
A structured output is one with a shape you defined in advance: named fields in a fixed order, a set length, a known way to show missing data. Structure turns a draft you have to read closely into something you can scan, paste into a spreadsheet, or check line by line. This module covers text outputs first, then short briefs for images and code, then how to document a prompt that other people will reuse.
An output contract has four parts:
asset_tag, device_type, assigned_to, purchase_date.not recorded. Without it, the model may fill gaps with plausible guesses."Keep it brief" is a preference. "Three bullets, each under 15 words" is a limit you can check. Exclusions work the same way: if you don't want prices, internal codes, or speculation, say so in a "Do not include" line.
Make each part checkable on its own. A request for "a summary, a risk list, and an email" in one block is hard to review. Three labeled sections, each with its own limit, let you pass or fail each one separately.
Some tasks produce images or code, and some take images or audio as input. Different modalities need different specifics.
An image brief should name the subject, the composition (what goes where, what space stays empty), the lighting, the style, the aspect ratio, and what must not appear. Generated lettering is often garbled, so leave text out and add it later in a layout tool.
A code brief should name the language and version, any libraries allowed, the input format, the exact behavior, what the code must not do, and the tests you expect. Generated code still needs review and a safe test run before anyone relies on it.
A prompt that a team runs every week is a small tool. Document it: owner, purpose, inputs it expects, output contract, known limits, a test set, version, and date of last change. When it breaks, someone knows who maintains it and how to check a fix.
Jae-won Park manages IT assets for a 90-person accounting firm. Staff send laptop handoff notes as free text, and he wants them turned into register rows.
Before:
Turn these handoff notes into a table. Keep it short. Fill in
anything missing so the register looks complete.
"Short" can't be checked. "Fill in anything missing" asks for invented serial numbers and dates.
After:
Extract each handoff note into one row with these fields, in this
order:
asset_tag | device_type | serial_number | assigned_to |
handoff_date | condition_note
Rules:
- Copy values exactly as written in the note.
- If a field isn't in the note, write: not recorded
- handoff_date as YYYY-MM-DD. If only a weekday is given, write
not recorded.
- condition_note: 12 words or fewer, from the note only.
- Do not include passwords, PINs, or personal phone numbers even if
a note contains them.
After the rows, list asset_tags with any "not recorded" field so I
can follow up.
Why this is stronger. Every row has the same fields in the same order, so Jae-won can paste them into the register. Missing data shows up as not recorded instead of a guess. The follow-up list is its own checkable part. The exclusion line keeps secrets out of the register, though he still removes them from the notes before pasting where he can.
He keeps a short documentation block above the prompt in the team's shared drive: Owner: J. Park. Purpose: handoff notes to asset register. Input: one or more plain-text notes. Output: rows as specified. Test set: 8 saved notes, including 2 with missing serials. Version 1.2, updated October 6.
For a related task, the same discipline applies to code: "Python 3.11, standard library only, read a UTF-8 CSV with an asset_tag column, print duplicate tags with their row numbers, do not modify the file, include tests for blanks and a missing column."
Setup. Find five short records from your work that arrive in free text: meeting requests, expense notes, customer inquiries, shipping updates.
Task. Write an output contract with four to six named fields, a fixed order, a missing-value marker, one measurable length limit, and one "Do not include" line. Run it on all five records. Then write a four-line documentation block: owner, purpose, input, test set.
What a good result looks like. All five outputs have identical fields in identical order. Any absent detail shows your marker, not an invented value. You can check every field against its source record in under a minute per record.