Issue 01 / Field notes for practical AI
AIAI Tutorials Hub
writing

5 prompt patterns that actually move the needle (with copy-pasteable templates)

Five prompt-engineering patterns that reliably improve ChatGPT and Claude output: role + constraint + format, few-shot, chain-of-thought, negative constraint, self-critique.

Updated
Read time
7 min read
Difficulty
Beginner
Author
By the AI Tutorials Hub editors

5 prompt patterns that actually move the needle (with copy-pasteable templates)

Most "10 prompt tips" articles are vague. This guide is different: five patterns I actually use, each with a before/after example and a copy-pasteable template. They work for both ChatGPT and Claude, and they compose — you can stack two or three in a single prompt.

What you'll learn

  • Five prompt patterns that improve output quality for both ChatGPT and Claude
  • A copy-pasteable template for each
  • How to combine patterns when one is not enough
  • A quick diagnostic for "why isn't my prompt working"

Pattern 1 — Role + Constraint + Output format

The single highest-leverage change to most prompts is to specify all three of these explicitly: a role, a constraint, and a desired output format.

Before

Write a tweet about my new product.

After

You are a B2B SaaS copywriter who specializes in punchy, technical Twitter hooks. Write a 240-character tweet announcing our new product, [PRODUCT NAME], which is a Postgres observability tool for engineering teams. The audience is senior backend engineers. Output format: single tweet, no hashtags, ending with a clear CTA.

Why it works

"Role" anchors the model's voice and vocabulary. "Constraint" (240 characters, no hashtags) prevents the most common default outputs. "Output format" forces a specific shape — single tweet, not "here are 3 options."

Tip
Save this template as a snippet. Reuse it for LinkedIn posts, blog intros, email subject lines — just change the role, the constraint, and the format.

Pattern 2 — Few-shot examples

If the output is in a non-obvious format, give the model two or three examples. Examples are stronger than instructions because they show rather than tell.

Before

Extract the company name, funding amount, and lead investor from this press release. [paste press release]

After

Extract the company name, funding amount, and lead investor from this press release. Output as JSON.

Example 1: Press release: "Acme Corp raises $20M Series B led by Sequoia." Output: {"company": "Acme Corp", "amount": "$20M", "round": "Series B", "lead": "Sequoia"}

Example 2: Press release: "Stealth startup BetaCo closes a $5M seed round with Andreessen Horowitz leading." Output: {"company": "BetaCo", "amount": "$5M", "round": "seed", "lead": "Andreessen Horowitz"}

[paste press release]

Why it works

For structured extraction, examples collapse ambiguity. The model no longer has to guess whether "Series B-2" is the same as "Series B," or whether "led by" includes co-leads. The examples define the contract.

Tip
Two examples is almost always enough. A third is for edge cases. More than three examples eats context window for diminishing returns.

Pattern 3 — Chain-of-thought trigger

For reasoning tasks, ask the model to think step by step before answering. This is "chain-of-thought" — it works because the model writes the reasoning into its own context before producing the final answer.

Before

A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?

After

A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Think step by step, then give the final answer on the last line.

Why it works

The classic bat-and-ball problem trips up most LLMs (and most humans) on the first try. The "think step by step" trigger forces intermediate calculations, which catches the wrong-answer impulse ($0.10) and surfaces the right one ($0.05).

Tip
The trigger phrase matters less than its presence. "Think step by step," "Show your reasoning," "Walk through this before answering" — all work. Pick one and use it consistently.

Pattern 4 — Negative constraint

Telling the model what NOT to do is often more effective than telling it what to do. This is especially true for style and format.

Before

Write a product description for a noise-cancelling headphone.

After

Write a product description for a noise-cancelling headphone. Do NOT use the words "immerse," "elevate," "unparalleled," or "cutting-edge." Do NOT use exclamation points. Do NOT start with "Introducing." Do NOT exceed 80 words.

Why it works

LLMs over-index on the most common words and phrases in their training data. Banning the most common 3-5 phrases forces the model to reach for less-default vocabulary, which is almost always better.

Tip
Build a personal "banned word" list. Mine: "delve," "leverage," "robust," "seamless," "in today's fast-paced world." You can paste it at the end of any prompt.

Pattern 5 — Self-critique loop

For high-stakes outputs, ask the model to critique its own first draft, then produce a second draft. This is roughly 2x the cost but often 2-3x the quality.

Before

Draft a difficult email telling a long-time client that we are raising our rates by 25%.

After

Draft a difficult email telling a long-time client that we are raising our rates by 25%. After drafting, critique your draft as if you were the client receiving it: what would feel dismissive, what would feel defensive, what would erode trust? Then produce a second draft that addresses those concerns.

Why it works

The model that produces the first draft is, statistically, the same model that finds the same draft's weaknesses — but only if asked. The critique pass forces it to switch perspective and notice the things it glossed over the first time.

Tip
For very high-stakes outputs (legal, medical, financial), the self-critique loop is still not a substitute for human review. Treat the second draft as a starting point, not a finished product.

How to combine them

The patterns compose. For a difficult outbound sales email, I would use all five:

You are a B2B SaaS sales rep with 8 years of experience writing cold
emails to engineering leaders. Write a 120-word cold email to the VP
of Engineering at a Series B fintech, pitching our observability tool.

Constraints:
- Do NOT use "delve," "leverage," "robust," "seamless," or "cutting-edge."
- Do NOT start with "I hope this email finds you well."
- Do NOT exceed 120 words.

Format: subject line, then body. Subject line under 50 characters.

After drafting, critique the draft from the VP's perspective. What would
make them delete it? Then produce a second draft.

Example of tone we want:
Subject: Postgres slow on Black Friday?
Body: "Most observability tools fire after the page is already down. We
ship a 30-second warning. Two-week pilot, no commitment. Worth 15 min?"

That is a 5-pattern stack, and the output is meaningfully better than any single pattern alone.

Diagnostic: why isn't my prompt working?

If you are getting bad output, check these in order:

  1. Did you specify the role? (Pattern 1)
  2. Did you show an example of the desired output? (Pattern 2)
  3. Did you ask for step-by-step reasoning? (Pattern 3)
  4. Did you ban the default-bad words? (Pattern 4)
  5. Did you ask for a self-critique pass? (Pattern 5)

If you have done all five and the output is still bad, the problem is almost always: the model lacks the information it needs. No prompt pattern can substitute for missing context.

FAQ

Do these work for both ChatGPT and Claude?

Yes. Both models are sensitive to the same structural cues. Claude is slightly more responsive to Patterns 1 and 5; ChatGPT is slightly more responsive to Patterns 2 and 4. The differences are minor.

How long should a prompt be?

As long as it needs to be. The "shorter is better" advice is wrong for complex tasks. A 300-token prompt that produces a 1000-token useful output is much better than a 30-token prompt that produces a 200-token mediocre output. The cost is roughly linear in prompt length; the value is often super-linear.

Why don't my prompts work?

Usually one of three things: (1) you did not specify the format, so the model is guessing; (2) you banned the wrong things, or did not ban the default-bad things; (3) the model lacks the information — for example, asking for "what changed in our codebase" without pasting the diff.

Should I use the same patterns for coding tasks?

Patterns 1, 3, and 4 transfer well. For coding, also specify: the language and version, the libraries in use, and the testing framework. Few-shot examples (Pattern 2) are powerful for code if you paste a representative existing file.

Does temperature matter?

For Patterns 1-4, leave temperature at the default. For Pattern 5, raising temperature slightly on the first draft and lowering it on the second can help — but it is an advanced tweak and not necessary for most users.

Frequently asked questions

Do these work for both ChatGPT and Claude?

Yes. Both models are sensitive to the same structural cues. Claude is slightly more responsive to Patterns 1 and 5; ChatGPT is slightly more responsive to Patterns 2 and 4. The differences are minor.

How long should a prompt be?

As long as it needs to be. The 'shorter is better' advice is wrong for complex tasks. A 300-token prompt that produces a 1000-token useful output is much better than a 30-token prompt that produces a 200-token mediocre output.

Why don't my prompts work?

Usually one of three things: you did not specify the format; you banned the wrong things or did not ban the default-bad things; or the model lacks the information it needs.

Should I use the same patterns for coding tasks?

Patterns 1, 3, and 4 transfer well. For coding, also specify the language and version, the libraries in use, and the testing framework. Few-shot examples (Pattern 2) are powerful for code if you paste a representative existing file.

Does temperature matter?

For Patterns 1-4, leave temperature at the default. For Pattern 5, raising temperature slightly on the first draft and lowering it on the second can help — but it is an advanced tweak.

Related tutorials