Interactive Learning

These docs are for version 1.x of Rasa Open Source.

User Guide

NLU

Core

Conversation Design

API Reference

Migrate from (beta)

Reference

Interactive Learning

This page shows how to use interactive learning on the command line.

In interactive learning mode, you provide feedback to your bot while you talk to it. This is a powerful way to explore what your bot can do, and the easiest way to fix any mistakes it makes. One advantage of machine learning-based dialogue is that when your bot doesn’t know how to do something yet, you can just teach it! Some people call this Software 2.0.

Running Interactive Learning

Run the following command to start interactive learning:

rasa run actions --actions actions&

rasa interactive \
  -m models/20190515-135859.tar.gz \
  --endpoints endpoints.yml

The first command starts the action server.

The second command starts interactive learning mode.

In interactive mode, Rasa will ask you to confirm every prediction made by NLU and Core before proceeding.

Providing feedback on errors

For this example we are going to use the concertbot example, so make sure you have the domain & data for it. You can download the data from our github repo.

Visualization of conversations

During the interactive learning, Rasa will plot the current conversation and a few similar conversations from the training data to help you keep track of where you are.

You can view the visualization at http://localhost:5005/visualization.html as soon as you’ve started interactive learning.

Interactive Learning with Forms

If you’re using a FormAction, there are some additional things to keep in mind when using interactive learning.

The form: prefix

The form logic is described by your FormAction class, and not by the stories. The machine learning policies should not have to learn this behavior...

* request_restaurant
    - restaurant_form
    - form{"name": "restaurant_form"}
    - slot{"requested_slot": "cuisine"}
* form: inform{"cuisine": "mexican"}
    - slot{"cuisine": "mexican"}
    - form: restaurant_form
    - slot{"cuisine": "mexican"}
    - slot{"requested_slot": "num_people"}
* form: inform{"number": "2"}
    - form: restaurant_form
    - slot{"num_people": "2"}
    - form{"name": null}
    - slot{"requested_slot": null}
    - utter_slots_values

Input validation

...

WARNING: FormPolicy predicted no form validation based on previous training stories. Make sure to remove contradictory stories from training data

👋 I can help you get started with Rasa and answer your technical questions.