Good answers start with good prompts. What you ask Claude — and how — dramatically affects the quality of the result. This guide distills Anthropic's official prompt engineering documentation into six practical principles you can apply right away, even if you don't write code.
🟢 Model references match the current lineup · model notice · Fable subscription
Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (
Why prompting matters
Anthropic's docs compare Claude to "a brilliant but new employee who has zero context" on your project. However capable, it can't read your mind about goals, norms, or preferences. The clearer you are, the better it performs. The docs also note that prompt engineering is faster and cheaper than fine-tuning, keeps everything human-readable, and works across model updates without retraining.
Six core principles (official)
1. Be clear and direct
Claude responds well to explicit, specific instructions. State the desired output format and constraints, and use numbered lists when step order matters. The official golden rule: "Show your prompt to a colleague with minimal context and ask them to follow it. If they'd be confused, Claude will be too."
- Less effective: "Create an analytics dashboard"
- More effective: "Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics to create a fully-featured implementation."
2. Add context
Explaining the reason or motivation behind an instruction helps Claude understand your goal and respond more precisely.
- Less effective: "NEVER use ellipses"
- More effective: "Your response will be read aloud by a text-to-speech engine, so never use ellipses since it won't know how to pronounce them."
Claude generalizes from the explanation to handle similar cases.
3. Use examples
Examples are one of the most reliable ways to steer output format, tone, and structure. A few well-crafted examples (few-shot / multishot) sharply improve accuracy and consistency. The docs recommend examples that are:
- Relevant: mirror your actual use case
- Diverse: cover edge cases so Claude doesn't pick up unintended patterns
- Structured: wrap them in
<example>tags (multiple in<examples>)
The official suggestion is 3–5 examples. You can also ask Claude to evaluate or generate examples for you.
4. Structure with XML tags
When a prompt mixes instructions, context, examples, and inputs, wrapping each in its own tag (e.g. <instructions>, <context>, <input>) lets Claude parse it unambiguously.
- Use consistent, descriptive tag names.
- Nest tags when content has a natural hierarchy (e.g. each
<document>inside<documents>).
5. Give Claude a role
Setting a role in the system prompt focuses Claude's behavior and tone. Even one sentence helps — e.g. "You are a helpful coding assistant specializing in Python." It's set via the API system parameter, but stating a role up front in normal chat has a similar effect.
6. Long context
For large documents or data (20k+ tokens), the docs recommend:
- Put longform data at the top, above your query and instructions. In tests, putting the query at the end improved response quality by up to 30% on complex multi-document inputs.
- Structure documents with XML tags — wrap each in
<document>with<document_content>and<source>subtags. - Ground responses in quotes — ask Claude to quote relevant passages first, which cuts through document noise.
Practical tips
- Start small, iterate: Once a prompt works, trim redundant phrasing to make it shorter and cheaper without losing performance.
- Ask for action explicitly: If you want changes made rather than suggested, say "Make these edits," not "Can you suggest changes?"
- Use Console tools: The Claude Console offers a prompt generator, templates/variables, and a prompt improver.
A copy-paste template
This combines the principles above (a role, XML structure, an example, and an explicit output format) into one block. Change only the bracketed parts and use it as is.
[Role] You are a data analyst who classifies customer feedback.
[Task] Sort the feedback below by category (UI / Performance / Feature request / Other),
sentiment (Positive / Neutral / Negative), and priority (High / Medium / Low).
[Format] A table, one item per row.
<feedback>
{paste the items to classify here}
</feedback>
<example>
Input: The new dashboard loads far too slowly → Performance / Negative / High
</example>
For long documents, put the document near the top of the prompt and your question at the end, then add “quote the relevant parts first, then analyze” to improve accuracy.
Summary
Clarity, context, examples, XML structure, roles, and long-context handling — these six fundamentals hold up across model versions. Rather than writing the perfect prompt on the first try, apply these principles, test quickly, and refine.
Source: Anthropic official prompt engineering documentation (overview, prompting best practices).
To lock tone, format, and length instead of asking each time, pair this with Claude Styles.
Related articles
- What Is Claude Cowork? Claude's File-Working Desktop Mode
- What Is Claude Design? Anthropic's Chat-to-Canvas Design Tool
- Claude Memory — How to Make Claude Remember and Manage It
- Claude Styles — Lock Tone, Format, and Length Your Way
- Claude in Chrome Guide: Claude Working in Your Browser
- Claude Science Guide: Anthropic's AI Workbench for Scientists (2026)
- How to Log In to Claude — Email Link & Google Account Guide
- Claude Dispatch Explained — Send Tasks from Your Phone to Your Desktop
- The Complete Guide to Working with PDFs in Claude — Summarize, Analyze, Extract, and Size Limits
- When Your Claude Character Drifts Mid-Conversation: Keeping Persona Context Stable with Projects