Prompt and Context Engineering
3 build exercises to practise the concepts in this domain.
6.1 — Instrument the Window, Then Take Three Things Out of It
Intermediate
45 minutes
- How to measure where a context window actually fills up
- How context editing clears spent tool results and what it reports back
- What a compaction summary keeps by default and what a custom instructions string silently drops
- How an isolated context changes the cost and the handover burden
6.2 — Move One Thing at a Time Against a Set That Does Not Move
Intermediate
60 minutes
- How to build an evaluation set that makes a prompt change attributable
- What moving standing rules from a user turn to the system field is actually worth
- How consistent, delimited examples change format compliance
- Why max_tokens is a guard and never a length control
- How delimiting and labelling incoming content changes what the model obeys
6.3 — Enforce the Shape, Then Try to Break It
Intermediate
45 minutes
- How the three ways of producing structured output differ in who enforces the shape
- Which errors survive a guaranteed schema and therefore need a validator
- Why stop_reason is checked before the payload
- How a retry that carries the validation errors differs from an identical retry