Go to next action irrespective of intent

Hi, Apologies if this has already been answered but I researched a lot and I still couldn’t find a valid answer to this scenario.

Assume that I would like to move to a next action irrespective of what the user says. For example: Rasa: What is your favorite movie? User: My favourite movie is X Rasa: What is it about? User: * Any possible answer* Rasa: Sounds interesting. Is it an old movie?

I understand that triggering actions is an option but right now for my current use case, it seems impossible to predict which intent my user response gets mapped to because the style of answering varies so much, and as far as I understand, triggering happens from one intent to another action. Right now, I’m looking for a use case that possibly hears what the user has to say and goes to the next pre-defined step irrespective of the answer.

The alternatives I have tried are giving all intents joined by OR in the story, but I’m hoping there is a much more cleaner solution that I may be missing.

Any help is appreciated! TIA!

Hi @vindam23!

I can think of another approach (I don’t know if it is better or worse).

You can use FormAction to ask the question “What is it about?” and use mappings to get free text input and then finally in the submit method you can utter whatever you want.

Hope that helps.

Hi Saurabh, Thanks for the response! Can you elaborate a little bit more or point me to an example?

I’m just curious how a FormAction would be used in this case. So I would not be needing an intent for that answer if I use FromAction. Is that understanding correct?

Hi @vindam23! Sure, lets design it for the example that you gave initially.

Here is the story:

    ## fav_movie
    * greet
        - utter_greet
        - utter_ask_fav_movie
    * inform_fav_movie
    	- movie_detail_form
        - form{"name": "movie_detail_form"}
        - form{"name": null}
        - action_restart 

Here is the FormAction:

class MovieDetailForm(FormAction):
    """Form to collect extra information about a movie"""

    def name(self) -> Text:
        """Unique identifier of the form"""

        return "movie_detail_form"

    def required_slots(tracker: Tracker) -> List[Text]:
        """A list of required slots that the form has to fill"""

        return ["movie_detail"]

    def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
        """A dictionary to map required slots to
            - an extracted entity
            - intent: value pairs
            - a whole message
            or a list of them, where a first match will be picked"""

        return {
            "movie_detail": self.from_text()

    def submit(
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict]:
        """Define what the form has to do
            after all required slots are filled"""

        # utter submit template
        dispatcher.utter_message("Sounds interesting. Is it an old movie?")
        return []

Some particulars that you should keep in your domain.yml.

  - greet
  - inform_fav_movie

    type: unfeaturized
    auto_fill: false
    type: unfeaturized

    - text: "What is your favorite movie?"
    - text: "What is it about?"
    - text: "Hello!"

  - movie_detail_form

  session_expiration_time: 60  # value in minutes
  carry_over_slots_to_new_session: true

Hope you understand the concept here.