Google Google Cloud コンソールを使用して Gen AI Evaluation Service を始める方法について学習します。
始める前に
- Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオでの Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Storage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- Click Select a role, then search for the role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Storage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- Click Select a role, then search for the role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
モデルを評価する
モデルを評価する手順は次のとおりです。
Google Cloud コンソールで、[生成 AI 評価] ページに移動します。
[新しい評価] をクリックして、評価ページを開きます。
評価用のデータセットを読み込むソースを選択します。
ローカルの CSV ファイルまたは JSONL ファイルをアップロードするには、[ファイルをアップロード] を選択します。データセットには、プロンプト テンプレートで使用するプロンプトまたはレコードと、必要に応じてモデルのレスポンスを含める必要があります。最大 200 行です。
プロンプト テンプレートからプロンプトを生成するには、[データを生成] を選択します。Gen AI Evaluation Service は、データセットの作成時にプロンプト テンプレートで定義した変数を生成して設定します。プロンプト テンプレートの作成の詳細については、プロンプト テンプレートを使用するをご覧ください。
[プロンプト テンプレート] フィールドに、変数を含むプロンプト テンプレートを入力します。
各変数の説明を追加したり、生成するサンプル数を指定したりするには、[変数を定義してサンプルサイズを指定する] を展開します。
[データセットを生成] をクリックして、プロンプトを生成します。
プロンプトに基づいて回答を生成して評価します。
[評価候補] セクションで、[評価候補を追加] をクリックします。候補がすでに存在する場合は、 [編集] をクリックして、評価するプロンプトとレスポンスを定義します。たとえば、アップロードしたファイルまたは生成されたデータからプロンプトやレスポンスを指定できます。
複数の候補を比較するには、[比較候補を追加] をクリックします。
[指標] セクションで、候補者の回答の質をスコア付けする指標を 1 つ以上追加します。指標タイプの詳細については、Gen AI Evaluation Service の概要ページの評価指標をご覧ください。
一部の適応型ルーブリックでは、[詳細] を開いて
Evaluate the dataset on cultural sensitivityなどのカスタム指示を入力することで、各プロンプトから生成されるルーブリックを調整できます。- [名前とストレージの構成] セクションで、評価の名前と、評価結果が保存される Cloud Storage バケットを指定します。
[評価] をクリックします。
評価結果を表示する
評価結果を表示するには:
Google Cloud コンソールで、[生成 AI 評価] ページに移動します。
[評価名] をクリックします。
評価データセット内の各プロンプトについて、レスポンスが評価結果とともに表示されます。
パートナー モデルを評価する
Gen AI Evaluation Service を使用して、次のパートナー モデルを評価できます。
- Anthropic
- Llama
パートナー モデルは、Gemini Enterprise Agent Platform Model Garden でサポートされています。評価用に選択する前に、Model Garden でパートナー モデルを有効にする必要があります。パートナー モデルを評価するには、評価の設定時にモデル選択メニューで選択します。
料金
サードパーティ モデルの評価の料金は、Gemini Enterprise Agent Platform Model Garden でモデル推論に発生した料金に基づきます。Agent Platform の生成 AI の料金ページをご覧ください。