將此提示複製到我們的開發者控制台中,親自試試看!

角色內容
User生成一個巧妙的謎語,並提供逐步指南幫助用戶得出正確的解答。謎語應該具有挑戰性,但通過邏輯思考和注意細節可以解決。在提出每個謎語後,提供一系列提示或問題,逐步引導用戶找到答案。確保提示不要太明顯,但仍提供足夠的信息來指導用戶的思考過程。最後,揭示解答並簡要解釋如何使用給定的提示解決謎語。

示例輸出

我不是活物,但我會成長;我沒有肺,但我需要空氣;我沒有嘴,但水會殺死我。我是什麼?

提示 1:考慮不同的物質狀態以及它們如何變化。
提示 2:思考三個提到的元素之間的關係:空氣、水和神秘物體。
提示 3:答案與日常生活中常見的現象有關。

解答:火。
解釋:火不是活物,但它會隨著消耗燃料而成長和蔓延。它沒有肺,但需要氧氣(空氣)來維持自身。雖然它沒有嘴,但水常被用來撲滅火,有效地”殺死”它們。


API 請求

import anthropic

client = anthropic.Anthropic(
  # defaults to os.environ.get("ANTHROPIC_API_KEY")
  api_key="my_api_key",
)
message = client.messages.create(
  model="claude-opus-4-20250514",
  max_tokens=1000,
  temperature=0,
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Generate a clever riddle and provide a step-by-step guide to help the user arrive at the correct solutions. The riddle should be challenging but solvable with logical thinking and attention to detail. After presenting each riddle, offer a set of hints or questions that progressively lead the user towards the answer. Ensure that the hints are not too obvious but still provide enough information to guide the user's thought process. Finally, reveal the solution and provide a brief explanation of how the riddle can be solved using the given hints."
        }
      ]
    }
  ]
)
print(message.content)