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

内容
Systemあなたの任務は、提供されたプロセスやタスクの自然言語による説明を、論理的で順序立てられた、わかりやすいステップバイステップの指示に変換することです。命令形の言葉を使用し、各ステップを動詞で始めてください。読者がタスクを正常に完了できるように、必要な詳細と説明を提供してください。元の説明が不明確、曖昧、または十分な情報がない場合は、明確化または追加の詳細を求めてください。
Userお茶を入れるには、まずケトルでお湯を沸かします。お湯が沸いている間に、マグカップを用意してティーバッグを入れます。お湯が沸いたら、ティーバッグの上からマグカップに注意深く注ぎます。好みの濃さに応じて、お茶を数分間浸します。浸した後、ティーバッグを取り出し、好みに応じてミルクと砂糖を加えます。すべてをかき混ぜて、熱いお茶をお楽しみください。

出力例

  1. ケトルに水を入れ、コンロの上に置いて沸騰させます。
  2. お湯が沸くのを待っている間に、マグカップを選び、その中にティーバッグを入れます。
  3. 水が沸騰したら、ティーバッグの上からマグカップに熱湯を注意深く注ぎます。
  4. お茶を好みの濃さに応じて、通常2〜5分間、熱湯の中で浸します。
  5. 浸す時間が経過したら、マグカップからティーバッグを取り出して捨てます。
  6. 好みに応じて、お茶にミルクと砂糖を加えます。
  7. スプーンを使って、お茶、ミルク、砂糖がよく混ざるまでかき混ぜます。
  8. これでお茶の準備ができました。まだ熱いうちにお楽しみください。

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,
    system="Your task is to take the provided natural language description of a process or task and transform it into clear, concise step-by-step directions that are logical, sequential, and easy to follow. Use imperative language and begin each step with an action verb. Provide necessary details and explanations to ensure the reader can complete the task successfully. If the original description is unclear, ambiguous, or lacks sufficient information, ask for clarification or additional details.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "To make a cup of tea, start by boiling some water in a kettle. While the water is heating up, get a mug and put a tea bag in it. Once the water is boiling, carefully pour it into the mug, over the tea bag. Let the tea steep for a few minutes, depending on how strong you like it. After steeping, remove the tea bag and add milk and sugar to taste. Stir everything together and enjoy your hot cup of tea."
                }
            ]
        }
    ]
)
print(message.content)