查看-增强会话_会话式人工智能-关键技术和挑战-第2部分
查看-增強會話
Follow up on my previous post discussing the key technologies around the conversational AI solution, I will be dive into the typical challenges the AI Engineer team would encounter when building a virtual agent or a chatbot solution for your clients or customers.
跟進我之前的帖子,討論 圍繞對話式AI解決方案的關鍵技術 ,我將深入探討AI工程師團隊在為客戶或客戶構建虛擬代理或聊天機器人解決方案時遇到的典型挑戰。
Let firstly define the scope and goal of the conversational application.
首先讓我們定義對話應用程序的范圍和目標。
Created by Catherine Wang由凱瑟琳·王創作The conversational agents can be categorized into two main streams. Open Domain Conversation and Task-Oriented Conversation.
會話代理可以分為兩個主要流。 開放域對話和面向任務的對話 。
The typical agents for Open Domain Conversation are Siri, Google Assistant, BlenderBot from Facebook, Meena from Google. Users can start a conversation without a clear goal, and the topics are unrestricted. Those agents factor entertainments and emotional response into their design, and able to carry a long conversation with end-users.
開放域對話的典型代理是Siri,Google助手,Facebook的BlenderBot和Google的Meena。 用戶可以在沒有明確目標的情況下開始對話,并且主題不受限制。 這些代理商將娛樂性和情感React納入其設計之中,并能夠與最終用戶進行長時間的交談。
Most of the commercial used virtual agents are Task-Oriented. They include the chatbot you saw on your bank’s website or the virtual agent who greets you when you call the flight center hotline. Those agents were built to serve specific goals and objectives. They focus on close domain conversation and typically would fulfill your requests with a response. The dialog in task-oriented agent tends to be short and logical.
大多數商業使用的虛擬代理都是面向任務的 。 它們包括您在銀行網站上看到的聊天機器人,或者當您撥打飛行中心熱線電話時與您打招呼的虛擬代理。 這些代理旨在滿足特定的目標。 他們專注于近距離對話,通常會通過響應滿足您的請求。 面向任務的代理中的對話框往往簡短而合乎邏輯。
Now we have a good definition of agent type, let’s explore the challenges in the realm of Task-Oriented Conversation. (the open domain conversation is beyond today’s topic, and will be covered in the future post)
現在我們已經對代理類型有了一個很好的定義,讓我們探討面向任務的對話領域中的挑戰。 (開放域對話超出了今天的主題,將在以后的帖子中介紹)
面向任務的對話 (Task-Oriented Conversation)
(Please refer to the previous post for a detailed explanation of the below architecture diagram)
(有關以下架構圖的詳細說明,請參閱上一篇文章)
Conversational AI Architecture — Created by Catherine Wang對話式AI架構 -由Catherine Wang創建1.整合,整合,整合! (1.Integration, Integration, and Integration!)
Building a stand along chatbot is easy. If you take the online course or follow up on the tutorial notebook, you can probably set up a voice agent in a few hours.
沿chatbot建立站很容易。 如果您參加在線課程或在教程筆記本上進行跟進,則可能可以在幾個小時內設置語音代理。
But in the real world, the conversational component needs to be seamlessly integrated with the existing system and infrastructure. The virtual agent’s architecture varies significantly depending on the digital maturity of your client’s tech stack.
但是在現實世界中,會話組件需要與現有系統和基礎架構無縫集成。 虛擬代理的體系結構根據客戶技術堆棧的數字成熟度而有很大不同。
If you are using the popular conversational service on the cloud platform (Dialogflow, Lex, Azure bot service, etc.), and your virtual agent is exposed to the public, think security first. Essentially, bot or virtual agent is a series of API calls to your core conversational services, make sure the solution has a robust authentication and authorization mechanism, and sensitive information is encrypted. If the bot/virtual agent solution needs to interact with your existing system or database, set up an external TCL/SSL proxy to interpret and normalize the request, instead of letting bot directly send an unserialized message to your core system. Another potential benefit of using an external proxy is, you can build a generic RESTful API that will enable you to scale up quickly.
如果您正在云平臺上使用流行的會話服務(Dialogflow,Lex,Azure bot服務等),并且您的虛擬代理公開給公眾,請首先考慮安全性 。 本質上,機器人或虛擬代理是對核心對話服務的一系列API調用,請確保該解決方案具有可靠的身份驗證和授權機制,并且敏感信息已加密 。 如果漫游器/虛擬代理解決方案需要與您現有的系統或數據庫進行交互,請設置外部TCL / SSL代理來解釋和規范化請求,而不是讓漫游器直接向您的核心系統發送未序列化的消息。 使用外部代理的另一個潛在好處是,您可以構建通用的RESTful API,使您能夠快速擴展。
Conversational Component Integration - Created by Catherine Wang會話組件集成 -由Catherine Wang創建If you are using conversational service on the cloud and building a virtual agent for the internal users, those agents are most likely to be information retrieval heavy. Internal users or employees would like to use the virtual agent as a knowledge search engine and ask the chatbot to find the last meeting notes, tax invoice, specific company policy, or a proposal from last year. The key to this type of solution is to create and maintain a consistent knowledge base and dynamic indexing strategy. The knowledge base is the ground truth of the agent’s search space, and it correlated with the answer accuracy. However, documents and content are scattered in the organization, and lack of management and ownership. So the first step of building this type of virtual agent should be designing comprehensive data ingestion, management, and governance pipeline. Be careful if the data you need to collect and query are both online and offline, or in multiple cloud platforms.
如果您在云上使用會話服務并為內部用戶構建虛擬代理,則這些代理很可能會占用大量信息 。 內部用戶或員工希望將虛擬代理用作知識搜索引擎,并且 請聊天機器人查找上次會議記錄,稅務發票,特定的公司政策或去年的提案。 這種解決方案的關鍵是創建并維護一致的知識庫和動態索引策略。 知識庫是座席搜索空間的基礎事實,它與答案的準確性相關。 但是,文檔和內容分散在組織中,并且缺乏管理和所有權。 因此,構建此類虛擬代理的第一步應該是設計全面的數據接收,管理和治理管道 。 如果您需要收集和查詢的數據是聯機和脫機的,或者是在多個云平臺中的,請務必小心。
Data Pipeline for Agent Knowledge Base — Created by Catherine WangAgent知識庫的數據管道 -由Catherine Wang創建Another critical part of the above solution is maintaining the indexing and knowledge ontology for the agent to query the knowledge base. In the simplest version, the virtual agent was backed by the curated Q&A sets and matching similar questions to the predefined answers. A more advanced agent would have semantic search capability (can be implemented via elastic search), it can understand natural language and perform query search on the knowledge base. The ultimate solution involves machine comprehension, making machines understand the corpus and long questions, thus find the span of the answer in the relevant document. A mature virtual agent solution would usually stack those components to increase the robustness.
上述解決方案的另一個關鍵部分是維護索引和知識本體,以供代理查詢知識庫。 在最簡單的版本中,虛擬代理由精選的問答集支持,并將相似的問題與預定義的答案進行匹配。 更高級的代理將具有語義搜索功能(可以通過彈性搜索實現),它可以理解自然語言并在知識庫上執行查詢搜索。 最終的解決方案涉及機器理解 ,使機器理解語料庫和冗長的問題,從而在相關文檔中找到答案的范圍。 成熟的虛擬代理解決方案通常會堆疊那些組件以增加健壯性。
Knowledge Base with Information Retrieval — Created by Catherine Wang信息檢索知識庫 — Catherine Wang創建2.如何處理嵌套或復合意圖匹配 (2. How to deal with Nested or Compound Intent matching)
In the perfect scenario, the user would ask a question with single and straight forward intent. But when humans communicate, we prefer to combine several intentions into one dialog.
在理想情況下,用戶會直接提出一個簡單的問題。 但是,當人們進行交流時,我們更喜歡將多種意圖組合成一個對話。
Question: Can you check the weather for me? If it is good, help me to book a ticket for XXX.
問題:你能幫我看看天氣嗎? 如果不錯,請幫我預訂XXX的門票。
Intent: [“check weather” , “book ticket”]
目的:[“查詢天氣”,“預訂機票”]
In the virtual agent solution, the dialog management component needs to track the conversation’s status and identify multiple intents from the user expressions (or questions). Once multiple intents have been matched, the next step is to determine the execution or fulfillment priority.
在虛擬代理解決方案中,對話框管理組件需要跟蹤對話的狀態并從用戶表達式(或問題)中識別多個意圖。 一旦多個意圖已經匹配,下一步就是確定執行或實現優先級。
Potential solutions can be:
可能的解決方案可以是:
Main Topic and parallel intent with priority scores
主要主題和與意圖得分平行的意圖
If, in your user scenario, intents that are naturally clustered into a topic, you can use the top-down setup like the above image. The main topic classifier will help you drill down to a subset of intents, then match to individual intent by considering pre-defined priority scores.
如果在您的用戶場景中,意圖自然地聚集到一個主題中,則可以使用如上圖所示的自上而下的設置。 主要主題分類器將幫助您深入分析意圖的子集,然后通過考慮預定義的優先級評分來匹配各個意圖。
Main intent with follow up intent
主要意圖與跟進意圖
Suppose your user scenario has a natural logic flow that can be converted into a sequence of intents. Then a better configuration is to set up the main intent with follow up intents similar to a logic decision tree. The virtual agent will then guide the user through the predefined logic.
假設您的用戶場景具有自然的邏輯流程,可以將其轉換為一系列意圖。 然后,更好的配置是使用類似于邏輯決策樹的跟進意圖來設置主意圖。 然后,虛擬代理將通過預定義的邏輯指導用戶。
Trigger confusion and error detection engine, and use recovering policy to clarify the intent.
觸發混亂和錯誤檢測引擎,并使用恢復策略來闡明意圖。
This option will be discussed in section 4. manage confusion and ambiguity.
此選項將在第4節中討論。 管理混亂和歧義 。
3.將對話映射到預定義任務中的挑戰。 (3. The challenge of mapping conversation into pre-defined tasks.)
Machine and humans have a different logic framework. Human conversation is intuitive and non-linear, but the machine program is linear, logical, and strictly defined. When designing your conversational agent, think about the user scenarios and what questions would user normally asked.
機器和人有不同的邏輯框架。 人機對話是直觀且非線性的,但是機器程序是線性,邏輯且嚴格定義的。 在設計會話代理時,請考慮用戶方案以及用戶通常會問哪些問題。
Created by Catherine Wang由凱瑟琳·王創作 Created by Catherine Wang由凱瑟琳·王創作Once you have understood your customers’ behavior, try to find the key drivers and topics of their actions, then develop a task flow for each type of the topic(user scenario). Please keep it simple, easy to follow, and flexible to expand. (main branch and optional child-nodes)
了解了客戶的行為后,請嘗試查找其行為的關鍵驅動因素和主題,然后針對每種主題類型(用戶場景)開發任務流。 請保持簡單,易于遵循且靈活擴展。 (主分支和可選的子節點)
Task Flow Example by RakebotsRakebots的任務流程示例Your conversational agent needs to be configured based on the task flow, and keep the master task flow updated and resolve conflicted logic points at an earlier stage.
您需要根據任務流配置會話代理,并保持主任務流更新并在較早階段解決沖突的邏輯點。
Suppose you are working on a mega-client project, where there are multiple parallel business divisions, and potentially hundreds of intents clustered into a range of topics. In that case, you can adopt the multi-agent architecture. A master agent controls the sub-agent, and the sub-agent has its own knowledge space and intent configuration.
假設您正在從事一個大型客戶項目,該項目中有多個并行的業務部門,并且可能有數百個意圖聚集在一系列主題中。 在這種情況下,您可以采用多代理架構。 主代理控制子代理,子代理具有自己的知識空間和意圖配置。
Multi-Agent Architecture — Created by Catherine Wang多代理架構 -由Catherine Wang創建[ Be careful if you choose to implement the above architecture, it is not suitable for PoC or quick experiments. Always start with a simple solution that can be easily integrated and deployed. Get some quick wins to build up the momentum, when the development cycle is more mature and stable, pivot to the fine-grained architecture design.]
[如果選擇實現上述架構,請當心,它不適用于PoC或快速實驗。 始終從一個易于集成和部署的簡單解決方案開始。 在開發周期更加成熟和穩定時,獲得一些快速的勝利來建立動力,轉向細粒度的架構設計。]
4.我們應該如何涵蓋長尾意圖? (4. How should we cover long-tail intent?)
Long-tail intents refer to the low-frequency and high variance questions that your virtual agent would receive over the time of service.
長尾意圖是指您的虛擬代理在服務時間內會收到的低頻和高方差問題。
It might cause the “out of intent” or “out of vocabulary” error.
這可能會導致“意圖不足”或“詞匯不足”錯誤。
The standard way of solving this issue is by building a knowledge base and use information retrieval techniques to generate answers for the unseen questions (instead of creating additional Q & A pairs or defining new intents mapping).
解決此問題的標準方法是建立知識庫,并使用信息檢索技術為看不見的問題生成答案(而不是創建其他問答對或定義新的意圖映射)。
Long Tail Intents — Created by Catherine Wang長尾意圖 —由凱瑟琳·王創作The long tail intents will always happen no matter how well you design your agent’s conversation and the underlying task flow. Human likes improvisation and abstraction, hence a prepare for the unseen and unknown.
無論您如何設計座席的對話和基本任務流程,長尾意圖總是會發生。 人類喜歡即興創作和抽象創作,因此為看不見和未知的事物做準備。
5.如何處理談話中的混亂和模棱兩可? (5. How to manage confusion and ambiguity in conversation?)
Human has a robust communication protocol and able to clarify ambiguity and confusion quickly.
人類具有強大的通信協議,并且能夠快速澄清歧義和混亂。
But for machines to clear up ambiguity, we need to design a mechanism to trigger the recovery and fallback policy (the rules defined by AI Engineer). A user’s expression(question) can be put into three groups, 1) clean and straight intent (easy to understand and process), 2) unknown intent (out of scope questions), and 3) uncertain intent (have potential matching but need additional clarification)
但是,對于要消除歧義的機器,我們需要設計一種機制來觸發恢復和后備策略(由AI工程師定義的規則)。 用戶的表達(問題)可以分為三類:1)清晰明確的意圖(易于理解和處理); 2)意圖不明(超出范圍的問題); 3)意圖不確定(具有潛在的匹配性,但需要附加條件)澄清)
The dialog management engine should be able to determine which group should the current user expression falls into. The general idea is that we assume the common user questions would typically follow the normal distribution. And the DM(dialog management) is using the classification threshold to triage the received questions.
對話框管理引擎應該能夠確定當前用戶表達式應屬于哪個組。 一般的想法是,我們假設常見的用戶問題通常遵循正態分布。 DM(對話管理)使用分類閾值對收到的問題進行分類。
Intent classification distribution — Created by Catherine Wang意圖分類分布 -由Catherine Wang創建predict_proba(expression)< ?1, [Reject], trigger [Fallback] response
預言_proba(表達式)<?1,[拒絕],觸發[回退]響應
?1<predict_proba(expression)< ?2, [Uncertain], trigger [Recovery] response
?1<predict_proba(表達式)<?2,[不確定],觸發[恢復]響應
predict_proba(expression)> ?2, [Accept], trigger [Match Intent] response
預言_proba(表達式)>?2,[接受],觸發[匹配意圖]響應
6.如何設計A / B測試以改善您的虛擬代理? (6. How to design the A/B testing to improve your virtual agent?)
In my humble view, A/B testing is the silver bullet to improve the usability and adoption rate of your virtual agent.
在我看來,A / B測試是提高虛擬代理的可用性和采用率的靈丹妙藥。
Before conducting A/B testing, the agent is only being used in a sanctuary environment where testers and developers might have an unconscious bias in the development cycle. Instead of making an arbitrary decision on feature roadmap, build priority should be guided by the A/B testing result.
在進行A / B測試之前,該代理僅在避難所環境中使用,在該環境中,測試人員和開發人員可能在開發周期中存在無意識的偏差。 代替對功能路線圖做出任意決定,構建優先級應以A / B測試結果為指導。
Below are a few design principles for the agent A/B testing:
以下是代理A / B測試的一些設計原則:
- Running the test over a period of time, and design a time interval for on/off test features. 在一段時間內運行測試,并為開/關測試功能設計一個時間間隔。
- Collect a significant size of samples to run the hypothesis test. 收集大量樣本以運行假設檢驗。
- Build testing groups on different demographics. 在不同的受眾特征上建立測試小組。
- Separate the UI change the virtual agent function change in testing. 單獨的UI更改將在測試中更改虛擬代理功能。
Key metrics to track are:
要跟蹤的關鍵指標是:
Activation Rate: The ratio of a random user would open the chatbot on your client application.
激活率 :隨機用戶的比例將在客戶端應用程序上打開聊天機器人。
Confusion Trigger: What’s the percentage dose the dialog agent classifies the user expression to ‘uncertain’ and trigger recovery policy.
混亂觸發: 對話代理將用戶表達式分類為“不確定”并觸發恢復策略的劑量百分比是多少。
Fall Back Rate: The ratio of the fallback response being triggered in the conversation session.
回退率:在會話會話中觸發的回退響應的比率。
Goal Completion Rate: How many percentages of the conversation lead to successful task completion.
目標完成率:多少百分比的對話可以成功完成任務。
Retention: How long does a user stay in the conversation session with the virtual agent.
保留時間 :用戶在與虛擬代理的對話會話中停留多長時間。
Self-Serve Rate: How often can the agent fulfill the user’s requests independently (without trigger fallback and need a human intervention).
自助服務率:座席可以獨立執行用戶請求的頻率(不觸發回退并且需要人工干預)。
User Satisfaction: The user feedback that rate the satisfaction of the experience in using the virtual agent service.
用戶滿意度:評估使用虛擬代理服務的體驗滿意度的用戶反饋。
7.通過不斷學習來改善您的對話代理人 (7. Improve your conversational agent via continuous learning)
Most of the engineering team wouldn't need to use this approach to improve their agent. The conversational cloud platform (Dialogflow or Lex) will do the heavy lifting for you.
大多數工程團隊不需要使用這種方法來改進他們的代理。 對話云平臺(Dialogflow或Lex)將為您完成繁重的工作。
However, if you would like to build your conversational system from scratch, below is a way to architect the continuous learning pipeline to improve your dialog system.
但是,如果您想從頭開始構建會話系統,下面是一種構建持續學習管道以改進對話框系統的方法。
Continuous Learning — Created by Catherine Wang持續學習 -由Catherine Wang創建To train your dialog model, you need to prepare a relevant dataset. If you have exposed your agent to the end-user, build a feedback loop to collect the chat logs, transcripts, transactions, weblogs, etc. Then transform and normalize those data into a training database.
要訓??練對話框模型,您需要準備一個相關的數據集。 如果您已將代理暴露給最終用戶,則建立一個反饋循環以收集聊天記錄,成績單,交易,網絡日志等。然后將這些數據轉換并標準化為培訓數據庫。
If you don’t have user interaction data, use a user simulator (e.g. .. ) to chat with your agent and collect the labeled data from the simulated conversation (e.g., classified or misclassified). Those data can be used to train the recovery policy and dialog state tracking model. The next step is to sample user goals (tasks users want to accomplish in the chat session) and use it on the following reinforcement learning phase as a reward evaluator.
如果您沒有用戶交互數據,請使用用戶模擬器(例如..)與您的代理聊天,并從模擬對話中收集標記的數據(例如,分類或錯誤分類)。 這些數據可用于訓練恢復策略和對話狀態跟蹤模型。 下一步是對用戶目標(用戶希望在聊天會話中完成的任務)進行抽樣,并在隨后的強化學習階段將其用作獎勵評估者。
Lastly, expose your agent online and enable online learning mechanism. Ensure your agent will get smarter and smarter when more and more people are using it.
最后,在線公開您的代理并啟用在線學習機制。 確保當越來越多的人使用它時,您的代理將變得越來越聰明。
(This is an advanced topic, and I won’t be going too deep in this post. Do contact me if you are interested in exploring more.)
(這是一個高級主題,在本文中我不會做得太深。如果您有興趣探索更多內容,請與我聯系。)
What has been discussed in this post only represents a fraction of the problems you would face in real life. And each point that has been mentioned can be expanded into a research post.
本文中討論的內容僅代表您在現實生活中將面臨的部分問題。 并且已提到的每個要點都可以擴展為研究職位。
We are exploring what is possible and building the future while we are learning it. Try to take your client on the journey with you and communicate authentically and transparently.
我們正在探索什么是可能的,并在我們學習的同時建設未來。 嘗試使您的客戶與您一起旅行,并進行真實,透明的溝通。
PexelsPixabayRemember, we are building a conversational AI solution, so why shouldn’t we first communicate better with our clients before thinking about how to make our virtual agent interact more smoothly with end-users.
請記住,我們正在構建一個對話式AI解決方案,所以為什么不首先考慮與客戶進行更好的溝通,然后再考慮如何使我們的虛擬代理與最終用戶更流暢地交互。
Thanks for reading, until next time.
感謝您的閱讀,直到下一次。
About me, I am a 👧🏻 who is living in Melbourne, Australia. I studied computer science and applied statistics. I am passionate about general-purpose technology. Working in a Global Consulting firm as an AI Engineer lead👩🏻?🔬, helping the organization to integrate AI solutions and harness its innovation power. See more about me on LinkedIn.
關于我,我是a ,住在澳大利亞墨爾本。 我學習了計算機科學和應用統計學。 我對通用技術充滿熱情。 在全球咨詢公司擔任AI工程師領導 👩🏻?🔬,幫助組織集成AI解決方案并利用其創新能力。 在LinkedIn上查看有關我的更多信息。
翻譯自: https://towardsdatascience.com/conversational-ai-key-technologies-and-challenges-part-2-b8dea63aeafc
查看-增強會話
總結
以上是生活随笔為你收集整理的查看-增强会话_会话式人工智能-关键技术和挑战-第2部分的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Mobileye 2022 年 Q4 营
- 下一篇: 我从未看过荒原写作背景_您从未听说过的最