# 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.
> Difficulty: beginner  
> Version: 1.0  
> Updated: 2026-08-04  
> Categories: Prompt Engineering  
> Tags: Chain Of Thought, Chatgpt, Claude, Few Shot, System Prompt

Source: https://invitationbuddy.com/cheat-sheet/prompt-engineering-cheat-sheet

---

## Overview
A prompt is an instruction, not a wish. The single biggest improvement most people can make is to state the ROLE, the TASK, the FORMAT and the CONSTRAINTS explicitly instead of hoping the model infers them.

## 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
A dependable starting point for any "make this better" task.
**System**

```text
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**

```text
Rewrite the text below for {{goal}}.

Audience: {{audience}}
Tone: {{tone}}
Hard limit: {{limit}}

Return only the rewritten text, with no preamble.

---
{{text}}
```
- `{{goal}}` — What you want improved (e.g. clarity and brevity)
- `{{audience}}` — Who will read it (e.g. first-time customers)
- `{{tone}}` — Desired register (e.g. plain, warm, non-salesy)
- `{{limit}}` — A measurable constraint (e.g. under 100 words)
- `{{text}}` — The source text (e.g. Paste the paragraph here)
**Example output**

```text
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.
```
> Tip: If the result drifts, add: "Do not change any names, dates or numbers."

### Structured extraction prompt
Turns messy text into machine-readable JSON.
**System**

```text
You extract data. You return valid JSON only, with no commentary and no markdown fences.
```
**User**

```text
Extract the fields below from the text.

If a field is absent, use null. Never guess.

Schema:
{{schema}}

Text:
{{text}}
```
- `{{schema}}` — The JSON shape you want (e.g. {"name": string, "date": string|null})
- `{{text}}` — Source content (e.g. Paste the email here)
**Example output**

```text
{"name": "Priya Raman", "date": "2026-03-14"}
```
> Tip: Pair this with the API's JSON mode where available — the instruction alone is not a guarantee.

## FAQs
**Does prompt length matter?**
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.

**Should I use "please" and "thank you"?**
It makes no measurable difference to quality. Use whatever register you are comfortable with.

**Why does the same prompt give different answers?**
Most models sample randomly. Set temperature to 0 (or the lowest available) when you need repeatable output.

## Resources
- [AI Tools directory](/ai-directory) — Find a tool to run these prompts in
- [Request a free tool](/request-tool) — Ask us to build something

---
_Generated from https://invitationbuddy.com/cheat-sheet/prompt-engineering-cheat-sheet_
