Claude 的思考能力

Claude 模型入門

Nikhil Rangarajan

Data Scientist

什麼是 Claude 的思考模式?

  • 透過 thinking 參數啟用
  • 複雜問題的進階推理
  • 逐步的邏輯處理
  • 反思與決策
  • 思考過程透明

大腦的示意圖

Claude 模型入門

何時使用思考能力

$$

  • 多步驟問題解決
  • 需要推理鏈的分析
  • 權衡取捨的決策
  • 複雜邏輯謎題

拼圖

Claude 模型入門

思考任務的類型

  • 分析型:
    • 拆解複雜資訊
  • 策略型:
    • 規劃與決策
  • 創意型:
    • 探索可能與解法
  • 邏輯型:
    • 依循推理鏈

手持放大鏡的人物圖示,代表複雜任務.jpg

Claude 模型入門

範例:策略規劃

user_prompt = "Think through this business decision:
Should we launch our new product in Q1 or Q2?"
response = client.messages.create(
    model="claude-2",
    messages=[{"role": "user", 
               "content": user_prompt}],
    thinking={"type": "enabled", 
              "budget_tokens": 1024},
    max_tokens=1300)
  • 結構化的決策請求
  • thinking 參數啟用逐步推理
  • budget_tokens 至少為 1024,max_tokens 必須大於該預算
Claude 模型入門

範例:策略規劃

"""
Based on the above analysis, I recommend 
a phased global expansion strategy. 
Start by launching in one or two 
high-potential markets first (perhaps 
as pilot programs in Q1). Learn and 
adapt from those initial launches, then 
gradually expand to additional regions 
over the year once strategies are 
refined. This approach balances rapid 
growth with risk management, allowing 
adjustments for cultural fit and ...
"""
  • 兩段式回應:

    • 思考區塊
    • 最終答案
  • 最終答案以內部思考邏輯為依據

Claude 模型入門

一起來練習吧!

Claude 模型入門

Preparing Video For Download...