Can RASA CORE follow exactly the stories defined in the stories.md file?

Rasa Core version: 0.12.1 Python version: 3.6.6 Operating system: Windows 10

Good afternoon, I’m new to RASA and I’m reading the documentation to learn how to use it correctly. My query is Is it possible to make RASA follow exactly the stories defined in the stories.md file? For example I have the following stories:

stories.md

Saludo

  • intent_saludo
    • utter_saludo

Despedida

  • intent_despedida
    • utter_despedida

Autenticacion

  • intent_autenticarme_inicio
    • utter_autenticarme_seleccion_documento
  • intent_autenticarme_documento{“documento”: “DNI”}
    • action_get_type_document
  • intent_autenticarme_numero_documento{“numero_documento”: “12345678”}
    • action_get_number_document

I used only the MemoizationPolicy, but at some point the bot goes directly to the default intent configured with the FallbackPolicy:

user:hola
bot: Hola! /////////////////////  ## Saludo (PERFECT)

user: quiero autenticarme
bot: ¿Con qué tipo de documento desea auntenticarse?       /////////////////////  ## Autenticacion (PERFECT)
1: DNI (DNI)
2: Pasaporte (Pasaporte)
3: Carné de Extranjería (Carné de Extranjería)          


user: DNI
bot: Por favor, ingrese el número de su DNI 

user: 74563192						
Usted ingresó el número 74563192		## Autenticacion   (PERFECT)

hola
Hola! Cómo puedo ayudarte! 			## Saludo   (PERFECT)

adios
Nos vemos :)					## Despedida   (PERFECT)

hola						## Saludo   (FAIL, DEFAULT INTENT)
¿Podrías repetirlo por favor?

hola						## Saludo   (FAIL, DEFAULT INTENT)
Ohhhhh ... no entendí :(

hola						## Saludo (FAIL, DEFAULT INTENT)
¿Podrías repetirlo por favor?

And it never gets fixed.

This is my training function.

def train_dialogue(domain_file = 'weather_domain.yml',
					model_path = './models/dialogue',
					training_data_file = './data/stories.md'):

	fallback = FallbackPolicy(fallback_action_name="action_default_fallback",
                          core_threshold=0.05,
                          nlu_threshold=0.3)

					
	agent = Agent(domain_file, policies = [MemoizationPolicy(), fallback])
	data = agent.load_data(training_data_file)	
	agent.train(data)

				
	agent.persist(model_path)
	return agent

I’ll be awaiting your comments.

I do not speak Spanish, but do you want to have the conversation restart? Then add action_restart to the end of your training stories. Best, Henry

You could use only MemoizationPolicy (Training and Policies). However, your bot then won’t be able to handle any conversations which are not in the training examples.

Good afternoon, sir. Thank you for answer me. In fact I used that policy, but as you can see I did not get a good result. The error is that for some reason, it does not predict the next action as it is defined in the story, in this case, the corresponding intent to the greeting is answered by the fallback intent. Do you know why this behavior happens?

Can you do an interactive training with the flag --vspecified and post the output here? I guess the reasons for your fallback action is either that your story leaves the path of the training stories or some NLU issue.

So the command should be something like:

python -m rasa_core.train interactive -c <your policy> -u <nlu model> -s <your-stories> -d <your domain> -o <model output> -vv