チュートリアル: コンソールを使用して評価を行う

Google Google Cloud コンソールを使用して Gen AI Evaluation Service を始める方法について学習します。

始める前に

  1. アカウントにログインします。 Google Cloud を初めて使用する場合は、 アカウントを作成して、実際のシナリオで Google プロダクトのパフォーマンスを評価してください。 Google Cloud新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Make sure that you have the following role or roles on the project: Storage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. 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.

    4. 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

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  5. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Make sure that you have the following role or roles on the project: Storage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. 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.

    4. 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

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.

モデルを評価する

モデルを評価する手順は次のとおりです。

  1. Google Cloud コンソールで、[生成 AI 評価] ページに移動します。

    [評価] に移動

  2. [新しい評価] をクリックして、評価ページを開きます。

  3. 評価用のデータセットを読み込むソースを選択します。

    • ローカルの CSV ファイルまたは JSONL ファイルをアップロードするには、[ファイルをアップロード] を選択します。データセットには、プロンプト テンプレートで使用するプロンプトまたはレコードと、必要に応じてモデルのレスポンスが含まれている必要があります。最大 200 行です。

    • プロンプト テンプレートからプロンプトを生成するには、[データを生成] を選択します。 Gen AI Evaluation Service は、データセットの作成時にプロンプト テンプレートで定義した変数を生成して入力します。プロンプト テンプレートの作成の詳細については、プロンプト テンプレートを使用するをご覧ください。

      1. [プロンプト テンプレート] フィールドに、変数を含むプロンプト テンプレートを入力します。

      2. 各変数の説明を追加したり、生成するサンプルの数を指定したりするには、[変数を定義してサンプルサイズを指定] を展開します。

      3. [データセットを生成] をクリックしてプロンプトを生成します。

  4. プロンプトに基づいてレスポンスを生成して評価します。

    1. [評価候補] セクションで、[評価候補を追加] をクリックします。候補がすでに存在する場合は、 [編集] をクリックして、評価するプロンプトと レスポンスを定義します。たとえば、アップロードしたファイルまたは生成されたデータからプロンプトまたはレスポンスを指定できます。

    2. 複数の候補を比較するには、[比較候補を追加] をクリックします。

    3. [指標] セクションで、候補のレスポンスの品質をスコア付けする指標を少なくとも 1 つ追加します。指標タイプの詳細については、Gen AI Evaluation Service の概要ページの 評価指標 セクションをご覧ください。

    一部の適応型ルーブリックでは、[詳細設定] を展開し、Evaluate the dataset on cultural sensitivityなどのカスタム手順を指定することで、各プロンプトから生成されるルーブリックを調整できます。

    1. [名前とストレージ構成] セクションで、評価の名前と、評価結果が保存される Cloud Storage バケットを指定します。
  5. [評価] をクリックします。

評価結果を表示する

評価結果を表示するには:

  1. コンソールで、[GenAI 評価] ページに移動します。 Google Cloud

    [評価] に移動

  2. [評価名] をクリックします。

    評価データセット内の各プロンプトについて、レスポンスが評価結果とともに表示されます。

パートナー モデルを評価する

Gen AI Evaluation Service を使用して、次のパートナー モデルを評価できます。

  • Anthropic
  • Llama

パートナー モデルは、Vertex AI Model Garden でサポートされています。評価対象として選択する前に、Model Garden でパートナー モデルを有効にする必要があります。パートナー モデルを評価するには、評価の設定時にモデル選択メニューで選択します。

料金

サードパーティ モデルの評価の料金は、Vertex AI Model Garden でのモデル推論で発生した料金に基づきます。Vertex AI での生成 AI の料金ページをご覧ください。

次のステップ