Prompt Engineering Cheat Sheet
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.
Overview
Anatomy of a prompt
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: ... |
Patterns worth memorising
| 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 |
Common mistakes
Each of these silently degrades output. Check them before blaming the model.
- Asking two things at once Split into separate prompts — quality drops sharply on compound asks.
- Describing what you do not want State the positive instruction; negations are followed unreliably.
- No output format If you did not specify the shape, you cannot complain about the shape.
- Burying the instruction Put the task at the top; long preambles push it out of attention.
- Vague quality words "Good", "professional" and "engaging" mean nothing — give a measurable rule.
- No examples for style work One example beats three paragraphs of description.
Prompt templates
Universal rewrite prompt
Editing, summarising, tone changesA dependable starting point for any "make this better" task.
Structured extraction prompt
Pipelines, data entry, form fillingTurns messy text into machine-readable JSON.
Frequently asked questions
Does prompt length matter?
Should I use "please" and "thank you"?
Why does the same prompt give different answers?
Resources
Was this cheat sheet useful?
Comments
No comments yet — be the first.