- Choose the structure needed by the next reader.
- Represent missing values explicitly.
- Validate content separately from formatting.
An output contract describes what the response must contain and how it should represent it. It is useful when a result will become a checklist, spreadsheet row or application input. A valid shape improves handling, but it does not prove that the values are correct.
Start with the downstream use
Suppose a coordinator will paste workshop registrations into a sheet. Define fields such as source_id, attendee_count and unresolved_question before requesting prose. Explain whether count is an integer and how missing information should appear. A smaller contract is easier to review than an elaborate schema containing fields the source cannot support. Include units where a number could otherwise mean people, seats or currency.
Show one supported and one incomplete case
Use a fictional example with a stated count and another without it. Demonstrate that unknown is not zero: zero means the source reports none, whereas null or an explicit missing label means no count was supplied. Keep the example values separate from the real task data so the assistant does not copy them into every response. The examples teach representation rather than supply missing evidence.
Run two different checks
First confirm the response uses the agreed keys and types. Then trace each nonempty value back to its source passage. A JSON parser can establish syntax while accepting a fabricated count of42; a source review can catch that unsupported value. Record both outcomes rather than treating a machine-readable response as complete validation. Reject unexpected fields when the next application relies on a narrow contract.
Illustrative worked example — Two registration notes
Supplied input
R1:12attendees. R2:no count provided. Contract:source_id,count,question.
Example result to inspect
R1 count12; R2 countnull with question count not supplied.
The missing value carries an explicit meaning and cannot silently become a zero-attendance claim.
This is an authored teaching example, not a recorded live provider run or an independent performance test.
Make the idea concrete.
- Write a three-field contract with types and missing-data rules.
- Create one complete and one incomplete fictional source.
- Check shape first and source support second.
What a useful outcome looks like
A reusable output contract with two separately recorded validation results.
Ask for reasoning you can verify.
Use fictional or permitted data. This is a copyable brief for a separate approved model; no model is called from this article.
Apply this output contract to the supplied fictional notes. Preserve source identifiers, distinguish zero from missing, and do not add keys or values without evidence. After drafting, list the checks a human should perform on structure and content.
Turn reading into a reviewed checkpoint.
Complete the manual exercise, review each item, then answer the evidence question. This records self-study, not independent assessment of expertise.
Review the checklist and pass the question to save this lesson.
Primary references
References support further checking; cited organizations do not endorse AgentX. This guide is original AI-assisted educational content with illustrative examples. Read the editorial policy or report a correction.
Continue with a related task.
Write the task before choosing a persona
A role such as expert analyst can suggest a tone, but it cannot tell the assistant which work to complete or establish expertise.
Give context a visible trust boundary
A prompt often combines the user’s task with text copied from somewhere else.
Use examples to teach the difficult boundary
Examples can communicate a pattern more clearly than another paragraph of instructions.