Building your own conversational AI with open source tools

Conversational AI is far from being a solved problem, but you don’t need to rely on third-party APIs to build great chat and voice apps.

In this talk we will live-code a useful, engaging conversational AI bot based entirely on machine learning. We’ll be using Rasa NLU & Rasa Core, which are open source libraries for building machine learning-based chatbots and voice assistants. We will teach our system how to hold multi-turn conversations by creating some initial training data, and then refine its behaviour by interacting with the system and providing feedback. We will cover the fundamentals of conversational AI, including the most important algorithms for intent classification, entity extraction, and dialogue management.

What will attendees learn:

  • fundamentals of natural language understanding and dialogue management for building intelligent assistants.
  • deep dive into the open source libraries Rasa NLU and Rasa Core.
  • open challenges.

This session was classified suitable for some domain / basic python by the speaker.

Transcript (auto)

Auto-generated from the recording utilizing Open-Source AI. Speaker labels (Speaker 1, Speaker 2) reflect diarization, not identity. Timestamps refer to the recording.

Speaker 1 [00:03]

Welcome, everyone, and thank you very much for coming to my talk. And also thank you, PyCon, for having me. It's really, really great to be here and talk about topics that I care about. So my name is Justyna, and I work as a developer advocate at Rasa, which is a Berlin-based startup working on open source software for conversational AI. And me, I have a background in econometrics. I worked as a data scientist for a few years, and now I am a mixture of a machine learning engineer and a person who is responsible for developer education and enabling people to understand how to build great conversational software. So I'm going to speak about how you can build your own conversational AI with open source tools and machine learning. So let's start with why do we care about chatbots in general. Well, I think it's getting quite difficult to surprise people with AI assistance and chatbots. And I think it's probably going to be hard to find a person who have never seen a chatbot, heard about a chatbot, or used one. But apart from all this hype and attention that it is around chatbots today, developers are still using quite limited approaches when building them. I'm speaking about rule-based approaches and state machines. And also they forget quite a few really important things what makes an assistant smart and useful. So one of the criteria is that an assistant has to be able to generalize. We as people, we are complicated creatures. Our speech is complicated. And there are so many different ways how a few different people can say the same thing. So a good assistant has to be able to generalize on different users and different types of speech. And another thing which is really important is that an AI assistant has to be able to learn from user feedback, or even better, to learn from its own mistakes. So, for example, just in an example here, if you saw this visualization, so when a user provides additional information and corrects the assistant when it made a mistake, a chatbot or AI assistant has to be able to pick up those details and learn and improve. And these are just a few challenges that Rasa as a company creating open source software is trying to tackle. And as a result, it created a framework, open source framework for conversational AI. This framework consists of two Python libraries. First one is called Rasa NLU. And And just like the name suggests, it is a library for natural language understanding, so enabling an assistant to understand what the user means in terms of intents and also details of user input entities. And another piece in this Rasa stack puzzle is Rasa Core, which is a machine learning based dialogue management system. So it is used to enable assistant to be able to respond, and this model predicts what response an assistant should make at specific state of the conversation. Those responses can be different things, they can be simple text responses, they can also be some back-end integrations, for example, API calls or an assistant can connect a database and extract some data and use it to create a response. And again, everything is open source, so developers are good to go and build something great with it. So let's roll back a little, and why Rasa? Why would you even think of using it? Because you probably now are thinking about alternatives and hosted solutions, so you probably heard of like Dialogflow, like LUIS, and if you attended presentations yesterday, we had a quick presentation of a chatbot. So first of all, Rasa allows you to build and run assistance locally. So you take the stack, you build your assistant, you can run it on your local machine, you can run it on the cloud, you can run it integrated in your own infrastructure. It's really up to you, up to a developer to decide where you want to run it. Another important thing is that you own your data. So if you work with a sensitive data or in a field where you just can't use any hosted solutions and share your data with anyone, this is a solution for you because Rasa never sees any data you use because, again, it's open source. You run it on your local machine or wherever you want. And also, you avoid vendor login. And also you're not dependent on a company making some improvements on the stack for you. And here I'm referring to a stack being hackable. Again, it's open source, so the biggest advantage is you see all the code, you see what is under the hood. There are no black boxes at all what is happening inside. So you can see the models, you can tune the models, you can change what you want, you can use your own models if you want to. So basically you can adapt entire framework to suit your needs best. So, how the architecture of an assistant built with RazzleStack look like, and this is a simplified version of that. So let's say we have a user who asks a question like, what's the weather like tomorrow? So the first stage that this user input goes through is a connector module. And this is where you can use your preferred messaging or voice platform. For example, Facebook Messenger, Slack, Google Assistant, or your own custom UI that you build in-house. So when this message is picked up, it is sent to input module. We call it EARS. And this is where Rasa NLU model stands. It takes this input, it crunches this input using the NLU model, and it extracts structured data that an assistant can then use to understand what was the user input about. And those details are passed to dialogue management, so-called brain, and this is where RASA core model stands. It takes all these details from NLU model and also it takes into account the history of the conversation and uses all this information to predict what an assistant should do, how to respond at this specific state of the conversation. And again, as I mentioned previously, can also include a lot of different actions like like API calls or other back-end systems that you have in mind or want to use. And once all these details are collected and an assistant is able to create a response, those details are sent back to the output module first, and this is a mouth of your assistant, so it creates a response that a human can understand. Here you have options as well. You can use natural language generation tools. you can use UI elements like buttons and pictures, and of course, you can also just pass simple responses. And then back to Connector module, and a user gets a message back that it's sunny and 20 degrees. So, as I mentioned, it is all based on machine learning. So, now I would like to explain to you what is under the hood, what are the models, how everything works, and I will start with the first stage, which is natural language understanding, and this is where, again, Rasa NLU model does its work. So, the main idea, as I mentioned, is to take unstructured user input in a simple human language and to extract structured data that a computer or AI system can understand and use. So, this structured data consists of two main components. First one is intent, which is what is overall intention of user input. So, for example, just like I have an example here, if a user says, I have a new address, it's 709 King Street, San Francisco. So, overall intention of this could be address change. And the second piece of this structured data that is extracted is entity or multiple entities. so details that are important for an assistant to be more specific what kind of actions it can execute and be more specific about the user's input. So entities can be a lot of different things. Here I have an example for an address. It can also be names, company names, dates. It really depends on the domain in which you build your assistant. So, there are quite a few ways how you can perform intent classification entity extraction with Razon-LU. One of them is to use word vectors, which I hope you are at least a little bit familiar with. So, the main idea is that if you use pre-trained word vectors, user input, for example, just like this, what's the weather like tomorrow, goes through the vectorization stage. So basically we use vectors for words and we create the sentence representation in a vectorized format and then we build a classifier which predicts the label for this user input. So how does it work under the hood? So when we have a user input, the same one for example, what's the weather like tomorrow? At first the model tokenizes this input, so a token can be a word And then you can use word vectors. So I think you have two choices, good choices by now. You can use glove vectors, you can use fast text vectors as well. There's a huge library of pre-trained word vectors for you. And so when you look up vectors for each word in input, you create a bag of words. And then you have to create sentence representation. And Rasa NLU does that by taking an average of the vectors. It's simple, but it works really well, surprisingly, but it does. And then you feed it to a classifier. One of the most popular models in Rasa NLU is simple SVM, and then it's just a matter of multi-class classification problem. So if you have five different intents in your training data, the model will do its best to predict the most probable intent label for a new user input. The next stage is entity extraction. And it's a similar process, but it just has a few additional steps. So again, when you have a new user input, this input is tokenized into tokens. Then the model can use part of speech tagger to assign grammatical meaning of the word. So is it a verb, adjective, and so on? It's not mandatory, but in some cases, it helps a lot to improve the models. And it's something, again, you can tune yourself. Another stage is a chunker. So chunker helps to train the model that can extract entities that consist of more than one word. So, for example, addresses or even some countries or cities. For example, New York, it's two words. So it's important to build a model that is able to extract multi-word entities, and chunker does that. by creating chunks of words from a sentence. And then you can train the model, named entity recognition model, and the result of this is an entity, so the value of the entity as well as the label. So in this example here, entity is date and the value is tomorrow. It can be lots of different values as well, it can be yesterday, 2018, 3pm, tomorrow, and so on. So under the hood, entity recognition also has quite a few options how it can be done. One of them, you can use two classifiers. First one to predict if there is an entity in a sentence at all or not. And then another classifier to predict the label of that entity. But it's quite time consuming and also resource heavy. So how it works in Rasa NLU by default is it is using direct structured prediction. So basically both tasks are achieved at the same time. And the most used and popular model in LASA NLU is conditional random field. So it's a model that works very similar to a skip-ground type of model when you try to predict a target word based on surrounding words in a sentence. So using pretender vectors works really well. And it works because since you don't need to train your own vectors, You don't need much training data to get started, and especially when you have small training data sample to get started, it's a really good way to go about intanglossification and entity extraction problem. However, when you use a classifier, you also have some trade-offs, and the limitation comes is that when you have a classifier, you can only predict one label for one user input. Well, again, humans don't speak like that. So many times when you say something or when you send a message to your friend, you usually mean more than one thing in just one input. So if you want to build good assistance, we have to enable this functionality for AI assistance as well. And this is where Arasa did a lot of work in the past few months, and as a result, we built a model called TensorFlow Embedding Model, which is able to predict more than one intent for one user input. So how that works, and we call it Supervisor Vector Approach, so this model was inspired by research done by Facebook, these guys are doing a really great job on that end, so they wrote a paper called Starspace, if you're interested, do read about it. So basically it works like a ranking model, you have embedding for user input, you also have embeddings for the labels, and you calculate the similarity between user input and all of the intents, and you maximize the loss function to get the result. And being able to get more than one possible intent for one user input is not the only advantage of this approach. You don't use any pre-trained word vectors. That means you can build assistance in any language, well, any language you can tokenize, but still you are not limited to those languages that have pre-trained word vectors. And also, you don't need to load a lot of pre-trained word vectors that a lot of the times you don't even use. And another advantage is that you can build assistance in a very specific domain, so sometimes some words may not even have pre-trained word vectors. So it's a good approach to go out of this problem. Yeah, so this is just the first part of the Assistant NLU, enabling to understand what the user needs. part is dialogue management and this is also a big topic in assistants and the chatbots field. How do you do that and how do you enable your assistant to respond mindfully and how to enable the natural conversation between a human and a chatbot. So the approach that Rasa takes is everything is based on machine learning. So instead of writing rules and writing state machines, we take a completely different approach We take real conversational data that people generate when they talk to each other or talk to the bots and we use that to build models that can approximate those conversations and then those models can be used to enable assistants to predict what response or action an assistant should make instead of writing rules and enforcing users to follow that happy path. so advantages of using RAS and why you would consider using RAS or core for dialogue management is that as just I mentioned no more state machines and based on my own experience state machines and rule-based approaches they just simply don't scale in production they are good ways and that's how I started with the chatbots and conversational AI they are good when you start something simple when you prototype, but then when things get serious and quite big, it's such a mess and you really spend way more time going through the architecture of your assistant over and over again rather than actually developing it. Reinforcement learning is a big topic in conversational AI, and I think this is where it all goes. I'm really excited to see where all this field goes in a few years, but at least for now it's still quite complicated task to use reinforcement learning and dialogue management and natural language understanding, because you need a lot of data to train good models. And also, it's really, really challenging to define good reward function for NLU-related and NLP, in general, related tasks. And also, people need simple solutions. So the main advantage of RazorCore is that you don't need a lot of training data to build something that works. You can build a simple assistant in under 20 minutes. And I'm not exaggerating, that's true. Yeah, so again, why machine learning? There are so many ways how a simple conversation can go, so many different turns, and it's a lot harder to write a rule for each turn in the conversation rather than actually collect some conversational data and build models that can generalize on those conversations. So instead of writing more rules, you should consider using conversational data. And this is an example of just, I think, pretty simple state machine. I think it can only do one or two things, and you can already see how complicated it gets when you try to model conversations with state machines and rules. Yeah, so what's under the hood and how RASACO works? So, of course, NLU is an important part. So, information that NLU model extracted from user inputs comes in as an input, and it is combined with the current state, like what the conversation is about right now. And the model also includes previous actions, so context and history of the conversation, what happened previously. All this is used to predict the next action, what the assistant should do, or how to respond. Here, again, since Rasa is open source, you have a selection of choices, what you can use. SVM is a simple approach. Of course, it will not include history and context, but you can use it if you want. Recurrent neural network is a go-to solution, which is the main model in Rasa core. So this is how we can include what happened now and what happened previously and use that to make predictions. So, when the next action is predicted and the conversation state is updated, an assistant sends a response. So, for example, again, in a weather example, it will be sunny and 20 degrees, and the cycle repeats again, a user response, and this user response is again parsed with NLU and passed to dialogue management, and then the process continues. Let's drill even deeper and see how this model that makes predictions work and what is included and so on. So again, RASL-NLU, you get intent classification results and entity extraction results, and all this is passed to the model, recurrent neural network. And so these things are inputted into a model as an input. if a model at some point in a previous state extracted some additional details, for example, when an assistant makes an API call or gets some details from the database and extracts some important details that might have influence on the next action that an assistant should make, these details also are included in a model to make predictions. So, yeah, and of course, the history of the conversation is included as well. One additional thing is that if you would like to limit your assistant what actions it could make at specific state, you can do that by applying action mask. This is important if you work in a, again, specific field and if you have two different groups of clients and you do want to allow one group of clients to be able to have access to specific actions and you don't want to give that access to other clients, you can basically enable this behavior using action mask. But if you do so, you then have to renormalize all the predictions that the model made so that they would sum into one. Yeah, and then all these inputs are used to make prediction. A sample action is predicted and an assistant does the job. So it can be API call or it can be a response. And here you can see that the output of an API call can also be fed back to the model and the response is produced. Again, this entire cycle of predictions over here, it can repeat multiple times. So it's not always like one user input, one response of an assistant. It can be one user input, five actions or responses from an assistant. Again, depends on what kind of conversations you are trying to approximate and model. And the last part of building an assistant is closing the feedback loop. So you build an assistant, it works, great, you give it to your users, and it's not done yet because you should take into account what feedback your users provide and to use that information to improve your model because that's the best data you can get. And in RasaCore you can do that by using so-called interactive learning, and it's also a really good tool to get started with building your assistant because it works in a way that you can talk to an assistant, provide feedback, and the model is trained live at the same time as you talk to your bot, and you also generate some training data for that. So the main idea is that you talk to your bot, it gives you a response, and if you are not happy with the response it gave you, you can tell, hey, you made a mistake. You should have done this or said that instead. And the model is then retrained and improved. Yeah, now it is a little demo time. Let's see how that works. So I'm going to give you a very, very quick demo how development of an assistant with Rasa stack looks like. Of course, you should check documentation for more details, but basics. So I'm going to show you how to build a very simple assistant that can change your email address. You can say, hey, my email changed. Please do. So NLU part, it has to, since it uses machine learning, you need some training data. And in Rasa, NLU training data consists of intent labels. So just like here, for example, I have intent by or intent greet. And examples how a user would say those specific things. So a couple of examples of how a user would say goodbye, how a user would say hello, how a user would say thank you, or how a user would ask to change the email. Again, it's machine learning. You don't have to write all possible ways how a user would say hello or goodbye. And the model will learn and it will start to generalize once it learned enough. So once you have training data, and again, it depends on your use case, how much you need and how many actions you will include in your assistant. The second component for MLU model is a configuration file, which defines the model that is going to be used. We have some pre-made pipelines for people who are not familiar with machine learning and don't really want to dig into these details. But for people who do want to do so, you can have a lot of fun here because you can specify pretty much everything, what classifier is going to be used. So here I'm using this cool one, TensorFlow embedding algorithm. I'm also using duckling for email extraction just to make things simpler and quicker because I also have a tiny sample of data in other use cases I would use the model that I mentioned previously for example conditional random field to make predictions. So once you do that, two components, NLU data and configuration model, you can train the model. So I'm going to do that super quick, train NLU. And what it does, it simply calls a Rasa NLU trained function and loads these two files. So all information that a model needs to learn something. And it simply saves the model. Also you get all the results, like what is happening, loss, and accuracy. I have a tiny data sample here, so accuracy is one. It's probably overfitting a little. Again, machine learning, so there are no magic underneath here. And all the same approaches as to any other machine learning problem applies. So I saved my model. It's trained. Since I have very limited time, I will move to the next stage. So my system now has a new model. It probably understands some user inputs. And now I can go and build a dialogue management model. Again, machine learning, I need some training data. And in Razocore, this training data consists of actual conversations a user would have with an assistant. Here, I have just a very few conversations. And also important thing is that those conversations, they have to be converted into RASA format. And this RASA format means that user inputs, they have to be converted into intent labels that the user, that would be assigned by NLU model to them. And responses of an assistant should be converted into action names. So for example, a super, super short conversation between a user and a bot when a user said hello and an assistant said hello and then the user left the conversation is here. So a user said hello, which is an intent greet and a chatbot responded with probably hello message because I have utterance greet here. So you would need a couple of conversations like this. Of course, in more complicated situations and domains, you would have a lot longer stories with covering a lot more different dialogue terms and that's important to build a good model. of course, but this is basically the data you feed into the model. So once you have that, again, I have a super, super tiny sample here. You need a domain file. And domain simply defines the universe where Assistant lives, so it has to know what kind of things it should be able to do and what kind of things it should expect to get from the user. So it basically includes the intents and entities that it should be expected to get from the user and also what actions it should be able to execute and predict using the model. Also you can use templates where you can define how an assistant will respond once specific actions are predicted and you can of course provide more than one possible response, not only one, then the model will randomize a little. If you want you can use NLG, just like I mentioned previously for that, but in some cases it's a lot easier to just write down some sample responses rather than building a neural network to generate that. And another part here, I have slots, which I haven't mentioned yet. Slot works as a placeholder for important information that you would like your assistant to keep throughout the conversation. So for example, when I provide an assistant, in this use case, I provide my email at the very beginning of the conversation, an assistant does some things, and then if, I don't know, I could ask, please subscribe me to the machine learning newsletter or something like that, an assistant will still remember my email that I gave in the first place, and it will use that instead of asking again, hey, can you remind me your email? Yeah, and also slots, of course, are depending on the type, because there are different slot types, they have different influence on predictions that an assistant makes. And these two pieces, data and domain, are the most important ones. But if you want to enable your assistant to do some actions, more than just giving a text response, you can define them in actions script. Action in RasaCore is basically a class that consists of two functions. First one is super simple. It defines the name of this action. So when the model will predict action store email, assistant will know that now it has to run everything that is written in this run function, and here you just simply write all the code. What do you want your assistant to do once this action is predicted? Here I'm just simply logging into G drive to store user email, so this action email change would be completed. And that's pretty much it, all you need. me try and train this model, no, I should do make train core, so again, very similar to NLU, it calls the RASL core function, it just runs already, and stores all these files that I created, and it runs for 200 epochs, you can specify that of course, and you get all the results again of the training, so you can inspect what is happening and how the model works. And once you have an OU model and DialogManager model, you can go ahead and test it out. So I will try. Again, I'm using command line here, so probably you're thinking why I'm not using some fancy UI. At this point, we allow developers to choose what UI front-end they want to use. So for development, you can of course get started with simple command line tools. But as I mentioned, there are connections to majority of the most popular messaging platforms. You can build your own UI and connect your bot quite easily. So just a quick example how that works. So bot loaded, so I will say hello. And a child bot responded, hey, how can I help you? Also you can see that it makes post requests because everything is also based, it's a server-based functionality here. So how can I help you? So I will say I would like to change my email address, okay, so I said what's your email because I didn't give it in the first place. So you can take a note of my email if you have more questions already, it's justeatraza.com. Yeah, so it saved the email, okay, it saved your email, awesome, so thanks, you're welcome. And also I think I still have this page, yeah, so it just stored this email here, so it made the action. And that's how it works. And, okay, I have a few minutes left for demo, so I will quickly show you what is that interactive learning about and how it works super quickly. So let me stop this. So I will start interactive learning session, make train interactive. So this will quickly retrain the model and launch it in interactive learning session so you will see at least how it works. So bot loaded, again, type a message and press enter so I can start the conversation. So I'll start with the same hello, just for the demonstration. And if you can see at the very bottom, an assistant, instead of giving me the response immediately, it says, is the NLU classification for hello with intent greet correct or not? So it made a prediction, and it asks me if what it did is correct. So here I can say yes or no. So since hello is indeed greet, I would say yes, of course. And then it gives me the history of the conversation, as well as confidence scores for intent classification. And then it tells me what action an assistant wants to do next. So it wants to respond with utterance greet. Well, it makes sense. Probably an assistant should be polite and say hello back to me once I say that. So that's correct. And then you can see an assistant responded with, hey, how can I help? And then it wants to listen for the next user input. So again, that's correct and so on. So being short on time, this is just a quick demonstration of how that works, so basically you can continue to talk to your bot, and then if something goes wrong, I actually can give you a quick example, next user input, change email, so here the prediction is correct, like change email is definitely change email intent, but if it wasn't, then I could say no, and then I could select which of intents that I had, and my training data should have been used instead. And I can choose as well. And I can also do some entity annotation if something wasn't extracted and so on. And again, all this is used to update the model as you talk to your bot. And once you're done, you should be able to save something. Yeah. So once you're done, you can either go back to the previous step, or you can start fresh, or you can export the conversation already in the Rasa format and use it to improve your bot or use this data and so on, or even get started and generate some data in the first place. Yeah, so that's how it works. Back to my slides for a few very last remarks. Yeah. Nope, not this one. So final thoughts. The main idea is to close the feedback loop. Once you build your bot, and my tip from my experience again, build something simple, give it to the users, let them talk, collect training data, use it to retrain the models, and basically use that to improve your bot from real conversations that you collect between your bot and the users. And also you can use interactive learning for that as well. The main idea for this is that if a developer tries to generate all training data on its own, very high chances are that there will be some bias in the data. I've been there myself. I built a few bots only for myself because I kept the same vocabulary subconsciously and the same structure of the sentences, and the bot worked perfectly for me. It didn't work for others just because I was the one basically building and training the bot, and then once I gave it to more users, collected more diverse training data, it improved immediately. so that's a pro tip. And yeah, NLU is definitely far from being a solved problem. So if you're curious and if you want to work on some tough problems, here are some inspiration for you. For example, negation is a super big problem and still a very big challenge in NLU to build a model that understands negation. Also, how do you combine dialogue models? So it's really good and quite easy, I would say, to build a model in a specific domain. For example, an assistant for hotel booking or restaurant search, but then the challenge comes, how do you build an assistant that can do, kind of do it all, or at least more than one thing well. And here, Raza also did quite a lot of research, and we actually wrote a paper on that end, so hopefully next time I give a talk, there will be some updates on that end as well. And the summary, again, machine learning improves the assistants because instead of writing rules, You use the real conversational data, which approximates a lot better in AI system development. Even though I was kind of bashing rules and state machines, in some cases, you could consider having both. In some cases, it makes sense to add additional rule if it's a really tricky use case or something like that. Yeah, and it's really exciting to see where deep learning and all the new techniques that are coming constantly in this field are going to take us in the upcoming few months or years. Yeah, and the last thing, get in touch. Here is my email, my Twitter. So I work with open source, I work with the open source community as well, so if you have any feedback questions, I am a go-to person to ask and say all the things I have in mind about Rasa. If you give it a go, also do let me know. And also we are building open source community around it. We have a really nice group of contributors who spend their time helping us to push this software and the field in general forward. So if you would like to contribute and help us to do so, please do. In our community, we have a nice forum where people discuss things. So, yeah, thank you. Thank you very much. So, anybody have questions? I think we have time for a couple more questions. So, if you have questions, you can raise your hand. What languages do you currently support? So entire framework is built on Python, but if you would like to integrate the AI system built with Rasa in your own framework, which is not using Python, you can do so because you can run a system on a server and then basically use HTTP requests to establish communication. Okay, thank you. I actually meant the natural language, but... For example, German or English. Oh, sorry. So it depends on what kind of pipeline you use. So as I mentioned, if you use pretender vectors, then you have to use language that has those pretender vectors. So for example, SPACI has language models for English, for German, I think for Dutch for sure, Spanish, French. But if you use fast text, I think they have over 100 languages that are supported. But if you have a specific language in mind, for example, my native language is Lithuanian, there are no pre-trained word vectors for this language whatsoever. So this is where you can use embedding pipeline that learns word embeddings from scratch from the data you provide in the training. Okay, thank you. Thanks again for the talk. Any more questions? Yep. Is there a way to make your bot store state? Like if you ask it for weather and then say, and how about the weather in Berlin? Or not saying the word weather again. Yeah, yeah, absolutely. So there is a state tracker, which is under the hood in RazorCore. So it constantly keeps track of what the user asked now, like what intents were classified, what entities were extracted, and also what action was executed. and you can store this, if you want to, you can store all this information, for example, in a database somewhere and then throughout the conversation an assistant can link back to all that information that is stored and basically reuse that so that a user wouldn't have to repeat that information. But also, that's how Rasa Core works in general. So if you have a conversation that includes these details, For example, when a user asks about weather in the first place, and then the next stages of your inner Dialogues that you use for training Keep that context assistant will remember but basically the answer is yes, so yeah Yeah, okay questions Thank you for your talk. How is it possible to do a voice chatbot with Razer? I saw that on your slides. Yeah, so again, since we give a choice for developers, at least now for sure, to choose what kind of front-end they want to use, you can use voice interfaces. So I personally worked on some projects, for example, we're integrating Rasa brain into Google Assistant. So that's super doable. And I would say integration is quite easy, but again, it depends on what kind of system you would like to use. If you have your own model and your own front end for voice, that's totally doable. Again, the main advantage of Rasa is that it's open source. So even if something doesn't work for some reason, the way you would like to, you can build something on top, add layers, or remove some layers to make adjustments. So, last question? Any last question? I think it's over there. Is it? Okay. Yeah, thanks for your talk. Maybe a kind of more philosophical question. So, how close do you think are chatbots in passing the Turing test? Hmm. Oh, that's a very tough question. They are getting there, I would say, but at least me working in this field, I still see a lot of limitations and there's still a lot of things to improve. Of course, if you saw Google Duplex presentation, probably almost everyone here did, it does look like super close to passing the test. but again when it comes to dialogue handling and those challenges that I showed in my slide previously, I think there's still some time for that but it's moving fast, the field is moving really fast and it's really exciting to see where it goes, as I mentioned, in months or years So thank you very much for Justyna let's give her a round of applause

Justina Petraitytė

Justina has a background in Econometrics and Data Analytics. Her curiosity for Data Science and human behaviour analytics has taken her to many places and industries – over the past three years she has been doing Data Science work across video gaming, fintech, insurance industries. Her interest in chatbots, natural language processing and open source has led her to Rasa, a Berlin-based conversational AI startup where she works as a Developer Advocate focusing on improving developer experience in using open source software for conversational AI.

Social card for talk: Building your own conversational AI with open source tools