rasa聊天机器人_Rasa-X是持续改进聊天机器人的独特方法
rasa聊天機器人
介紹 (Introduction)
When it comes to chatbot improvement, three elements are paramount:
在改善聊天機器人方面 ,三個要素至關(guān)重要:
- Continuous 連續(xù)
- Incremental 增加的
- Contextual 語境
Most NLU environments have existing tools for conversational improvement. These tools are often characterized by by these traits:
大多數(shù)NLU環(huán)境都有用于對話改進的現(xiàn)有工具。 這些工具通常具有以下特征:
- High level 高水平
- Statistical Approach 統(tǒng)計方法
- Bulk 塊
- Metrics Focused 重點指標
- Hard To Steer 難以操縱
為何經(jīng)常失敗:用戶想要遵循期望的道路 (Why This Often Fails: Users Want To Follow The Desire Path)
We talk about the happy path, and the repair path. The main aim of the repair path, is to bring the user back to the so-called happy path.
我們談?wù)摽鞓返牡缆?,以及修復(fù)的道路 。 修復(fù)路徑的主要目的是使用戶回到所謂的快樂路徑。
But, should we not rather look at renaming it? Is the happy path not the designed path…and the repair path the desire path of the user?
但是,我們是否應(yīng)該寧愿考慮重命名呢? 幸福的道路不是設(shè)計的道路嗎?修理的道路是否是用戶的期望道路?
Design versus Desire設(shè)計與欲望欲望之路 (Desire Path)
The desire path usually represents the shortest or most easily navigated route between an point of departure and a destination. In parks and open areas, the width and severity of erosion are often indicators of the traffic level that a path receives.
期望路徑通常表示出發(fā)點與目的地之間的最短或最容易導(dǎo)航的路線。 在公園和空曠地區(qū),侵蝕的寬度和嚴重程度通常是路徑接收流量水平的指標。
Desire paths emerge as shortcuts where constructed or designed paths take a circuitous route, have gaps, or are sometimes non-existent.
期望路徑作為捷徑出現(xiàn),其中已構(gòu)造或設(shè)計的路徑采用circuit回路線,存在間隙或有時不存在。
Back to chatobots, instead of forcing our users onto the conversations we designed for them, why not learn what their desired path is implement their preferences?
回到chatobots,為什么不讓我們的用戶參加我們?yōu)樗麄冊O(shè)計的對話,而是為什么不了解他們想要實現(xiàn)自己的偏好的途徑呢?
Left: Desire Path | 左 :欲望之路 Right: Designed Path右:設(shè)計路徑住所 (Accommodation)
Landscapers sometimes accommodate desire paths by paving them, thereby integrating them into the official path network rather than blocking them. The image above is of an desire path being blocked and rehabilitated in an attempt to force users on the designed path.
園丁有時會通過鋪砌所需路徑來容納所需路徑,從而將其整合到官方路徑網(wǎng)絡(luò)中,而不是阻塞它們。 上面的圖像是一個期望路徑被阻止和修復(fù),試圖迫使用戶使用設(shè)計的路徑。
Sometimes, land planners have deliberately left land fully or partially unpathed, waiting to see what desire paths are created, and then paving those.
有時,土地規(guī)劃師故意讓土地完全或部分地處于無路的狀態(tài),等著看產(chǎn)生了什么愿望之路,然后鋪路。
In Finland, planners are known to visit parks immediately after the first snowfall, when the existing paths are not visible.
在芬蘭,眾所周知,規(guī)劃人員會在第一次降雪后立即前往公園,而此時看不到現(xiàn)有路徑。
The naturally chosen desire paths, marked by footprints, can then be used to guide the routing of new purpose-built paths.
然后,可以使用以足跡標記的自然選擇的需求路徑來指導(dǎo)新的專用路徑的路由。
對話方法的要素 (Elements OF A Conversational Approach)
從設(shè)計之路到住宿 (From Designed Paths To Accommodation)
Rasa took a completely alternative approach compared to other chatbot frameworks. By introducing something they call Conversation-Driven Development (CDD). This approach is encompassed in their Rasa-X environment.
與其他聊天機器人框架相比, Rasa采用了完全替代的方法。 通過介紹他們稱為“ 對話驅(qū)動開發(fā)” ( CDD )的內(nèi)容。 這種方法包含在其Rasa-X環(huán)境中。
Their approach is novel yet effective.
他們的方法新穎而有效。
With Rasa-X, what drives improvement is real conversation. And by studying real user conversations the delta between real conversations (desire) and anticipated (designed) conversations are narrowed.
使用Rasa-X , 真正的對話是推動改進的動力。 通過研究真實用戶對話,可以縮小真實對話(期望)和預(yù)期(設(shè)計)對話之間的差異。
The whole process is very efficient due to a closed loop from review, to annotating to even doing NLU “development”. As you will see later in this story.
由于從審閱到注釋甚至是NLU“ 開發(fā) ”的全過程,整個過程非常高效。 正如您將在本故事的后面看到的。
The process is simplified and turned into an administrative task.
該過程被簡化并變成了管理任務(wù)。
Communication between teams and translation of tasks are negated.
團隊之間的溝通和任務(wù)翻譯被否定。
分享你的機器人 (Sharing Your Bot)
The notion in Rasa-X to create a URL through which you can create a preview for users, reminds very much of feature IBM Watson.
Rasa-X中用于創(chuàng)建URL的概念使您可以通過它為用戶創(chuàng)建預(yù)覽,這使IBM Watson特性大為改觀。
IBM Watson Assistant Preview LinkIBM Watson Assistant預(yù)覽鏈接What this does, is create an avenue to quickly and efficiently share your bot in a way which can be revoked again just as easily. All the while creating user conversations to analyse.
這樣做是為了創(chuàng)建一種途徑,以可以輕松地再次撤銷的方式快速有效地共享您的機器人。 在創(chuàng)建用戶對話進行分析的同時。
NLU收件箱:將NLU培訓(xùn)轉(zhuǎn)變?yōu)楣芾砣蝿?wù) (NLU Inbox: Turn NLU Training Into An Administrative Task)
Utterances from users which are not part of your training data shows up in your NLU Inbox. These utterances can annotated and classified within the web tool.
NLU收件箱中會顯示不屬于您的訓(xùn)練數(shù)據(jù)的用戶發(fā)言。 這些話語可以在網(wǎng)絡(luò)工具中進行注釋和分類。
Rasa X概述:安裝和功能 (Rasa X Overview: Installation & Functionality)
安裝 (Installation)
Most probably you want to install Rasa X on your Windows 10 machine to play around with. I would suggestion you first install the Rasa chatbot software.
很可能您想在Windows 10計算機上安裝Rasa X來玩。 我建議您先安裝 Rasa chatbot軟件。
Installing Rasa X will be really be an extension of your Rasa chatbot. To install Rasa X, open Anaconda Prompt window. Activate your virtual environment and run the command:
安裝Rasa X確實是Rasa chatbot的擴展。 要安裝Rasa X,請打開Anaconda Prompt窗口。 激活您的虛擬環(huán)境并運行命令:
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simpleOnce you have successfully installed Rasa X, run the command:
成功安裝Rasa X后,請運行以下命令:
rasa xIn your Anaconda window you will see the url where Rasa X is running. Simple open it in your browser.
在您的Anaconda窗口中,您將看到Rasa X運行的URL。 只需在瀏覽器中打開它即可。
Rasa X Successfully StartedRasa X成功啟動The user name and password can be found in the initialization string within the anaconda terminal.
用戶名和密碼可以在anaconda終端的初始化字符串中找到。
開始與您的機器人對話 (Start Talking To Your Bot)
Before you can start talking with your bot, you will have to train your first model:
在開始與您的機器人對話之前,您必須訓(xùn)練您的第一個模型:
rasa trainAnd start your bot:
并啟動您的機器人:
rasa shell互動學(xué)習 (Interactive Learning)
You have the ability to talk to your bot and make use of interactive learning while in a conversation. This bridges the gap between practical experience and training data.
您可以在對話中與您的機器人對話并利用交互式學(xué)習。 這彌合了實際經(jīng)驗和培訓(xùn)數(shù)據(jù)之間的差距。
Interactive Learning Chat Window互動學(xué)習聊天窗口NLU收件箱 (NLU Inbox)
When users talk to your assistant — via a messaging channel, the Share your bot feature, or through the Talk to your bot screen — their messages are funneled into the NLU inbox. When you have unprocessed messages in the Inbox, you’ll now see an indicator in the sidebar, alerting you that messages are ready to be reviewed.
當用戶通過消息通道,“ 共享您的機器人” 功能或通過“ 與您的機器人對話” 屏幕 與您的助手 交談時, 他們的消息將被集中到NLU收件箱中。 當收件箱中有未處理的郵件時,現(xiàn)在您會在側(cè)欄中看到一個指示符,提醒您已準備好查看郵件。
List of Functionality Within Rasa XRasa X中的功能列表The NLU model can be trained from the console, with a list of all models available and an indicator which one is currently in production. Switching between models are easy. This is very convenient should you want to roll back to the last model; or even a few models back.
NLU模型可以從控制臺進行訓(xùn)練,其中包含所有可用模型的列表以及一個指示當前正在生產(chǎn)中的指示器。 在模型之間切換很容易。 如果要回滾到上一個模型,這將非常方便; 甚至是一些模型。
Your Pipeline configuration file is available via the console, with stories and responses.
您的管道配置文件可通過控制臺獲得,包括故事和響應(yīng)。
創(chuàng)建意圖和復(fù)合實體 (Creating Intents & Compound Entities)
Lastly I would like to spend some time on this one feature of Rasa X; managing and creating intents and entities. I see this as a sign that Rasa X will most probably evolve into a full-blown Graphic development tool.
最后,我想花一些時間在Rasa X的這一功能上。 管理和創(chuàng)建意圖和實體。 我認為這標志著Rasa X很可能會發(fā)展成為成熟的Graphic開發(fā)工具。
But with a difference…
但是有所不同……
Most other GUI’s have their focus on the dialog flow, call flow, state machine, conversation state management…call it what you like. Products that come to mind here are:
大多數(shù)其他GUI都將重點放在對話流,呼叫流,狀態(tài)機,對話狀態(tài)管理…隨便說什么。 這里想到的產(chǎn)品有:
- Microsoft Composer 微軟作曲家
- Watson Assistant 沃森助手
- Microsoft Power Virtual Agents Microsoft Power虛擬代理
- etc. 等等
It is design driven development of the chatbot. Or dialog driven development. The notion of, the more we improve the conversational design the better our chatbot will improve.
它是聊天機器人的設(shè)計驅(qū)動開發(fā)。 還是對話框驅(qū)動的開發(fā)。 的概念是,我們越改進對話設(shè)計,我們的聊天機器人就會越好。
Rasa is unique in the sense that they approach this problem from a conversational perspective. Something they refer to as Conversational-Driven Development.
從他們從對話的角度解決這個問題的意義上說,Rasa是獨一無二的。 他們將其稱為“ 對話驅(qū)動開發(fā)” 。
The focus is on improving the Conversational Experience by focusing on:
重點是通過改善以下方面來改善會話體驗:
- Chatting with your own chatbot and correcting it on the fly (interactive learning). 與您自己的聊天機器人聊天并即時進行糾正(交互式學(xué)習)。
- Studying how your users interact with the chatbot. 研究您的用戶如何與聊天機器人進行交互。
The reason I say Rasa X is an excellent development tool, is illustrated by their intent and entity management.
我說Rasa X是出色的開發(fā)工具的原因可以通過其意圖和實體管理來說明。
Let’s look at a practical example; within Rasa X you can create a new intent for your chatbot.
讓我們看一個實際的例子。 在Rasa X中,您可以為您的聊天機器人創(chuàng)建新的意圖。
Create a New Intent創(chuàng)建一個新的意圖We are naming our new intent:
我們正在命名我們的新意圖:
travel_detailOnce defined, we need to give example utterances for this intent. fifteen to twenty examples are good. We start with the example:
定義好之后,我們需要針對此意圖給出示例話語。 十五到二十個例子是好的。 我們從示例開始:
I want to travel from Berlin to Stuttgart by train tomorrow.We can save the example, and add more examples.
我們可以保存示例,并添加更多示例。
Example Utterance for Intent: travel_detail意圖的話語示例:travel_detailThe challenge is that within this intent there multiple entities we would like to capture. These entities can be fined graphically within Rasa X, and also contextually.
挑戰(zhàn)在于,在此意圖下,我們想要捕獲多個實體。 這些實體可以在Rasa X中以及在上下文中以圖形方式進行細化。
Intents can be seen as verbs and entities as nouns. The phrase slot filling also refers to capturing entities.
意圖可以看作動詞,實體可以看作名詞。 短語插槽填充還指捕獲實體。
Contextually means that entities are not recognized by the chatbot by asking the user directly for the input, or found via a finite lookup list. But rather entities are detected based on their context within the utterance or sentence.
上下文意味著聊天機器人無法通過直接向用戶詢問輸入或通過有限的查找列表來發(fā)現(xiàn)實體。 而是根據(jù)實體在話語或句子中的上下文來檢測實體。
This is closer aligned with how we as humans detect entities in a conversation.
這與我們?nèi)祟惾绾螜z測對話中的實體更加一致。
The word “Berlin” is selected and tagged as Entity type “from_city”選擇“柏林”一詞并將其標記為實體類型“ from_city”The word Berlin can be highlighted, and very intuitively a popup prompts us to define an Entity type or synonym. For now we are focusing on the Entity type.
柏林一詞可以突出顯示,并且非常直觀地彈出窗口提示我們定義實體類型或同義詞。 目前,我們專注于Entity類型。
We have two cities in the sentence, one the point of departure. The other the destination.
我們在句子中有兩個城市,一個是出發(fā)點。 另一個目的地。
Hence to entity types. In this context, we mark Berlin as an entity type from_city.
因此是實體類型。 在這種情況下,我們將柏林標記為實體類型from_city。
Continuing of Entity Annotation實體注釋的繼續(xù)The other entities we are interested in, we mark in the sentence.
我們感興趣的其他實體,我們在句子中標記。
Creating Entity Names or Types創(chuàng)建實體名稱或類型Each of the marked portions in the sentence we assign to an entity name we created. The different entities are conveniently marked in the sentence with different colors.
我們將句子中每個標記的部分分配給我們創(chuàng)建的實體名稱。 方便地在句子中用不同的顏色標記不同的實體。
The list of entities are:
實體列表為:
date_timetravel_mode
from_city
to_city
Adding more intent examples are easy an the process of becomes almost an administrative task. Below you can see from the color coding which entities are of the same type.
添加更多意向示例很容易,過程幾乎變成了管理任務(wù)。 在下面,您可以從顏色編碼中看到哪些實體屬于同一類型。
Adding a Second Intent Example添加第二個意圖示例結(jié)論 (Conclusion)
The challenge that an unstructured input environment like chabots pose is that you cannot anticipate every possible variation of user input.
象機器人這樣的非結(jié)構(gòu)化輸入環(huán)境所帶來的挑戰(zhàn)是,您無法預(yù)期用戶輸入的所有可能變化。
However, user input is a good indicator of what is on the mind of users. And making use of those conversations, following conversation driven development, leads to quicker iterations and rapid improvements.
但是,用戶輸入可以很好地表明用戶的想法。 在對話驅(qū)動的開發(fā)之后,利用這些對話,可以加快迭代速度并快速改進。
在這里… (Read More Here…)
翻譯自: https://medium.com/@CobusGreyling/rasa-x-has-a-unique-approach-to-continuous-chatbot-improvement-420a367f4146
rasa聊天機器人
總結(jié)
以上是生活随笔為你收集整理的rasa聊天机器人_Rasa-X是持续改进聊天机器人的独特方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: g4600处理器相当于i几
- 下一篇: 苹果8有128g内存的吗