Posts

Showing posts from 2020

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

How many languages I've used...

Out of curiosity, I made up a list of computer languages and the order in which I learnt them: In the 80s Basic (TRS-80, Sinclair) Z80 Assembly Language (Sinclair) Color Disk Basic (TRS-80 Color Computer) 6809E Assembly Language (TRS-80 Color Computer) dBaseII Lotus 1-2-3 Macro Language Cobol Logo dBaseIII Microsoft Basic (IBM-PC - Basic compiler) C Clipper 8086 Assembly Language 90s: K (Graphics Factory programming language) C++ Pascal (Delphi) Lisp (Autocad) Html Java Javascript 8048 Assembly Language (Odyssey²) 6502 Assembly Language ASP Visual Basic 00s: Bash script PHP ASP.Net C# Markdown 10s: IWS Scripting Language (Indusoft) Powerscript Python I know, some of these aren't exactly languages, but syntaxes. I didn't include programmable calculator though. And I'm sure I must have forgotten some...

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

Intro

Hi, there... I'm Simon I've been in love with technology since I was knee-high to a grasshopper. Here I'll be posting about my experience with hardware and software... tips and tecnhiques included. A little bit of history. I've lived in Brazil since 1979, due to my father (an engineer) being transferred here by a multinational corp, tasked with designing a coffee harvesting machine. He's always loved technology,  and in 1980 he purchased a HP33 (not sure if it was an E or a C) during a trip to the US, along with some application books for it. He spent a week of evenings reading through every manual and trying every single command on the calculator. Around this time he got me a 200 in 1 electronic kit from Radio Shack. I started playing with computers in 1981 with a TRS80 Pocket computer that an american co-worker of my father owned. He also had a lot of computer magazines (Byte, Kilobaud Microcomputing). I'd stare in awe at computers in a store, and peste