Rasa Core - How to write reliable stories

rasa-core

(Caspar) #1

Today I tried out Rasa Core to see if it is really the better alternative too a decision tree. I made up a super simple story and did not include any actions, only simple utterances.

Idea

The idea is,…

…that I can order drinks in a loop until I’m satisfied

…each time I order a “fanta”, the bot makes an additional comment “bamboocha”

That’s it!

Problem

I don’t make it to build such a flow. I tried many different stories, but always had some problems. In the attached sample I have the following problems:

  • If I order a coke after the greeting, the bot tells me “bamboocha” (should only happen with fanta)
  • The visualisation shows me a loop for order a drink, but not one for ordering fanta

Questions

Can you help me…

  • …to solve the specific problem?
  • …with general knowledge how to write stories?
  • …to get rid of my doubts, that this never can work for a complex project, if I have already so many problem with this super simple example?

Training data

Stories

## story_greet
* greet
 - utter_greet
> check_greet

## story_order_drink
> check_greet
* orderdrink
 - utter_anythingelse
* orderdrink
 - utter_anythingelse
> check_finish

## story_order_fanta_1
> check_greet
* orderdrink
 - utter_anythingelse
* orderdrink{"drink":"fanta"}
 - utter_bamboocha
 - utter_anythingelse
> check_finish

## story_order_fanta_2
> check_greet
* orderdrink{"drink":"fanta"}
 - utter_bamboocha
 - utter_anythingelse
* orderdrink
 - utter_anythingelse
> check_finish

## story_finish
> check_finish
* finish
 - utter_goodbye

Visualisation, Domain and NLU

domain.yml (351 Bytes) graph.html (4.8 KB) nlu_data.md (1.0 KB)

I’m more than curious for your inputs. Many thanks!


(Caspar) #2

Are there any field reports, best practices or just experiences with RASA Core and the use of sample stories? Where you I find them?


(weberi) #3

Hi Chris, have you already tried using a slot for drinks, and specifically a slot of type categorized? Slots and slot types are declared in the domain.yml like

slots: drink: type: categorical values: - fanta - rivella

See here in the docs: https://rasa.com/docs/core/slots/ https://rasa.com/docs/core/api/slots_api/

If you give it a try, please let me know what you found.


Rasa Core does not work for simple scenario
(Caspar) #4

Finally I found time to test that. The result is more or less the same. I can’t create reliable stories. If I wan’t to react different depending on the entity (or/and slot) value, it does not work.

Additional thoughts:

  • The ML seams to ignore that orderdrink{"drink": "coke"} is a specification and orderdrink (without a concrete entity value) a generalisation. In my eyes the specification should have a stronger impact on the decision.

  • Interactive learning is good idea, but to reach my goal I will “train” hundreds of times. A plain decision tree would be way more effective, less time consuming and not as error prone.

  • How can that scale, if it does not work with such an easy sample?

I heard so many good comments about RASA CORE. I would be super glad to understand how I can use Rasa Core the right way (or at least that somebody tells me that it is not as cool). Thanks for all input.