Loading...
    • 開發者指南
    • API 參考
    • MCP
    • 資源
    • 發行說明
    Search...
    ⌘K

    第一步

    Claude 介紹快速入門

    模型與定價

    模型概覽選擇模型Claude 4.5 的新功能遷移到 Claude 4.5模型棄用定價

    使用 Claude 建構

    功能概覽使用 Messages API上下文視窗提示詞最佳實踐

    功能

    提示詞快取上下文編輯延伸思考串流訊息批次處理引用多語言支援Token 計數嵌入向量視覺PDF 支援Files API搜尋結果Google Sheets 附加元件

    工具

    概述如何實現工具使用代幣高效工具使用細粒度工具串流Bash 工具代碼執行工具電腦使用工具文字編輯工具網頁擷取工具網路搜尋工具記憶工具

    代理技能

    概述在 API 中開始使用 Agent Skills技能編寫最佳實踐使用 Agent Skills 與 API

    Agent SDK

    概述Agent SDK 參考 - TypeScriptPython SDK

    指南

    串流輸入處理權限會話管理託管 Agent SDK修改系統提示SDK 中的 MCP自訂工具SDK 中的子代理SDK 中的斜線命令SDK 中的代理技能追蹤成本和使用量待辦事項清單SDK 中的外掛程式

    API 中的 MCP

    MCP 連接器遠端 MCP 伺服器

    Claude 在第三方平台上

    Amazon BedrockVertex AI

    提示工程

    概述提示詞生成器使用提示模板提示詞改進器保持清晰和直接使用範例(多樣提示)讓 Claude 思考(思維鏈)使用 XML 標籤給 Claude 分配角色(系統提示詞)預填 Claude 的回應串接複雜提示長文本技巧延伸思考技巧

    測試與評估

    定義成功標準開發測試案例使用評估工具降低延遲

    加強防護措施

    減少幻覺提高輸出一致性防範越獄handle-streaming-refusals減少提示詞洩漏保持 Claude 的角色特性

    管理和監控

    Admin API 概述使用量和成本 APIClaude Code 分析 API
    Console
    提示工程

    串接複雜提示以獲得更強大的表現

    While these tips apply broadly to all Claude models, you can find prompting tips specific to extended thinking models here.

    在處理複雜任務時,如果你試圖在單一提示中處理所有事情,Claude 有時可能會出錯。思維鏈(Chain of thought, CoT)提示很好,但如果你的任務有多個需要深入思考的不同步驟呢?

    這就需要提示串接:將複雜任務分解成更小、更易管理的子任務。

    為什麼要串接提示?

    1. 準確性:每個子任務都能獲得 Claude 的全部注意力,減少錯誤。
    2. 清晰度:更簡單的子任務意味著更清晰的指令和輸出。
    3. 可追蹤性:輕鬆找出並修復提示串接中的問題。

    何時串接提示

    在進行研究綜合、文件分析或迭代內容創作等多步驟任務時使用提示串接。當任務涉及多個轉換、引用或指令時,串接可以防止 Claude 遺漏或處理錯誤步驟。

    **記住:**串接中的每個環節都能獲得 Claude 的全部注意力!

    除錯提示:如果 Claude 遺漏了某個步驟或表現不佳,將該步驟單獨放在一個提示中。這樣你就可以微調有問題的步驟,而無需重做整個任務。

    如何串接提示

    1. 識別子任務:將任務分解為不同的、順序性的步驟。
    2. 使用 XML 結構化以清晰交接:使用 XML 標籤在提示之間傳遞輸出。
    3. 設定單一任務目標:每個子任務應該有一個明確的單一目標。
    4. 迭代:根據 Claude 的表現改進子任務。

    串接工作流程示例:

    • 多步驟分析:參見下方的法律和商業示例。
    • 內容創作流程:研究 → 大綱 → 草稿 → 編輯 → 格式化。
    • 數據處理:提取 → 轉換 → 分析 → 視覺化。
    • 決策制定:收集信息 → 列出選項 → 分析每個選項 → 提出建議。
    • 驗證循環:生成內容 → 審查 → 改進 → 再審查。
    優化提示:對於具有獨立子任務的任務(如分析多個文檔),創建單獨的提示並並行運行以提高速度。

    進階:自我糾正串接

    你可以串接提示讓 Claude 審查自己的工作!這可以捕捉錯誤並改進輸出,特別是對於高風險任務。


    示例


    提示庫

    從精選的各種任務和用例提示中獲得靈感。

    GitHub 提示教程

    一個包含我們文檔中提示工程概念的示例豐富教程。

    Google Sheets 提示教程

    通過互動式電子表格提供的我們提示工程教程的輕量級版本。

      © 2025 ANTHROPIC PBC

      Products

      • Claude
      • Claude Code
      • Max plan
      • Team plan
      • Enterprise plan
      • Download app
      • Pricing
      • Log in

      Features

      • Claude and Slack
      • Claude in Excel

      Models

      • Opus
      • Sonnet
      • Haiku

      Solutions

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

      Claude Developer Platform

      • Overview
      • Developer docs
      • Pricing
      • Amazon Bedrock
      • Google Cloud’s Vertex AI
      • Console login

      Learn

      • Blog
      • Catalog
      • 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

      Help and security

      • Availability
      • Status
      • Support center

      Terms and policies

      • Privacy policy
      • Responsible disclosure policy
      • Terms of service: Commercial
      • Terms of service: Consumer
      • Usage policy

      Products

      • Claude
      • Claude Code
      • Max plan
      • Team plan
      • Enterprise plan
      • Download app
      • Pricing
      • Log in

      Features

      • Claude and Slack
      • Claude in Excel

      Models

      • Opus
      • Sonnet
      • Haiku

      Solutions

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

      Claude Developer Platform

      • Overview
      • Developer docs
      • Pricing
      • Amazon Bedrock
      • Google Cloud’s Vertex AI
      • Console login

      Learn

      • Blog
      • Catalog
      • 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

      Help and security

      • Availability
      • Status
      • Support center

      Terms and policies

      • Privacy policy
      • Responsible disclosure policy
      • Terms of service: Commercial
      • Terms of service: Consumer
      • Usage policy
      © 2025 ANTHROPIC PBC