Sunday, April 18Digital Marketing Journals

Rasa export demo: The Concertbot. To demonstrate the power of the… | by Vittorio Banfi | Dec, 2020


To demonstrate the power of the Botsociety Rasa export, we re-designed the official Rasa example ‘Concertbot’ in Botsociety. It will give you a good idea of what you can accomplish by using a Botsociety design as the starting point of your Rasa project. We will also break the export file by file, showing how to use them in your Rasa project.

Note: This blog post will not go into the details of how to design a chatbot on Botsociety. If you are interested in that, check out the rest of our tutorials here.

Before we start, the files! We will be using a design file on Botsociety that will export the ConcertBot example.

The design file can be found here:

The Rasa Concert bot example that I reference can is in the official Rasa Github repository. Here:

Ready? Let’s go!

The first thing that you will need to do is copy the design file to your Botsociety account so that you can edit it. To do that:

If you don’t have a Botsociety account, you can create one for free.

Ok, now you own a copy of your file!

To export the file from the example:

  • Click on the wrench icon on the left-hand side panel
  • From the dropdown on top select Rasa
  • Click export

That’s it! You just have downloaded your Rasa files on your computers. Let’s open the ZIP file.

The export has the following files:

As you will notice, Botsociety generated the Rasa file structure for you. So if you compare it with the Rasa example on Github:

You will see that the only difference is the README file.

1. 3 Tips for your Voice and Chatbot Program from Gartner’s Customer Service Hype Cycle 2020

2. Deploying Watson Assistant Web Chat in Salesforce Lightning Console

3. Are Chatbots Vulnerable? Best Practices to Ensure Chatbots Security

4. Your Path to AI — An IBM Developer Series

Ok great! Let’s analyze each file one by one.

This file sets up your Rasa bot general configuration. You may want to change it. Here’s the Rasa example. Botsociety exports a static, default one to get you started:

The config.yml file in the Botsociety export

The Rasa example is very similar, with different values for the epochs and other settings:

The config.yml file in Rasa

To know what to do with the config.yml, check the relevant Rasa documentation.

Conclusion: If you are using your Botsociety export to update an existing Rasa project, our suggestion is not to copy this over. Otherwise, it’s a good starting point.

This is a static file, and it’s exactly the same in the Rasa export and in the Botsociety export.

Conclusion: If you are using your Botsociety export to update an existing Rasa project, our suggestion is not to copy this over. Otherwise, it’s a good starting point.

This is an important file. It lists the intents, the responses, and the actions available in the bot. This is how it looks in the Botsociety export:

version: '2.0'actions: []entities: []intents:- greet:use_entities: []- how_to_get_started:use_entities: []- deny:use_entities: []- goodbye:use_entities: []- affirm:use_entities: []- compare_reviews:use_entities: []- search_venues:use_entities: []- search_concerts:use_entities: []- thankyou:use_entities: []- nlu_fallback:use_entities: []- bot_challenge:use_entities: []responses:utter_greet:- text: hey thereutter_how_to_get_started:- text: i can help you find concerts and venues. do you like music?utter_goodbye:- text: 'goodbye :('utter_affirm:- text: awesome! you can ask me things like "find me some concerts"utter_compare_reviews:- text: |-foo fighters: 4.5katy perry: 5.0utter_search_venues:- text: |-here are some venues i foundbig arena: 4.5rock cellar: 5.0utter_search_concerts:- text: |-foo fighterskaty perryutter_thankyou:- text: you're very welcome.utter_nlu_fallback:- text: 'sorry, i didn''t get that, can you rephrase?'utter_bot_challenge:- text: 'i am a bot, powered by rasa.'

This is how it looks in the Rasa example:

The Rasa example contains everything that Botsociety exported, plus two additional fields that contain data that is not defined in Botsociety.

Let’s take a look at them.

The first one is the slot section:

slots:
concerts:
type: list
influence_conversation: false
venues:
type: list
influence_conversation: false
likes_music:
type: bool
influence_conversation: true

The slots are a Rasa feature that allows you to give context to your chatbot. We may eventually add context inside Botsociety and make this feature available in the export in the future, but for now, you will need to set these up in Rasa directly. In this case, adding the above block in this file is needed to set up the slots of this conversation.

The second block that is present in the Rasa example only is the session config:

session_config:
session_expiration_time: 60 # value in minutes
carry_over_slots_to_new_session: true

Those are additional configurations that you can find in Rasa.

Conclusion: As you see, most of the heavy lifting on the domain.yml was done by Botsociety based on your design. If you want to add additional features

This is a static file, and it’s exactly the same in the Rasa export and in the Botsociety export.

Conclusion: If you are using your Botsociety export to update an existing Rasa project, our suggestion is not to copy this over. Otherwise, it’s a good starting point.

Leave a Reply