如要最佳化 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 教練有三種主要用途:
意圖偵測:如果您只想向服務專員顯示目前適用的指示,不需要範例回覆,您可以根據顯示詳細資料中儲存的擷取資料 (網址、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 教練建議重複資料刪除功能可防止系統向服務專員顯示重複或高度相似的建議。使用產生器原型中的 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 ... }