The patterns, structures and fixes that reliably improve output
A one-page reference for writing prompts that work: the anatomy of a strong prompt, the six patterns worth memorising, ready-to-copy templates, and the mistakes that quietly ruin results.
Include these in roughly this order. You rarely need all six, but naming them stops you forgetting the one that matters.
| Part | What it does | Example |
|---|---|---|
| Role | Sets voice, expertise and assumed audience | You are a senior technical editor. |
| Task | The single thing you want done | Rewrite the paragraph below for clarity. |
| Context | Facts the model cannot guess | The audience is non-technical hospital staff. |
| Format | Exact output shape | Return a markdown table with 3 columns. |
| Constraints | Hard limits and exclusions | Under 120 words. No marketing language. |
| Examples | One or two worked cases | Input: ... Output: ... |
| Pattern | When to use it | Cue phrase |
|---|---|---|
| Zero-shot | Simple, well-known tasks | Just ask directly |
| Few-shot | Output must match a specific style | Here are two examples: ... |
| Chain-of-thought | Multi-step reasoning or maths | Work through this step by step |
| Role prompting | Domain expertise or tone matters | You are a ... |
| Structured output | The result feeds another system | Return valid JSON matching this schema |
| Self-critique | Accuracy matters more than speed | Review your answer and list any errors |
Each of these silently degrades output. Check them before blaming the model.
A dependable starting point for any "make this better" task.
SYSTEM
You are a meticulous editor. You preserve the author's meaning and voice. You never add facts that are not present in the source.
USER
Rewrite the text below for {{goal}}.
Audience: {{audience}}
Tone: {{tone}}
Hard limit: {{limit}}
Return only the rewritten text, with no preamble.
---
{{text}} | Variable | Description | Example |
|---|---|---|
{{goal}} | What you want improved | clarity and brevity |
{{audience}} | Who will read it | first-time customers |
{{tone}} | Desired register | plain, warm, non-salesy |
{{limit}} | A measurable constraint | under 100 words |
{{text}} | The source text | Paste the paragraph here |
EXAMPLE OUTPUT
Your booking is confirmed for Tuesday at 2pm. We will send a reminder the day before. If you need to change it, reply to this message and we will sort it out.
Turns messy text into machine-readable JSON.
SYSTEM
You extract data. You return valid JSON only, with no commentary and no markdown fences.
USER
Extract the fields below from the text.
If a field is absent, use null. Never guess.
Schema:
{{schema}}
Text:
{{text}} | Variable | Description | Example |
|---|---|---|
{{schema}} | The JSON shape you want | {"name": string, "date": string|null} |
{{text}} | Source content | Paste the email here |
EXAMPLE OUTPUT
{"name": "Priya Raman", "date": "2026-03-14"} Only insofar as it costs tokens and can push your instruction out of focus. A precise 60-word prompt usually beats a rambling 400-word one.
It makes no measurable difference to quality. Use whatever register you are comfortable with.
Most models sample randomly. Set temperature to 0 (or the lowest available) when you need repeatable output.