Rasa Webinars | How Rasa’s Research Team Uses Rasa X to Build Carbon Bot

How Rasa’s Research Team Uses Rasa X to Build Carbon Bot

Update

A lot of things have changed since this webinar was recorded. Rasa X, the freemium companion tool to Rasa Open Source, is no longer supported or maintained, and we are currently focused on the development of the Rasa Enterprise platform. To learn more about this, you can check out this blog post.

YouTube Link

How Rasa’s Research Team Uses Rasa X to Build Carbon Bot

Rasa33K subscribers Originally aired: December 17, 2019

In this recorded 1-hour webinar, Alan Nichol, co-founder and CTO of Rasa presents the Rasa research team’s work building and fine-tuning Carbon Bot, a contextual assistant that helps travelers purchase carbon offsets for flights.

The Demo Includes:

Transcript:

Hi, everyone. Can you hear me? I hope so. Thanks, everyone, for phoning in. Getting some comments. Does that mean people can hear us?

Yes, people can hear us.

Excellent. All right. Thanks for the quick feedback, everyone. So it's Alan and Ty here from Rasa. Great that all of you joined. We'll be recording this webinar and making it available online in case you want to share it with your friends later on. So we're going to talk a little bit about Carbon Bot, which is a project that we're working on in the research team, and specifically we're going to be talking about how we use Rasa and Rasa X together to improve the assistant based on the conversations that people have with it. So I'll be showing a mix of things. I'll be showing the GitHub repo, which is open source, I'll be showing the command line where I have the code running, and I'll be showing the server where we're running Rasa X and just do some live annotation and look at things, and we'll give you the chance to ask lots of questions. So if you have a question, just make a note of it. Ty's here, keeping track of all of them, and we'll make sure that there's plenty of time to answer everybody's questions about things that maybe don't make sense.

Cool. So I'll go and start with a very quick intro to Rasa and why we exist just for a couple of minutes and then we'll go straight into looking at Rasa X. So the reason why this company exists is to empower all makers to create AI assistants that work for everyone. That's our mission because we believe it's an important piece of technology. We think that voice and chat interfaces are extremely important, and it would be a real shame if we only get to use that technology in the context of being an Amazon customer or an Apple customer or anything like that. There are many important, valuable use cases for this technology, which the big tech companies will never build. So we want to make sure that everybody has the ability to build great AI assistants to help themselves and others in their lives.

The way that we aim to achieve that mission is doing three things. So we open-sourced the Rasa framework, which is an open source machine learning based framework for building AI assistants. Then we invest heavily in our community. We have a very active forum, we have lots of active contributors. If you're in this webinar, a good chance you're already part of the community, so thank you for being part of it. It's really a core foundational piece of our mission. We do lots of applied research, and that's also what we're doing with Carbon Bot. So we have a research team, and our focus is really on finding out where people get stuck when they build an AI assistant, and that can also mean just building one ourselves and seeing where we get stuck, and then figuring out what things we can build that help you build something that you couldn't build today. How do we push the boundaries of what's possible? All those things together are how we want to achieve our mission.

Lots of people use Rasa, which is great. We just had our third birthday this week, and since then we've had over 2 million downloads, since we originally open-sourced Rasa. We have companies in all sorts of different industries using it for all sorts of use cases. So we also recently launched a showcase on our website. If you go to Rasa.com/showcase, you can see some of the things that people are building with Rasa.

The way we think about building AI assistants and making them more sophisticated is to split it up into five levels. This is something we talk a lot about at Rasa. We borrowed this idea from self-driving cars. So we don't just say there are dumb chat bots and artificial general intelligence, there are lots of layers in between. The same way that like a level five self-driving car, you can just fall asleep in the back and wake up at your destination, we think of level five conversational AI as building an autonomous organization with lots of different AI assistants coordinating and handling large parts of your operations.

But where the advanced teams are today and what we're really focused on right now at Rasa is level three. Level three means that you can have fluid conversation within a narrow domain. So you don't have a chat bot that can talk about anything, you don't have an AI assistant that can help you with anything, but you're focused on a specific domain, but you can handle users going off the happy path. That's a really crucial part to building AI systems that really help people rather than just frustrate them. Just to add a bit more color to the difference between level two, so a real level two assistant is one where you're rigidly...

The next level up is kind of a basic version of level three where you do some form filling. So you ask the user a couple of questions in order to help them. But of course if the user has follow on questions or they don't comply or they want to know why you'd want to know that or they're not about something, you get a little stuck. So that's what we think of as advanced level three, is where you can guide a user to complete their goal, you can collect the information that you need from them, and you can also help them decide what it is they really want, choose between different options ask follow on questions, compare things, and have a more interesting dialogue around a narrow topic.

So one of the pieces of tech that's here to enable these advanced level three assistants is a model called TED, which is the transformer embedding dialogue policy, as we wrote a paper about this and it's available in Rasa as of version 1.3, which was released this summer. What the TED model does is it looks at the history of your conversation at every turn and it decides which parts are relevant at any point in time. So if the user has been going off topic for a bit and having some follow-on questions and then returns to the original topic, TED knows which parts of the conversation to skip over because they're not relevant and go back and complete the topic that was addressed earlier on. So that's advanced level three, where you can have quite a natural, fluid set of conversations with nested sub-conversations and referring back to earlier things.

Cool. So we'll get back to level three in a little bit, but I also want to introduce Carbon Bot just very briefly. So Carbon Bot is a very simple thing. It just tries to encourage people to buy carbon offsets when they take a flight. So if you're flying, as opposed to taking the train somewhere, you're causing a great deal of emissions that could be avoided. If you can't avoid it, if flying is your only option, then you can at least buy some carbon offsets which kind of counteract the carbon dioxide that's admitted from your flight.

So if you want to give a try, you can go to this link here, or you can scan the QR code on your phone and you can have a chat with Carbon Bot right away. It's deployed on Facebook messenger right now. So if you want to have a go at it, just feel free to follow that link. The code for Carbon Bot is open source. So if you want to look along, maybe have a look at the code base, also to ask some questions later in the webinar, feel free to just go to GitHub now and have a poke around the base and look at how it's set up and look at the training data set that's in there, and we'll be looking at the GitHub repo in a few minutes in any case.

Cool. So then I want to talk a little bit about Rasa X and how we use it together with Rasa to build Carbon Bot. So Rasa X is not a replacement for Rasa, it's a tool that you use together with Rasa Open Source. So the way we intend it to be used is that you build the minimal, simplest possible version of your bot using Rasa Open Source, and then as quickly as possible, you give it to some people to test. So, there's really no substitute for getting test users to try your bot and learning from those conversations.

So we think of this as different stages. You have your minimal viable assistant. Once you have that running, then you can set up Rasa X, you can talk to the assistant yourself, then you can share the link with some friends or some colleagues and get them to test it out. And then once you have it to a level that you're happy with, then you can start involving real users and hook it up to Facebook messenger or Slack or wherever it is you want to deploy your bot.

So we really see these tools as working together. An important piece is that Rasa X is not meant to be a kind of all in one, but building point and click platform. Rasa X is there to do the things that are hard to do just in code and on the command line.

The way the Rasa X works is you collect the conversations that people are having with your assistant. That's the first step. You then review them. So you go through, see what people are saying, understanding which parts of your bot you need to improve, and then you set it up together with your continuous integration and deployment to continuously improve the assistant as you invest time and energy into improving it.

So that's what I'll be showing in the webinar today, is this process and how we use it for Carbon Bot.

So I have the Rasa X UI open, it's deployed on a server here at carbon.rasa.com. So this is just where I go and log in and see everything that's going on with the bot. So if you want to figure out how to deploy Rasa X on a server, the latest episode of the Rasa Masterclass is episode nine, and it just goes into a huge amount of detail of provisioning a server, installing Docker Compose, getting everything up and running and getting it also hooked up to the right channels so that people can actually chat to your bot.

If I just look, it looks like some of you have been chatting to Carbon Bot just now, which is cool. So your conversations are coming up here. I can see that in total, over 400 people have chatted with Carbon Bot, which is very cool and very encouraging. That's obviously then a challenge for me to figure out, okay, which of these conversations contained something interesting that I can learn from, and which ones are going well and which ones aren't?

If I want to go a little further, then the question is, okay, which conversations really include something interesting?

I could do that by filtering for an intent, but I'm not going to. I'm going to actually filter by the action where the assistant explains how this calculation is done. So it says here, auto explain also calculation. So we'll have a look for all the conversations where at least this happens. We have a much more manageable number now of 33 conversations.

So if I think that, Well, look, I added a few more NLU examples here, then I'm pretty happy with this performance. I haven't degraded any of the intents particularly, so I'll just merge that.