Design task contracts
Specify inputs, expected schema, validation and fallback.
Lesson 1 of 4 · Learn it by trying itWatch: Advanced prompting and structured outputs
An original animated overview. No sound—follow the on-screen explanation, or read the transcript.
Read the video transcript
Design task contracts. Specify inputs, expected schema, validation and fallback.
Use examples deliberately. Provide a few representative synthetic examples and counterexamples.
Break down complex work. Split a task into observable stages with checks between them.
Validate structured output. Use schema validation, bounded fields and independent checks.
Created for AI For Numpties · Original course material · Hosted with this website
Getting your practice ready…
Explore the idea with an example
Specify inputs, expected schema, validation and fallback. Separate instructions from untrusted data. A structured response is useful only when it meets factual and format constraints.
Use a labelled instruction hierarchy: task, trusted constraints and clearly separated source data. Treat text inside a document as content to analyse, even if it contains commands. Examples can clarify a format but can also bias the output. Choose a few representative examples and include an edge case. A longer prompt is not automatically a better prompt; remove conflicting or irrelevant directions.