Problem in Stories

Bot is not replying as expected. Like when i am first time saying “hi” to my bot it reply with flow but after completing flow then if i said “hi” again then my bot stuck. And just tell me whats wrong with my file.

Stories.md

welcome

  • welcome
    • utter_welcome

room booking

  • room_booking
    • utter_room_booking

affirm

  • affirm
    • action_card_verification
  • affirm
    • action_face_verification_response

nlu.md

intent:welcome

  • hey
  • hello
  • hi
  • good morning
  • good evening
  • hey there
  • heya
  • hellow
  • hii
  • hiii

intent: room_booking

  • book a room
  • i want to book a room
  • book room
  • room booking
  • room
  • book conference room
  • book the room
  • i would like to book a room
  • I would like to book a room
  • I want to book a room
  • I want to book room
  • I want room booking
  • Book a room
  • Book the room
  • Book room
  • Booking a room
  • Booking the room
  • Booking room
  • Book a room please
  • Book the room please
  • Booking a room please
  • Booking the room please
  • Please book a room
  • Please book the room
  • Kindly book a room
  • Kindly book the room
  • Please book room
  • Kindly book room
  • Room booking
  • Schedule a meeting
  • Schedule the meeting
  • Schedule meeting
  • Book a meeting room
  • Book the conference room
  • Book meeting room

intent:affirm

  • yes
  • indeed
  • of course
  • that sounds good
  • correct
  • why not
  • hmmm
  • hmmmmmm
  • hmmmmmmmm
  • yeah
  • ye
  • yess

Hey, have you tried with interactive learning to see what’s going wrong?

already tried but it gives me only one path. like this, only single path.

interactive stories

  • ques_1
    • ans _1
  • ques_2
    • ans_2
  • ques_3
    • ans_3

What do you mean by that? Could you please elaborate a bit?

Hi @Tobias_Wochinger i mean when we creating story through interactive learning. then at the end it update my story and nlu file like this:-

  • ques_1
    • ans _1
  • ques_2
    • ans_2
  • ques_3
    • ans_3
  • stop

Only single path. And it is working well 1st time but when i am invoking my bot again by saying ‘hi’ then it stuck.

Hi, Add action_restarted at the end of the story. Need to define a class in actions.py

from rasa_core_sdk import Action
from rasa_core_sdk.events import Restarted

class ActionRestarted(Action):
   def name(self):
         return 'action_restarted'
   def run(self, dispatcher, tracker, domain):
        return [Restarted()]

Hope It will help

@madhanaravind is it default action from rasa?

@haneef Yes action_restarted is a default action. When this action is met in the story, it will reset all the slots and start the flow from beginning.

@varunsapre10 Thanks it works but not in all my cases.