Amazon Q in Connect で生成 AI を活用したセルフサービスを使用する - Amazon Connect

Amazon Q in Connect で生成 AI を活用したセルフサービスを使用する

ヒント

「AWSワークショップ: Amazon Q in Connect セルフサービスのカスタマイズ」のコースを確認してください。

Amazon Q in Connect は、チャットおよび音声 (IVR) チャンネルでのカスタマーセルフサービスのユースケースをサポートしています。以下を行うことができます。

  • 顧客の質問に回答する。

  • ステップバイステップガイダンスを提供する。

  • 予約の再スケジュールや旅行の予約などのアクションを完了する。

顧客が追加のサポートを必要とする場合、Amazon Q in Connect は会話全体のコンテキストを維持しながら、シームレスにエージェントに転送します。

デフォルトのシステムツール

Amazon Q in Connect には、すぐに使用可能な以下のツールを備えています。

  1. QUESTION: 他のツールがクエリに直接対処できない場合に、回答を提供し、関連情報を収集します。

  2. ESCALATION: お客様が人的支援をリクエストすると、エージェントに自動的に転送されます。

    注記

    ESCALATION を選択すると、[顧客の入力の取得] ブロックの [エラー] ブランチが作成されます。

  3. CONVERSATION: 具体的な顧客の意図がない場合に、基本的な対話を行います。

  4. COMPLETE: 顧客のニーズが満たされたときにやり取りを終了します。

  5. FOLLOW_UP_QUESTION: 顧客との対話をよりインタラクティブで情報収集できるようにします。このツールの使用の詳細については、「FOLLOW_UP_QUESTION ツール」を参照してください。

これらのデフォルトツールは、特定の要件を満たすようにカスタマイズできます。

セルフサービスを設定する

Amazon Q in Connect をセルフサービスで有効にするには、次の手順に従います。

  1. AMAZON.QinConnectIntent を有効化して、Amazon Lex ボットで Amazon Q in Connect を有効にします。手順については、「Amazon Q in Connect のインテントを作成する」を参照してください。

  2. Amazon Q in Connect ブロックをフローに追加します。

  3. 顧客の入力を取得する ブロックをフローに追加して、以下を指定します。

    • Amazon Q in Connect が顧客とのやり取りの処理を開始するタイミング。

    • 処理する必要があるやり取りのタイプ。

    手順については、「フローを作成して会話型 AI ボットを追加する」を参照してください。

  4. (オプション) フローに コンタクト属性を確認する ブロックを追加し、Amazon Q in Connect が会話のターンを完了した後に何が起こるかを決定するように設定します。[チェックする属性] セクションで、プロパティを次のように設定します。

    • [名前空間][Lex] に設定する

    • [キー][セッション属性] に設定する

    • [セッション属性キー] を [ツール] に設定する

    Amazon Q in Connect は、選択したツール名を Lex セッション属性として保存します。このセッション属性には、[コンタクト属性の確認] ブロックを使用してアクセスできます。

  5. (オプション) Amazon Q in Connect で選択されたツールに基づいてルーティングロジックを定義します。

    • COMPLETE レスポンスをルーティングしてやり取りを終了します。

    • カスタムツールレスポンス (TRIP_BOOKING など) を特定のワークフローにルーティングします。

    次の図は、Amazon Q in Connect が決定した内容に基づいてルーティングを決定する方法の例を示しています。

    COMPLETE パスと TRIP_BOOKING パスの Q ツール選択に基づく問い合わせルーティング。

セルフサービスのカスタムアクション

カスタムツールを追加することで、Amazon Q in Connect の機能を拡張できます。これらのツールでは以下を行うことができます。

  • 顧客向けの次善のアクションを示す。

  • 既存の Amazon Lex ボットにタスクを委任する。

  • 特殊なユースケースを処理する。

AI プロンプトにカスタムツールを追加する場合:

  • Amazon Q in Connect が適切なアクションを選択するのに役立つ関連例を含めます。

  • コンタクト属性を確認する ブロックを使用して分岐ロジックを作成します。

    • [コンタクト属性の確認] を設定する際、[チェックする属性] セクションで、カスタムツールの名前を入力します。

    次の図は、TRIP_BOOKING という名前のカスタムツールが指定されていることを示しています。

    コンタクト属性の確認ブロックの TRIP_BOOKING という名前のカスタムツール。

例: 顧客の意図を明確にする

エージェントにルーティングする前に情報を収集する生成 AI アシスタントを作成できます。これには以下が必要です。

以下は、あいまいさを解消するためのツール定義の例です。CONVERSATION を除くすべてのデフォルトツールを削除し、HANDOFF と呼ばれる新しいカスタムツールを 1 つ追加できます。

tools: - name: CONVERSATION   description: Continue holding a casual conversation with the customer.   input_schema:     type: object     properties:       message:         type: string         description: The message you want to send next to hold a conversation and get an understanding of why the customer is calling.     required:     - message - name: HANDOFF   description: Used to hand off the customer engagement to a human agent with a summary of what the customer is calling about.   input_schema:     type: object     properties:       message:         type: string         description: Restatement to the customer of what you believe they are calling about and any pertinent information. MUST end with a statement that you are handing them off to an agent. Be as concise as possible.       summary:         type: string         description: A list of reasons the customer has reached out in the format <SummaryItems><Item>Item one</Item><Item>Item two</Item></SummaryItems>. Each item in the Summary should be as discrete as possible.     required:     - message     - summary

例: 顧客にアクションを推奨する

フローを使用して、Amazon Connect で次に最適なアクションを設定できます。自動アクションを設定し、UI ベースのアクションを顧客に提供するためのステップバイステップガイドを作成することもできます。詳細については、「Amazon Connect エージェントワークスペースを設定するためのステップバイステップガイド」を参照してください。  Amazon Q in Connect は、選択したツール名を Lex セッション属性として保存します。その後、この属性には [コンタクト属性の確認] フローブロックを使用してアクセスできます。 

以下に、旅行を予約するためのツール定義の例を示します。

-name: TRIP_BOOKING   description: Tool to transfer to another bot who can do trip bookings. Use this tool only when the last message from the customer indicates they want to book a trip or hotel.   input_schema:     type: object     properties:       message:         type: string         description: The polite message you want to send while transferring to the agent who can help with booking.     required:     - message

[コンタクト属性の確認] フローブロックを使用して Amazon Q in Connect が選択したツールを決定する場合、分岐の決定を行って、そのユーザーに関連するステップバイステップガイドを選択できます。例えば、顧客がセルフサービスチャットでやり取りしている際に旅行を予約する場合は、以下を行うことができます。

  • フロー内の TRIP_BOOKING ツールのレスポンスを一致させる。

  • 適切なステップバイステップガイドにルーティングする。

  • ステップバイステップのインターフェイスを顧客のチャットウィンドウに直接表示する。

チャットでのステップバイステップガイドの実装の詳細については、「Amazon Connect チャットにステップバイステップガイドをデプロイする」を参照してください。

FOLLOW_UP_QUESTION ツール

FOLLOW_UP_QUESTION ツールは、顧客との対話をよりインタラクティブで情報収集を目的とするものにすることで、Amazon Q in Connect のセルフサービス機能を強化します。このツールは、デフォルトおよびカスタムツールと連動します。これは、実行するアクションを決定する前に、必要な情報を収集するのに役立ちます。

次のコードは、FOLLOW_UP_QUESTION ツールの設定を示しています。

- name: FOLLOW_UP_QUESTION description: Ask follow-up questions to understand customer needs, clarify intent, and collect additional information throughout the conversation. Use this to gather required details before selecting appropriate actions. input_schema: type: object properties: message: type: string description: The message you want to send next in the conversation with the customer. This message should be grounded in the conversation, polite, and focused on gathering specific information. required: - message

FOLLOW_UP_QUESTION ツールは、Amazon Q in Connect が実行するアクションを決定する前に必要な情報を収集できるようにすることで、定義されたツールを補完します。特に以下の場合に便利です。

  • インテントのあいまいさの排除

    顧客のインテントが不明な場合は、このツールを使用して明確な質問をしてから、適切なアクションを選択します。

  • 情報の収集

    タスクを完了したり、質問に答えたりするために必要な詳細を収集します。

FOLLOW_UP_QUESTION ユースケースの例

不正を報告するように設計されたセルフサービスボットの場合、CONFIRM_SUBMISSION という名前のツールを定義して、顧客から特定の情報を収集できます。

- name: CONFIRM_SUBMISSION description: Confirm all collected information and finalize the report submission. input_schema: type: object properties: message: type: string description: A message reviewing all of the collected information and asking for final confirmation before submission. report_details: type: string description: The user's report or complaint details reporter_info: type: string description: Reporter's contact information (if provided) or "Anonymous" subject_info: type: string description: Information about the individual or business being reported required: - message - report_details - reporter_info - subject_info

ただし、次の例に示すように、代わりに FOLLOW_UP_QUESTION ツールを使用してこの情報をステップバイステップで収集できます。

- name: FOLLOW_UP_QUESTION description: Ask follow-up questions to understand customer needs and collect additional information throughout the complaint process. Use this for all information gathering steps including confidentiality preferences, contact info, subject details etc. input_schema: type: object properties: message: type: string description: The message you want to send next in the conversation with the customer. This message should be grounded in the conversation and polite. Use this for asking clarification questions, collecting contact information, gathering subject details, and all other follow-up steps in the complaint process. required: - message

プロンプトの指示

FOLLOW_UP_QUESTION ツールを使用するタイミングについてセルフサービスボットをガイドする指示をプロンプトに追加します。例:

CRITICAL: Use FOLLOW_UP_QUESTION for all information gathering steps after the initial analysis. Do NOT proceed to other tools until you have collected all required information. Use this tool to disambiguate customer intent when unclear. When using FOLLOW_UP_QUESTION: 1. Ask one specific question at a time 2. Focus on collecting required information for the most likely intent 3. Be conversational but direct 4. Acknowledge information the customer has already provided 5. Only move to other tools (like CONFIRM_SUBMISSION or TRIP_BOOKING) when you have all required information

会話の例

以下は、使用中の FOLLOW_UP_QUESTION ツールを示す 3 つの会話の例です。

  • 例 1: 顧客が不正の報告について質問した場合、モデルは顧客から情報 (report_detailsreporter_infosubject_info など) を収集してレポートを作成する必要があります。この例は、CONFIRM_SUBMISSION ツールという名前のカスタムツールを使用して情報を収集する代わりに、FOLLOW_UP_QUESTION ツールを使用して必要な情報の収集を開始する方法を示しています。

  • 例 2: この例では前の例と同じテーマで、FOLLOW_UP_QUESTION ツールを使用して報告者のコンタクト情報を取得できる代替情報を示します。

  • 例 3: この例では、モデルが顧客からのあいまいなリクエストにどのように応答し、FOLLOW_UP_QUESTION ツールを使用して内容を明確にするかを示します。

<examples> <example> <conversation> [CUSTOMER] I want to report someone who I think is committing fraud </conversation> <thinking> The customer wants to report fraud. I need to collect specific information including details about the suspected fraud, reporter information, and subject information. I'll start by asking about the suspected fraudulent activity. </thinking> <tool> [FOLLOW_UP_QUESTION(message="I'd be happy to help you report suspected fraud. Could you please describe the fraudulent activity you've observed?")] </tool> </example> <example> <conversation> [AGENT] Can you provide me your full address? [CUSTOMER] I don't feel comfortable sharing my address </conversation> <thinking> The caller declined to share their address. I should respect their privacy concerns while still trying to collect alternative contact information. </thinking> <tool> [FOLLOW_UP_QUESTION(message="I understand your privacy concerns. That's completely fine. Would you be comfortable providing a phone number or email address instead? Or you can choose to remain anonymous.")] </tool> </example> <example> <conversation> [CUSTOMER] I'm not getting my benefit payments anymore </conversation> <thinking> The customer is reporting a payment issue. This sounds like a general service issue rather than fraud. I should clarify if they need assistance with their benefits. </thinking> <tool> [FOLLOW_UP_QUESTION(message="I'm sorry to hear about the issue with your payments. To help me understand better, could you tell me when you last received a payment and if you've received any notification about why they stopped?")] </tool> </example> </examples>