Claude Prompting Best Practices
Effective prompting techniques specific to Claude
Last reviewed
Recommended
Claude Prompting Best Practices — Timed Test (5 questions)
No account needed. Answers and explanations arrive when you submit.
What this topic tests
The mix every Claude Prompting Best Practices set is built to, and the questions published against it so far. Nothing here is hidden before you start.
| Level | Target share | Published |
|---|---|---|
| Easy | 40% | 3 |
| Medium | 40% | 2 |
| Hard | 20% | 0 |
| Total | 5 |
Claude Prompting Best Practices — the theory
How you write a prompt has a real, measurable effect on the quality of Claude's response. A few practices consistently help.
Be clear and specific. Vague prompts get vague answers. Stating exactly what you want, in what format, and for what purpose gives Claude the context it needs to be precise rather than generic.
Use examples. Showing Claude one or two examples of the output you want (a technique often called "few-shot prompting") is one of the most reliable ways to shape its response style, especially for structured or formatted output.
Ask for step-by-step reasoning. For tasks involving logic, math, or multi-step analysis, explicitly asking Claude to work through its reasoning before giving a final answer ("think step by step") tends to produce more accurate results than asking for the answer directly.
Specify format and length. If you need a specific structure — bullet points, a table, a fixed word count, particular XML tags for parsing — say so explicitly rather than assuming Claude will guess correctly.
Give role or persona context when useful. Telling Claude to approach a task as a specific kind of expert (e.g., "as a copyeditor" or "as a Python code reviewer") can sharpen the lens it applies to the task.
Iterate rather than expecting perfection on the first try. Prompting is often a conversation, not a single command — refining your request based on what Claude produces usually gets better results faster than trying to write the perfect prompt up front.
Provide relevant context up front. Background information — the audience for a piece of writing, constraints on a technical solution, or prior decisions already made — helps Claude avoid generic answers that ignore your actual situation. Leaving out context you already know often means Claude has to guess, and guesses are where quality slips.
Say what to do, not only what to avoid. Purely negative instructions — "don't be too formal", "don't make it long" — leave the model to guess what you actually want. Pairing every "don't" with a positive target ("write in a friendly, conversational tone, around 200 words") gives it something concrete to aim at, and results improve accordingly.
Structure longer prompts deliberately. When a prompt contains several kinds of information — instructions, background, source material, examples — separating them clearly helps the model treat each part correctly. Simple labels or delimiters ("Here is the draft:", "Instructions:", or clearly marked sections) prevent instructions from being read as content and content from being read as instructions. For long prompts, stating the core task near the beginning, and restating the most important requirement at the end, reduces the chance that it is overlooked.
Break large tasks into stages. Asking for an enormous deliverable in one shot — "write the entire report" — tends to produce something generically shaped. Asking for an outline first, agreeing on it, and then requesting sections in turn keeps you in control of direction and catches misunderstandings early, when they are cheap to fix. The same principle applies to technical work: agree on the approach before asking for the full implementation.
Ask for critique, not just production. Some of the most useful prompts do not ask for new content at all. Having Claude review a draft against specific criteria, find weaknesses in an argument, list edge cases a plan has missed, or explain something back to confirm shared understanding often adds more value than another round of generation — and it takes advantage of the model's ability to evaluate as well as produce.
Common mistakes to avoid. The failure patterns are as consistent as the good practices: burying the actual question in the middle of a long preamble; asking several unrelated questions in one message and getting shallow answers to all of them; omitting the audience, so a technical answer arrives for a non-technical reader; and accepting a first draft without a single round of refinement. Each of these is cheap to fix once you notice the habit.
A practical checklist. Before sending a prompt that matters, it is worth a ten-second scan: Is the task stated plainly? Does it say who the output is for and what it will be used for? Is the desired format and rough length explicit? Is any needed background included and clearly separated from the instructions? Would an example make the target clearer? If the answer to each is yes, the odds of a strong first response rise dramatically.
Prompting for different kinds of tasks. The emphasis shifts with the work. For creative writing, examples of tone and audience context matter most. For analytical tasks, supplying the raw material and asking for explicit reasoning matters most. For technical tasks, stating constraints — the language, the framework, what cannot change — matters most. And for research-style questions, asking the model to distinguish what it is confident about from what it is unsure of produces a more honest, usable answer. The underlying principles are the same in every case; what changes is which one carries the most weight.
These principles apply across most AI chat tools, not just Claude, but understanding them well is one of the highest-leverage skills for getting consistently good output from any of them, and it's a skill that compounds: better prompts save you rounds of back-and-forth revision.
Sample questions
Three questions from this topic, with the answer and the reasoning shown.
Q1EasyIf you need output in a specific structure, like a table or a fixed word count, what should you do?
- Explicitly specify the format and length in the promptCorrect
- Assume the assistant will guess the correct format
- Never mention format since it cannot be controlled
- Only request format changes after receiving the response
Explanation
Say it in the prompt. Format and length are part of what you are asking for, so a request that omits them has not been fully specified — the model will pick something reasonable, and reasonable is not the same as the four-column table you needed.
Two habits make this reliable. Describe the structure concretely: name the columns, give the row order, state the word count as a number rather than as "short". And tell the model what to do rather than what to avoid — "write flowing prose paragraphs" steers better than "do not use markdown", because a prohibition rules out one option and leaves all the others open.
Fixing it afterwards does work, and it is a fair second move. As a first move it costs a round trip every time, and a reformatting pass often drops detail while it rearranges. Specifying up front is the same information delivered earlier, and it is the difference between one response and three.
Q2EasyWhat is a reasonable approach to prompting when the first response isn't quite right?
- Iterate and refine the request based on what was producedCorrect
- Give up immediately since the first response should always be perfect
- Start an entirely unrelated new topic
- Repeat the exact same prompt with no changes
Explanation
Read what came back as evidence about the prompt. A first response that misses usually tells you which part of the request was under-specified: too generic means you set no constraints, off-topic means the goal was never stated, the wrong shape means the format was left open. Change that one thing and ask again.
That is different from sending the identical prompt a second time, which is the move people actually reach for. The same request carries the same information, so you are re-rolling rather than correcting, and any improvement is luck you cannot reproduce.
Anthropic's own advice is to start simple and add complexity only where it is needed, checking each addition to see whether it actually helped. In practice that is two or three rounds: supply the missing constraint, then an example if the shape is still wrong, then split the task if it was doing too much at once.
The useful test on a prompt that keeps failing is whether a colleague with no context could follow it. If they could not, the model cannot either.
Q3EasyWhich of these is most likely to improve the quality of an AI assistant's response?
- Being clear and specific about what you want and in what formatCorrect
- Keeping the request as vague as possible
- Never providing any examples
- Avoiding any mention of desired format
Explanation
A model cannot ask what you meant before it answers, so everything you leave out it has to guess — and a guess averaged over everything it has read is exactly what a generic answer is. Anthropic's own framing is to treat Claude as a brilliant new colleague who has no context on your norms: capable, but unaware of your audience, your house style or the length you need.
Being specific is what removes the guessing. Name the audience, the format, the length and the constraints that matter. "A 200-word summary for a non-technical manager, as three bullets" asks for something the model can actually hit; "summarise this" does not. Say what you want rather than what you want avoided, because a prohibition still leaves every other option open.
The other three answers all withhold something: the detail, the examples, the format. Each one hands a decision to the model that you were in a better position to make.
Practise all 5 questions
Every published question in Claude Prompting Best Practices, with its answer and explanation.
- If you need output in a specific structure, like a table or a fixed word count, what should you do?easy
- What is a reasonable approach to prompting when the first response isn't quite right?easy
- Which of these is most likely to improve the quality of an AI assistant's response?easy
- For tasks involving math or multi-step logic, what technique tends to improve accuracy?medium
- What is 'few-shot prompting'?medium