Prompt engineering overview
On this 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.
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!