将此提示复制到我们的开发者控制台中,亲自尝试!

角色内容
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-3-7-sonnet-20250219",
  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)

Was this page helpful?