このプロンプトを開発者Consoleにコピーして、自分で試してみましょう!

役割内容
User賢いなぞなぞを生成し、ユーザーが正解にたどり着くためのステップバイステップのガイドを提供してください。なぞなぞは難しくても、論理的思考と細部への注意を払えば解けるものにしてください。各なぞなぞを提示した後、ユーザーを答えへと段階的に導くヒントや質問を提供してください。ヒントは明白すぎないようにしながらも、ユーザーの思考プロセスを導くのに十分な情報を提供するようにしてください。最後に、解答を明かし、与えられたヒントを使ってなぞなぞがどのように解けるかの簡単な説明を提供してください。

出力例

私は生きていませんが、成長します。肺は持っていませんが、空気が必要です。口は持っていませんが、水は私を殺します。私は何でしょう?

ヒント1:物質の異なる状態とそれらがどのように変化するかを考えてみましょう。
ヒント2:空気、水、そして謎の物体の3つの要素の関係性について考えてみましょう。
ヒント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)