Behind the prompt: Prompting tips for Claude.ai

Anthropic · Advanced ·🧠 Large Language Models ·2y ago

Key Takeaways

Prompt engineer Alex shares 5 tips for effective prompting with Claude.ai

Full Transcript

[Music] foreign [Music] engineer at anthropic I help people get the most out of Claude with safety at the top of the moment first got into prompt engineering uh back in last August anthropic released their paper red teaming language models to reduce harms and immediately I read it and it was hooked I was inspired to see that a company was taking a safety first approach to researching language models and I thought it was really interesting how you could see the ways that models would output to different and diverse ranges of prompts you may be familiar with red teaming attacks as prompt exploits or the more Infamous name jailbreaks I decided to start writing jailbreaks after reading the paper and becoming inspired by the opportunities that still existed to Red Team these models jailbreaks are specific prompts that are written to circumvent the filters that have been applied on top of language models prompt engineering is the practice of optimizing your prompt in order to get the best response from the language model at anthropic we like to take an empirical test driven approach to prompt engineering whenever we write a new prompt we run it against a series of benchmarks in order to scientifically measure its performance with Claude we've discovered a set of best practices that'll allow you to get the most out of the model so let's get into it here are my five tips for getting the best performance from Claude first describe your task Claude responds well to clear direct and Specific Instructions let's say you wanted Claude to remove personal identifiable information from a piece of text explaining the quad exactly what that means helps Claude recognize what pieces of text to remove for example email addresses and phone numbers second Mark different parts of your prompt with XML tags XML tags look like this Claude has been fine-tuned to pay special attention to their structure in our example we use XML tags to indicate the beginning and end of text that claw needs to de-identify third give examples the more examples the better including a wide range of examples helps Claude learn how to do the task back to our pii prompt we provide cod with examples of how to de-identify text within XML tags fourth make use of the long context pod can read up to a hundred thousand tokens that's roughly 70 000 words or the length of the entire Great Gatsby and finally the last tip is to let Claude think researchers have discovered that giving language models some time to think through their response before producing their final answer leads to better performance with Claude we like to use thinking tags so that it can jot down its ideas before answering a complex question here in this example you can see Claude starts to reason within thinking tags and then outputs its final answer alright so those are my top tips for getting the most out of Claude and a little bit about me and my own prompting Journey stay up to date on the latest prompting best practices make sure to go check out our developer dog site and if you haven't got access to the Claude API yet you can still practice your prompt engineering right now at claude.ai [Music]

Original Description

Alex, a prompt engineer at Anthropic shares a little about his journey into prompting, and his 5 best tips for using Claude.ai. https://docs.anthropic.com/ https://claude.ai/ Read the research paper: Red Teaming Language Models to Reduce Harms — https://www.anthropic.com/index/red-teaming-language-models-to-reduce-harms-methods-scaling-behaviors-and-lessons-learned
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Playlist UUrDwWp7EBBv4NwvScIpBDOA · Anthropic · 5 of 60

1 Quick tips for Claude: Long context file uploads
Quick tips for Claude: Long context file uploads
Anthropic
2 Inside our first Anthropic Hackathon, San Francisco
Inside our first Anthropic Hackathon, San Francisco
Anthropic
3 Long inputs, multi-step output with Claude
Long inputs, multi-step output with Claude
Anthropic
4 Coding with Claude
Coding with Claude
Anthropic
Behind the prompt: Prompting tips for Claude.ai
Behind the prompt: Prompting tips for Claude.ai
Anthropic
6 Robin AI, powered by Claude
Robin AI, powered by Claude
Anthropic
7 Claude 3 Opus as an economic analyst
Claude 3 Opus as an economic analyst
Anthropic
8 Claude 3 Sonnet as a language learning partner
Claude 3 Sonnet as a language learning partner
Anthropic
9 Claude 3 Haiku turns thousands of physical documents into structured data
Claude 3 Haiku turns thousands of physical documents into structured data
Anthropic
10 Claude 3 Haiku for instant customer service
Claude 3 Haiku for instant customer service
Anthropic
11 Claude 3 Haiku for fast document analysis
Claude 3 Haiku for fast document analysis
Anthropic
12 Tool use with the Claude 3 model family
Tool use with the Claude 3 model family
Anthropic
13 Coming soon to the Team plan on Claude.ai
Coming soon to the Team plan on Claude.ai
Anthropic
14 Introducing the Claude iOS app
Introducing the Claude iOS app
Anthropic
15 Claude is now available in Europe
Claude is now available in Europe
Anthropic
16 What is interpretability?
What is interpretability?
Anthropic
17 What should an AI's personality be?
What should an AI's personality be?
Anthropic
18 Scaling interpretability
Scaling interpretability
Anthropic
19 Claude 3.5 Sonnet for sparking creativity
Claude 3.5 Sonnet for sparking creativity
Anthropic
20 Claude 3.5 Sonnet for vision
Claude 3.5 Sonnet for vision
Anthropic
21 Claude 3.5 Sonnet as a writing partner
Claude 3.5 Sonnet as a writing partner
Anthropic
22 Claude 3.5 Sonnet for agentic coding
Claude 3.5 Sonnet for agentic coding
Anthropic
23 Shareable Projects in Claude
Shareable Projects in Claude
Anthropic
24 Evaluate prompts in the Anthropic Console
Evaluate prompts in the Anthropic Console
Anthropic
25 Shareable Artifacts in Claude
Shareable Artifacts in Claude
Anthropic
26 How we built Artifacts with Claude
How we built Artifacts with Claude
Anthropic
27 Wedia advances digital asset management with Claude
Wedia advances digital asset management with Claude
Anthropic
28 AI prompt engineering: A deep dive
AI prompt engineering: A deep dive
Anthropic
29 AI Prompt Engineering 101: Explained
AI Prompt Engineering 101: Explained
Anthropic
30 Ancient Wisdom, Modern AI?
Ancient Wisdom, Modern AI?
Anthropic
31 AI's Greatest Challenge: You?
AI's Greatest Challenge: You?
Anthropic
32 AI Prompts That Drive Growth
AI Prompts That Drive Growth
Anthropic
33 Tips For Better Results With AI
Tips For Better Results With AI
Anthropic
34 AI, policy, and the weird sci-fi future with Anthropic’s Jack Clark
AI, policy, and the weird sci-fi future with Anthropic’s Jack Clark
Anthropic
35 European Parliament expands access to their archives with Claude in Amazon Bedrock
European Parliament expands access to their archives with Claude in Amazon Bedrock
Anthropic
36 Claude | Computer use for automating operations
Claude | Computer use for automating operations
Anthropic
37 Claude | Computer use for orchestrating tasks
Claude | Computer use for orchestrating tasks
Anthropic
38 Claude | Computer use for coding
Claude | Computer use for coding
Anthropic
39 Asana supercharges work management with Claude
Asana supercharges work management with Claude
Anthropic
40 What do people use AI models for?
What do people use AI models for?
Anthropic
41 Alignment faking in large language models
Alignment faking in large language models
Anthropic
42 Building Anthropic | A conversation with our co-founders
Building Anthropic | A conversation with our co-founders
Anthropic
43 How difficult is AI alignment? | Anthropic Research Salon
How difficult is AI alignment? | Anthropic Research Salon
Anthropic
44 Tips for building AI agents
Tips for building AI agents
Anthropic
45 Claude 3.7 Sonnet with extended thinking
Claude 3.7 Sonnet with extended thinking
Anthropic
46 Introducing Claude Code
Introducing Claude Code
Anthropic
47 Advice For Building AI Agents
Advice For Building AI Agents
Anthropic
48 The Two Most Useful Applications of AI Agents
The Two Most Useful Applications of AI Agents
Anthropic
49 Defending against AI jailbreaks
Defending against AI jailbreaks
Anthropic
50 The Most Common Mistake People Make When Building AI Agents
The Most Common Mistake People Make When Building AI Agents
Anthropic
51 Controlling powerful AI
Controlling powerful AI
Anthropic
52 How Intercom is redefining customer support with Claude
How Intercom is redefining customer support with Claude
Anthropic
53 Tracing the thoughts of a large language model
Tracing the thoughts of a large language model
Anthropic
54 Introducing Claude for Education
Introducing Claude for Education
Anthropic
55 Could AI models be conscious?
Could AI models be conscious?
Anthropic
56 Lessons on AI agents from Claude Plays Pokemon
Lessons on AI agents from Claude Plays Pokemon
Anthropic
57 The Societal Impacts of AI
The Societal Impacts of AI
Anthropic
58 What Does AI Mean for the Future of Work?
What Does AI Mean for the Future of Work?
Anthropic
59 Understanding AI Agents...Through Pokémon
Understanding AI Agents...Through Pokémon
Anthropic
60 What Pokémon Teaches Us About Building With AI
What Pokémon Teaches Us About Building With AI
Anthropic

Related Reads

Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →