Google Google Cloud コンソールを使用して Gen AI Evaluation Service を始める方法について学習します。
始める前に
- アカウントにログインします。 Google Cloud を初めて使用する場合は、 アカウントを作成して、実際のシナリオで Google プロダクトのパフォーマンスを評価してください。 Google Cloud新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $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 バケットを指定します。
[評価] をクリックします。
評価結果を表示する
評価結果を表示するには:
コンソールで、[GenAI 評価] ページに移動します。 Google Cloud
[評価名] をクリックします。
評価データセット内の各プロンプトについて、レスポンスが評価結果とともに表示されます。
パートナー モデルを評価する
Gen AI Evaluation Service を使用して、次のパートナー モデルを評価できます。
- Anthropic
- Llama
パートナー モデルは、Vertex AI Model Garden でサポートされています。評価対象として選択する前に、Model Garden でパートナー モデルを有効にする必要があります。パートナー モデルを評価するには、評価の設定時にモデル選択メニューで選択します。
料金
サードパーティ モデルの評価の料金は、Vertex AI Model Garden でのモデル推論で発生した料金に基づきます。Vertex AI での生成 AI の料金ページをご覧ください。