如需优化 AI 教练建议,您必须提供以下信息:
- 一组书面说明
- 对话转写
- 来自 API 的数据
作为回报,AI 指导师会提供适用的指令和建议的客服人员回答。
推荐用途
为了获得最有用的建议,请在以下情况下使用 AI 教练。
追加销售和交叉销售
当联络中心客服人员必须提供其他产品或服务时,AI 教练可以提供以下实用信息。
- 建议何时开始销售,以及何时完全不尝试销售。
- 提出探究性问题,了解客户需求。
- 根据对话上下文,从简短列表中推荐商品。
- 建议如何处理异议。
客户留存率
当联络中心代理尝试说服客户继续使用其公司的服务时,AI 教练可以提供以下实用信息。
- 建议何时提供客户留存优惠。
- 提出探究性问题,了解客户的取消原因。
- 根据对话内容推荐客户挽留优惠。
使用工具实现单步自动化
AI 教练还可以根据客户服务对话自动执行后续重复性业务流程。
- 当客户通过身份验证并提供订单号时,检索订单状态。
- 在订单号和取消原因可用时取消订单。
- 将有风险的自动化操作配置为需要人工审核和批准。
存在风险的操作
风险操作是指可能会造成严重经济损失、数据泄露或违规的自动化业务流程。例如,未经身份验证就写入数据库和检索敏感信息。AI 教练可以建议时间安排并从对话中提取参数,但风险较高的操作需要人工审核和批准,不应完全自动化。
AI 教练指令
编写一组指令,教导 AI 教练在整个客户服务对话中,客服人员应采取哪些行动以及何时需要采取这些行动。指令可以指定任何客服人员操作,例如向客户询问其账号 PIN 码、查看订单状态并告知客户或提交取消请求。
AI 指导的指令包含以下信息:
显示标题:有助于您管理多条指令。显示标题不会显示给 LLM。
显示详细信息:指定模型在指令适用时应返回的静态内容。显示详细信息可以包括网址、内部工具或系统的快捷方式、客服人员的速查表或后端 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
代理操作
理想情况下,您可以根据以下三个信息来源验证代理操作的每个步骤:
- 说明:详情请参阅上一部分。
- 对话转写:记录代理和客户在整个客户服务对话中的对话内容。
- 提取的数据:包含在对话中未直接找到的相关客户数据,例如近期交易、账单和正在进行的促销活动。
以下是 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 也必须提供缺失的信息。
避免撰写任何需要使用这些来源中未提供的信息的操作。
如果您找不到相应的数据,请避免:
- 向客户说明账单。
- 告知客户其余额、到期日期或订单状态。
多个动词
虽然上述代理操作列表仅包含一个动词,表示代理要采取的操作,但一个步骤可以包含多个动词。例如,如果某商家希望其代理在一个响应中推荐特定产品,并将该产品与病情相关联,那么您可以编写一个代理操作步骤,如以下输入所示。
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 个主要应用场景:
意图检测:如果您只想向代理显示当前适用的指令,而不需要示例回答,则可以使用此功能。您可以依靠显示详情中存储的已提取数据(网址、Webhook、速查表等)向客服人员提供建议或触发已提取的 API 调用。
分步指导:如果您想通过示例回答向代理提供分步指导,请选择此选项。
产品推荐:如果您希望使用 AI 教练来指导客服人员何时向客户推荐产品以及推荐哪些产品,请选择此选项。商品推荐候选对象可由用户的推荐系统或静态目录生成。
质量改进
以下有关撰写 AI 指导教练指令的建议有助于提高示例回答的质量,但无法阻止 AI 指导教练提出意想不到的建议。
用于显示详细信息的文本格式
使用 Markdown 语法以富格式(链接、粗体文本等)显示详细信息。这会在 Google Cloud 控制台模拟器中呈现,但也有助于在网页界面中实现。
代理操作的文本格式
如果 AI 教练经常遗漏某个步骤或要求,请使用粗体文本来引导模型更加关注特定文本。如需使用 Markdown 语法创建粗体文本,请在文本两侧各添加两个星号。
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 ..."
引导式推理
如果一条或多条指令指定了目标,但步骤不够或未阐明实现目标的隐藏推理,请修改步骤以提高清晰度。例如,当代理被告知要推荐产品时,建议的产品应与对话内容相关。通过在代理操作的开头添加引用对话上下文的子任务,帮助 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 教练建议去重功能可防止向客服人员显示重复或高度相似的建议。使用生成器 proto 中的 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
消息包含不同类型建议的字段(例如,AgentActionSuggestion
、SampleResponse
)。每个字段都将包含一条 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 ... }