Back to tutorials
AnthropicIntermediate2025-11-05
Anthropic's Prompt Engineering Docs: Claude in Context
Anthropic's official prompt engineering docs are the de facto reference for Claude development: six techniques to scenario templates.
Open the official tutorialOverview
Anthropic's prompt engineering docs are the standard reference for Claude developers — alongside OpenAI's guide, one of the two major official paradigms. Its strength is scenario-based guidance: role-playing, tool use, and long-context templates.
Six core techniques
- Be clear and direct.
- Use roles and tone.
- Structured output (XML/JSON templates).
- Few-shot examples (1-3 high-quality ones).
- Tool-call design: describe when a tool should be used.
- Long-context strategy: chunking, summarization, retrieval.
Engineering practice
- Version-control your prompts; keep change logs.
- Build an eval set; run it on every prompt change.
- Prefer tool use and structured outputs over longer prompts.
Official source: Anthropic prompt engineering docs.
Note: This is an original Laojin Chuhai companion to the official tutorial, not a replacement for provider documentation. Use the official link for current models, SDKs, pricing, quotas, and safety policies.