XML and markdown-delimited sections work because they give the model unambiguous boundaries between different types of instruction. `<context>` tells it the situation. `<task>` tells it what to do. `<constraints>` tells it what not to do. `<output_format>` specifies the shape of the response. `<examples>` provides the ground truth it should match.
Positive and negative examples with 'why' labels outperform paragraphs of instruction for the same reason that showing beats telling. Two gold examples and two explicitly-labeled-bad examples, each annotated with a brief explanation of what the failure is, teach the model the boundary more precisely than prose ever can.
Output contracts close the reliability gap: specify a JSON schema, validate every response at the boundary, and never render raw model text directly in a production UI. Always parse-check.