Claude Platform Docs
  • 消息
  • 托管智能体
  • 管理

Search...
⌘K
用例
概览工单路由客户支持智能体内容审核法律摘要
提示工程
概览提示最佳实践为 Claude Fable 5 编写提示为 Claude Opus 4.8 编写提示控制台提示工具
测试与评估
定义成功标准并构建评估在控制台中使用评估工具降低延迟
加强防护措施
减少幻觉提高输出一致性缓解越狱攻击减少提示泄露
参考
术语表

Log in
概览
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Claude Platform Docs

Solutions

  • AI agents
  • Code modernization
  • Coding
  • Customer support
  • Education
  • Financial services
  • Government
  • Life sciences

Partners

  • Claude on AWS
  • Claude on Google Cloud

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Company

  • Anthropic
  • Careers
  • Economic Futures
  • Research
  • News
  • Responsible Scaling Policy
  • Security and compliance
  • Transparency

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Help and security

  • Availability
  • Status
  • Support
  • Discord

Terms and policies

  • Privacy policy
  • Responsible disclosure policy
  • Terms of service: Commercial
  • Terms of service: Consumer
  • Usage policy
最佳实践/提示工程

提示工程概述

开始提示工程之前

本指南假设您已具备以下条件:

  1. 对您的用例有明确的成功标准定义
  2. 有一些方法可以根据这些标准进行实证测试
  3. 有一个想要改进的初稿提示

如果没有,我们强烈建议您先花时间建立这些基础。请查看定义成功标准并构建评估以获取相关提示和指导。


提示生成器

还没有初稿提示?试试 Claude Console 中的提示生成器!


提示最佳实践

如需针对 Claude 最新模型的特定调优指导,请从这里开始。


何时进行提示工程

本指南重点关注可通过"prompt engineering"(提示工程)控制的成功标准。 并非所有成功标准或失败的评估都最适合通过提示工程来解决。例如,"latency"(延迟)和成本有时可以通过选择不同的模型来更轻松地改善。


如何进行提示工程

所有提示技术——从清晰度和示例,到 XML 结构化、角色提示、思考以及提示链——都涵盖在提示最佳实践中。这是持续更新的参考文档,请从那里开始。

Claude Console 还提供了提示工具——提示生成器、模板和变量,以及提示改进器——帮助您快速构建和优化提示。


提示工程教程

如果您是交互式学习者,可以直接深入学习我们的交互式教程!


GitHub 提示教程


一个包含丰富示例的教程,涵盖了我们文档中的提示工程概念。


Google Sheets 提示教程


通过交互式电子表格提供的轻量版提示工程教程。

Was this page helpful?

  • 开始提示工程之前
  • 何时进行提示工程
  • 如何进行提示工程
  • 提示工程教程