Chatbots Depend On Continuous Collaborative Improvement
To This End, Rasa X Is An Exceptional Tool
The barrier to releasing your first chatbot is much lower than releasing your first mobile app…
There is much more initial effort required to launch a mobile app compared to a chatbot. This might be an enticement to rather focus on a conversational interface.
The truth is, although the initial work is less with chatbots, the real work starts once your chatbot is in production.
With a mobile app, you dictate the structure of the data prior to input; and this is defined early on in the design. The one thing which should never happen is the app crashing.
Chatbots on the other hand, encourage unstructured input. Hence the need for continuous and collaborative improvement.
Tools For Continuous Collaborative Improvement
Often in chatbot teams much time is spend on collecting information, transforming that information and distributing it to teams or individuals to review and give their recommendations.
Creating a common understanding and synchronizing efforts are time consuming.
Recommendations & Improvements, once collated, need to find their way to a NLU specialist to train a the Natural Language Under standing model.
The ideal would be to access an environment, where while transcripts are reviewed, these conversations can be marked, annotated and submitted to train a new and enhanced model. One of the best example of such an environment is Rasa X. This environment seems to employ best practice for continuous improvement.
Hence the best way to describe this process would be an overview of what Rasa X offers.
Rasa X Overview: Installation & Functionality
Most probably you want to install Rasa X on your Windows 10 machine to play around with. I would suggest you first install the Rasa chatbot software.
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:
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple
Once you have successfully installed Rasa X, run the command:
In your Anaconda window you will see the url where Rasa X is running. Simple open it in your browser.
The user name and password can be found in the initialization string within the anaconda terminal.
Start Talking To Your Bot
Before you can start talking with your bot, you will have to train your first model:
And start your bot:
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.
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.
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.
Your Pipeline configuration file is available via the console, with stories and responses.
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.
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:
- Microsoft Composer
- Watson Assistant
- Microsoft Power Virtual Agents
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.
Rasa is unique in the sense that they approach this problem from a conversational perspective. Something they refer to as Conversational-Driven Development.
The focus is on improving the Conversational Experience by focusing on:
- Chatting with your own chatbot and correcting it on the fly (interactive learning).
- 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.
Let’s look at a practical example; within Rasa X you can create a new intent for your chatbot.
We are naming our new intent:
Once 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.
The 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.
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.
This is closer aligned with how we as humans detect entities in a conversation.
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.
We have two cities in the sentence, one the point of departure. The other the destination.
Hence to entity types. In this context, we mark Berlin as an entity type from_city.
The other entities we are interested in, we mark in the sentence.
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.
The list of entities are:
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.
The challenge that an unstructured input environment like chabots pose is that you cannot anticipate every possible variation of user input.
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.