Lesson 3 of 6
Specify an output format
An explicit format turns an open-ended response into a deliverable you can work with.
The idea
Name the fields, ordering, and limits you need. A comparison table helps a person scan options. JSON may help a program consume a result, but a prompt alone cannot guarantee valid JSON. Validate parsed data and required fields before using it. Decide how missing information should be represented instead of encouraging the model to fill gaps.
Compare two instructions
Before
A request with important details left open.
Compare these tools.
After
An instruction with an explicit task and constraints.
Compare the supplied tool descriptions in a table with columns: tool, supported task, stated limitation, and missing information. Use ‘not provided’ when a description does not state a fact. Do not add features from memory.
Try it yourself
Use the scenario below, then compare your approach with a worked example.
Compare and reflect. No live AI generation.
Key takeaway
Specify both the output structure and how to handle missing values.