2 Prompt Design: Structural Elements
This chapter covers
- The core Structural Elements: Instructions, Constraints, Context, Input Parameters, Output Format, and Delimiters
- Writing falsifiable constraints that bound the solution space
- Using input parameters to inject dynamic context and enable reuse
- Specifying output structure for consistent, predictable responses
- Combining these elements into reliable, task-specific prompts
Most prompts start as a single block of text. The task, the background, the variable inputs, the expected output shape, all in one place with no clear boundaries. The model has to infer what is an instruction, what is context, what is content to act on, and what the output should look like. When the output is wrong, there is no clear place to look.
Structural Elements give each concern a defined place. Instructions define the task and Constraints place explicit, verifiable limits on what the output must not violate, forming the directive layer of the prompt. Context provides the background the model needs to interpret them, while Input Parameters separate variable inputs from stable instruction logic so the same template works across different runs. Output Format specifies what the response must look like, and Delimiters mark the boundaries around embedded content so it cannot be misread as instructions.