Evaluate prompts in the Anthropic Console

Anthropic
9 Jul 202403:20

Summary

TLDR最近、Anthropic Workbenchに多くの改良が加えられ、Claudeを使った高品質なプロンプトの作成と展開が容易になりました。最新のプロンプト生成ツールを見てみましょう。タスクの高レベルな説明を詳細なプロンプトテンプレートに変換できます。顧客サポートのリクエストを例にすると、Claudeが詳細で具体的なプロンプトを書き始めます。プロダクションに展開する前に、現実的なデータでテストが必要です。Claudeはリアリスティックな入力データを自動生成し、評価機能で多くのテストケースを設定可能です。結果を比較し、プロンプトを調整して品質を向上させることができます。

Takeaways

  • 🛠️ アンソロピック・ワークベンチに多くの改善が加えられ、クロードを使いやすくして品質の高いプロンプトを開発・展開する手助けができます。
  • 📝 プロンプトジェネレーターを使用して、タスクの高レベルの説明を詳細なプロンプトテンプレートに変換できます。
  • 🤖 クロード3.5ソネットを使って、タスクに基づいて自動的にプロンプトを生成します。
  • 📑 顧客サポートリクエストの分類のようなタスクに対して、クロードは即座に詳細で具体的なプロンプトを書きます。
  • 🔍 プロンプトを本番環境に展開する前には、実際の顧客データを使用してパフォーマンスをテストすることが重要です。
  • 🧩 クロードを使って、プロンプトに基づいて現実的な入力データを自動生成できます。
  • 📊 新しい「評価」機能を使って、多様なテストケースを設定し、プロンプトのパフォーマンスを評価できます。
  • 📋 テストケースの生成ロジックはカスタマイズ可能で、既存のテストセットに適応できます。
  • 🔄 必要に応じて、生成ロジックを直接編集して、特定の要件に合わせて調整できます。
  • 📝 十分なテストケースが用意できたら、新しいテストスイートの結果を生成できます。
  • 📝 プロンプトの品質を評価し、必要に応じてプロンプトを更新して、より良い結果を得ることができます。
  • 🔄 テストスイートは再利用でき、新しいプロンプトを古いテストセットデータで再実行できます。
  • 📊 新しい結果と古い結果を比較して、品質の向上を確認できます。

Q & A

  • アンソロピック・ワークベンチの最近の改善点は何ですか?

    -アンソロピック・ワークベンチは、クロード3.5ソネットを使用して、タスクの高レベルの説明を詳細なプロンプトテンプレートに変換するプロンプトジェネレーターを更新し、リアルな顧客データを使用してプロンプトのパフォーマンスをテストし、自動的にリアルな入力データを生成する機能を追加しました。

  • クロードを使用してプロンプトを開発する際の利点は何ですか?

    -クロードは、タスクの説明に基づいて自動的に詳細で具体的なプロンプトを作成し、リアルな顧客データを使用してパフォーマンスをテストし、リアルな入力データを自動生成することができます。

  • リアルなテストデータを作成することはなぜ時間がかかるのでしょうか?

    -リアルなテストデータを作成することは、プロンプト自体を書くよりも時間がかかることがあります。なぜなら、現実の顧客データに忠実に、多様性と正確性を持つデータを収集し、整理する必要があるからです。

  • クロードで自動生成された入力データの利点は何ですか?

    -クロードで自動生成された入力データは、時間と労力を節約し、多様性と正確性を持つデータセットを作成することで、プロンプトのテストと評価を効率化します。

  • 新しい「評価」機能の目的は何ですか?

    -新しい「評価」機能は、さまざまなテストケースを設定し、プロンプトが広範囲のシナリオで実際に機能することを確認するために使用されます。

  • テストケースの生成ロジックはどのようにカスタマイズできますか?

    -テストケースの生成ロジックは、既存のテストセットに適応し、特定の要件に合わせて直接編集することができます。

  • テストケースをCSVからアップロードすることはできますか?

    -はい、テストケースをCSVファイルからアップロードすることができます。これはテストデータがすでにその形式で用意されている場合に特に便利です。

  • テスト結果を生成した後、どのように品質を評価しますか?

    -テスト結果を生成した後、各結果の品質を評価し、必要に応じてプロンプトを調整して、より良い結果を得ることができます。

  • プロンプトの改善が必要な場合、どのようにテストスイートを再実行しますか?

    -プロンプトを更新後、古いテストセットデータを使用してテストスイートを再実行し、新しいプロンプトが期待通りに機能することを確認できます。

  • 新しい結果と古い結果を比較することで何を得ることができますか?

    -新しい結果と古い結果を比較することで、改善がどの程度の影響を与えているかを確認し、平均的なグレードが向上しているかを評価できます。

  • プロンプトの改善に際して、どのように具体的な変更を加えますか?

    -例えば、評価時に理由が短すぎると感じた場合は、プロンプトで1文の理由を2文に更新することができます。

Outlines

00:00

🛠️ アンソロピックワークベンチの改善

最近のアップデートにより、アンソロピックワークベンチは、クロード3.5ソネットを用いて、タスクの高レベルの説明を詳細なプロンプトテンプレートに変換するプロンプトジェネレーターを備えています。このプロセスは、カスタマーサポートリクエストの分類など、特定のタスクに基づいてプロンプトを作成し、実際の顧客データを使用してパフォーマンスをテストし、リアルな入力データを自動生成することができます。

📝 プロンプトのテストと評価

プロンプトを生成した後、実際の顧客データでテストを行い、そのパフォーマンスを評価することが重要です。新しい「評価」機能を使用して、多数のテストケースを設定し、カスタマイズ可能なテストケース生成ロジックを活用して、広範な代表的なテストケースを生成することができます。CSVからテストケースをアップロードすることもでき、特定の要件に基づいて生成ロジックを直接編集することができます。

🔍 結果のグレードと比較

テストケースの結果を生成し、グレードを付けることで、プロンプトの質を判断します。もし、例えば、理由が短すぎると感じた場合は、プロンプトを更新して2つの文に理由を拡張することができます。更新されたプロンプトを再実行し、テストセットデータを再利用して、新しい結果を生成し、グレードを付けることができます。新旧の結果を比較して、改善された点を確認することができます。

Mindmap

Keywords

💡Anthropic Workbench

Anthropic Workbenchは、Claudeのための高品質なプロンプトを開発および展開するのを容易にするツールです。ビデオでは、Anthropic Workbenchの新しい機能を使ってプロンプトを生成し、テストデータを作成し、評価する過程が説明されています。

💡プロンプト生成器

プロンプト生成器は、タスクの高レベルな説明を詳細なプロンプトテンプレートに変換するツールです。ビデオでは、顧客サポートリクエストのトリアージを行うためのプロンプトが生成される例が示されています。

💡Claude 3.5 Sonnet

Claude 3.5 Sonnetは、プロンプト生成に使用されるAIモデルです。ビデオでは、このモデルがタスクの詳細で具体的なプロンプトを即座に生成する様子が紹介されています。

💡トリアージ

トリアージは、顧客サポートリクエストを優先順位付けして処理するプロセスです。ビデオでは、生成されたプロンプトがどのようにトリアージ決定を行うかが説明されています。

💡リアリスティックなテストデータ

リアリスティックなテストデータは、実際の顧客データに近い形で生成されるテストデータです。ビデオでは、プロンプトの性能をテストするために、Claudeを使って自動生成された顧客サポートリクエストが使用されています。

💡Evaluate機能

Evaluate機能は、生成されたプロンプトの性能を様々なテストケースで評価するためのツールです。ビデオでは、広範な代表的なテストケースを生成し、評価するプロセスが示されています。

💡テストケース生成ロジック

テストケース生成ロジックは、既存のテストセットに適応し、特定の要件に合わせてカスタマイズ可能なテストケースを生成するメカニズムです。ビデオでは、このロジックを編集して特定の要件に対応する方法が紹介されています。

💡テストスイート

テストスイートは、評価のためにまとめられた複数のテストケースの集合です。ビデオでは、生成されたテストスイートに対して新しいプロンプトを実行し、その結果を評価する過程が示されています。

💡グレード

グレードは、生成された結果の品質を評価するための基準です。ビデオでは、プロンプトの出力結果を評価し、必要に応じてプロンプトを修正する過程が説明されています。

💡結果の比較

結果の比較は、新しい結果と古い結果を並べて評価するプロセスです。ビデオでは、新しいプロンプトによる出力結果が以前の結果と比較され、全体的な評価が改善されたことが示されています。

Highlights

Improvements to the Anthropic Workbench for easier development and deployment of high-quality prompts for Claude.

Introduction of the updated prompt generator using Claude 3.5 Sonnet.

Automatic conversion of high-level task descriptions into detailed prompt templates.

Triage of customer support requests as an example task for the prompt generator.

Claude's ability to write prompts based on the given task description.

Necessity of testing prompts with realistic customer data before production deployment.

Automatic generation of realistic input data using Claude to simulate customer support requests.

Evaluation of prompt performance with a specific support request.

Introduction of the new Evaluate feature for testing prompts across a broad range of scenarios.

Capability to set up multiple test cases and upload from a CSV file.

Customizable test case generation logic to adapt to existing test sets.

Direct editing of generation logic for specific requirements.

Generation of results for the new test suite to evaluate prompt quality.

Adjusting prompt specifications based on evaluation feedback, such as justification length.

Rerunning the prompt with updated specifications to see improved results.

Utilization of the evaluate tab to rerun the new prompt against the old test set data.

Grading and comparing new outputs against old results for better performance assessment.

Transcripts

play00:00

We've recently made a number of improvements to the Anthropic Workbench

play00:04

that make it easier to develop and deploy high-quality prompts for Claude.

play00:08

Let's see how it works by taking a look at our recently updated prompt generator.

play00:12

You can use the prompt generator to take a high-level description of a task and convert

play00:16

it into a detailed prompt template using Claude 3.5 Sonnet.

play00:20

In this case, let's imagine we need to triage customer support requests.

play00:24

As you can see, Claude immediately starts writing a prompt based off of our task.

play00:28

It's detailed and specific and looks like it should work.

play00:32

But, before we deploy it to production, we should really test to see how it performs

play00:36

with realistic customer data.

play00:39

Coming up with realistic test data can be time-consuming and it can take longer than

play00:43

writing the prompt itself.

play00:45

You can now use Claude to automatically generate realistic input data based off of your prompt.

play00:50

In this case, we can generate a customer support request.

play00:54

This one looks good, so let's see how the prompt works with this particular support request

play01:01

This seems pretty good.

play01:02

It's providing a justification and a triage decision.

play01:06

But how do we know that we didn't get lucky?

play01:08

How do we know that this prompt is actually going to work in a broad range of scenarios?

play01:12

That's where the new Evaluate feature comes in.

play01:15

You can use the Evaluate page to set up as many test cases as you want.

play01:20

Let's keep generating a broad range of representative test cases.

play01:24

You can also upload test cases from a CSV if you happen to have the test data in it.

play01:30

Test case generation logic is highly customizable and adapts to your existing test set.

play01:36

If you have highly specific requirements, you can directly edit the generation logic

play01:41

yourself.

play01:42

Once you have enough test cases ready, you can generate results for your new test suite.

play01:57

Alright, these results look pretty good, so let's go and grade their quality.

play02:01

Maybe we decide when we're evaluating them that we actually felt that the justifications

play02:06

were a little brief.

play02:07

We'd like them to be a bit longer.

play02:10

Well, we can go back to the prompt and find the section where it specified a one sentence

play02:16

justification and update it to a two sentence justification.

play02:22

We can rerun the prompt, and just as we'd hope, we're seeing a two sentence justification.

play02:30

So let's go back to the evaluate tab, and thankfully, our test suite is still there.

play02:36

So it can rerun the new prompt against the old test set data.

play02:43

And just as we hoped, they're all just a little bit longer.

play02:47

We can go and grade these new outputs.

play02:50

We're happier with these ones.

play02:54

But just to be sure, we can actually compare these new results against the old results.

play03:02

And here we can see, side by side, the results are longer.

play03:06

We're still getting similar triage decisions, but our grading, on average, is better.

Rate This

5.0 / 5 (0 votes)

Related Tags
プロンプトジェネレータークロード3.5テストケース評価機能カスタマイズサポートリクエスト自動生成トライアージュリアルデータフィードバック
Do you need a summary in English?