本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
搭配 Amazon Q in Connect 使用生成式 AI 技術的自助服務
提示
從 AWS 研討會查看此課程:自訂 Amazon Q in Connect 自助式服務
Amazon Q in Connect 支援聊天和語音 (IVR) 管道中的客戶自助式使用案例。它可以:
-
回答客戶的問題。
-
提供step-by-step指引。
-
完成像是重新安排預約和預訂行程等動作。
當客戶需要額外協助時,Amazon Q in Connect 會順暢地將客戶轉接給客服人員,同時保留完整對話的內容。
預設系統工具
Amazon Q in Connect 隨附下列內建工具,可out-of-the-box:
-
問題:當其他工具無法直接處理查詢時, 會提供答案並收集相關資訊。
-
升級:在客戶請求人工協助時自動轉接至客服人員。
注意
選取 ESCALATION 時,它需要取得客戶輸入區塊的錯誤分支。
-
對話:在沒有特定客戶意圖時參與基本對話。
-
完成:在滿足客戶需求時結束互動。
-
FOLLOW_UP_QUESTION:可與客戶進行更多互動和資訊收集對話。如需使用此工具的詳細資訊,請參閱 FOLLOW_UP_QUESTION 工具。
您可以自訂這些預設工具,以符合您的特定需求。
設定自助式服務
請依照下列步驟啟用 Amazon Q in Connect for self-service:
-
透過啟用 AMAZON.QinConnectIntent,在您的 Amazon Lex 機器人中啟用 Amazon Q in Connect。 QinConnectIntent 如需說明,請參閱建立 Amazon Q in Connect 意圖。
-
將 Amazon Q in Connect區塊新增至您的流程。
-
將取得客戶輸入內容區塊新增至流程以指定:
-
當 Amazon Q in Connect 應該開始處理客戶互動時。
-
應處理的互動類型。
如需說明,請參閱建立流程並新增對話式 AI 機器人。
-
-
(選用) 將檢查聯絡屬性區塊新增至您的流程,並加以設定,以判斷 Amazon Q in Connect 完成對話輪換後應該發生的情況:在要檢查的屬性區段中,設定屬性,如下所示:
-
設定命名空間 = Lex
-
設定金鑰 = 工作階段屬性
-
設定工作階段屬性索引鍵 = 工具的名稱
Amazon Q in Connect 會將選取的工具名稱儲存為 Lex 工作階段屬性。然後,您可以使用檢查聯絡屬性區塊存取此工作階段屬性。
-
-
(選用) 根據 Amazon Q in Connect 選取的工具定義路由邏輯:
-
路由 COMPLETE 回應以結束互動。
-
將自訂工具回應 (例如 TRIP_BOOKING) 路由到特定工作流程。
下圖顯示如何根據 Amazon Q in Connect 的決定做出路由決策的範例。
-
自助服務的自訂動作
您可以新增自訂工具來擴展 Amazon Q in Connect 的功能。這些工具可以:
-
為客戶找出下一個最佳動作。
-
將任務委派給現有的 Amazon Lex 機器人。
-
處理特殊使用案例。
將自訂工具新增至 AI 提示時:
-
包含相關範例,以協助 Amazon Q in Connect 選擇適當的動作。
-
使用 檢查聯絡屬性區塊來建立分支邏輯。
-
當您設定檢查聯絡人屬性時,請在要檢查的屬性區段中輸入自訂工具的名稱。
下圖顯示已指定名為 TRIP_BOOKING 的自訂工具。
-
範例:淡化客戶意圖
您可以建立生成式 AI 助理,在路由至代理程式之前收集資訊。這需要:
-
無知識庫組態。
-
收集資訊的簡單說明。
-
向客服人員呈現資訊的Step-by-step指南。如需詳細資訊,請參閱在 Amazon Connect 中開始聯絡時,在客服人員工作區中顯示聯絡內容。
以下是解構的範例工具定義。您可以移除 CONVERSATION 以外的所有預設工具,並新增名為 HANDOFF 的新自訂工具:
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 在 中設定下一個最佳動作。您也可以設定自動化動作並建立step-by-step指南,為客戶提供以 UI 為基礎的動作。如需詳細資訊,請參閱設定 Amazon Connect 客服人員工作區Step-by-step指南。 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 已選取哪些工具時,您可以做出分支決策,為該使用者選取相關的step-by-step指南。例如,如果客戶想要在自助式聊天互動期間預訂行程,您可以:
-
比對流程中的 TRIP_BOOKING 工具回應。
-
路由至適當的step-by-step指南。
-
直接在客戶的聊天視窗中顯示step-by-step界面。
如需在聊天中實作step-by-step指南的詳細資訊,請參閱 在 Amazon Connect 聊天中部署step-by-step指南。
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 step-by-step收集此資訊,如下列範例所示:
- 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 工具的三個對話範例。
-
範例 1:當客戶詢問有關報告詐騙的問題時,模型需要從客戶收集資訊 (例如
report_details
、reporter_info
、subject_info
) 來建立報告。此範例顯示如何使用 FOLLOW_UP_QUESTION 工具開始收集必要資訊,而不是使用名為 CONFIRM_SUBMISSION 工具的自訂工具來收集資訊。 -
範例 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>