Prevent repition of utter_ask_<slot> if slot is not filled

Hi, I’m new to Rasa.

I want to provide a step by step tutorial with my chatbot.

My solution is this:

  • I use a form
  • Each step is a boolean slot
  • each utter_ask_ is a piece of instruction followed by a “Did you succeed?”
  • I use custom validation to proceed to the next step if the user affirms, ask “Could you describe the problem?” if the user denies or answer any other question the user may have.

This leads to the following problem: If the user answers with a deny intent the bot will ask “Could you describe the problem?” followed by a repetition of the utter_ask_slot message. Is there some way to prevent this message?

@fomsi Hey! Means after deny intent you getting

Could you describe the problem? and then Did you succeed?

then clear to me “followed by a repetition of the utter_ask_slot message”

@nik202 Hey, thanks for your reply! Each step of the tutorial corresponds to the text in utter_ask_<slot_name>. That text has the following format: … Did you succeed?

After deny intent the bot will have two answers (of which I want to prevent the second one):

bot: “Could you describe the problem?”

bot: "… Did you succeed? (this is what i meant by repitition of utter_ask_<slot_name>)

@fomsi Are you able to get each slots? and you want after each correct slot, the message should print i.e “Did you succeed?” Right

@nik202 Each slot is a boolean. If the user shows an affirm intent, the bot continues to the next step. If it is a deny intent, the validation method will call the dispatcher and write “Could you describe your problem?” and return {‘slot_name’: None}. Then the bot will repeat the utter_ask_slot text.

@fomsi It’s all related to story and rules or form loop.

@nik202 Ah, so I can just create a story where the bot does not repeat the utter_ask_slot text if the user denies or asks something else?

I don’t know how to influence a running form with rules

@fomsi What are you using? Story or rules? Have you seen some rasa videos on forms, or should I share for your reference?

@nik202 Currently I rely only on rules. I watched some videos and saw this doc here: Forms

My tutorial form has 6 steps, does that mean I have to make a rule or story for each step where the user can utter a deny intent?

Is there some way to make this work more general? I would like to add further tutorials

@fomsi I think so, stick to rules or story; because user can always change the conversation as per his need, he can even break after 1 steps or even after 3 etc. So, your bot need to be trained based on every scenario’s, not fixed on only one scenario.

For your reference, I will share some official rasa videos on rasa channel Rasa, please do see it again it will help you:


See, all whilst keeping in mind your issue. Hope it will help.

@nik202 Thanks, I will give it a try!

@fomsi No worries, try it, if you not able to solve then I am here :slight_smile:

@fomsi have you tried it, If yes can you please close this thread for others.

@nik202 I ended up using a different approach so I did not use forms in this way anymore. I save the tutorial step in a slot now and have a custom action that chooses the response based on the tutorial step and updates the slot.

@fomsi good, mark this Prevent repition of utter_ask_<slot> if slot is not filled - #14 by fomsi as Solution for others.