Anthropic Official Courses
本文为开源社区精选内容,由 Anthropic 原创。 文中链接将跳转到原始仓库,部分图片可能加载较慢。
查看原始来源AI 导读
Anthropic Official Courses Official educational courses from Anthropic covering Claude API fundamentals, prompt engineering, real-world prompting patterns, tool use, and prompt evaluations. Each...
Anthropic Official Courses
Official educational courses from Anthropic covering Claude API fundamentals, prompt engineering, real-world prompting patterns, tool use, and prompt evaluations. Each course includes hands-on Jupyter notebooks.
Anthropic courses
Welcome to Anthropic's educational courses. This repository currently contains five courses. We suggest completing the courses in the following order:
- Anthropic API fundamentals - teaches the essentials of working with the Claude SDK: getting an API key, working with model parameters, writing multimodal prompts, streaming responses, etc.
- Prompt engineering interactive tutorial - a comprehensive step-by-step guide to key prompting techniques. [AWS Workshop version]
- Real world prompting - learn how to incorporate prompting techniques into complex, real world prompts. [Google Vertex version]
- Prompt evaluations - learn how to write production prompt evaluations to measure the quality of your prompts.
- Tool use - teaches everything you need to know to implement tool use successfully in your workflows with Claude.
Please note that these courses often favor our lowest-cost model, Claude 3 Haiku, to keep API costs down for students following along with the materials. Feel free to use other Claude models if you prefer.
Anthropic API fundamentals
A series of notebook tutorials that cover the essentials of working with Claude models and the Anthropic SDK including:
- Getting an API key and making simple requests
- Working with the messages format
- Comparing capabilities and performance of the Claude model family
- Understanding model parameters
- Working with streaming responses
- Vision prompting
Welcome to Anthropic's Prompt Engineering Interactive Tutorial
Course introduction and goals
This course is intended to provide you with a comprehensive step-by-step understanding of how to engineer optimal prompts within Claude.
After completing this course, you will be able to:
- Master the basic structure of a good prompt
- Recognize common failure modes and learn the '80/20' techniques to address them
- Understand Claude's strengths and weaknesses
- Build strong prompts from scratch for common use cases
Course structure and content
This course is structured to allow you many chances to practice writing and troubleshooting prompts yourself. The course is broken up into 9 chapters with accompanying exercises, as well as an appendix of even more advanced methods. It is intended for you to work through the course in chapter order.
Each lesson has an "Example Playground" area at the bottom where you are free to experiment with the examples in the lesson and see for yourself how changing prompts can change Claude's responses. There is also an answer key.
Note: This tutorial uses our smallest, fastest, and cheapest model, Claude 3 Haiku. Anthropic has two other models, Claude 3 Sonnet and Claude 3 Opus, which are more intelligent than Haiku, with Opus being the most intelligent.
This tutorial also exists on Google Sheets using Anthropic's Claude for Sheets extension. We recommend using that version as it is more user friendly.
When you are ready to begin, go to 01_Basic Prompt Structure to proceed.
Table of Contents
Each chapter consists of a lesson and a set of exercises.
Beginner
Chapter 1: Basic Prompt Structure
Chapter 2: Being Clear and Direct
Chapter 3: Assigning Roles
Intermediate
Chapter 4: Separating Data from Instructions
Chapter 5: Formatting Output & Speaking for Claude
Chapter 6: Precognition (Thinking Step by Step)
Chapter 7: Using Examples
Advanced
Chapter 8: Avoiding Hallucinations
Chapter 9: Building Complex Prompts (Industry Use Cases)
- Complex Prompts from Scratch - Chatbot
第九章:构建复杂提示 (行业用例) (Building Complex Prompts (Industry Use Cases)) 从零开始构建复杂提示 - 聊天机器人 (Complex Prompts from Scratch - Chatbot)- Complex Prompts for Legal Services
- Exercise: Complex Prompts for Financial Services
- Exercise: Complex Prompts for Coding
- Congratulations & Next Steps
Appendix: Beyond Standard Prompting
- Chaining Prompts
Real world prompting
Welcome to Anthropic's comprehensive real world prompting tutorial. This course is designed for experienced developers who have already dipped their toes into the world of prompt engineering, particularly those who have completed our comprehensive Prompt engineering interactive tutorial. If you haven't gone through that tutorial yet, we strongly recommend you do so before continuing, as it provides an in-depth exploration of various prompting techniques with hands-on exercises.
Across five lessons, you will learn how to incorporate key prompting techniques into complex, real world prompts. We recommend that you start from the beginning with the Prompting recap lesson, as each lesson builds on key concepts taught in previous ones.
Table of contents
- Prompting recap
- Medical prompt walkthrough
- Prompt engineering process
- Call summarizing prompt walkthrough
- Customer support bot prompt walkthrough
Tool use
Welcome to Anthropic's comprehensive tool use tutorial. Across six lessons, you will learn everything you need to know to implement tool use successfully in your workflows with Claude. We recommend that you start from the beginning with the tool use overview, as each lesson builds on key concepts taught in previous ones.
Table of contents
- Tool use overview
- Your first simple tool
- Forcing JSON with tool use
- The complete tool use workflow
- Tool choice
- Building a chatbot with multiple tools
Prompt evaluations
Welcome to Anthropic's comprehensive prompt evaluations course. Across nine lessons, you will learn everything you need to know to implement evaluations successfully in your workflows with the Anthropic API. We recommend that you start from the beginning with the Evaluations 101 lesson, as each lesson builds on key concepts taught in previous ones.
Table of contents
- Evaluations 101
- Writing human-graded evals with Anthropic's Workbench
- Writing simple code-graded evals
- Writing a classification eval
- Promptfoo for evals: an introduction
- Writing classification evals with promptfoo
- Custom graders with promptfoo
- Model-graded evals with promptfoo
- Custom model-graded evals with promptfoo
深度加工(NotebookLM 生成)
基于本文内容生成的 PPT 大纲、博客摘要、短视频脚本与 Deep Dive 播客,用于多场景复用
PPT 大纲(5-8 张幻灯片) 点击展开
Anthropic Official Courses — ppt
幻灯片 1:Anthropic 官方教育课程概览
- 官方提供了涵盖 Claude API 基础、提示词工程及提示词评估等内容的系统性教育课程 [1]。
- 为了达到最佳学习效果,官方建议按照特定的递进顺序来完成这五个核心课程的学习 [1]。
- 每个课程都包含了实操性强的 Jupyter notebooks,方便开发者进行动手实践 [1]。
- 课程通常优先使用速度最快且成本最低的 Claude 3 Haiku 模型,以降低学习过程中的 API 成本费用 [2, 3]。
幻灯片 2:课程一 - Anthropic API 基础 (API Fundamentals)
- 专注于教授使用 Claude SDK 的核心基础知识,包括如何获取 API 密钥及发送基础请求 [1, 2]。
- 介绍如何处理消息(messages)格式、理解模型参数以及比较 Claude 模型家族的不同能力和性能表现 [2]。
- 指导开发者掌握流式响应(streaming responses)的处理方式 [1, 2]。
- 涵盖多模态应用,教授如何编写包含视觉元素(Vision prompting)的提示词 [1, 2]。
幻灯片 3:课程二 - 提示词工程交互教程 (Prompt Engineering)
- 提供全面、循序渐进的指南,帮助学习者掌握良好提示词的基本结构并了解 Claude 的优缺点 [2, 3]。
- 课程包含 9 个章节及配套练习,涵盖从初级(保持清晰直接)到高级(避免幻觉)的各类技巧 [3, 4]。
- 教授“80/20”技巧,帮助开发者识别并解决常见的提示词失败模式 [3]。
- 每节课都配有“Example Playground”区域,供学习者自由修改提示词并观察响应变化 [3]。
幻灯片 4:课程三 - 真实场景提示词 (Real World Prompting)
- 专为已经具备一定提示词工程经验的资深开发者量身打造 [4]。
- 通过 5 节课程,讲解如何将提示词技巧整合到复杂的真实业务场景中 [5]。
- 提供针对医疗健康场景及通话记录总结的复杂提示词详细演练 [5]。
- 包含指导开发者如何为客户服务机器人构建并优化提示词的实操练习 [5]。
幻灯片 5:课程四 - 工具使用教程 (Tool Use)
- 全面讲解如何在 Claude 业务工作流中成功开发并实施工具调用(Tool use) [2, 5]。
- 通过 6 节课程的逐步引导,学习者可掌握完整的工具调用工作流程及工具选择策略 [5, 6]。
- 教授实用的进阶技巧,例如如何通过工具使用来强制模型输出 JSON 格式的数据 [6]。
- 课程最终包含一项综合性实践:构建一个能够同时调用多个工具的复杂聊天机器人 [6]。
幻灯片 6:课程五 - 提示词评估 (Prompt Evaluations)
- 专注于教授如何在生产环境中编写评估指标,以准确衡量提示词的质量 [1]。
- 介绍如何使用 Anthropic Workbench 编写人工评分(human-graded)的评估标准,以及如何编写简单的代码级评估 [6]。
- 全面引入 promptfoo 工具,教授如何用其进行分类评估和构建自定义评分器 [6]。
- 探讨进阶评估手段,包含如何使用 promptfoo 进行基于模型的自动评分(Model-graded evals)及自定义模型评分 [6]。
幻灯片 7:学习建议与进阶指南
- 建议遵循从基础结构到分离数据、格式化输出再到思维链(Precognition)的路径循序渐进地提升提示词技巧 [4]。
- 提示词教程提供了更为友好的 Google Sheets 扩展版本,官方强烈推荐使用该版本进行学习 [7]。
- 虽然课程主要基于 Haiku 模型,但相关提示词技术同样适用于具有更高智能的 Claude 3 Sonnet 和 Opus 模型 [7]。
- 在附录和进阶章节中,还提供了针对法律服务、金融服务以及代码编写等具体行业的复杂端到端用例 [4]。
博客摘要 + 核心看点 点击展开
Anthropic Official Courses — summary
想要全面掌握 Claude API 并提升 AI 开发技能?Anthropic 官方推出了一系列实用的实战课程,为开发者提供了完整的学习路线图 [1]。本指南详细解析了这五大核心课程:从基础的 API 接入与参数设置,到包含 9 大章节的提示词工程(Prompt Engineering)互动教程,再到针对复杂行业案例的真实场景提示词应用 [1-4]。此外,课程还深入讲解了如何让大模型调用外部工具(Tool Use)以及构建生产环境下的提示词评估(Prompt Evaluations)体系 [5, 6]。所有课程均配有丰富的 Jupyter Notebook 实操练习,并推荐使用高性价比的 Claude 3 Haiku 模型进行开发测试 [1, 2]。无论你是新手还是资深开发者,都能借此全面解锁 Claude 的强大潜力!
核心看点:
- 全方位进阶课程体系:系统涵盖 API 基础、提示词工程、真实场景落地、工具调用与提示词评估五大核心模块 [1]。
- 系统化提示词实战指南:通过 9 大章节和互动游乐场,带你掌握从基础结构设计到避免 AI 幻觉的进阶技巧 [3, 4]。
- 深入真实行业场景:提供医疗、金融等复杂案例练习,并手把手指导构建多工具调用的 AI 聊天机器人 [4-6]。
60 秒短视频脚本 点击展开
Anthropic Official Courses — video
钩子开场
官方五大课程全攻略![1]
核心解说
从API基础起步,带你一步步掌握提示词结构,解决常见失败模式。[1-3]
结合真实场景进阶,学习医疗与客服案例,掌握多工具调用的核心流程。[4, 5]
最后深入提示词评估,编写评估代码与评分器,科学量化你的提示质量。[1, 6]
收束
建议按官方顺序学习,轻松开发出色的AI应用![1]
课后巩固
与本文内容匹配的闪卡与测验,帮助巩固所学知识
延伸阅读
根据本文主题,为你推荐相关的学习资料