Prompt Patterns That Consistently Improve Results in Claude
There is a moment most people reach after a few weeks of using Claude. The answers are useful, but they are inconsistent. The same kind of request gives you something excellent on Monday and something vague on Thursday. You cannot tell what you did differently.
This article is about closing that gap. Not with clever tricks, but with eight named parts you can add to a prompt on purpose. Once you can name them, you can tell which one is missing.
New term: a prompt is simply the message you send. A prompt pattern is a part of that message that does a specific job. This article covers eight of them.
Throughout, I label my claims so you know what you are reading:
- Verified — checked against Anthropic's official documentation on the date at the end of this article.
- Example — an illustration I have written.
- Recommendation — my own advice, based on my work as a consultant.
Here is a downloadable resource for you >> Paresh-Stack-Prompt-Pattern-Sheet <<
Why structure beats length
Most people try to improve a weak prompt by making it longer. They add more sentences, more background, more politeness. Sometimes it helps. Often it does not, and they cannot work out why.
The reason is that length is not the thing that carries meaning. Structure is. A long prompt with no clear task is worse than a short prompt with one. Adding words to a prompt that lacks a task just gives Claude more to average out.
Recommendation: stop asking "is my prompt long enough?" and start asking "which part is missing?" That question has an answer. The first one does not.
Verified: Anthropic publishes a prompt engineering guide in its official documentation. It has individual pages covering being clear and direct, using examples (which it calls multishot prompting), giving Claude room to think, using XML tags to structure prompts, giving Claude a role with a system prompt, prefilling responses, and chaining prompts together. The eight patterns in this article are my own teaching framework, but they draw on the same ideas. Links are in the sources at the end.
The anatomy of a structured prompt
Here are the eight parts, each in one line:
- Role — the perspective to write from.
- Task — the single job to do.
- Context — what you already know that Claude does not.
- Source boundary — what it may draw on.
- Constraints — the limits it must respect.
- Examples — what a good answer looks like.
- Criteria — how the answer will be judged.
- Output format — the shape you want back.
You will almost never need all eight. Most good prompts use three or four. The value of knowing all eight is diagnostic: when an answer disappoints you, you can usually point at the part you left out.
Building one prompt, one pattern at a time
Rather than explain the patterns separately, let me build a single prompt across all eight. Watch how the request becomes more precise at each step — and notice that it does not get much longer.
Example. The task: I have to explain a new expenses policy to my team, and I want help writing the email.
Step 0 — the starting point
Write an email about our new expenses policy.
This will produce something. It will be generic, it will invent policy details, and it will not sound like you. Every problem from here is a missing part.
Step 1 — add the Task
"Write an email" is a vague instruction. What is the email supposed to achieve?
Write an email that tells my team about a change to our expenses policy and makes clear what they need to do differently from 1 October.
New term: the task is the outcome you want, not the activity. "Write an email" is an activity. "Tell my team what to do differently from 1 October" is an outcome. Outcomes give Claude something to aim at.
This is the single highest-value change in the whole article. If you only adopt one pattern, adopt this one.
Step 2 — add the Role
You are writing as a team manager to your own team — a group of eight people you know well and speak to every day.
Write an email that tells my team about a change to our expenses policy and makes clear what they need to do differently from 1 October.
New term: role prompting means telling Claude what perspective to write from.
Now, an important clarification that a lot of advice online gets wrong.
A role gives you a perspective. It does not give you professional authority.
Telling Claude "you are a lawyer" does not make its answer legal advice. Telling it "you are a doctor" does not make its answer medical advice. What the role actually changes is the angle and vocabulary of the answer. Asking for a manager's perspective gets you the warmth and practicality a manager would use. It does not mean the answer has been reviewed by anyone.
Recommendation: use roles to shape tone and focus. Never use them as a substitute for a qualified human on anything legal, medical, financial or safety-related. In my consulting work, a role is how I get the right framing — never how I get the right answer signed off.
Step 3 — add the Context
You are writing as a team manager to your own team — eight people you know well.
Context: the old policy let people claim any expense under $100 without a receipt. The new one requires a receipt for everything. This came from Finance, not from me, and it applies across the whole company. My team submits maybe three or four claims each per month, mostly taxis and client lunches.
Write an email that tells them about the change and makes clear what they need to do differently from 1 October.
New term: context is background Claude cannot know unless you tell it. Here it is the actual policy change, where it came from, and how it affects this specific team.
Look at what the context prevented. Without it, Claude would have had to invent what the policy says. With it, there is nothing left to invent. Most made-up detail in Claude's answers is a context gap, not a flaw in the model.
Step 4 — add the Source boundary
[role and context as above]
Use only the information I have given you above. If something is missing that the email needs, write "[TO CONFIRM]" in the text rather than guessing.
New term: a source boundary tells Claude what it may draw on, and what to do when it runs out.
This is the pattern that took me longest to appreciate, and the one I now use most. The second sentence is doing the real work. Without it, "use only what I gave you" leaves Claude with a choice between disobeying you and leaving a hole in the email. Given no third option, it will usually fill the hole.
Recommendation: whenever you restrict the sources, also give Claude permission to say nothing. A marker like [TO CONFIRM] turns an invisible invention into a visible gap. Invisible inventions are the expensive kind.
Step 5 — add the Constraints
[as above]
Constraints: under 200 words. No corporate phrases like "going forward" or "reach out". Do not apologise for the change and do not oversell it. Do not suggest anyone contact Finance directly.
New term: constraints are limits on the answer — length, tone, and things to avoid.
Note that useful constraints are often negative. "No corporate phrases" removes more bad writing than "be clear" adds good writing. Telling Claude what not to do is frequently more precise than telling it what to do.
Step 6 — add an Example
[as above]
For tone, here is how I usually open this kind of email:
"Quick one — Finance has changed how we handle expenses, and there's one thing you'll need to do differently from next month."
New term: giving Claude a sample of what you want is sometimes called few-shot prompting — "shot" meaning example, so few-shot means a small number of examples.
One real sentence of your own writing teaches tone better than three paragraphs describing your tone. Describing a voice is hard; showing one is easy. We will go much deeper into this in the next article.
Step 7 — add the Criteria
[as above]
The email succeeds if someone can read it once, on their phone, and know exactly what to keep hold of from 1 October.
New term: evaluation criteria are the test the answer has to pass — a description of what success means.
This is the least-used pattern and one of the most useful. It is different from a constraint. A constraint limits the answer; a criterion defines what winning looks like. And a criterion gives you something to check the answer against afterwards, which is the part most people skip.
Step 8 — add the Output format
[as above]
Give me the subject line first, then the email body. After the email, list separately anything you marked [TO CONFIRM].
New term: output format is the shape of the response — where things go and in what order.
The second sentence matters more than it looks. It pulls the gaps out of the email and into their own list, so you cannot miss them. Asking for gaps to be listed separately is a habit worth keeping.
What changed
Compare the two versions. "Write an email about our new expenses policy" is nine words. The finished prompt is a little over a hundred. But the difference in the answer is not proportional to the extra words — it comes from the fact that each part removed a specific decision Claude would otherwise have had to make for you.
Recommendation: that is the mental model worth keeping. Every pattern you add takes one guess away from Claude and gives it back to you.
The pattern library
Keep this table somewhere you can find it. When an answer is not right, read the middle column and find the symptom you are looking at.
| Pattern | Use it when the answer… | What to write |
|---|---|---|
| Role | …has the wrong tone, or reads like nobody in particular wrote it | "You are writing as [who] to [whom]." |
| Task | …is technically on-topic but does not do anything useful | "[Do what] so that [outcome]." |
| Context | …contains details you never gave it | "Context: [the facts it cannot know]." |
| Source boundary | …mixes your material with general knowledge | "Use only [source]. Write [TO CONFIRM] rather than guessing." |
| Constraints | …is too long, too formal, or keeps using words you dislike | "Under [n] words. Do not [thing]." |
| Examples | …is close but does not sound like you | "Here is an example of the tone I want: [sample]." |
| Criteria | …looks fine but you cannot tell whether it is any good | "This succeeds if [test]." |
| Output format | …has the right content in an awkward shape | "Give me [structure], in this order." |
Five templates you can reuse
Example. These are written so you can copy them and replace the square brackets. Each uses only the patterns that job actually needs.
1. Explain something
Explain [topic] so that [who the reader is] can understand it. Context: they already know [what they know]. The part that confuses them is [the sticking point]. Constraints: about [n] words. Everyday language, no jargon. If you must use a technical term, define it in the same sentence. This succeeds if the reader can explain it back in their own words without using any term you had to define.
Patterns used: task, context, constraints, criteria.
2. Draft something in your voice
You are writing as [your role] to [audience]. Write [what] so that [outcome]. Context: [the facts]. Use only this information. Where something is missing, write [TO CONFIRM] instead of guessing. For tone, here is something I wrote previously: [paste two or three of your own sentences] Constraints: under [n] words. Do not use [words or phrases you dislike]. Give me the [subject line / heading] first, then the body, then a separate list of anything marked [TO CONFIRM].
Patterns used: all eight. This is the template I use most often.
3. Review your own work
Below is [what it is] that I wrote. Using only this text, tell me: what is unclear, what could be misread, and what I could cut without losing meaning. Do not rewrite it. I want to make the changes myself. This succeeds if every point you raise names a specific sentence or paragraph.
Patterns used: task, source boundary, constraints, criteria. Note the last line: it is what stops you getting vague advice like "tighten the introduction".
4. Work with a document you supply
I have attached [document]. Answer using only that document. Question: [what you want to know]. If the document does not answer it, say "the document does not cover this" rather than answering from general knowledge. Quote the part you based your answer on, so I can check it.
Patterns used: task, source boundary, output format. The last line gives you somewhere to look, which turns checking from a chore into a glance.
5. Compare options
Help me compare [option A] and [option B] for [my situation]. Context: [what matters to me, and what my limits are]. Give me a table: one row per factor, one column per option, and a final column saying which one wins on that factor and why. Do not recommend one overall. I will decide. But do tell me what information I am missing that would change the answer.
Patterns used: task, context, output format, constraints. That last instruction — "tell me what information I am missing" — often produces the most valuable line in the whole answer.
Over-prompting: the mistake nobody warns you about
Once people learn these patterns, the common failure flips. Instead of prompts that are too thin, you get prompts that are stuffed. Here is what that looks like, and how to fix it.
| Mistake | Why it hurts | The fix |
|---|---|---|
| Using all eight patterns every time | Turns a two-line question into an admin task. You stop using Claude for small things. | Start with task and context. Add others only when something actually goes wrong. |
| Piling up a dozen constraints | Constraints can contradict each other. "Be thorough" and "under 100 words" cannot both win. | Keep three or four. Read them together and check none of them fight. |
| Stacking roles | "You are a lawyer, an accountant and a marketing expert" gives you an average of three voices, which is no voice. | One role. If you want two perspectives, ask twice. |
| Describing tone instead of showing it | "Professional but warm, confident but humble" is almost meaningless as an instruction. | Paste two sentences you have actually written. One example beats five adjectives. |
| Asking for several unrelated things in one prompt | Every part of the answer gets less attention. You get four shallow answers instead of one good one. | One task per prompt. Follow up for the next thing. |
| Adding a role where facts were the problem | A role changes the voice, not the accuracy. Dressing up a factual gap does not close it. | If details are wrong or invented, the missing pattern is context or a source boundary. |
| Writing an elaborate prompt for a throwaway question | Effort should match consequences. Most questions do not need engineering. | Save the full template for work that matters or repeats. |
Recommendation: the point of these patterns is not to write impressive prompts. It is to get a specific answer with less effort. If a pattern is not earning its place, take it out.
Your exercise: improve one prompt in five passes
This takes about twenty minutes and teaches more than reading this article twice.
Pick a real task you actually need done this week. Not a practice one — a real one.
- Pass one: ask badly on purpose. Write the laziest version of the request. One line, no detail. Save the answer somewhere you can see it later.
- Pass two: add the task. Rewrite the request so it states the outcome, not the activity. Send it in a new conversation, so the first answer is not influencing it. Compare.
- Pass three: add the context. Write down what you know that Claude does not, and add it. Compare again. This is usually where the biggest jump happens.
- Pass four: add a source boundary and a criterion. Restrict what it may use, give it permission to write
[TO CONFIRM], and state what a good answer would achieve. Check whether any[TO CONFIRM]markers appear — and notice that in pass one, those same gaps were filled with invented detail you would not have spotted. - Pass five: take something away. Remove one pattern and see whether the answer gets worse. If it does not, you have learned that this task does not need it. That is as useful as anything you added.
Pass five is the one people skip, and it is the one that stops you over-prompting for the next year.
Quality checklist
Before you send a prompt that matters, read down this list. It takes about fifteen seconds.
- ☐ Is there exactly one task, stated as an outcome?
- ☐ Have I given the facts Claude cannot know?
- ☐ If I want it to stick to my material, have I said so — and given it permission to say "not specified"?
- ☐ Are my constraints consistent with each other?
- ☐ If tone matters, have I shown an example rather than described it?
- ☐ Can I say what a good answer would look like? (If not, I may not be ready to ask yet.)
- ☐ Have I asked for the shape I actually want back?
- ☐ Is there anything here that is not doing a job? Remove it.
- ☐ If I used a role: am I relying on it for perspective, or am I quietly relying on it for authority?
That last one is worth a real pause. It is the checklist item that protects you.
Key takeaways
- Structure improves prompts far more reliably than length. A long prompt with no clear task is worse than a short one with a clear task.
- There are eight parts worth knowing: role, task, context, source boundary, constraints, examples, criteria, output format.
- Every pattern you add takes one guess away from Claude and gives it back to you.
- The task pattern gives the biggest improvement for the least effort. State the outcome you want, not the activity.
- Most invented detail comes from a missing context or a missing source boundary — not from a flaw in the model.
- When you restrict the sources, always give Claude a way to say "not specified". Otherwise it has to choose between disobeying you and filling the gap.
- A role gives perspective, not professional authority. It changes the voice, never the reliability.
- Showing one example of your tone beats describing your tone in five adjectives.
- Most good prompts use three or four patterns, not eight. Over-prompting is a real mistake with a real cost.
- Knowing all eight is mainly diagnostic: when an answer disappoints you, you can name the part that was missing.
What to read next
Article 9: Using Examples, Templates, and Structured Outputs. Pattern six — examples — gets a whole article of its own, because it is the one with the most leverage and the most technique behind it. We will cover how many examples to give, how to build a template you can reuse, and how to ask for output in a consistent structure so the answers are easy to review and reuse.
If you are working through the series in order, finish the five-pass exercise above first. Article 9 assumes you have felt the difference that context and a source boundary make.
Sources
- Anthropic, Prompt engineering overview — docs.claude.com/en/docs/build-with-claude/prompt-engineering/overview
- Anthropic, Be clear, direct, and detailed — docs.anthropic.com/en/docs/be-clear-direct
- Anthropic, Use examples (multishot prompting) — docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/multishot-prompting
- Anthropic, Use XML tags to structure your prompts — docs.claude.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags
- Anthropic, Chain complex prompts for stronger performance — docs.claude.com/en/docs/build-with-claude/prompt-engineering/chain-prompts
Paresh's Stack — practical notes on Dynamics 365, Power Platform, Business Central and AI.
Comments
Post a Comment