使用自定义部分的摘要功能会使用 LLM 来总结客户服务对话。借助此功能,系统会在模型获取对话和自定义部分(即定义模型要执行的任务的文本提示的一部分)后生成摘要。
此功能提供了六个预定义部分,类似于总结 V2 基准中提供的部分,您可以从中选择并使用。您还可以在自定义部分中编写自己的总结任务定义。生成器中介绍了预定义部分和自定义部分。
编写版块定义
部分至少包含名称和值,定义如下:
版块名称:为版块管理提供一个听起来顺耳的名称。该名称必须与任何预定义的部分名称不同。使用有意义的名称,反映部分定义中所述的任务目标。
部分定义:此值由定义总结任务或子任务的任务说明组成,用于告知模型生成特定类型的摘要。
例如,用于确保摘要使用特定术语的自定义部分可能如下所示:
section name: custom_action
section definition: Based on the conversation, summarize what the agent does to help the customer. Use "representative" in place of "agent" in the summary.
如需生成更精确、更准确的摘要,请在编写自定义部分定义时遵循以下建议。
清晰的说明
该部分定义应对您希望在摘要中包含的详细信息进行具体说明。指定摘要的上下文、格式和风格,包括您希望看到的任何特定术语和句子结构。例如,您可以指定摘要必须采用现在时态,如下所示:
Recommended: Summarize what the customer needs help with or has questions about in the past tense. For example, The sentence "The customer wants to cancel an order." isn't in the past tense as indicated by the verb "wants". The sentence "The customer wanted to cancel an order." is in the past tense.
Not recommended: Summarize customer issues in the past tense.
如果您对部分定义非常具体,使用自定义部分进行总结更有可能生成您想要的样式和格式。
强调
您可以使用大写字母来强调版块定义中的重要信息。如果您需要摘要包含某些信息,但模型会忽略您在部分定义中提供的信息,您可以使用全大写形式的关键字。例如,为了确保订单号包含在摘要中,以下部分定义强调了动词“包含”。
Recommended: Summarize what the customer needs help with or has questions about. If there is an order number mentioned in the conversation, INCLUDE the order number.
Not recommended: Summarize what the customer needs help with or has questions about with order numbers.
引导式推理
将复杂任务分解为一系列子任务有助于模型准确解析整个任务。例如,为了确保使用自定义部分的摘要功能可以准确确定客户服务问题是否已得到解决,请在部分定义开头添加子任务,以便为问题提供背景信息。
Recommended: First explain what actions are taken to handle the customer issue, then determine whether the issue is resolved.
Not recommended: Determine whether the issue is resolved.
语言选项
请使用与摘要相同的语言编写部分定义。例如,使用法语编写部分定义,以生成法语摘要。
Recommended: Résumez ce pour quoi le client a besoin d'aide ou sur quoi il a des questions.
Not recommended: Summarize what the customer needs help with or has questions about.
少样本示例
如果您的自定义部分定义未生成您想要看到的摘要,您最多可以添加 10 个示例来演示如何执行任务。此类示例包括对话转写和预期摘要。您无需为预定义部分提供预期摘要。这些少样本示例说明了您希望在生成的摘要中看到的确切词汇、格式、风格和背景信息。
为了有效说明您希望看到的摘要类型,请尝试使用各种少样本示例来涵盖任务的所有可能答案。对于以下任务,答案可以包含也可以不包含订单号,每个示例都涵盖一种情况。
自定义版块:
section_name: custom_situation
section_definition: summarize what the customer needs help with or has questions about. If there is an order number in the conversation, add the order number after "Order Number:" at the end.
少样本示例 1:
[Conversation transcript]
CUSTOMER: cancel order.
AGENT: Hi, this is Joe. I can definitely help with order cancellation. Can you share the order number?
CUSTOMER: Z12345
AGENT: Thanks. Give me a second to pull the order.
AGENT: May I know why you want to cancel the order?
CUSTOMER: I ordered the wrong color.
AGENT: Noted.
AGENT: I have canceled the order for you. You should receive a confirmation email soon.
CUSTOMER: Thanks.
[Expected summary]
Customer wants to cancel an order because they ordered the wrong color. Order Number: Z12345
少样本示例 2:
[Conversation transcript]
AGENT: Hi this Ralph. How can I help you?
CUSTOMER: I have some questions about the latest bill.
AGENT: Sure, I can help you with that.
AGENT: Can I have your name and phone number?
AGENT: Are you still there?
[Expected summary]
Customer calls to ask about the latest bill.
如果模型误解了对话转写中的信息,少样本示例也非常有用。例如,使用前面相同的自定义部分,如果模型不将“订单 ID”识别为“订单号”的同义词,则您可能需要添加类似于此处示例的示例。
[Conversation transcript]
CUSTOMER: order status
CUSTOMER: order ID X12345
AGENT: Thank you for contacting us
[Expected summary]
Customer wants to check order status Order Number: X12345
从基础开始并不断迭代
通过迭代过程,段落定义设计可从总结中获得最佳结果。先从基本定义开始。随着您了解改进摘要所需的要素,可以添加更多元素。以下列表包含三个可能的迭代步骤,可用于改进摘要:
1. Summarize agent actions.
2. Summarize what actions the agent took to help the customer.
3. Summarize what actions the agent took to help the customer. Exclude actions relevant to authentications.
第一次迭代会生成摘要。第二个会生成与客户服务相关的 ID。最后一个摘要与客户服务相关,不包含身份验证操作。每次迭代都会生成更准确、更精确的摘要。
主要用例
以下是自定义版块的一些使用场景示例。
词汇
自定义摘要中使用的术语。例如,参与者的默认名称为“客户”和“客服人员”,您可以为任务指定自定义参与者名称。
Summarize what the customer needs help with or has questions about. Use "user" in place of "customer".
格式和样式
自定义摘要的格式和样式。例如,您可以为提取的实体指定要点:
Extract entities and output name/value pairs in bullet points. For example:
- {entity name 1}: {entity value 1}
- {entity name 2}: {entity value 2}
...
Leave it blank if there are no entities.
另一个示例是设置日期格式:
Summarize what the customer needs help with or has questions about. Format dates as "MM/DD/YYYY" in the summary.
重写
重写预定义部分,以满足您的具体要求。例如,您可以选择预定义的“操作”部分,并使用自定义的参与者名称:
Rewrite "action" and use "representative" in place of "agent".
后续步骤
如需详细了解如何使用此功能,请参阅使用自定义部分进行总结。