Prompt patterns
Five reusable prompt patterns to make requests clearer, check results and improve them over time.
Prompt advice is easy to repeat and harder to evaluate. Test it against your own tasks before adopting it. A useful pattern gives you a structure you can reuse and improve.
These five patterns offer a practical starting point.
1. Role · Context · Task
State the relevant role, provide the context, and describe the task. This helps you make the request explicit: what does the model need to know, what should it do, and who is the result for?
2. Structured input
Separate instructions from the material to process. For example, place a support ticket inside <TICKET>...</TICKET> tags or a clearly labelled section. This makes the boundaries easier to follow, but formatting alone does not prevent the model from following unwanted instructions inside the input.
3. Examples with a purpose
Give examples that demonstrate the desired output and meaningful edge cases. Keep the instructions explicit, then test ordering and wording for your model and task. There is no single placement rule that guarantees better results across models.
4. Review against clear criteria
Give the model specific criteria for reviewing a draft: required facts, missing information, tone, or length. A review can identify points to check, but the model’s scores are not independent evidence. Validate important results with other checks or a human reviewer.
5. Specify the output structure
Describe the fields, format or template the next step needs. For software workflows, validate the returned structure and handle failures explicitly. A valid structure makes the output easier to use; it does not guarantee factual correctness.
When a pattern stops working
Results can change when you switch models, receive different kinds of input, or provide more material. Keep a small set of representative examples with expected outcomes. Run them again after changes and adjust the smallest part of the prompt that addresses the problem.
Keep the wording that works, and keep the evidence that it works.
Save prompt versions, compare results, and record why you made a change.