0% found this document useful (0 votes)
6K views1 page

Prompt Engineering Overview - Anthropic

This document provides an overview of prompt engineering for Claude models, emphasizing its advantages over finetuning, such as resource efficiency, cost-effectiveness, and rapid iteration. It outlines essential criteria for successful prompt engineering, including defining success criteria and developing test cases. The guide also lists techniques for effective prompt engineering, from using a prompt generator to providing domain-specific context.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6K views1 page

Prompt Engineering Overview - Anthropic

This document provides an overview of prompt engineering for Claude models, emphasizing its advantages over finetuning, such as resource efficiency, cost-effectiveness, and rapid iteration. It outlines essential criteria for successful prompt engineering, including defining success criteria and developing test cases. The guide also lists techniques for effective prompt engineering, from using a prompt generator to providing domain-specific context.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

English Search... ⌘K Research News Go to claude.

ai

Prompt generator
Welcome User Guides API Reference Prompt Library Release Notes
Don’t have a first draft prompt? Try the prompt generator in the Anthropic
Console!
Developer Console PROMPT ENGINEERING Developer Console

Developer Discord
Prompt engineering overview Developer Discord

Support Support

While these tips apply broadly to all Claude models, you can find prompting When to prompt engineer
Get started Get started
tips specific to extended thinking models here.
This guide focuses on success criteria that are controllable through prompt
Overview Overview
engineering. Not every success criteria or failing eval is best solved by prompt
Initial setup Initial setup engineering. For example, latency and cost can be sometimes more easily improved by

Intro to Claude Before prompt engineering Intro to Claude


selecting a different model.

This guide assumes that you have:


Learn about Claude Learn about Claude Prompting vs. finetuning
1. A clear definition of the success criteria for your use case
Use cases Use cases
2. Some ways to empirically test against those criteria Prompt engineering is far faster than other methods of model behavior control,
Models & pricing Models & pricing
such as finetuning, and can often yield leaps in performance in far less time.
3. A first draft prompt you want to improve
Security and compliance Security and compliance Here are some reasons to consider prompt engineering over finetuning:

If not, we highly suggest you spend time establishing that first. Check out Define your
Resource efficiency: Fine-tuning requires high-end GPUs and large
Build with Claude success criteria and Create strong empirical evaluations for tips and guidance. Build with Claude
memory, while prompt engineering only needs text input, making it much
Ask AI
Define success criteria Define success criteria more resource-friendly.

Develop test cases Develop test cases

Cost-effectiveness: For cloud-based AI services, fine-tuning incurs Transparency: Prompts are human-readable, showing exactly what
significant costs. Prompt engineering uses the base model, which is information the model receives. This transparency aids in understanding
typically cheaper. and debugging.

Maintaining model updates: When providers update models, fine-tuned


versions might need retraining. Prompts usually work across versions
Developer Console without changes. Developer Console

Developer Discord Time-saving: Fine-tuning can take hours or even days. In contrast, prompt Developer Discord

engineering provides nearly instantaneous results, allowing for quick


How to prompt engineer
Support Support
problem-solving. The prompt engineering pages in this section have been organized from most broadly

Get started Get started effective techniques to more specialized techniques. When troubleshooting
Minimal data needs: Fine-tuning needs substantial task-specific, labeled
performance, we suggest you try these techniques in order, although the actual impact
data, which can be scarce or expensive. Prompt engineering works with
Overview Overview of each technique will depend on your use case.
few-shot or even zero-shot learning.
Initial setup Initial setup
Flexibility & rapid iteration: Quickly try various approaches, tweak 1. Prompt generator
Intro to Claude Intro to Claude
prompts, and see immediate results. This rapid experimentation is difficult
2. Be clear and direct
with fine-tuning.
Learn about Claude Learn about Claude 3. Use examples (multishot)
Domain adaptation: Easily adapt models to new domains by providing
Use cases Use cases 4. Let Claude think (chain of thought)
domain-specific context in prompts, without retraining.
Models & pricing Models & pricing 5. Use XML tags
Comprehension improvements: Prompt engineering is far more effective
Security and compliance than finetuning at helping models better understand and utilize external Security and compliance 6. Give Claude a role (system prompts)
content such as retrieved documents
7. Prefill Claude’s response
Build with Claude Preserves general knowledge: Fine-tuning risks catastrophic forgetting, Build with Claude
8. Chain complex prompts
where the model loses general knowledge. Prompt engineering maintains
Define success criteria Define success criteria
the model’s broad capabilities. 9. Long context tips
Develop test cases Develop test cases

You might also like