Story does't get recognised by the Bot, rarely the same story works.. Fix? Please

I am very new to RASA and using it to create a normal chatbot for my Final Year Project. I am creating an assistant bot to solve DFA, NFA related questions directly via chat with my Bot. The conversation flow I want to develop is like

Bot : How can I help you?
User : I have a question
Bot : Provide the Type of Language (Here I have used the categorical slot and it fetches data perfectly) (when it somehow works)
User : “provides the TOL” (Here the story crashes most of the time but it did work once and it worked perfectly)
Bot : Enter the string
User: “enters string” same issue again , story crashes
Bot : Would you like to add an (and) / (or) property?
User : “replies with Yes or No” If Yes then again loop for the TOL and String then ends the chat…

I have told the flow of the conversation above. I have tried multiple solutions wo fix it but I can’t succeed in any of them.

  1. Tried writing the whole “above conversation” in a single story flow (didn’t worked)
  2. Tried using checkpoints (didn’t worked)
  3. Tried distributing the whole flow in different chunks of stories (the last intent of the first story is the starting intent of the second story)

(3) did work once and I took the screenshot of it as well which I will provide , but when I re-trained the BOT after adding another action only , the same story crashed (stuck on input).

I cannot get the fix for this crash , it gets stuck on " input → " . Please help me out with this random story crash , I need my project to be done by this month. Please!!!

Stories.yml

  • story: Have a Question

    steps:

    • intent: user_greet

    • action: utter_greet_back

    • intent: tell_have_question

    • action: utter_question_start

    • action: utter_ask_TOL

    • intent: tell_TOL

  • story: Provide the Inputs

    steps:

    • intent: tell_TOL

    • action: utter_ask_string

    • intent: tell_string

    • action: utter_fetched_TOL_string

    • action: utter_want_closure?

    • intent: confirm_closure

  • story: Tell Closure Confirm

    steps:

    • intent: confirm_closure

    • action: utter_ask_closure

    • intent: tell_closure

    • action: utter_verify

    • action: utter_fetched_TOL_string_closure

  • story: Tell Closure Deny

    steps:

    • intent: tell_string

    • action: utter_fetched_TOL_string

    • action: utter_want_closure?

    • intent: deny_closure

    • action: utter_verify

    • action: utter_fetched_TOL_string

domain.yml

slots:

TOL:

type: categorical

values:

  - starts with

  - ends with

  - contains

  - starts

  - ends

mappings:

- type: from_entity

  entity: TOL

influence_conversation: true

string:

type: text

mappings:

- type: from_entity

  entity: string

influence_conversation: true

cloProp:

type: categorical

values:

  - and

  - or

  - union

  - intersection

mappings:

- type: from_entity

  entity: cloProp

influence_conversation: true

I am attaching some screenshots of the story working somehow once , now crashes everytime

This is the crash I am talking about…

The Deny of (and)/(or) property was also working

Same story which was working earlier , now crashes on re-training

But as you can see the correct story doesn’t execute when I have written a flow of it. Please help me fix the crash issue.

Thank you

My first idea would be to run rasa shell --debug to see what your bot is doing (tracker states, predictions).

Maybe that gives you further hints as to why it’s not working

Try this:

  1. end first story with action: utter_ask_TOL
  2. start second story with action: utter_ask_TOL, followed by intent: tell_TOL

Also, from a users point of view I’d have no idea what you want me to do after the bot prompts: “Enter Type of Language”)

@Maximilian-Ka Thank you so much for your reply brother. I have tried what you have suggested above but it also didn’t worked.
Plus I have tried rasa shell --debug as well but I still cannot find the issue due to which it crashes, the slot doesn’t get filled either, even though when I just run a chunk of story just to check the Type of Language input is being fetched in the slot or or not (This works perfectly). Now when I just added that in a longer story it crashes in between , I even debug it but I am unable to understand where the crash is happening.
I will share the stories.yml with you and the dubug log as well. See if you can help me out with it.

Answering your query

I am making a Theory of Automata Chatbot using RASA , which basically takes some inputs such as Type of Language which is like (starts with) Exp: DFA that starts with “aab” hope you get the point this TOL and string and closure are known things to someone who knows or have studied Theory of Automata (TOA). So you do not worry about it. Just help me get a fix for the storyline issue that I am facing

stories.yml

  • story: Have a Question

    steps:

    • intent: user_greet

    • action: utter_greet_back

    • intent: tell_have_question

    • action: utter_question_start

    • action: utter_ask_TOL

  • story: Provide the Inputs

    steps:

    • action: utter_ask_TOL

    • intent: tell_TOL

    • action: utter_ask_string

    • intent: tell_string

    • action: utter_fetched_TOL_string

    • action: utter_want_closure?

    • intent: confirm_closure

Debug Output

@muzammilali28 Hey there :slight_smile:

You have to read the debug output very carefully and need to try to understand it if you want to go any further with Rasa. You will most likely encounter such problems frequently.

In the debug output I see that your chatbot predict intent “nlu_fallback” instead of the correct intent. Thus, you model was not able to identify an intent with confidence above the threshold.

As a result, your chatbot performed the default action ‘action_default_fallback’. You can find information on what that does in the documentation.

I guess this problem is related to your nlu.yaml file

Hope that helps a bit :slight_smile:

@Maximilian-Ka It did helped brother :+1: Thank you for pointing the issue out in the Debug Log.
Moreover, apologies brother for replying after ages, I literally forgot that I was on RASA official forms and had posted a query as well :sweat_smile: have been busy for quite long, that’s why.
btw Thank alot again brother :gift_heart:

1 Like