Prompt Engineering

Prompt Patterns Cheat Sheet

Six reusable prompt patterns — role, few-shot, chain-of-thought, output format, refinement, decomposition — each with a copy-paste template.

promptstemplatesproductivity

What a prompt pattern is

A pattern is a reusable technique, not a fill-in-the-blank prompt. Once you know these six, you can combine them for almost any task — a role plus an output constraint, or decomposition plus a refinement loop. For ready-made everyday prompts, use the Prompt Engineering Cheat Sheet instead; this page is the technique catalog.

Role prompting

Give the model a perspective to answer from. The role sets vocabulary, priorities, and depth, which changes the answer more than most people expect.

You are [an experienced hiring manager in tech].
Review my resume below and tell me what you would question
in a first interview, and why.

[paste resume]

Few-shot examples

Show two or three examples of input and desired output before your real request. The model imitates the pattern — often more reliably than any written description of it.

Rewrite each headline to be clear and specific.

Headline: We're making changes to our pricing
Rewrite: Prices increase 10% on March 1

Headline: Exciting news about our product
Rewrite: [your example here]

Headline: [the real headline you want rewritten]
Rewrite:

Chain of thought

Ask the model to reason step by step before answering. Useful for math, logic, planning, and anything where the path to the answer matters as much as the answer.

Solve this step by step. Show your reasoning at each stage,
then state the final answer on its own line at the end.

[problem]

Output-format constraint

Specify the exact shape of the response so you can use it without cleanup. Name the structure, the fields, and what to leave out.

List the pros and cons of [decision].
Format: two headed lists titled "Pros" and "Cons",
maximum 5 bullets each, no introduction and no summary.

Refinement loop

Treat the first response as a draft, then direct the revision — or have the model critique its own work before you weigh in. One or two rounds usually beat a single perfect-prompt attempt.

Here is your previous draft:

[paste draft]

Critique it against these criteria: [clarity, accuracy, tone].
List the weaknesses first, then produce an improved version.

Decomposition

Break a big job into steps and run them one at a time, feeding each result into the next prompt. Quality drops when you ask for everything at once; it holds when each prompt has one job.

I want to [write a project proposal]. Before doing any of it,
break the job into a numbered list of steps, with one line on
what each step needs from me. Wait for my go-ahead, then we
will do step 1 only.

Combining patterns

The patterns stack naturally. A strong everyday combo: assign a role, show one example, constrain the format, then run a refinement round on the result. To understand why these techniques work — and when they fail — read Prompt Engineering: First Principles.