サイトのデザインが新しくなりました。

【claude-prompt-engineer】ChatGPTを解約してClaude 3をもっと使いたくなるAIエージェントの使い方を解説

claude-prompt-engineer ChatGPT Claude-3 AIエージェント 使い方 解説

claude-prompt-engineerは、既に公開されていてGitHub上で5,300以上のスターを獲得している「gpt-prompt-engineer」の最新バージョンで、公開されたばかりのClaude 3 Opusを使用しています。

gpt-prompt-engineerは、タスクの説明といくつかのテスト ケースを入力するだけで、システムが多数のプロンプトを生成、テスト、ランク付けして、最もパフォーマンスの高いプロンプトを見つけてくれます。

claude-prompt-engineerでは、テストケースが自動生成され、ユーザーが複数の入力変数を定義できるようになったので、モデルの性能も相まって、さらに柔軟かつ強力になりました。

今回は、claude-prompt-engineerの概要や使ってみた感想をお伝えします。

是非最後までご覧ください!

なお弊社では、生成AIツール開発についての無料相談を承っています。こちらからお気軽にご相談ください。

目次

claude-prompt-engineerの概要

claude-prompt-engineerは、タスクの説明を入力するだけで、多数のプロンプトを生成、テスト、ランク付けして、最もパフォーマンスの高いプロンプトを見つけてくれるツールです。

GPT-4を超える性能を持つといわれるClaude 3 Opusを使用しており、従来のgpt-prompt-engineerよりさらに強力かつユーザーの指示に柔軟に対応できるようになりました。

プロンプトエンジニアリングは、ファインチューニング等に比べて低コストで簡単にLLMの性能を引き上げられる手法です。しかし、APIでプロンプトの効果検証を多く行うと、つまり多くのトークンを消費すると、かなりの時間やコスト等の負担がかかります。

それをプロンプトの生成から、テスト、評価まですべて自動で行ってくれるこのツールは、プロンプトエンジニアリングを次のステップに引き上げる可能性を秘めています。

そんなclaude-prompt-engineerの機能を紹介します。

プロンプト生成

Claude 3 Opusを使用して、ユーザーから与えれれた、AIに何を実行させたいかを説明するユースケースや入力変数をもとに、プロンプトを生成します。

この際、生成するプロンプトの数は指定できます。

Claude 3 Opusは比較的コストが高いので、出力のしすぎには注意しましょう。

テスト

claude-prompt-engineerは、ユーザーからの指示をもとに、自動でいくつかのテストケースを作成し、生成したすべてのプロンプトに対してテストを実行します。

テストでのパフォーマンスを比較し、ELO評価システムを使用してランク付けします。

ELO評価システム

ELO評価システムは、主にチェスなどの2人プレイヤーのゲームで使われるプレイヤーの相対的なスキルレベルを数値で評価するために開発されたシステムです。

claude-prompt-engineerでは、このシステムを使用し、各プロンプトのテストケースに対する応答を生成する際のパフォーマンスを比較して、数値化します。

各プロンプトは、ELO評価 1200から始まり、パフォーマンス評価に応じて数値が変化します。

実際に、テストで評価を行っている様子です。

引用元:https://github.com/mshumer/gpt-prompt-engineer/blob/main/README.md

数値化してランク付けすることにより、どのプロンプトが最も効果的であるかを簡単に確認できます。

これらの機能により、人間よりはるかに効率的にプロンプトエンジニアリングを行うことができ、実際にclaude-prompt-engineerの開発者は、このツールを日々の作業に利用し、大幅に効率化させているとのことです。

ここからは、claude-prompt-engineerの使い方を解説し、実際に使用してみようと思います。

なお、Claude 3について知りたい方はこちらの記事をご覧ください。
【Claude 3】GPT-4を超えるAnthropicのOpus、Sonnet、Haikuとは?使い方や料金も解説

claude-prompt-engineerのライセンス

claude-prompt-engineerはMITライセンスのもとで提供されており、商用利用や改変を行うことができます。

利用用途可否
商用利用⭕️
改変⭕️
配布⭕️
特許使用
私的使用⭕️
引用元:https://github.com/mshumer/gpt-prompt-engineer/blob/main/LICENSE

claude-prompt-engineerの使い方

claude-prompt-engineerは、Google Colabのデモノートブックが公開されており、基本的にはこちらを実行するだけです。

claude-prompt-engineer

注意点として、以下の画像の「ANTHROPIC_API_KEY = “ADD YOUR KEY HERE”」は自分のANTHROPIC_API_KEYに変更してください。

また、ユースケースや入力変数は、「In the cell below, fill in your description and input variables」にある以下の部分を変更してください。

今回は試しにそのまま実行してみましょう。

実行を開始すると、このようにテストが実施されていき…

最終的に以下の文章が出力されました!

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+-------------+----------------+-------+
|                                                                                                                                                                          Prompt                                                                                                                                                                         |       Rating       | SENDER_NAME | RECIPIENT_NAME | TOPIC |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+-------------+----------------+-------+
|                                                                                                                     Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:                                                                                                                    | 1263.656842847659  |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                                        {{TOPIC}}                                                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                   When writing the email, keep the following in mind:                                                                                                                                                   |                    |             |                |       |
|                                                                                                                      - Use an appropriate tone and level of formality based on the relationship between the sender and recipient.                                                                                                                       |                    |             |                |       |
|                                                                                                                    - Organize the email clearly with an opening greeting, body paragraphs discussing the main points, and a closing.                                                                                                                    |                    |             |                |       |
|                                                                                                                                            - Provide relevant details and explanations related to the topic.                                                                                                                                            |                    |             |                |       |
|                                                                                                                              - Ask any necessary follow-up questions or request any needed information from the recipient.                                                                                                                              |                    |             |                |       |
|                                                                                                                                         - Proofread the email for spelling, grammar, and clarity before sending.                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                      Please generate the full text of the email, using proper email formatting including a subject line, greeting, body, and signature. Let me know if you need any clarification or have questions about the task.                                                                     |                    |             |                |       |
| Your role is to act as an email assistant, crafting a personalized email response based on the provided sender, recipient, and topic information. Write the email in a style and tone appropriate for the relationship between the sender and recipient. Address all key points mentioned in the topic, and aim for a response length of 100-250 words. | 1227.7912241007662 |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                         The email should begin with a greeting to {{RECIPIENT_NAME}} and end with a signature from {{SENDER_NAME}}. The body of the email should thoroughly cover the {{TOPIC}} in a clear and organized manner.                                                                        |                    |             |                |       |
|                                                                                                        Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}}. The email should be focused on the following topic:                                                                                                       | 1186.2110994526113 |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                                        {{TOPIC}}                                                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                   When writing the email, keep the following in mind:                                                                                                                                                   |                    |             |                |       |
|                                                                 - Use an appropriate tone and level of formality based on the relationship between the sender and recipient. For example, an email between friends will be more casual than an email from an employee to their manager.                                                                 |                    |             |                |       |
|                                        - Structure the email with a clear opening, body, and closing. The opening should greet the recipient and state the purpose of the email. The body should elaborate on the main topic. The closing should summarize any key points or action items and sign off politely.                                        |                    |             |                |       |
|                                                                                                             - Provide relevant details and context related to the topic to make the email feel personalized and engaging for the recipient.                                                                                                             |                    |             |                |       |
|                                                                                                                       - Aim for an email length of around 150-250 words, adjusting as needed based on the complexity of the topic.                                                                                                                      |                    |             |                |       |
|                                                                                                                                           - Use proper grammar, spelling, and formatting throughout the email.                                                                                                                                          |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                        Output the entire email, including the opening and closing. Do not include any other text or commentary before or after the email content.                                                                                                       |                    |             |                |       |
|                                                                                                              You are an AI assistant tasked with writing personalized email responses. You will be provided with the following information:                                                                                                             | 1173.339915029818  |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                {{SENDER_NAME}}: The name of the person sending the email                                                                                                                                                |                    |             |                |       |
|                                                                                                                                          {{RECIPIENT_NAME}}: The name of the person the email is addressed to                                                                                                                                           |                    |             |                |       |
|                                                                                                                                        {{TOPIC}}: A brief 1-2 sentence summary of what the email should be about                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                        Using this information, generate a full email response that is tailored to the specific individuals and topic provided. The email should:                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                  - Have an appropriate subject line based on the topic                                                                                                                                                  |                    |             |                |       |
|                                                                                                                                                - Include a greeting that addresses the recipient by name                                                                                                                                                |                    |             |                |       |
|                                                                                                                        - Contain 2-4 paragraphs that elaborate on the given topic in a relevant way for the two parties involved                                                                                                                        |                    |             |                |       |
|                                                                                                                - Adopt a tone and style that makes sense given the relationship between sender and recipient (professional, casual, etc)                                                                                                                |                    |             |                |       |
|                                                                                                                                                   - Close with an appropriate sign-off from the sender                                                                                                                                                  |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                   Make sure the full email response is personalized and fits the unique context of the sender, recipient, and topic. The email should sound natural, as if it was written by the sender, while comprehensively addressing the key points of the topic.                                                  |                    |             |                |       |
|                                                                                                                     Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:                                                                                                                    | 1149.0009185691454 |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                                        {{TOPIC}}                                                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                                                                   When writing the email, keep the following in mind:                                                                                                                                                   |                    |             |                |       |
|                                                                                                                      - Use an appropriate tone and level of formality based on the relationship between the sender and recipient.                                                                                                                       |                    |             |                |       |
|                                                                                                                                   - Organize the email in a clear, logical manner with an opening, body, and closing.                                                                                                                                   |                    |             |                |       |
|                                                                                                                - Provide relevant details and information related to the topic to make the email informative and useful to the recipient.                                                                                                               |                    |             |                |       |
|                                                                                                                  - Ask questions or request feedback from the recipient where appropriate to encourage a response or further dialogue.                                                                                                                  |                    |             |                |       |
|                                                                                                                                         - Proofread the email for spelling, grammar, and clarity before sending.                                                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                                         If the email is work-related, maintain a professional tone. If it is a personal email, feel free to use a more casual and friendly tone.                                                                                                        |                    |             |                |       |
|                                                                                                                                                                                                                                                                                                                                                         |                    |             |                |       |
|                                                                                             Please generate the full text of the email, including a subject line. Limit the email to around 200 words or less. Sign the email as {{SENDER_NAME}} at the end.                                                                                            |                    |             |                |       |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------+-------------+----------------+-------+

少し見にくいですが、右側のRatingのところに数値がある行にプロンプトがあり、プロンプトは降順で表示されています。

一番高いスコアを獲得したプロンプトは、

Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:

{{TOPIC}}

When writing the email, keep the following in mind:

- Use an appropriate tone and level of formality based on the relationship between the sender and recipient.

- Organize the email clearly with an opening greeting, body paragraphs discussing the main points, and a closing.

- Provide relevant details and explanations related to the topic.

- Ask any necessary follow-up questions or request any needed information from the recipient.

- Proofread the email for spelling, grammar, and clarity before sending.

Please generate the full text of the email, using proper email formatting including a subject line, greeting, body, and signature. Let me know if you need any clarification or have questions about the task.

あなたのタスクは、次のトピックについて、{{SENDER_NAME}} から {{RECIPIENT_NAME}} に個別のメールを作成することです。

{{トピック}}

メールを書くときは、次の点に注意してください。

  • 送信者と受信者の関係に基づいて、適切な口調とフォーマルさのレベルを使用してください。
  • 冒頭の挨拶、要点を説明する本文の段落、そして結びで電子メールを明確に構成します。
  • トピックに関連する詳細と説明を提供します。
  • 必要なフォローアップの質問をするか、受信者に必要な情報を要求します。
  • 送信する前に、電子メールのスペル、文法、明瞭さを校正してください。

件名、挨拶、本文、署名などの適切な電子メール形式を使用して、電子メールの全文を生成してください。 説明が必要な場合やタスクに関する質問がある場合はお知らせください。

でした。

逆に、一番低いスコアを獲得したプロンプトは、

Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:

{{TOPIC}} 

When writing the email, keep the following in mind:
- Use an appropriate tone and level of formality based on the relationship between the sender and recipient. 

- Organize the email in a clear, logical manner with an opening, body, and closing.

- Provide relevant details and information related to the topic to make the email informative and useful to the recipient.

 - Ask questions or request feedback from the recipient where appropriate to encourage a response or further dialogue.

- Proofread the email for spelling, grammar, and clarity before sending.

If the email is work-related, maintain a professional tone. If it is a personal email, feel free to use a more casual and friendly tone. 

あなたのタスクは、次のトピックについて、{{SENDER_NAME}} から {{RECIPIENT_NAME}} に個別のメールを作成することです。

{{トピック}}

メールを書くときは、次の点に注意してください。

  • 送信者と受信者の関係に基づいて、適切な口調と形式レベルを使用します。
  • 電子メールは、冒頭、本文、結びで明確かつ論理的に構成されます。
  • 受信者にとって有益で有益な電子メールとなるよう、関連する詳細とトピックに関連する情報を提供します。
  • 応答やさらなる対話を促すために、必要に応じて受信者に質問したり、フィードバックを要求したりします。
  • 送信する前に、電子メールのスペル、文法、明瞭さを校正してください。

メールが仕事関連の場合は、プロフェッショナルな口調を維持してください。 個人的なメールの場合は、よりカジュアルでフレンドリーな口調を使用してください。

ほとんど同じプロンプトのように見えますが、100以上もスコアに差があります。

claude-prompt-engineerの実行にかかるコスト

ちなみに、今回はV100GPUを使用して、テストケース10個、プロンプト10個生成してもらいましたが、実行が終了するまでなんと1時間以上もかかり、コストも約8ドルもかかっていました…汗

正直、時間もお金もかかりすぎなので、これの半分程度(テストケース5個、プロンプト5個)かそれ以下が現実的かもしれません。

ここからは、先ほど得られた最高スコアと最低スコアのプロンプトを様々なモデルに入力して、結果は本当なのか検証してみます。

claude-prompt-engineerで生成されたプロンプトを実際に使ってみた

ここからは、先ほど生成した以下の最高スコアと最低スコアのプロンプトを、Claude 3 OpusとGPT-4に入力して、どのような出力が生成されるのか、スコア通りの出力になるのか検証します。

最高スコア

Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:

{{TOPIC}}

When writing the email, keep the following in mind:

- Use an appropriate tone and level of formality based on the relationship between the sender and recipient.

- Organize the email clearly with an opening greeting, body paragraphs discussing the main points, and a closing.

- Provide relevant details and explanations related to the topic.

- Ask any necessary follow-up questions or request any needed information from the recipient.

- Proofread the email for spelling, grammar, and clarity before sending.

Please generate the full text of the email, using proper email formatting including a subject line, greeting, body, and signature. Let me know if you need any clarification or have questions about the task.

あなたのタスクは、次のトピックについて、{{SENDER_NAME}} から {{RECIPIENT_NAME}} に個別のメールを作成することです。

{{トピック}}

メールを書くときは、次の点に注意してください。

  • 送信者と受信者の関係に基づいて、適切な口調とフォーマルさのレベルを使用してください。
  • 冒頭の挨拶、要点を説明する本文の段落、そして結びで電子メールを明確に構成します。
  • トピックに関連する詳細と説明を提供します。
  • 必要なフォローアップの質問をするか、受信者に必要な情報を要求します。
  • 送信する前に、電子メールのスペル、文法、明瞭さを校正してください。

件名、挨拶、本文、署名などの適切な電子メール形式を使用して、電子メールの全文を生成してください。 説明が必要な場合やタスクに関する質問がある場合はお知らせください。

最低スコア

Your task is to write a personalized email from {{SENDER_NAME}} to {{RECIPIENT_NAME}} about the following topic:

{{TOPIC}} 

When writing the email, keep the following in mind:
- Use an appropriate tone and level of formality based on the relationship between the sender and recipient. 

- Organize the email in a clear, logical manner with an opening, body, and closing.

- Provide relevant details and information related to the topic to make the email informative and useful to the recipient.

 - Ask questions or request feedback from the recipient where appropriate to encourage a response or further dialogue.

- Proofread the email for spelling, grammar, and clarity before sending.

If the email is work-related, maintain a professional tone. If it is a personal email, feel free to use a more casual and friendly tone. 

あなたのタスクは、次のトピックについて、{{SENDER_NAME}} から {{RECIPIENT_NAME}} に個別のメールを作成することです。

{{トピック}}

メールを書くときは、次の点に注意してください。

  • 送信者と受信者の関係に基づいて、適切な口調と形式レベルを使用します。
  • 電子メールは、冒頭、本文、結びで明確かつ論理的に構成されます。
  • 受信者にとって有益で有益な電子メールとなるよう、関連する詳細とトピックに関連する情報を提供します。
  • 応答やさらなる対話を促すために、必要に応じて受信者に質問したり、フィードバックを要求したりします。
  • 送信する前に、電子メールのスペル、文法、明瞭さを校正してください。

メールが仕事関連の場合は、プロフェッショナルな口調を維持してください。 個人的なメールの場合は、よりカジュアルでフレンドリーな口調を使用してください。

また、メールを送信する側をMax、受信する側をSaraという人物にしてプロンプトを入力します。

早速検証していきましょう!

Claude 3 Opus

claude-prompt-engineerは、Claude 3 Opusを使用しているので、Claude 3 Opusにとって最適なプロンプトになっていることを期待しましょう!

結果はこのようになりました。

最高スコア

以下のような回答を生成しました。

Thank you for the detailed instructions. To generate a personalized email from Max to Sara, I will need some additional information:

What is the relationship between Max and Sara (friends, colleagues, family members, etc.)? This will help determine the appropriate tone and level of formality.
What is the specific topic that Max needs to discuss with Sara in the email? Please provide the details that should be included in the {{TOPIC}} section.
Are there any necessary questions Max needs to ask Sara or is there any information he needs to request from her related to the topic?
Once you provide those details, I'll be happy to generate a full draft of the email, including a subject line, greeting, body paragraphs covering the key points, any follow-up questions, and a closing signature. 
Please let me know if you need any clarification on the additional information I'm requesting.

詳しい説明をありがとうございます。MaxからSaraへのパーソナライズされたメールを作成するには、追加情報が必要です:

MaxとSaraの関係(友人、同僚、家族など)を教えてください。これは、適切なトーンと形式的なレベルを決定するのに役立ちます。
マックスがサラとメールで話す必要のある具体的なトピックは何ですか?TOPIC}}セクションに含めるべき詳細を記入してください。
マックスがサラに尋ねる必要のある質問や、トピックに関連してサラに要求する必要のある情報はありますか?
これらの詳細をお知らせいただければ、件名、挨拶、主要なポイントをカバーする本文、フォローアップの質問、結びの署名など、Eメールの完全な草稿を作成させていただきます。また、追加情報の説明が必要な場合はお知らせください。

このように追加情報を求めてきたので、以下のように情報を提供しました。

Max:teacher
Sara:Student
TOPIC:About Homework

Max asks Sarah via email about her homework progress.

マックス:先生
サラ:学生
TOPIC:宿題について

マックスはサラにメールで宿題の進捗状況を尋ねます。

結果はこのようになりました。

Subject: Checking In - Homework Progress

Dear Sara,

I hope this email finds you well. I wanted to touch base with you regarding your homework assignments and see how you are progressing.

As we discussed in class, completing homework is an essential part of the learning process. It helps reinforce the concepts we cover during our lessons and provides an opportunity for you to practice and apply your knowledge independently.

I noticed that you have a few assignments that are coming due soon:

Math worksheet on fractions (due Wednesday)
English essay on the book we're reading (due Friday)
Science lab report (due next Monday)
I wanted to check in and see if you have any questions or if there are any areas where you feel you need additional guidance or support. Please don't hesitate to reach out if you need clarification on any of the assignment instructions or if you are having difficulty with a particular concept.

I'm here to help and want to ensure that you feel confident in your ability to complete your homework successfully. If you need any assistance, please let me know. We can arrange a time to meet and discuss any challenges you're facing.

Also, I wanted to remind you that I offer homework help sessions after school on Tuesdays and Thursdays. Feel free to drop by if you need some extra support or if you want to review any of the material we've covered in class.

Please keep me updated on your progress with your current assignments. If you have already completed some of them, please let me know so I can review your work and provide feedback.

Keep up the great work, Sara! I'm proud of the effort you're putting into your studies.

Best regards,
Mr. Max Johnson
7th Grade Math & Science Teacher
Oakwood Middle School

件名 チェックイン – 宿題の進捗状況

サラへ

このメールがあなたに届くことを願っています。宿題の進捗状況についてご連絡したいと思います。

クラスでお話ししたように、宿題をこなすことは学習プロセスの重要な一部です。宿題をこなすことは、授業で扱った概念の補強に役立ち、また、自分の知識を自主的に練習し、応用する機会を提供します。

もうすぐ締め切りの課題がいくつかあります:

分数に関する算数のワークシート(水曜日提出)
今読んでいる本についての英作文(金曜日締切)
科学実験レポート(来週月曜日提出)
何か質問がないか、あるいは追加の指導やサポートが必要だと思われるところがないか、確認したいと思います。課題についての説明や、特定の概念について困っていることがあれば、遠慮なく声をかけてください。

皆さんが自信を持って宿題に取り組めるよう、お手伝いさせていただきます。サポートが必要な場合は、私にお知らせください。お会いして、あなたが直面している問題について話し合う時間を設けることもできます。

また、火曜日と木曜日の放課後、宿題のお手伝いをしています。特別なサポートが必要な場合や、授業で扱った内容を復習したい場合は、気軽に立ち寄ってください。

現在提出されている課題の進捗状況を常に私に知らせてください。また、すでに課題を終えている場合は、私に知らせてください。

サラ、これからも頑張ってください!あなたが勉強に打ち込んでいることを誇りに思います。

よろしくお願いします
マックス・ジョンソン先生
7年生数学・理科教師
オークウッド中学校

人物の関係と宿題というキーワードしか与えていないにも関わらず、非常に詳細でリアルなメールを作成してくれました。

宿題の内容や、期限、サポート体制などが詳細に設定されており、プロンプトとモデルの優秀さが伺えます。

それでは最低スコアのプロンプトではどのような出力になるでしょうか。

最低スコア

以下のような回答を出力しました。

Thank you for the detailed instructions on writing a personalized email from Max to Sara. To generate the email, I will need some additional context and details, such as:

What is the relationship between Max and Sara? Are they friends, colleagues, family members, or have some other connection? Knowing this will help determine the appropriate tone and level of formality for the email.
What is the specific topic that Max is writing to Sara about? You mentioned "{{TOPIC}}" but I would need the actual topic filled in there in order to write relevant details and information in the email body.
What is the purpose of Max's email to Sara regarding this topic? Is he sharing information, asking a question, making a request, or something else?
Are there any other key details about Max, Sara, or the topic that would be helpful context to include?
Once I have a bit more information, I'll be happy to draft a personalized email from Max to Sara, following the helpful guidelines you provided around tone, organization, content, and proofreading. Please feel free to fill in those additional details, and I'll generate the email for you.

マックスからサラへのパーソナライズされたEメールの書き方について、詳しい説明をありがとうございました。メールを作成するためには、以下のような追加的な背景や詳細が必要です:

マックスとサラの関係は?MaxとSaraの関係は、友人なのか、同僚なのか、家族なのか、それとも他のつながりがあるのか?これを知ることで、メールの適切なトーンや形式的なレベルを決めることができます。
マックスがサラに書いている具体的なトピックは何ですか?トピック}}」とありますが、メール本文に関連する詳細や情報を書くためには、実際のトピックをそこに記入する必要があります。
このトピックに関するマックスのサラへのメールの目的は何ですか?彼は情報を共有しているのか、質問をしているのか、依頼をしているのか、それとも他の何かですか?
その他に、マックス、サラ、またはこのトピックに関する重要な詳細で、含めると役に立つ文脈はありますか?
もう少し詳しい情報がわかりましたら、トーン、構成、内容、校正など、ご提供いただいた有益なガイドラインに沿って、マックスからサラにパーソナライズしたメールを作成させていただきます。ご遠慮なく詳細をご記入ください。

こちらも先ほどと同じように追加情報を求めてきたので、同様の情報を提供します。

Max:teacher
Sara:Student
TOPIC:About Homework

Max asks Sarah via email about her homework progress.

マックス:先生
サラ:学生
TOPIC:宿題について

マックスはサラにメールで宿題の進捗状況を尋ねます。

結果はこのようになりました。

Subject: Checking In - Homework Progress

Dear Sara,

I hope this email finds you well. I wanted to touch base with you regarding your homework assignments and see how you are progressing.

As we discussed in class, consistently completing homework is crucial for reinforcing the concepts we cover during our lessons. It also helps me gauge your understanding of the material and identify any areas where you may need additional support.

I noticed that you haven't turned in the last couple of assignments. Is there anything I can help you with? If you are facing challenges with the homework, please don't hesitate to reach out. I'm here to support your learning and ensure that you feel confident in your understanding of the subject matter.

If you have any specific questions about the assignments or need clarification on any of the topics we've covered, I encourage you to visit me during office hours or schedule a time to discuss your concerns. Alternatively, if there are any extenuating circumstances affecting your ability to complete your homework, please let me know so that we can work together to find a solution.

I'm committed to your academic success and want to make sure you have the resources and support you need to thrive in this class. Please submit any outstanding assignments as soon as possible, and let's work together to get you back on track.

If you have any further questions or concerns, feel free to reply to this email or catch me before or after class.

Best regards,
Max Smith

件名 チェックイン – 宿題の進捗状況

サラへ

このメールがあなたに届くことを願っています。宿題の進捗状況についてご連絡したいと思います。

授業でお話ししたように、宿題を着実にこなすことは、授業で扱った概念を強化する上で非常に重要です。また、あなたの理解度を測り、追加サポートが必要な分野を特定するのにも役立ちます。

ここ数回、宿題を提出していないようですね。何かお手伝いできることはありますか。宿題で問題に直面している場合は、遠慮なく声をかけてください。私はあなたの学習をサポートし、あなたが教科の理解に自信を持てるようにします。

宿題について具体的な疑問がある場合、あるいはこれまでに取り上げたトピックについて明確な説明が必要な場合は、オフィスアワーに私を訪ねるか、あるいは相談する時間を予約することをお勧めします。また、宿題をやり遂げるのにやむを得ない事情がある場合は、私に知らせてください。

私はあなたの学業での成功に全力を尽くし、このクラスで成功するために必要なリソースとサポートを提供したいと考えています。未提出の課題はできるだけ早く提出してください。

ご質問やご不明な点がありましたら、このメールに返信していただくか、授業前または授業後にご連絡ください。

よろしくお願いします
マックス・スミス

こちらも、最高スコアのプロンプトとほぼ同様の内容、形式ですが、残りの宿題の具体的な名前や、提出期限、相談可能な曜日、中学校名などがなく、具体性に欠けるメールになっています。

普通は、これでも相当優秀な出力なのですが、先ほどの最高スコアのプロンプトでの出力が優秀すぎましたね。

結果は、スコア通りの出力の差があるように感じました。

GPT-4

続いて、先ほどのプロンプトをGPT-4にも入力して、どのような出力をするのか検証します。

最高スコア

以下のような回答を生成しました。

To assist you accurately, I'll need the specific topic that Max wants to discuss with Sara in the email. 
Could you please provide that information?

正確にお手伝いするためには、マックスがサラと話し合いたい具体的なトピックをメールに書いていただく必要があります。
その情報を提供していただけますか?

こちらもClaudeと同じように追加情報を求めてきましたが、トピックに関することのみのようです。

Claude 3 opusとの出力の差も比較したいので、提供する情報も同じものにします。

Max:teacher
Sara:Student
TOPIC:About Homework

Max asks Sarah via email about her homework progress.

マックス:先生
サラ:学生
TOPIC:宿題について

マックスはサラにメールで宿題の進捗状況を尋ねます。

結果はこのようになりました。

Subject: Checking In On Your Homework Progress

Dear Sara,

I hope this email finds you well and in good spirits. As we navigate through this semester, I've been keeping an eye on everyone's progress and wanted to check in with you specifically regarding your recent homework assignments.

Over the past few weeks, I've noticed a slight inconsistency in the submission of your homework. While I understand that each student's circumstances are unique, it's important to stay on top of these assignments to ensure a deep understanding of the material we're covering in class. Homework is not just a means of assessment but a critical part of the learning process, helping to reinforce concepts and skills introduced in class.

Could you share with me any challenges you might be facing that are affecting your ability to complete your homework? Whether it's issues with understanding the material, managing your time effectively, or anything else, I'm here to support you. If there are specific areas where you're struggling, please let me know, as I can provide additional resources or arrange for some extra help.

Furthermore, if you have any completed assignments that haven't been submitted yet, I encourage you to do so at your earliest convenience. Remember, it's better to turn in something rather than nothing at all, as it provides an opportunity for feedback and learning.

Lastly, I'd like to remind you of the importance of regular practice and review. Spending a little time each day on the subject can make a big difference in your understanding and retention of the material.

Please feel free to reply to this email or drop by during my office hours if you'd like to discuss this further or if there's anything else I can help with. Your success is my top priority, and I'm here to assist in any way I can.

Looking forward to hearing from you soon.

Best regards,

Max

件名 宿題の進捗状況について

サラへ

このメールを見て、あなたが元気でいることを祈っています。今学期を振り返って、皆さんの進歩に目を配ってきましたが、特に最近の宿題について確認したいと思います。

ここ数週間、宿題の提出に若干のばらつきがあることに気づきました。生徒それぞれの事情は理解していますが、授業で扱う内容を深く理解するためには、宿題をきちんとこなすことが大切です。宿題は単なる評価の手段ではなく、学習プロセスの重要な一部であり、授業で学んだ概念やスキルを強化するのに役立ちます。

宿題をこなす能力に影響するような問題に直面している可能性があれば、教えていただけますか?教材の理解、効果的な時間管理など、どんなことでもサポートします。具体的に困っている分野があれば、追加のリソースを提供したり、特別なヘルプを手配したりしますので、お知らせください。

さらに、まだ提出していない課題がある場合は、できるだけ早く提出することをお勧めします。何も提出しないよりは、何か提出した方が、フィードバックや学習の機会になります。

最後に、定期的な練習と復習の大切さを思い出してほしい。毎日少しずつでも時間を費やすことで、教材の理解と定着に大きな違いが生まれます。

このメールに返信していただくか、オフィスアワーにお立ち寄りください。あなたの成功が私の最優先事項であり、できる限りのお手伝いをさせていただきます。

ご連絡をお待ちしております。

よろしくお願いします、

マックス

面白いことに、Claude 3 Opusで最低スコアのプロンプトで出力された内容とほぼ同じものが出力されました。

メールの構成も内容もほとんど同じです。

違うモデルでここまで出力が似る原因は不明ですが、一つ言えることは、GPT-4は最高スコアのプロンプトでClaude 3 Opusの最低スコアのプロンプトでの出力と同等だということです。

最低スコア

以下のような回答を出力しました。

Of course, I can help with that! However, you haven't mentioned the specific topic for the email from Max to Sara. 
Could you please provide the topic you want to be addressed in the email?

もちろん、それについてはお手伝いできます!しかし、マックスからサラに送るメールの具体的なトピックが書かれていません。メールで取り上げてほしいトピックを教えていただけますか?

こちらも先ほどと同じように追加情報を求めてきたので、同様の情報を提供します。

Max:teacher
Sara:Student
TOPIC:About Homework

Max asks Sarah via email about her homework progress.

マックス:先生
サラ:学生
TOPIC:宿題について

マックスはサラにメールで宿題の進捗状況を尋ねます。

結果はこのようになりました。

Subject: Checking In On Your Homework Progress

Dear Sara,

I hope this message finds you well. As we've been diving into our new unit, I wanted to take a moment to check in with you regarding your homework assignments.

Understanding the material we're covering is crucial for your success in this course, and the homework assignments are designed to reinforce the lessons learned in class. With this in mind, I am curious about how you are finding the assignments so far. Are you facing any challenges with the content or the workload? Is there a particular area where you feel you need more support or clarification?

Please remember that my primary goal is to support your learning journey. If there are specific obstacles you're encountering, I encourage you to share them with me. Whether it's a need for additional resources, clarification on certain topics, or help with time management strategies, I'm here to assist.

Additionally, if you've found certain aspects of the assignments particularly engaging or helpful, I'd love to hear about that too. Your feedback is invaluable as it helps me tailor the course to better meet your needs and interests.

Could we perhaps set a time to discuss this further? If you're comfortable, I'd be more than happy to arrange a one-on-one meeting, whether in person or via a video call, to discuss your progress and any concerns you might have. Alternatively, feel free to reply to this email with your thoughts and any questions.

Looking forward to hearing from you soon, and remember, there's no concern too small to address. Let's work together to ensure you get the most out of this course.

Best regards,

Max

件名 宿題の進捗状況について

親愛なるサラへ

このメッセージがあなたのもとに届いていることを祈っています。新しいユニットに入ったので、宿題の進捗状況を確認したいと思います。

宿題は授業で学んだことを補強するためのものです。宿題は授業で学んだことを補強するためのものです。内容や仕事量について、何か問題に直面していますか?また、もっとサポートや説明が必要だと感じている分野はありますか?

私の第一の目標は、皆さんの学習をサポートすることであることを忘れないでください。具体的な問題があれば、ぜひ私に教えてください。追加資料の必要性であれ、特定のトピックに関する明確な説明であれ、時間管理戦略に関する支援であれ、私はお手伝いします。

さらに、課題のある側面が特に魅力的であったり、役に立ったりしたのであれば、それもぜひお聞かせください。あなたのフィードバックは非常に貴重であり、あなたのニーズや興味に合うようにコースを調整するのに役立ちます。

もしよろしければ、このことについて話し合う時間を設けていただけませんか?もしご都合がよろしければ、1対1のミーティングをセッティングさせていただければと思います。あるいは、このEメールに感想や質問をお気軽に返信してください。

すぐにご連絡をお待ちしております。このコースを最大限に活用できるよう、一緒に頑張りましょう。

よろしくお願いします

マックス

こちらは、宿題の提出を求めるのではなく、より生徒の感情に訴えかけるようなメールになっています。

生徒の学習のサポートが第一の目標であることを伝え、1対1のミーティングをセッティングするなど、最高スコアのプロンプトでの出力よりも生徒に寄り添うような内容になっています。

この結果からはどちらの方が優秀か判断はできません。

今回は、claude-prompt-engineerで生成された最も高いスコアを獲得したプロンプトと最も低いスコアを獲得したプロンプトを、Claude 3 OpusとGPT-4に入力してどのような出力になるのか検証しました。

結果は、Claude 3 Opusは概ねスコア通りの差が生じていると感じましたが、GPT-4ではそこまで差は感じず、今回の結果だけでは判断できませんでした。

ですが、Claude 3 OpusとGPT-4の結果を比較すると、今回の検証で最も優秀なメールを生成したのは、Claude 3 Opusであり、そのモデル性能の高さを改めて実感しました。

もしこの記事を読んで気になった方は是非試してみてください!

なお、GPT-4について知りたい方はこちらの記事をご覧ください。
GPT-4とは?GPT-4の使い方や料金体系、GPT-3.5との違い、API、画像入力の方法を解説!

claude-prompt-engineerを使って最適なプロンプトを生成しよう

claude-prompt-engineerは、タスクの説明を入力するだけで、多数のプロンプトを生成、テスト、ランク付けして、最もパフォーマンスの高いプロンプトを見つけてくれるツールです。

GPT-4を超える性能を持つといわれるClaude 3 Opusを使用しており、従来のgpt-prompt-engineerよりさらに強力かつユーザーの指示に柔軟に対応できるようになりました。

このツールは、Google Colabのノートブックが公開されており、APIキーとユースケース、入力変数を任意のものに変更するだけで実行できます。

実際に使ってみた感想は、非常に詳細で適切なプロンプトを生成してくれましたが、1回の実行に1時間以上かかり、APIの利用料金も8ドル以上かかってしまったので、生成されるテストケースやプロンプトの数はかなり少なめ(5個以下)にすることをお勧めします。

claude-prompt-engineerは、プロンプトエンジニアリングを大幅に効率化するだけでなく、さらに高いパフォーマンスを引き出すプロンプトの生成が可能であり、プロンプトエンジニアリングを次のステップに引き上げる可能性を秘めています。

もしこの記事を読んで気になった方は是非試してみてください!

サービス紹介資料

生成系AIの業務活用なら!

・生成系AIを活用したPoC開発

・生成系AIのコンサルティング

・システム間API連携

最後に

いかがだったでしょうか?

弊社では

・マーケティングやエンジニアリングなどの専門知識を学習させたAI社員の開発
・要件定義・業務フロー作成を80%自動化できる自律型AIエージェントの開発
・生成AIとRPAを組み合わせた業務自動化ツールの開発
・社内人事業務を99%自動化できるAIツールの開発
ハルシネーション対策AIツールの開発
自社専用のAIチャットボットの開発

などの開発実績がございます。

まずは、「無料相談」にてご相談を承っておりますので、ご興味がある方はぜひご連絡ください。

➡︎生成AIを使った業務効率化、生成AIツールの開発について相談をしてみる。

生成AIを社内で活用していきたい方へ

「生成AIを社内で活用したい」「生成AIの事業をやっていきたい」という方に向けて、生成AI社内セミナー・勉強会をさせていただいております。

セミナー内容や料金については、ご相談ください。

また、弊社紹介資料もご用意しておりますので、併せてご確認ください。

投稿者

  • ゆうや

    ロボット工学専攻。 大学時代は、対話ロボットのための画像キャプションの自動生成について研究。 趣味は、サウナとドライブ。

  • URLをコピーしました!
  • URLをコピーしました!
目次