RASA: a Newbie's Journey
Tags: nlp, rasa, chatbot, python
Published: 2019-05-14 08:02:40

---
title: RASA: a Newbie's Journey
published: true
description: Series on creating a chatbot with the RASA stack as a newbie.
tags: NLP, RASA, Chatbot, python
---

## Part1: Chatbot Begins

###I did something stupid. And it was awesome.
![High diving with a horse](https://media.giphy.com/media/l0IynI18xtOju4Y2Q/giphy.gif)
After my exceptionally ambitious feats of coding, like:
* Calculator
* Shopping list creator
* Guess the Number: The Game

I decided to make a [chatbot](https://github.com/zs-horvath/chatbot).

I am documenting my journey and what I learned in the process.

Basically I am expressing what I would say to myself 2 months ago.
After a smack on the head.

####TL;DR:
* Create a chatbot, it is the most rewarding way to learn Python and NLP (among other things).
* Use RASA, the framework that gathers all the NLP and machine learning goodness for you, and can be tamed with Python. You just need to feed it data to grow healthy and strong.
* Installing might be a heroic achievement, but the whole internet will come together to help you.

####Why is it in fact a good idea to make a chatbot as your first real project?
Not because secretly it is easy, sorry. It is not, even with the proper framework (and there is [a lot of those](https://geekflare.com/chatbot-development-frameworks/)). But because it will drag you through a lot of things in small doses (NLP, Machine Learning, using API-s, Bash scripting, UX, even marketing, if you are into that), and will teach you to think about how these things link to each other.
Chatbots are also versatile, you can bend them to fit your territory, it is a good opportunity to learn to use tools from various fields.
And in the end you will create a personality that will actually answer you (they will be your, preprogrammed answers, but you may be in for a surprise).

####Why RASA?
RASA is well documented:
* [Beginner's guide](https://rasa.com/docs/)
* Documentation: [Language Understanding](https://rasa.com/docs/nlu/), [Dialog Generation](https://rasa.com/docs/core/)
* [Blog](https://blog.rasa.com/)
* [Forum](https://forum.rasa.com/)

It is written in Python, you can check the source [here.](https://github.com/RasaHQ)
It runs fully on your computer, no need to register anywhere.
You own your data, yet you can integrate your stuff to the cloud.
You can hack the pipeline any step of the way, but the default options will get you results.

####So how do we start?
I have found two tutorials made by RASA a [simple one](https://rasa.com/docs/core/0.9.8/tutorial_basics/) and a [more complex](https://www.youtube.com/watch?v=xu6D_vLP5vY), they are a bit outdated, but informative.
Tutorials are not the best solution, they never show the obstacles their creators had to overcome, so the sooner you can switch to reading documentations the better. But they are good to get you started. First of all, they show that it *can* be done, give you a process to follow, and help you keep on track even after you spent days on manually installing and configuring tensorflow (which *may or may not* have happened to me and my old laptop, don't ask).

####Can we finally install the thing?
Your best friend here is requirements.txt, a file that, as the name suggests, lists all the software requirements. [This is mine](https://github.com/zs-horvath/chatbot/blob/master/requirements.txt) that I have merged from the ones I found on the remote repositories of the RASA project.

Use pip to install:
```
pip install -r path/to/requirements.txt
```
If you want to use a specific version of Python and pip doesn't seem to respect that wish, run pip as a Python script:
```
python3 -m pip install -r path/to/requirements.txt
```
Just substitute the number with the Python version you want to use.
 
It is a long list, so be prepared, you may need to dig deep into the packages of your system, dependencies have dependencies, you have your own things, a lot of opportunities are there for trouble. I cannot help you much with this, as I am not the one to live on your system.
Most problems I faced were solvable by beginner methods:
* Search the error message ([common error messages in Python](https://interactivepython.org/runestone/static/CS152f17/Debugging/KnowyourerrorMessages.html))
* Search for the problem on Stack Exchange or Stack Overflow (or blog posts, or Linux forums, or Github threads or...), again, using your favorite search engine as a hub.

With pip you get standard python [backtraces](http://cs.franklin.edu/~ansaria/traceback.html), so at least you might feel at home.

Sometimes, if pip is not cooperative, you can try to install some packages with the native package manager of your system.

You may want to consider using virtual environments, which I did not, because this is my first actual project, and there is such a thing as too many abstractions at once.

Good luck, and see you at Part 2!