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
    測試與評估

    使用評估工具

    Claude Console 具有評估工具功能,讓您可以在各種情境下測試您的提示。

    存取評估功能

    要開始使用評估工具:

    1. 開啟 Claude Console 並導航到提示編輯器。
    2. 撰寫完提示後,在螢幕頂部尋找「評估」標籤。

    存取評估功能

    確保您的提示包含至少 1-2 個使用雙大括號語法的動態變數:{{variable}}。這是建立評估測試集的必要條件。

    生成提示

    Console 提供內建的 提示生成器,由 Claude Opus 4.1 驅動:

    1. 1

      點擊「生成提示」

      點擊「生成提示」輔助工具將開啟一個模態視窗,讓您輸入任務資訊。

    2. 2

      描述您的任務

      描述您想要的任務(例如,「分類入站客戶支援請求」),可以提供詳細或簡略的描述。您提供的上下文越多,Claude 就越能針對您的特定需求量身定制生成的提示。

    3. 3

      生成您的提示

      點擊底部的橙色「生成提示」按鈕,Claude 將為您生成高品質的提示。然後您可以使用 Console 中的評估螢幕進一步改善這些提示。

    此功能讓建立具有適當變數語法的提示變得更容易,以便進行評估。

    提示生成器

    建立測試案例

    當您存取評估螢幕時,您有幾個選項來建立測試案例:

    1. 點擊左下角的「+ 新增行」按鈕手動新增案例。
    2. 使用「生成測試案例」功能讓 Claude 自動為您生成測試案例。
    3. 從 CSV 檔案匯入測試案例。

    要使用「生成測試案例」功能:

    1. 1

      點擊「生成測試案例」

      Claude 將為您生成測試案例,每次點擊按鈕時一次生成一行。

    2. 2

      編輯生成邏輯(可選)

      您也可以透過點擊「生成測試案例」按鈕右側的箭頭下拉選單,然後點擊彈出的變數視窗頂部的「顯示生成邏輯」來編輯測試案例生成邏輯。您可能需要點擊此視窗右上角的「生成」來填入初始生成邏輯。

      編輯此項目可讓您自訂和微調 Claude 生成的測試案例,以獲得更高的精確度和特異性。

    以下是包含多個測試案例的已填入評估螢幕範例:

    已填入的評估螢幕

    如果您更新原始提示文字,您可以對新提示重新執行整個評估套件,以查看變更如何影響所有測試案例的效能。

    有效評估的技巧

    使用 Console 中的「生成提示」輔助工具快速建立具有適當變數語法的提示以進行評估。

    理解和比較結果

    評估工具提供多項功能來幫助您改善提示:

    1. 並排比較:比較兩個或多個提示的輸出,快速查看您的變更所產生的影響。
    2. 品質評分:使用 5 分制對回應品質進行評分,以追蹤每個提示的回應品質改善情況。
    3. 提示版本控制:建立提示的新版本並重新執行測試套件,以快速迭代和改善結果。

    透過檢視各測試案例的結果並比較不同的提示版本,您可以發現模式並更有效率地對提示進行明智的調整。

    立即開始評估您的提示,使用 Claude 建立更強健的 AI 應用程式!

      © 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