本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
在 Connect 中通过 Amazon Q 使用人工智能驱动的生成式自助服务
提示
查看 AWS 研讨会的本课程:在 Con nect 自助服务中自定义 Amazon Q
Amazon Q in Connect 支持聊天和语音 (IVR) 渠道中的客户自助服务用例。它可以:
-
回答客户的问题。
-
提供 step-by-step指导。
-
完成重新安排预约和预订行程等操作。
当客户需要其他帮助时,Amazon Q in Connect 会将其无缝转移给客服,同时保留完整对话的背景。
默认系统工具
Amazon Q in Connect 附带了以下可用的内置工具 out-of-the-box:
-
问题:当没有其他工具可以直接处理查询时,提供答案并收集相关信息。
-
升级:当客户请求人工帮助时,自动转接给客服。
注意
选择 “升级” 后,它将使用 “获取客户输入” 块的 “错误” 分支。
-
对话:当没有具体的客户意图时,进行基本对话。
-
完成:满足客户需求后结束互动。
-
F@@ OLLOW_UP_QUES TION:支持与客户进行更具互动性和信息收集性的对话。有关使用此工具的更多信息,请参阅跟进问题工具。
您可以自定义这些默认工具以满足您的特定要求。
设置自助服务
请按照以下步骤启用 Amazon Q in Connect 进行自助服务:
-
通过激活亚马逊,在你的 Amazon Lex 机器人中启用 Connect 中的 Amazon Q。 QinConnectIntent。有关说明,请参阅在 Connect 中创建 Amazon Q 意图。
-
在你的流程中添加一个Amazon Q in Connect方块。
-
在流程中添加一个获取客户输入区块以指定:
-
Amazon Q in Connect 何时应该开始处理客户互动。
-
它应该处理哪些类型的互动。
有关说明,请参阅创建流程并添加对话式 AI 机器人。
-
-
(可选)在您的流程中添加一个检查联系人属性区块并将其配置为确定在 Amazon Q in Connect 完成对话后应该发生什么:在 “要检查的属性” 部分,按以下方式设置属性:
-
设置命名空间 = Lex
-
设置密钥 = 会话属性
-
设置会话属性密钥 = 工具的名称
Connect 中的 Amazon Q 将选定的工具名称保存为 Lex 会话属性。然后,可以使用 “检查联系人属性” 块访问此会话属性。
-
-
(可选)根据 Amazon Q 在 Connect 中选择的工具定义路由逻辑:
-
路由完成响应以结束互动。
-
将自定义工具响应(如 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指南,为客户提供基于用户界面的操作。有关更多信息,请参阅 Step-by-step 设置 Amazon Connect 代理工作空间的指南。 Connect 中的 Amazon Q 将选定的工具名称保存为 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 工具支持与客户进行更具互动性和信息收集的对话,从而增强了 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_SUBMITION 的工具来收集客户的特定信息:
- 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_SUBMITION 工具的自定义工具来收集信息。 -
示例 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>