Context / Tools / Evals / Safety / 02
Context is the interface
Design instructions, examples, retrieval, state, structured outputs, and context budgets deliberately.
Before you begin
By the end, you can…
- Design a context contract
- Separate instructions, evidence, and user data
- Use structured outputs for downstream work
01 / Understand
Context shapes behavior more than clever phrasing
A model sees only the context supplied for the current task: instructions, user input, retrieved evidence, examples, tools, state, and output constraints. Missing or conflicting context creates unstable behavior.
Place durable policy above task-specific requests. Delimit untrusted content and state that it is data, not instruction. Include only evidence relevant to the decision; more context can add distraction and cost.
02 / Apply
Make outputs easier to verify
Structured schemas reduce ambiguity when software consumes the result. Require source references, uncertainty, or missing fields where appropriate. Reject invalid output rather than guessing.
Examples teach format and boundaries, but they can overfit behavior. Test with novel and adversarial cases, not only examples that resemble the prompt.
03 / Make
Your studio task
Make — Create a context contract that lists instructions, evidence, examples, state, tools, and output schema.
- Inventory instructions, user data, retrieved evidence, examples, state, and tools.
- Define precedence and how untrusted text is delimited.
- Specify a structured output with required uncertainty or citations.
- Test missing, conflicting, irrelevant, and adversarial context.
Every included token has a job, and missing or conflicting context has an explicit policy.
04 / Check