Photo by Ryan Wang on Unsplash

Eight Things Differentiating Rasa From Other Chatbot Platforms

And Why These Eight Elements Might Be What Your Conversational UI Needs.

10 min readAug 19, 2020

--

Introduction

While I was building prototypes with different chatbot platforms and environments, I saw clear patterns starting to emerge. One could see how most platforms have a very similar approach to Conversational AI.

Even though one might lead the other in certain elements, each were trying to solve common problems in a very similar fashion.

In this pursuit of solving Conversational AI problems, Rasa stands alone in many areas with their unique approach.

Here are eight things they do differently, and do exceptionally well.

1: Ease Of Access

Software

Rasa is so open and generous in terms of access to software and information…the question does arise, how do they make money? That question is answered in detail.

Could Rasa, as a company, have been commercially aggressive? For sure. Would they have made more Money? Most Probably.

But then the elements which attract so many of the current users would be lost.

Our mission is to empower all makers to build AI assistants that work for everyone.
To make that happen, our tools have to be accessible to all users, and all users should have full control over their data. ~ Rasa

One of my first Rasa Prototypes: RASA Interactive Learning and Conversation Visualization.

With Rasa you do not need a specialized hardware, GPU’s etc.

There is no mandatory cloud involved. You can run it locally on your machine. You don’t need mountains of training data (two examples per intent is the minimum) or hours to create and train a model.

Typically you can start with 15 to 20 user utterance examples per intent.

You don’t need to buy any software. There is no requirement for a NLU/NLP expert.

The most efficient way to get started on a Windows machine with Rasa is?

  • Install Anaconda
  • Create an Anaconda Environment
  • Install Python, ujson, tensorflow, Rasa, Visual C++,
  • Run:
rasa init
rasa train
rasa shell

Then chat to your bot via the command line!

Hiding Complexity

There is a true art to adding functionality to your software, while simultaneously simplifying the UI.

Most organizations fail at this.

Most chatbot environments grow hugely in complexity as they mature and add functionality. A case in point is Amazon’s Alexa Console and especially Alexa Conversations. Also IBM Watson Assistant.

The beauty of something like GPT-3 is the simplicity and ease of use of the new API.

Rasa-X & CDD falls into the same category. As Rasa grows in functionality, the user environment actually becomes more simplistic and intuitive. To achieve this is no easy feat.

Documentation

Rasa has approached Conversational AI from a grassroots level and started a revolution. Not in the corridors of power and boardrooms, but with developers, enthusiasts and those willing to dare.

An Early Afrikaans Language Demo Using Tensorflow Pipeline

Rasa has become the platform for many a hackathon project.

This has lead to seed projects in larger organizations and Rasa gaining traction almost through osmosis.

With documentation, tutorials, master classes, blogs and forums…help is in abundance and growing.

Developer advocacy started early and created an environment of experimentation and learning.

People

It is clear that the Rasa team is comprised of some of the brightest people. The is evident on may fronts. And again the openness and sharing of information, best practice and future plans are astonishing.

2: Conversation-Driven Development

Rasa has taken a very innovative and unique approach to continuous improvement of chatbots. This approach they have named Conversation-Driven Development (CDD). The enabler or tool for CDD is called Rasa-X.

Focusing On The Overlap

The overlap between what the user says and what you designed needs to grow. The two circles need to move into focus, until there is only one circle.

The Overlap Needs To Grow.

The overlap is where the successful conversations take place, and where the competitive advantage of your organization is built. Is it where the value of your data set vests.

Rasa-X is an ideal tool to grow the overlap from the get-go.

Mobile Apps Compared To Chatbots

Mobile Apps and chatbots are opposites in their time/effort curves. There is an allure to the the ease with witch a chatbot can be deployed. However, when the customer conversations start, the word begins. This is usually a rude awakening when the steep slope of effort emerges post launch.

Mobile Apps Compared To Chatbots

This steep slope is then best conquered by focusing on the conversations and improving the chatbot from the perspective of conversations.

Most NLU environments have existing tools for conversational improvement. These tools are often characterized by by these traits:

  • High level
  • Statistical Approach
  • Bulk
  • Metrics Focused
  • Hard To Steer
Traditional Chatbot Improvement versus CDD

Once you have pulled all the levers and tweaked setting, you deploy your model and wait with baited breath to view the results.

This is the opposite of CDD, which allows you to improve your model by working with actual conversations.

3: Evolving Entities

Contextual & Compound

One of Rasa’s strong points all along were compound and contextual entities.

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.

Compound & Contextual Entities in Rasa-X

Compound entities mean I can capture multiple entities per intent, or user utterance. In a scenario where the user gives you all the information in one utterance, you have the ability to capture all those values in one go.

This translate into fewer dialog turns and a more efficient chatbot.

Rasa’s Entity Roles

The starting point of entities are that you can add labels to words. Hence you can define concepts in your data.

In the example below, you have different city types defined with other entities.

## intent:travel_details- I want to travel by [train](travel_mode) from [Berlin](from_city) to [Stuttgart](to_city) on [Friday](date_time)

This is not elegant, as multiple entities need to be created for one real-word object, namely city.

And in this example, city have two roles, the city of departure and the city of arrival. With Rasa you are able to define these entities with specific roles in your project’s nlu.md file.

## intent:travel_details- I want to travel by [train](travel_mode) from [Berlin]{"entity": "city", "role": "depart"} to [Stuttgart]{"entity": "city", "role": "arrive"} on [Friday](date_time)

The output looks like this:

I want to travel by train from Berlin to Stuttgart on next week Wednesday.
{
"intent": {
"name": "travel_details",
"confidence": 0.9981381893157959
},
"entities": [
{
"entity": "travel_mode",
"start": 20,
"end": 25,
"value": "train",
"extractor": "DIETClassifier"
},
{
"entity": "city",
"start": 31,
"end": 37,
"role": "depart",
"value": "Berlin",
"extractor": "DIETClassifier"
},
{
"entity": "city",
"start": 41,
"end": 49,
"role": "arrive",
"value": "Stuttgart",
"extractor": "DIETClassifier"
}
],
"intent_ranking": [
{
"name": "travel_details",
"confidence": 0.9981381893157959
},

Rasa’s Entity Groups

This feature allows for entities to be grouped together with a specific group label. The best way to explain this is with an example…

Again, defined in your /data/nlu.md file:

## intent:teams- The first team will be [John]{"entity": "teamMember", "group": "1"}, [Mary]{"entity": "teamMember", "group": "1"} and [Geoff]{"entity": "teamMember", "group": "1"} and the second groupto travel will be [Martha]{"entity": "teamMember", "group": "2"}, [Adam]{"entity": "teamMember", "group": "2"} and [Frank]{"entity": "teamMember", "group": "2"}.

And the output from Rasa NLU:

The first team will be John, Mary and Geoff and the second group to travel will be Martha, Adam and Frank.
{
"intent": {
"name": "teams",
"confidence": 0.9999754428863525
},
"entities": [
{
"entity": "teamMember",
"start": 23,
"end": 33,
"group": "1",
"value": "John, Mary",

"extractor": "DIETClassifier"
},
{
"entity": "teamMember",
"start": 38,
"end": 43,
"group": "1",
"value": "Geoff",

"extractor": "DIETClassifier"
},
{
"entity": "teamMember",
"start": 83,
"end": 95,
"group": "2",
"value": "Martha, Adam",

"extractor": "DIETClassifier"
},
{
"entity": "teamMember",
"start": 100,
"end": 105,
"group": "2",
"value": "Frank",

"extractor": "DIETClassifier"
}

It must be noted…In general, data structures are being introduced to Entities. Entities can have sub and sub-sub entities, and can be decomposed. This trend is visible in Rasa, Alexa Conversations tool and Microsoft LUIS. Rasa calls it Entities Roles & Groups. AWS calls it Slots with Properties. And Microsoft LUIS, entities which can be decomposed.

4: Deprecation Of The State Machine

There are two areas chatbots will have to advance significantly to be truly conversational and handle unstructured multi-turn conversations. The one area is complex and compound entities.

The second, but most important is the state machine, dialog flow or also referred to as the dialog management system. This is the node tree with decision blocks at each node deciding where the conversation should go based on on a set of conditions.

This is the Achilles’ heel of chatbot platforms. It is the one element which constrains the chatbot to be flexible and resilient. While other platform providers are trying to optimize the dialog state management, Rasa is doing the opposite. They are deprecating it.

You cannot write rules for every single possible dialog path. The juxtaposition is evident; we want to introduce Conversational AI, but with a huge set of rules to manage our conversational tree.

Rasa uses machine learning to learn conversational patterns and predict response; based on the context etc. Training data is in the form of examples of conversations defined in a simple format.

5: Language Agnostic

The big cloud chatbot providers make provision for a set of languages. These languages are chosen based on what makes commercial sense. A minor regional language have no chance of being implemented. And for a large portion of the market this is a requirement.

Example of A Rasa Pipeline for Any Non-English Language:

language: "xx"  # your two-letter language codepipeline:
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: "char_wb"
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100

Other Machine Learning avenues demands specialized knowledge, hardware or is hard to package or productionize.

With Rasa you can train your chatbot in any language of your choice. Or you can choose to use the BytePair embeddings with access to 275 languages.

6: Ease Of Configurations & Pipeline Changes

Experimentation and rapid test iterations are made easy for the following reasons:

  • Installation via virtual environments (Anaconda for instance)
  • Run multiple virtual environments
  • Quick Installation
  • Minimal training data & Short Training Time
  • List of Models and Options
  • Pipeline & Configuration Examples
Anaconda Prompt running Rasa

You can fully customize your NLU pipeline by combining components in the config.yml file. You can change this on the fly to test performance. So can choose a starting point, and from there customize and adjust your configuration.

This is big advantage of using Rasa, being able to tweak configurations and parameters and subsequently test performance.

7: No Specialized Or Dedicated People Required

Rasa is democratizing access and availability of NLU software, resources and training. As mentioned before, while Rasa is becoming more complex and loaded with features, their UI is in simplified.

Rasa-X Console

Elements constituting the chatbot framework are clearly segmented and easy to understand. With minimal training, staff can be up to speed with the development and other environments.

8: Full Control Of Your Data

When it comes to your data there are two aspects which need to be considered. Firstly, where your data is hosted. Some countries have legislation prohibiting personal data being stored outside of the country. Cloud providers offer a range of geographic and edge locations.

Rasa-X: Managing your models. When “rasa train” is run, a new model is created. Activation of previous models is shown here.

The second aspect is that NLU/P organizations want you to “hand over” your data. The models they build with your data is not 100% under your control.

There is a feasibility study required and months of data collection etc. etc.

Rasa allows you to install anywhere you want; you can start on your laptop if you like. Minimal data is required to start the process and lay people can be skilled up and trained to “run with it”…

Conclusion

There are some companies who claim they have a secret AI sauce which will change the world irrevocably.

Hence why I find Rasa’s approach realistic, honest, open and long-term.

--

--

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com