Prompt Engineering Cheat Sheet
Prompt PacksFreeFifty battle-tested prompt patterns covering chain-of-thought reasoning, few-shot examples, system prompt construction, output format control, role assignment, and context compression. Includes a printable PDF and a Markdown reference.
#prompt-engineering#cheat-sheet#chain-of-thought#few-shot#system-prompts#llm
About this listing
This is the prompt engineering reference you'll actually keep open while working. Not a tutorial — a dense, practical cheat sheet of 50 patterns organised into seven categories, with a real example for each one.
**Chain-of-Thought (8 patterns)** — Zero-shot CoT, step-back prompting, self-consistency with majority vote, scratchpad with explicit reasoning, progressive disclosure, and more.
**Few-Shot Learning (7 patterns)** — Optimal example count by task type, format-consistent examples, contrastive examples (what not to do), dynamic example selection, and handling distribution shift.
**System Prompt Construction (8 patterns)** — Persona definition, constraint stacking, output contract, knowledge cutoff disclosure, tone calibration, fallback instruction, and meta-instruction injection.
**Output Format Control (8 patterns)** — JSON schema adherence, Markdown structure enforcement, length anchoring, table formatting, list vs prose switching, and XML tag structuring for Claude.
**Role Assignment (6 patterns)** — Expert persona, adversarial reviewer, Socratic tutor, devil's advocate, peer reviewer, and subject matter validator.
**Context Compression (7 patterns)** — Summarise-and-inject, rolling context window, document Q&A prefix, entity extraction pass, hierarchical summarisation, and retrieval anchor injection.
**Evaluation and Self-Critique (6 patterns)** — Reflexion, self-ask, consistency checking, confidence elicitation, critique-and-revise, and constitutional AI-style self-evaluation.
Comes as a Markdown file (easy to paste into any LLM), a printable single-page PDF, and a Notion template.