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

カスタム セクションを使用した要約では、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 つ目は、カスタマー サービスに関連するものを生成します。最後の概要はカスタマー サービスに関連しており、認証アクションは除外されます。各イテレーションで、より正確で精度の高い要約が生成されます。

主な使用例

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

語彙

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

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".

次のステップ

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