A practical method for your work
Output Contract Pattern
Make the model return a predictable shape instead of a pretty but unusable answer.
Core idea
An output contract defines sections, order, fields, length, and forbidden behavior before the model writes. It is especially useful when humans or scripts consume the result.
Why it works
LLMs are flexible by default. A contract narrows that flexibility and turns the answer into an interface.
Summarize this research.
Return exactly: 1) one-sentence claim, 2) evidence bullets with URLs, 3) confidence, 4) risks, 5) next action. Do not add extra sections.
Customize it
Working template
Goal: [what I am trying to accomplish]
Context: [background, audience, constraints]
Use this pattern: Output Contract Pattern
Variables: Required sections, Field names, Length limits, Allowed formats, Forbidden extras
Return: [exact output format]
Before finalizing: state limits and one improvementOperating recipe
- Start with the weak version so you know what problem you are fixing.
- Add the missing variables instead of making the instruction longer randomly.
- Ask the model to follow the output contract exactly once.
- Review the first answer against the checklist below.
- Save the improved version as your reusable pattern.
Quality checklist
- Did I give the model the real goal, not just the task?
- Did I define the output shape before asking for the answer?
- Did I include examples, constraints, or a quality bar?
- Did I ask for limits, uncertainty, or failure cases?
- Can I reuse this as a pattern next time?
Model notes
Strong for long context, critique, and structured writing. Give it clear sections and examples.
Strong for fast iteration and everyday templates. Be explicit about output format and assumptions.
Useful for broad synthesis and Google-adjacent research. Keep source requirements explicit.
Limits
Too rigid a contract can hide nuance. Leave a notes field for uncertain research tasks.
Read next
Turn this into a reusable workflow.
Get the Prompt Debugging Checklist and Solo Builder AI Setup Pack as language-specific .md files.