FormAction Loop and weird training interaction stories

rasa-core==0.12.2 rasa-nlu==0.13.8

## Generated Story 6822711629446700830
  • begin_chat
    • utter_begin_chat
  • query
    • utter_display_capabilities
  • dialogue_branch{“dialogue_branch”: “generate_ticket”}
    • slot{“dialogue_branch”: “generate_ticket”}
    • utter_begin_ticket
    • utter_ask_problem_type
  • problem_type{“problem_type”: “hardware”}
    • action_ticket_form
    • form{“name”: “action_ticket_form”}
    • slot{“requested_slot”: “device”}
  • form: inform{“device”: “laptop”}
    • slot{“device”: “laptop”}
    • form: action_ticket_form
    • slot{“device”: “laptop”}
    • slot{“requested_slot”: “device_id”}
  • inform{“number”: 45123}
    • slot{“number”: 45123}
    • action_process_device_id
    • action_listen
    • slot{“device_id”: 45123}
    • action_ticket_form
    • slot{“requested_slot”: “date”}
  • inform{“time”: “2018-11-26T00:00:00.000+00:00”}
    • slot{“time”: “2018-11-26T00:00:00.000+00:00”}
    • action_store_problem_date
    • action_listen
    • slot{“date”: “26/11/2018”}
    • action_ticket_form
    • slot{“requested_slot”: “damage_type”}
  • form: inform{“time”: “2018-11-26T00:00:00.000+00:00”}
    • slot{“time”: “2018-11-26T00:00:00.000+00:00”}
    • form: action_ticket_form
    • slot{“damage_type”: “i spilled some water yesterday”}
    • slot{“requested_slot”: “name”}
  • query{“name”: “jerry”}
    • slot{“name”: “jerry”}
    • utter_thanks
    • action_ticket_document
    • action_show_ticket
  • affirm
    • utter_thanks
    • utter_ask_more_info
  • deny
    • utter_ask_feedback
  • feedback{“feedback_value”: “negative”}
    • slot{“feedback_value”: “negative”}
    • utter_negative_feedback
    • utter_bye

This is one of my stories that is generated by interactive training that i have corrected. I am using form action to slotfill specific slots and the rest of my stories is all created in interactive training.

If i dont change anything, it works well up until it reaches the FormActions and repeats action_ticket_Form without even waiting for a user input and when the chatbot enters a chat interface it will just spam this requested slot

* dialogue_branch{"dialogue_branch": "generate_ticket"}
- slot{"dialogue_branch": "generate_ticket"}
- utter_begin_ticket
- utter_ask_problem_type
  • problem_type{“problem_type”: “hardware”}
    • slot{“problem_type”: “hardware”}
    • action_ticket_form
    • form{“name”: “action_ticket_form”}
    • slot{“requested_slot”: “device”}
    • form: action_ticket_form
    • slot{“requested_slot”: “device”}
    • form: action_ticket_form
    • slot{“requested_slot”: “device”}
    • form: action_ticket_form
    • slot{“requested_slot”: “device”}
    • form: action_ticket_form
    • slot{“requested_slot”: “device”}

I cant find any problems as this slot_mappings is very similar to the example at the Rasa Core Website

    def slot_mappings(self):
    return {
        "device": [self.from_entity(entity="device",
                                    intent="inform")],
        "device_id": [self.from_entity(entity="device_id",
                                       intent="inform")],
        "date": self.from_entity(entity="date",
                                 intent="inform"),
        "damage_type": self.from_text(intent="inform"),
        "name": [self.from_entity(entity="name",
                                  intent="inform")]
    }

Thanks Franz

Right, so I was just being dumb. In any case for me and who ever stumbles across this page in the future.

I was attempting to use custom action inside forms (which worked on a previous version of) it was to validate things as well, which caused problems as training policies are not to do anything inside formAction which is handled by formPolicy

My pathing Sucked: since the migration to 0.12.x my old policies were persisting in my files which was causing problems

lastly the new things to add: in your config.yml files there is a new thing to add aside from pipeline, policies, here is where you define form policies as well.

when form action is looping forver something is wrong in config files (most_likely) cheers Franz

Glad you figured the issue out and, most importantly, shared the solution with the comunity @franzlom! :slight_smile:

1 Like