Posts

Showing posts with the label rasa

Better report for Rasa chatbot model analysis

Image
Rasa is a very powerful AI Framework for building contextual assistants, but you have to know how to set up your NLU, and improve your intent recognition. You can generate a report that will show what your model looks like using the  rasa test  command. In the results folder, the intent-errors.json will show where intents are getting mixed up, but doesn't show you intents that are nearly  being confused, and an alteration in your NLU examples can cause them to start failing. All of your examples are influencing the neural net that is classifying what the user typed, in one way or another. Imagine a huge spider web connecting all examples with intents... if you "move" one example, all the intents classifications will move, albeit some almost imperceptibly. I'll be showing you how to analyze intent classification and figuring out where to improve your model, and taking you step-by-step through writing a python script to help figure out what's happening. So how do ...

Multiple Rasa containers with docker-compose (part 2)

Multiple Rasa containers with docker-compose (part 2) Dockerfiles for our other containers Let's start with the action servers... Rasa normally runs on port 5055. If we want to start two action servers on the same server, we would need to specify different ports for each instance, but in this case, since they will run in separate containers, there's no need. If we want to access them from the host we have to expose different ports, though. We can do that in the docker-compose.yml file. cd  into the chatbot_a/actions folder and let's create this Dockerfile: FROM sscudder/rasabase RUN apt-get update && apt-get -y install locales locales-all RUN locale-gen pt_BR.UTF-8 ENV LANG pt_BR.UTF-8 ENV LANGUAGE pt_BR:pt ENV LC_ALL pt_BR.UTF-8 COPY /actions/actions.ini /actions/actions.ini COPY /actions/actions.py /actions/actions.py WORKDIR /actions The Dockerfile from chatbot_b/actions will be exactly the same. Moving on to the docker file for chat...

Multiple Rasa containers with docker-compose (part 1)

Image
Setting up multiple Rasa instances with docker-compose Our customer has two different chatbots with distinct functions. One is a site support chatbot, with knowledge of the site itself and can open support tickets for the humans that run the site. The other is a general knowledge chatbot that answers questions about the customers business, related to realtors. Here's how we got the chatbots up and running on the same server using docker containers. The setup is under RHEL7 (CentOS). We'll use docker containers and docker-compose to make life easier.  In the end, there will be 5 containers running: Chatbot A Action server A Chatbot B Action server B mongoDB Setting up the file system Create a folder, let's say app , and create a folder for each chatbot (we'll call them chatbot_a and chatbot_b ). Copy your chatbot configuration files into the separate folders, but leave the trained models out for the moment. We want a folder structure li...