All Projects â†’ RasaHQ â†’ Starter Pack Rasa Stack

RasaHQ / Starter Pack Rasa Stack

Licence: apache-2.0
🎒Everything you need to build your first contextual chatbot with the open source Rasa Stack - includes files and training data

Programming Languages

python
139335 projects - #7 most used programming language

Rasa Stack starter-pack

Looked through the Rasa NLU and Rasa Core documentation and ready to build your first intelligent assistant? We have some resources to help you get started! This repository contains the foundations of your first custom assistant. This starter-pack also comes with a step-by-step video tutorial which you can find here.

This starter-pack comes with a small amount of training data which lets you build a simple assistant. You can find more training data here in the forum and use it to teach your assistant new skills and make it more engaging.

We would recommend downloading this before getting started, although the tutorial will also work with just the data in this repo.

The initial version of this starter-pack lets you build a simple assistant capable of cheering you up with Chuck Norris jokes.

Clone this repo to get started:

git clone https://github.com/RasaHQ/starter-pack-rasa-stack.git

The starter-pack should be run with the most recent release of Rasa. If you are feeling adventourous, check out the latest branch and install the master branch version of Rasa.

After you clone the repository, a directory called starter-pack-rasa-stack will be downloaded to your local machine. It contains all the files of this repo and you should refer to this directory as your 'project directory'.

Setup and installation

If you haven’t installed Rasa NLU and Rasa Core yet, you can do it by navigating to the project directory and running:

pip install -r requirements.txt

You also need to install a spaCy English language model. You can install it by running:

python -m spacy download en

What’s in this starter-pack?

This starter-pack contains some training data and the main files which you can use as the basis of your first custom assistant. It also has the usual file structure of the assistant built with Rasa Stack. This starter-pack consists of the following files:

Files for Rasa NLU model

  • data/nlu_data.md file contains training examples of six intents:

    • greet
    • goodbye
    • thanks
    • deny
    • joke
    • name (examples of this intent contain an entity called 'name')
  • nlu_config.yml file contains the configuration of the Rasa NLU pipeline:

language: "en"

pipeline: spacy_sklearn

Files for Rasa Core model

  • data/stories.md file contains some training stories which represent the conversations between a user and the assistant.
  • domain.yml file describes the domain of the assistant which includes intents, entities, slots, templates and actions the assistant should be aware of.
  • actions.py file contains the code of a custom action which retrieves a Chuck Norris joke by making an external API call.
  • endpoints.yml file contains the webhook configuration for custom action.
  • policies.yml file contains the configuration of the training policies for Rasa Core model.

How to use this starter-pack?

  • NOTE: If running on Windows, you will either have to install make or copy the following commands from the Makefile
  1. You can train the Rasa NLU model by running:
    make train-nlu
    This will train the Rasa NLU model and store it inside the /models/current/nlu folder of your project directory.

  2. Train the Rasa Core model by running:
    make train-core
    This will train the Rasa Core model and store it inside the /models/current/dialogue folder of your project directory.

  3. In a new terminal start the server for the custom action by running:
    make action-server
    This will start the server for emulating the custom action.

  4. Test the assistant by running:
    make cmdline
    This will load the assistant in your terminal for you to chat.

What's next?

This starter-pack lets you build a simple assistant which can tell Chuck Norris jokes. It's pretty fun, but there is so much more you can do to make a really engaging and cool assistant. Here are some ideas of what you can do to take this assistant to the next level:

  • Use the Rasa NLU training data file which you downloaded previously from Rasa Community Forum. This dataset contains quite a few interesting intents which will enable your assistant to handle small talk. To use it, append the training examples to data/nlu_data.md file, retrain the NLU model and see how your assistant learns new skills.
  • Enrich data/nlu_data.md file with the custom intents you would like your assistant to understand. Retrain the NLU model using the command above and see you assistant improving with every run!
  • Enrich data/stories.md file with more training stories with different dialogue turns, intents and actions.
  • Implement more custom action inside the actions.py file and add them to stories data as well as the domain file.

Let us know how you are getting on with Rasa Stack and what have you built! Join the Rasa Community Forum and share your experience with us!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].