Prompt Engineering#
- Messages
- Managed Agents
- Admin
- Resources
Search
⌘K
Use cases
OverviewTicket routingCustomer support agentContent moderationLegal summarization
Prompt engineering
OverviewPrompting best practicesPrompting Claude Fable 5Prompting Claude Opus 5Prompting Claude Opus 4.8Prompting Claude Sonnet 5
Test and evaluate
Define success and build evaluationsReducing latency
Strengthen guardrails
Reduce hallucinationsIncrease output consistencyMitigate jailbreaksReduce prompt leak
Reference
Best practicesOverview
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Solutions#
- AI agents
- Code modernization
- Coding
- Customer support
- Financial services
- Government
- Higher education
- K-12 teachers
- Life sciences
Partners#
Learn#
- Blog
- Courses
- Use cases
- Connectors
- Customer stories
- Engineering at Anthropic
- Events
- Powered by Claude
- Service partners
- Startups program
Company#
- Anthropic
- Careers
- Economic Futures
- Research
- News
- Responsible Scaling Policy
- Security and compliance
- Transparency
Learn#
- Blog
- Courses
- Use cases
- Connectors
- Customer stories
- Engineering at Anthropic
- Events
- Powered by Claude
- Service partners
- Startups program
Help and security#
Terms and policies#
- Privacy policy
- Responsible disclosure policy
- Terms of service: Commercial
- Terms of service: Consumer
- Usage policy
Best practices/Prompt engineering
Prompt engineering overview#
Copy page
Learn when prompt engineering is the right solution, and find Claude prompting techniques and interactive tutorials.
Copy page
#
Before prompt engineering
This guide assumes that you have:
- A clear definition of the success criteria for your use case
- Some ways to empirically test against those criteria
- A first draft prompt you want to improve
If not, spend time establishing that first. Check out Define success criteria and build evaluations for tips and guidance.
Don't have a first draft prompt? Generate one with the metaprompt recipe from the Claude Cookbook.
For model-specific tuning guidance for Claude's latest models, start here.
#
When to prompt engineer
This guide focuses on success criteria that are controllable through prompt engineering. Not every success criteria or failing eval is best solved by prompt engineering. For example, you can sometimes improve latency and cost more easily by selecting a different model.
#
How to prompt engineer
All prompting techniques (from clarity and examples to XML structuring, role prompting, thinking, and prompt chaining) are covered in Prompting best practices. That's the living reference; start there.
For general prompt engineering craft beyond Claude-specific techniques, see the blog post on best practices for prompt engineering.
#
Prompt engineering tutorial
If you're an interactive learner, you can start with the interactive tutorials instead!
An example-filled tutorial that covers the prompt engineering concepts found in the docs.
Google Sheets prompting tutorial
A lighter-weight version of the prompt engineering tutorial, as an interactive spreadsheet.
Was this page helpful?
- Before prompt engineering
- When to prompt engineer
- How to prompt engineer
- Prompt engineering tutorial