Claude Prompting Guide: Getting the Most from Claude
Claude rewards clear structure and context. Learn the techniques that work especially well with Anthropic's models, including XML tags and long-context tips.

Claude tends to reward writers who stay organized. Hand it a wall of mixed instructions and raw text, and it will still try to help, but you get sharper, more reliable results when you treat your prompt like a short brief rather than a stream of consciousness. The model follows a plan well when it can actually see the plan. That idea sits underneath every technique below.
Give Claude a shape to follow
Before you type anything, decide what the pieces of your request are. Most prompts break into a few parts: the task, any background the model needs, the material it should work from, and the format you want back. When you keep those parts visually distinct, Claude spends its effort on the work instead of guessing which sentence was the real instruction.
A simple ordering that holds up well:
- Context first, so the model knows the situation.
- The source material or data it should use.
- The specific task, phrased as a command.
- The output format you expect.
You don't need fancy formatting to do this. Headings, numbered steps, and short labeled sections all work. A person skimming your prompt should be able to tell the instructions from the data in about two seconds. If you can, so can Claude. For a broader foundation on this way of thinking, the fundamentals of prompt engineering cover why structure beats cleverness almost every time.
Wrap your data in tags
Claude was trained on a lot of structured text, and it responds well to XML-style tags that mark where one thing ends and another begins. Tags like <document>, <instructions>, and <example> act as fences. They stop a quoted email from being read as a command, and they let you point back to a section by name later in the prompt.
Here is a support-reply task with the customer message fenced off from the instruction:
Because the message sits inside its own tag, Claude won't mistake "I'm getting frustrated" for part of your instructions. Tags also make few-shot examples cleaner, since you can label each demonstration:
You can invent your own tag names. <transcript>, <policy>, and <draft> all work as long as you stay consistent. If you also need machine-readable output, describe the shape you want and reach for a JSON prompt builder to keep the structure tidy.
<document>, answer the <question>" nudges Claude to stay grounded in what you gave it instead of filling gaps from memory.Put the long stuff first
When your prompt includes a big document, a transcript, or a batch of records, place that material near the top and put your question at the end. Claude does better when it has read the source before it reads what you are asking of it. Ending with the question also keeps the instruction fresh in the model's working attention.
This ordering matters more as the input grows. For a two-line question it makes no difference, but for anything long, question-last is the safer habit.
Say what you mean, plainly
Claude follows direct instructions better than hinted ones. If you want three bullet points, ask for three bullet points. If you want the answer to skip a preamble, tell it not to restate the question. Vague asks produce vague output, and then you spend a second round correcting it.
A few swaps that tighten a prompt:
- Instead of "maybe summarize this," write "summarize this in five sentences."
- Instead of "make it professional," name the audience and tone: "write for a busy CFO, formal but not stiff."
- Instead of "don't be too long," set a limit: "keep it under 200 words."
- If a rule is firm, mark it: "You must cite a line number for every claim."
Spelling out edge cases helps too. Tell Claude what to do when the answer is not in the text ("if the contract is silent, say so rather than guessing"). Readers coming from other tools will find the same directness pays off, and the guide to ChatGPT prompts shows how much of this instinct carries across models. When you want a second pass on wording, a prompt optimizer can tighten a draft you have already written.
Set the ground rules with a system prompt
The system prompt is where you tell Claude who it is and how to behave for the whole conversation, separate from any single question. Use it for the role, the tone, the hard constraints, and anything that should hold across every turn. Keep the task-specific details in the regular message.
With the role fixed up front, your later messages can stay short. You ask the question; the behavior is already set. A system prompt generator helps if you would rather start from a template than a blank box.
Give Claude room to think
For anything that needs reasoning, such as math, multi-step logic, or weighing options, ask Claude to work through it before committing to an answer. Naming the steps out loud tends to improve the final result, because the model is not trying to leap straight to a conclusion.
Splitting the reasoning and the verdict into separate tags gives you a bonus: you can show users only the verdict while keeping the reasoning for your own logs. If you want to push this further with structured chains and self-checking, advanced prompt engineering goes deeper.
Lean on the big context window
Claude can hold a large amount of text at once, which changes what you can attempt in a single prompt. Rather than summarizing a report before you feed it in, paste the whole thing and ask questions against it. A few uses that pay off:
- Drop in an entire codebase file and ask for a targeted change.
- Paste a long meeting transcript and pull out every action item with its owner.
- Compare two contracts side by side, each in its own tag, and list the differences.
- Give several samples of your writing so the reply matches your voice.
More context is not automatically better, though. Irrelevant filler can distract the model, so include what is genuinely useful and cut the rest. Label each big block with a tag so Claude can tell your three documents apart. Used well, the room to include real, complete source material is what separates a generic answer from one grounded in your actual work.


