ベスト プラクティス: カスタム セクションを使用した要約

カスタム セクションによる要約では、LLM を使用してカスタマー サービスの会話を要約します。この機能では、モデルが会話とカスタム セクションを受け取った後に要約が生成されます。カスタム セクションは、モデルが実行するタスクを定義するテキスト プロンプトの一部です。

この機能には、要約 V2 ベースラインにあるものと同様の 6 つの事前定義されたセクションがあり、そこから選択して使用できます。カスタム セクションで独自の要約タスク定義を記述することもできます。事前定義セクションとカスタム セクションの両方が、ジェネレータで記述されます。

セクションの定義を作成する

セクションは、次のように定義される名前と値で構成されます。

  • セクション名: セクション管理用にわかりやすい名前を付けます。事前定義されたセクション名とは異なる名前にする必要があります。セクション定義で説明されているタスクの目的を反映したわかりやすい名前を使用します。

  • セクションの定義: この値は、要約タスクまたはサブタスクを定義し、特定のタイプの要約を生成するようモデルに指示するタスクの説明で構成されます。

たとえば、要約で特定の用語を使用するようにするカスタム セクションは次のようになります。

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 個追加できます。たとえば、会話の文字起こしや、想定される要約などです。事前定義されたセクションの想定される要約を指定する必要はありません。これらの少数ショットの例は、生成された要約に表示する内容の正確な語彙、形式、スタイル、コンテキストを示しています。

表示する要約の種類を効果的に示すには、タスクで考えられるすべての回答を網羅するように、さまざまな少数ショット サンプルを選択してください。次のタスクでは、回答に注文番号が含まれる場合と含まれない場合があり、各例は 1 つのケースに対応しています。

カスタム セクション:

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

基本から始め、反復処理する

セクション定義の設計では、反復処理を使用して、要約から最適な結果を得ます。まず基本的な定義から始めましょう。要約を改善するために必要な要素を把握したら、要素を追加します。次のリストに、要約を改善するための 3 つの反復処理ステップを示します。

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.

最初の反復処理で概要が生成されます。2 つ目は、カスタマー サービスに関連するチケットを生成します。最後の概要はカスタマー サービスに関連し、認証アクションは除外されます。反復処理を繰り返すたびに、より正確で精度の高い要約が生成されます。

主な使用例

カスタム セクションのユースケースの例を次に示します。

語彙

要約で使用する用語をカスタマイズします。たとえば、参加者のデフォルト名は「customer」と「agent」ですが、タスクの参加者の名前をカスタマイズして指定できます。

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.

書き換え

特定の要件に合わせて、事前定義されたセクションを書き換えます。たとえば、事前定義されたセクション「action」を選択し、参加者のカスタマイズされた名前を使用できます。

Rewrite "action" and use "representative" in place of "agent".

次のステップ

この機能にアクセスする方法については、カスタム セクションを使用した要約をご覧ください。