Utterance inside a form (v2.x)

I’m using Rasa 2.3.0 and I have a form that executes and steps through the questions as you would expect.

How would I go about “injecting” an utterance, that say explains the next few questions? Do I need to create a validation for the previous field and have the action.py send that utternace?

Seems a little “duct-tapey” but is that the proper way to add in utterance elements during form execution?

It’s possible for you to have a custom action for requesting slots in a form. So, you could have action_ask_<form_name>_<slot_name> instead of utter_ask_<form_name>_<slot_name>, which could help you have more control and you could have a logic step that decides whether or not this user needs a explanation “injected” (or however you like it to be).

1 Like

Oh yea that makes sense, I did that to have different logic paths based on answers to different questions.

That’s a lot of overhead to “just” add in instructions midway through the form though. Would be nice to be able to add an utterance when defining the required slots and mappings in domain.yml

That said, I guess that’s a preferable way to do it, it gives you total control over the form logic that way.