콘텐츠로 이동

Prompt Engineering#

Claude Platform Docs

API reference

EnglishConsoleLog in



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

Glossary

Log in

Best practicesOverview

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Loading

Claude Platform Docs

Solutions#

Partners#

Learn#

Company#

Learn#

Help and security#

Terms and policies#

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:

  1. A clear definition of the success criteria for your use case
  2. Some ways to empirically test against those criteria
  3. 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.

Prompt generator notebook

Don't have a first draft prompt? Generate one with the metaprompt recipe from the Claude Cookbook.

Prompting best practices

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!

GitHub prompting tutorial

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