AI コーチ: ベスト プラクティス

AI コーチの提案を最適化するには、次の情報を提供する必要があります。

  • 一連の指示
  • 会話の文字起こし
  • API からのデータ

AI コーチは、適切な手順とエージェントの返信文候補を提供します。

最も有益な提案を受け取るには、次のシナリオで AI コーチを使用します。

アップセルとクロスセル

コンタクト センターのエージェントが別の商品やサービスを提案する必要がある場合、AI コーチは次の有益な情報を提供できます。

  • 販売を開始するタイミングと、販売を試みるべきでないタイミングを提案します。
  • 詳細を把握するための質問をして、お客様のニーズを理解します。
  • 会話のコンテキストに基づいて、短いリストから商品を推奨します。
  • 異議への対処方法を提案します。

顧客維持

コンタクト センターのエージェントが顧客に自社への残留を説得しようとしている場合、AI コーチは次のような役立つ情報を提供できます。

  • 解約防止の提案を行うタイミングを提案します。
  • 具体的な質問をして、お客様の解約理由を把握します。
  • 会話のコンテキストに基づいて、引き止め提案を推奨します。

ツールによるワンステップ自動化

AI コーチは、カスタマー サービスでの会話に基づいて、反復的なビジネス プロセスを自動化することもできます。

  • お客様が認証され、注文番号が提供されたときに注文ステータスを取得します。
  • 注文番号とキャンセルの理由がわかっている場合は、注文をキャンセルします。
  • リスクの高い自動化を構成して、手動での審査と承認を必須にします。

リスクの高いオペレーション

リスクの高いオペレーションは、財務上の大きな損失、データ漏洩、規制違反を引き起こす可能性のある自動化されたビジネス プロセスです。たとえば、認証なしでデータベースに書き込んだり、機密情報を取得したりするなどが挙げられます。AI コーチはタイミングを提案し、会話からパラメータを抽出できますが、リスクの高いオペレーションには手動での確認と承認が必要であり、完全に自動化することはできません。

AI コーチの手順

カスタマー サービス会話全体を通して、エージェントがどのようなアクションをいつ行うべきかを AI コーチに教える一連の手順を記述します。手順では、お客様にアカウント PIN を尋ねる注文ステータスを確認してお客様に伝えるキャンセル リクエストを送信するなど、エージェントのあらゆるアクションを指定できます。

AI コーチの指示には次の情報が含まれます。

  • タイトルの表示: 複数の手順を管理するのに役立ちます。表示タイトルは LLM に表示されません。

  • 詳細を表示: 指示が適用される場合にモデルが返す静的コンテンツを指定します。表示の詳細には、URL、内部ツールやシステムへのショートカット、エージェント向けのチートシート、バックエンド API 呼び出しなどがあります。これらの詳細は、人間のエージェントのみがアクセスできます。表示の詳細はモデルには表示されません。

  • 条件: 会話のどのタイミングで指示が適用されるかを指定します。条件はモデルに表示されます。

  • エージェントのアクション: 指示が適用される場合にエージェントが取るべき手順を指定します。エージェントのアクションはモデルに表示されます。

  • システム アクション: 指示が適用される場合に自動化に使用するツールを指定します。システム アクションがモデルに表示されます。

条件、エージェントのアクション、システムのアクションは、AI コーチの提案に影響します。

条件

条件は明確かつ簡潔で、自己完結型である必要があります。お客様の問題の簡単な説明を使用できます。商品に詳しくない一般の人に説明するようなつもりで、状態を記述します。有用な条件の例を次に示します。

  • お客様が注文のキャンセルを希望している。
  • お客様は新しいスマートフォンを購入したいと考えています。
  • お客様のインターネット接続が非常に遅い。

使用できる条件とエージェント アクションの例を次に示します。

  • 条件: お客様が配送先住所を新しい住所に更新するよう依頼している。
  • エージェントの対応: 新しい住所がまだ提供されていない場合は、配送に使用する新しい住所をお客様に確認します。

通常、会社の方針のテキストは、関連する条件が満たされた後にのみ表示されます。この例では、お客様が解約を希望した後にのみ、AI コーチが解約ポリシーを表示します。次の入力例では、会話の意図されたトピックが、表示タイトルと条件の両方に反映されています。エージェントに表示されるテキストの内容は、表示の詳細で定義されます。

AI コーチへの入力:

display_title: order cancellation
display_detail: Company cancellation policy: Orders cannot be canceled more than 30 days after they have been placed. Only the cancellation team can process order cancellations.
condition: the customer wants to cancel an order
agent_action: N/A

エージェントの対応

理想的には、次の 3 つの情報源に基づいてエージェント アクションの各ステップを確認できます。

  • 手順: 詳しくは、前のセクションをご覧ください。
  • 会話の文字起こし: カスタマー サービスでの会話全体を通して、エージェントとお客様が話した内容を記録します。
  • 取り込まれたデータ: 会話に直接含まれていない関連する顧客データ(最近の取引、請求書、進行中のプロモーションなど)で構成されます。

AI コーチが使用できる取り込みデータの例:

ingested_data_key: Product Recommendation
ingested_data_value:
* Microwave-safe, glass food container set, $29.99
* Gila Complete Window Film Application Kit, $19.99

データがありません

エージェント アクションで、他の指示や会話の文字起こしにない情報が必要な場合、取り込まれたデータを提供する API も、不足している情報を提供する必要があります。

  • これらのソースにない情報を必要とするアクションは記述しないでください。

  • 対応するデータが見つからない場合は、次のことを避けてください。

    • お客様に請求書を説明します。
    • 残高、期日、注文ステータスをお客様に伝える。

複数の動詞

上記のエージェント アクションのリストには、エージェントが実行するアクションを示す動詞が 1 つだけ含まれていますが、ステップには複数の動詞を含めることができます。たとえば、エージェントに特定の商品を推奨し、その商品を条件に関連付けることを 1 つのレスポンスで行うようにしたい場合は、次の入力のように 1 つのエージェント アクション ステップを記述できます。

display_title: recommend device protection
display_detail:
 trade-in process: [list steps for trade-in]
 device protection plan: [list plan details]
condition: the customer has issues/questions about trade-in
agent_action:
Recommend the device protection plan and tell the customer it can help them get better trade-in values in the future.

レスポンス出力の例

エージェント アクションでは、取り込まれたデータを利用して、サンプル レスポンス出力のテンプレートを指定することもできます。たとえば、推奨する商品が複数あり、エージェントが会話のコンテキストに関連する推奨事項を作成できるようにしたい場合、エージェント アクションによって AI コーチに特定の提案をサンプル レスポンス出力に表示させることができます。また、この例では、AI コーチにテンプレートに沿った回答例を生成するよう促すエージェント アクションの作成方法も示しています。

display_title: cross-selling
display_detail: see `Product Recommendations` for a relevant product
condition: the customer is inquiring about product availability
agent_action:
Summarize to the customer what product you have been discussing, then recommend a relevant product from the section titled "Product Recommendation" and provide a brief explanation of how the two products are relevant to each other. Use this template for sample responses: "Since we've been talking about ..., I'd like to recommend ... because ...".

Some examples:
- For TVs, recommend TV stands.
- For storage, recommend label writers.
- For slow cookers and microwaves, recommend food container sets.
- For air conditioners, recommend humidifiers.

マルチステップ アクション

最後に、エージェント アクションは複数のステップで構成できます。マルチステップ エージェント アクションは、単一の条件が満たされた場合にエージェントが会話をどのように進めるべきかを示します。

注文のキャンセルに関する会話の例を考えてみましょう。エージェントはキャンセルを処理する前に一連の質問をする必要があります。各ステップで個別のサンプル レスポンスが生成されます。

display_title: order cancellation
display_detail:
 cancellation policy: [list policies]
 look up `[order number]` in ordering system
 how to cancel an order [list steps]
condition: the customer wants to cancel an order
agent_action:
1. Ask the customer for the order number.
2. Ask the customer why they want to cancel the order.
3. Inform the customer you are working on the cancellation.
4. Inform the customer that you have canceled the order.
5. Inform the customer that they will receive the refund in 5-7 business days.

注文のキャンセルなどのステップは、追加の統合がないと確認が難しい場合があります。前の例では、解約手続き中であることをお客様に伝えるというステップに置き換えます。

システム アクション

システム アクションでは、すでに定義されているツールを参照できます。手順のこのセクションでは、手順の条件が満たされたときに考慮すべきツールを指定します。ツールへの参照は ${tool:tool_name|action_name} の形式にする必要があります。ツールの設定方法について詳しくは、OpenAPI と Integration Connectors のツールをご覧ください。

システム アクションの例を次に示します。

例 1: ツール名とアクション名の一覧を取得します。

...
system_action:
${tool:order_management|cancel_order}, ${tool:order_management|check_order}

例 2: 条件付き動作を追加します。

...
system_action:
* if "RESPONSE TO ${TOOL:ORDER_MANAGEMENT|CANCEL_ORDER}" is already present without any error, skip ${tool:order_management|cancel_order} 
* if the order number has been provided, use ${tool:order_management|cancel_order} 
* if "RESPONSE TO ${TOOL:GETORDERDETAILS|GETORDERDETAILS}" shows errors or failures, retry ${tool: order_management | cancel_order}

AI コーチでの包括的なガイダンスの使用

AI コーチには、包括的なガイダンスという構成可能なプロンプト セクションが追加されています。このセクションでは、次の内容を指定します。

  • 用語集
  • 回答候補のスタイル、形式、トーンに関するガイドライン
  • 手順の使用と実行に関する重要な注意事項

用語集

次の用語集では、脆弱な顧客アカウント認証を明確に定義しています。この用語集を包括的なガイダンスに含めることで、以前のバージョンの AI コーチのように用語を繰り返し定義する必要がなくなり、手順の中で用語を使用できるようになります。

#### Vulnerable customer

A customer is considered a vulnerable customer when at least one of the following is true:

- The customer is experiencing financial hardship.
- The customer has a physical disability or chronic health condition.
- The customer is facing domestic abuse or is in an unsafe situation.

#### Account authentication

Account authentication is considered completed if the account PIN provided by the customer matches the account PIN in the data section *Account PIN*.

スタイル、フォーマット、トーンに関するガイドライン

サンプル回答では、次のスタイル、形式、トーンのガイドラインに沿ってください。

  • 常に共感を示し、忍耐強く、安心感を与えるようにしてください。
  • くだけた表現やスラングは避けてください。敬意を払いながらも温かいトーンを維持します。
  • 回答では、お客様の気持ちや懸念を常に明示的に認める必要があります(例: 「ご不便をおかけして申し訳ございません」)。
  • 短い文を使用し、複雑な言葉や専門用語は避けます。
  • お客様を責めたり、反論したりしないでください。代わりに、正しい情報に誘導します。
  • お客様の主な懸念事項を明確に認識していることを示すことから、すべての回答を始めます。

指示実行に関するメモ

手順に沿って操作する方法に関するメモを追加します。自動候補の精度を高めるために、メモを使用して思考プロセスや推論プロセスを指定することもできます。

例 1: モデルの動作を構成する

### Follow instructions
* An instruction is applicable if and only if both of the following are true:
  * The condition is met by the conversation and the contexts.
  * Some of the agent actions are not completed yet. (If all the agent actions are done, then the instruction no longer applies.)
* Notes on following the applicable instructions:
  * Do not suggest any sample responses or agent actions that are not specified in the applicable instructions.
  * Do not ask for information not specified in the instructions.
  * If an agent action step is to ask for information that the customer has already provided, then the step should be skipped.
  * **Your suggested responses should fit into the conversation flow**. For example, if the customer and the support agent has moved on to a new issue, you should stop making suggestions for the old issue.
* Each sample response (or agent action suggestion) must be concise and only carry out one step in the applicable instruction. Do not cover multiple steps within one sample response (or agent action suggestion).
* Avoid repetition:
  * Do not suggest sample responses or agent actions that the agent has already said or done earlier in the conversation.
  * Do not ask for information that is already available in the conversation or the contexts.
* For product names, when you provide parameters in system action suggestions, provide the full names, including available specs.
* If multiple instructions lead to the same or similar suggestion, give one suggestion, but with multiple sources.

例 2: 指示の優先度を調整し、思考プロセスを指定して、より正確な候補を取得する

### Notes on how to use or follow instructions
If there are multiple instructions applicable at the same time, **suggest only one instruction as applicable based on the following priority (from highest to lowest)**:
* [Highest priority] security related

Example: Account authentication is required before anything else.

* [High priority] customer retention
* [Medium priority] issue resolution
* [Low priority] upselling or cross-selling

### Thinking process
Before you make any suggestions, answer the following questions in this output section:
* For each instruction, is it applicable? If yes, what is its priority?
* Which instruction has the highest priority?

次の例は、同じ指示の優先度と、特定の状況でモデルが提案すべき内容の例を示しています。

### Notes on how to use or follow instructions
If there are multiple instructions applicable at the same time, **suggest only one instruction as applicable based on the following priority (from highest to lowest)**:
* [Highest priority] security related

Examnple: Account authentication is required before anything else.

* [High priority] customer retention
* [Medium priority] issue resolution
* [Low priority] up-selling or cross-selling

#### Examples to follow
<example_1>
<instructions>
...
instruction I1
condition: the customer wants to inquire about their current plan
agent action: inform the customer of what plan they have and what features they get
...
instruction I2
condition: the authentication is not done yet
agent action: ask for the account PIN
...
</instructions>
<conversation>
customer: can you tell me what plan I have?
</conversation>
<good_suggestion>
may I have your account PIN, please?
</good_suggestion>
<bad_suggestion>
sure, let me pull up your account information.
</bad_suggestion>
<comment>
Both instructions I1 and I2 are applicable, but I1 should have the highest priority because it's security related. Therefore, asking for the account PIN is a good suggestion.
</comment>
</example_1>

AI コーチの出力言語

AI コーチは、指定された出力言語で提案を生成します。出力言語が指定されていない場合、モデルは候補の出力言語を決定します。

AI コーチの出力

AI コーチは、次の結果のいずれかまたは両方を返します。

  • 適用可能な手順: 複数の適用可能な手順を返すことができ、それぞれに表示タイトルと詳細があります。

  • 回答例: AI コーチは、エージェントが会話でどのように応答するかについての例も生成します。これらのサンプル レスポンスは、指示、会話のコンテキスト、取り込まれたデータに基づいています。サンプル レスポンスは空にすることもできます。

ユースケース

AI コーチには主に次の 3 つのユースケースがあります。

  • インテント検出: 現在適用可能な手順をエージェントにのみ表示し、サンプル レスポンスは必要ない場合に使用します。取り込まれたデータ(URL、Webhook、チートシートなど)は、エージェントに提案したり、取り込まれた API 呼び出しをトリガーしたりするために、表示の詳細に保存されます。

  • 手順ガイド: エージェントにサンプル レスポンスを通じて手順ガイドを表示する場合に使用します。

  • 商品のおすすめ: AI コーチを使用して、エージェントが顧客に商品を勧めるタイミングや、勧めるべき商品を判断できるようにする場合に使用します。商品のおすすめ候補は、ユーザーのおすすめシステムまたは静的カタログによって生成できます。

品質の向上

AI コーチの指示を作成する際の次の推奨事項は、サンプル レスポンスの品質向上に役立ちますが、AI コーチが予期しない提案を行うことを防ぐことはできません。

表示の詳細のテキスト形式

Markdown 構文を使用して、詳細をリッチ形式(リンク、太字など)で表示します。これは Google Cloud コンソール シミュレータでレンダリングされますが、ウェブ インターフェースでの実装にも役立ちます。

エージェント アクションのテキストの書式設定

AI コーチが特定のステップや要件を頻繁に見逃す場合は、太字のテキストを使用して、モデルが特定のテキストに注意を払うようにします。マークダウン構文で太字のテキストを作成するには、テキストの両側に 2 つのアスタリスクを追加します。

display_title: order cancellation
display_detail:
 cancellation policy: [list policies]
 look up `[order number]` in ordering system
 how to cancel an order [list steps]
condition: the customer wants to cancel an order
agent_action:
1. ask the customer for the order number
2. **ask the customer why they want to cancel the order**
3. inform the customer you are working on the cancellation
4. inform the customer that you have canceled the order
5. inform the customer that they will receive the refund in 5-7 business days

たとえば、エージェント アクションのすべてのステップが太字になっていると、太字の効果が薄れます。この手法は慎重に使用してください。

具体的な例を追加する

AI コーチが期待どおりのサンプル レスポンスを返さない場合は、エージェント アクションに期待するレスポンスの例を追加すると効果的です。次の詳細な例は、軽量な例(ハイライト表示)の使用方法を示しています。

display_title: smartwatch recommendation
display_detail: see `Smartwatch Catalog` for a relevant smartwatch
condition: the customer recently purchased phones
agent action:
recommend a specific smartwatch from the section titled "Smartwatch Catalog"; the recommendation should match the recently purchased phones from the section titled "Recent Purchases".
Following are some examples:
- For Galaxy phones, recommend Galaxy watch.
- For iPhones, recommend Apple Watch.
- For Pixel phones, recommend Pixel Watch. 
- For other phones, recommend Fitbit Sense.

軽量な例がない場合、AI コーチは Android 向け Apple Watch を提案するか、利用可能なすべてのスマートウォッチをリストします。軽量な例では、候補が正確になります。

メッセージ テンプレート

生成されたサンプル レスポンスの文言や形式を制御するには、エージェント アクションにメッセージ テンプレートや静的な固定メッセージを追加します。軽量の例とは異なり、これらのテンプレートでは、サンプル レスポンスで使用する正確な文言が示されています。メッセージ テンプレートをハイライト表示した例を次に示します。

display_title: bill explanation
display_detail:
 look up `[account number]`
 check `Recent Bills` to compare amounts
 https://www.[company name].com/promos
condition: the customer wonders why the bill is getting higher this month
agent_action:
1. ask the customer for the account number. use this fixed message for sample responses: "May I have your account number, please?"
2. compare the bills in the last two months from the section titled "Recent Bills" and inform the customer of the extra charge. use this template for sample responses: "Compared with last month, this month you have an extra charge for ..., which costs ..."

ガイド付き推論

1 つ以上の手順で、目標を達成するためのステップが不足しているか、目標を達成するための隠れた理由が明確になっていない目標が指定されている場合は、ステップを明確になるように変更します。たとえば、エージェントが商品を推奨するように指示された場合、推奨される商品は会話に関連している必要があります。会話のコンテキストを参照するサブタスクをエージェント アクションの先頭に追加して、AI コーチが関連性の高い提案を行えるようにします。

display_title: cross-selling
display_detail: sample response
condition: the customer is inquiring about product availability
agent_action:
summarize to the customer what product you have been discussing, then recommend a relevant product from the section titled "Product Recommendation" and provide a brief explanation of how the two products are relevant to each other. Use this template for sample responses: "Since we've been talking about ..., I'd like to recommend ... because ...".

この例では、会話に関連する商品を提案することが主なタスクです。AI コーチは要点を把握できず、[商品のおすすめ] セクションに表示されている最初の商品をおすすめすることがあります。サブタスクを追加すると、関連性が大幅に向上します。また、サブタスクの結果がサンプル レスポンスにスムーズに収まるように、エージェント アクションの最後にメッセージ テンプレートを追加します。

候補の重複除去を追加

AI コーチの提案の重複排除機能により、エージェントに重複した提案や類似性の高い提案が表示されるのを防ぐことができます。ジェネレータ プロトの SuggestionDedupingConfig フィールドを使用して、提案コンポーネント(指示、回答例など)を最近の提案の履歴と比較します。構成可能なしきい値を使用して、類似性の感度を調整できます。DuplicateCheckResult メッセージは、候補レスポンス内の重複除去チェックの結果を提供します。

候補の重複除去を構成する

AI コーチからの重複する提案を管理するには、ジェネレータの構成内で SuggestionDedupingConfig を構成します。

構成フィールド

SuggestionDedupingConfig には次のフィールドがあります。

  • enable_deduping: このブール値フィールドを true に設定すると、候補の重複除去機能が有効になります。false に設定するか未設定のままにすると、重複除去が無効になります。例:

    suggestion_deduping_config {
    enable_deduping: true
    }
    
  • similarity_threshold: 特定のフィールドで類似性に基づく重複除去を行う場合は、この浮動小数点型のしきい値を使用します。重複除去プロセスでは、類似度スコアがこの値よりも高い候補は重複と見なされます。スコアの範囲は 0.0 ~ 1.0 です。このフィールドを 0.0 に設定するか、未設定のままにすると、デフォルトのしきい値 0.8 が使用されます。例:

    suggestion_deduping_config {
    enable_deduping: true
    similarity_threshold: 0.85
    }
    

重複除去の仕組み

enable_deduping が true の場合、提案を過去の提案と比較できます。重複除去プロセスでは、次の候補フィールドごとに重複が評価されます。

  • 手順(applicable_instructions: 履歴の候補と完全に一致するかどうかを確認します。
  • レスポンスの例(sample_responses: 現在の候補と履歴の候補の類似性を確認します。類似度スコアが類似度しきい値を超えると、重複除去フラグは重複する結果を検出します。
  • エージェント アクション(agent_action_suggestions: 現在の候補と履歴の候補の類似性を、サンプル レスポンスと同様にチェックします。類似度スコアが類似度しきい値を超えると、重複除去フラグによって重複する結果が検出されます。重複除去チェックの結果は DuplicateCheckResult メッセージで返されます。

出力: DuplicateCheckResult

AgentCoachingSuggestion メッセージには、さまざまな種類の候補(AgentActionSuggestionSampleResponse)。これらの各フィールドには、履歴で検出された重複の可能性に関する情報を提供する DuplicateCheckResult メッセージが含まれます。例:

// Example within AgentActionSuggestion
message AgentActionSuggestion {
  // ... other fields ...
  DuplicateCheckResult duplicate_check_result = 3;
}

// Duplication check for the suggestion.
message DuplicateCheckResult {
  // The duplicate suggestions.
  repeated DuplicateSuggestion duplicate_suggestions = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (datapol.semantic_type) = ST_NOT_REQUIRED
  ];

  // The duplicate suggestion details.
  message DuplicateSuggestion {
    // The answer record ID of the past duplicate suggestion.
    string answer_record = 1 [
      (google.api.field_behavior) = OUTPUT_ONLY,
      (datapol.semantic_type) = ST_IDENTIFYING_ID
    ];
    // Sources for the suggestion.
    Sources sources = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
    // The index of the duplicate suggestion in the past suggestion list.
    int32 suggestion_index = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
    // The similarity score of between the past and current suggestion.
    // This is only populated for fields using similarity checks.
    float similarity_score = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

構成の例

この例のジェネレータ構成では、enable_deduping を true に設定することで、候補の重複排除機能を有効にしています。また、similarity_threshold の値を 0.75 に設定します。つまり、新しい候補のテキスト(サンプル レスポンスとエージェント アクションの場合)と過去の候補の類似性スコアが 0.75 以上の場合、重複除去は DuplicateCheckResult で重複としてフラグを設定します。

# Example Generator configuration with Deduping enabled
generator {
  # ... other generator fields ...

  suggestion_deduping_config {
    enable_deduping: true
    similarity_threshold: 0.75 # Optional: Adjusts sensitivity for similarity checks
  }

  # ... rest of generator config ...
}