Integrate Rasa in a humanoid Robot

Hello everyone,

I’m a newbie regarding Chatbots, Python and especially in projects on that scale of using all those different skills in combination. Still, I think it’s a highly interesting topic and maybe some of you are interested in helping me along the long and bumpy path till success.

As a student project I am currently trying to use Rasa to significantly improve the “intelligence” of a humanoid Robot - Pepper. It isn’t quite easy because I’m not really a tech / computer science student so I have to learn a lot. However, here is my plan and the goal:

The goal is to „make“ Pepper able to respond to a lot of questions regarding my university. Basically the manufacturer of Pepper provides kind of an IDE to script his intelligence. Script. There isn’t real intelligence. I can define some synonyms and optional parts in some sentences, but all in all I have to define every spoken and - sadly - understandable word for Pepper. That’s not quite smart. So I was thinking of using something more brilliant: Rasa.

I thought it would be clever to train Rasa all the necessary stuff and especially using a knowledge base.

As I explained in the beginning I’m not an IT crack which means there are some challenges, which are feeling like Mount Everests I have to face:

  1. I have to customize my actions to get the right kind of answers based on the knowledge base. Solution: Learning Python, understand the Action documentation and customize them.
  2. I have to get familiar with the - from my perspective - highly complex way to use the API to solve the communication between Pepper and Rasa. Just to explain: I thought the user could talk with Pepper. Pepper would pass the grasped sentence in the form of a text to the API, Rasa figures out the answer and pass it back to Pepper who would speak it out for the user. Sounds so easy to describe :wink:.

To solve all those problems I am currently learning Python. Hopefully afterwards I will be able to customize those actions and eventually can establish the communication between the two systems.

Why I’m writing this?

I already read many posts and also realized that there are (German) Rasa developers so maybe they are also interested to help me a bit :).

Now I’m interested, what do you think about this project? Is my path of solution realistic?



Out of curiosity, how much time do you have for this project?

1 Like

Well all-in-all I could work on it till January / February 2020.

Even though you mentioned that the coding part is what you find most challenging, I would still advise you to prioritize having a solid Rasa model first. In my experience it is very important to find a good architecture for the Machine Learning part and define a solid Training set, which you will have to do mostly by hand in the beginning. Having a good structure for the different user intents and entities you want to extract and possibly store is critical. If you have that solid foundation the logic required for your custom actions will be much more straight forward. Also, communication between Rasa and Pepper, depending on the implementation of Pepper, boils down to just a few lines of code of posting your message string and listening for the response Rasa will post on the same REST channel, as described in the docs.

@EliDll Thanks for your answer! I think you are absolutely correct and the described and necessary logic is one of the most interesting parts in my opinion!

Just a question regarding your mentioned machine learning architecture. What do you mean with architecture? Is it when to use what intent and which intents are necessary in general? Like using more complex intent or prefer using simple intents? If you have any good sources where I could dig deeper into the architecture I would appreciate it if you let me know.

However I just thought it would be clever to check all the included parts of my project against practicability. That’s why I thought I could start with kind of an MVP to test all the included elements. As soon everything works and I know it is possible to establish the communication between Pepper and Rasa I would focus immediately on the machine learning architecture!

Thanks a lot, Sven

Yes that’s what i meant. You could choose to have very broad intents and only narrow down your reaction based on which entities you find alongside the intent, or you could choose to have very narrow and specific intents. Also you have to think about which entities are relevant to you. That’s the one side of architecture, the other one would be to think about wether you want to train your own model from the ground up, or use pretrained language models like spacy, or duckling in your pipeline. Detailed information on how to configure your pipeline can be found in the Rasa Docs, however i found that this three-part Blog was very helpful in choosing the right approach.

1 Like

Thanks again for your answer!

I definitely will read the blog articles. I currently using a german spaCy language model (de_core_news_md) because I expect that I will not have a lot of training data. However I will find that out quite soon. Even if I’m not sure what “a lot” training data means or where “few” training data begins :thinking:. So just to be clear: I have a running rasa system which works like to expect. Nevertheless it’s not further evolved because I currently working on the Python & communication problem.

I also thought that it is not a huge problem to change pipelines later if it’s necessary because I could put the same and in a different pipeline (excluded multi-intents). Correct me if I’m wrong.

Thanks again,

Yes, switching out your pipeline later on should be relatively straight-forward, provided you know which components work together and which ones won’t, there are a few dependencies. Just keep in mind that the bigger your training data gets, the more tedious it will be to add a new feature, like a new entity you want to detect, whilst keeping your file clean. I wasn’t aware that you already have a working ML model set up. In that case I agree it’s a good idea to focus on the interface part, although I would be fairly optimistic about that. Good luck with your project!