Slots not getting filled up, after utter_ask_slotname in a form

Hi! I am using Rasa3.1. The bot runs utter_ask_<slot_name>, but after receiving an input, it did not store the value as the required slot. Instead, it repeats utter_ask_<slot_name>.

What am I missing?

domain.yml

utter_ask_depgroup:
  - text: Okay, got it! Are the dependent variables 'categorical' or 'numerical' or 'factors' or 'count' or 'time to event'?
  utter_ask_indepgroup:
  - text: Great! Are the independent variables 'categorical', 'numerical' or 'factors/covariates'?

stories.yml

  • story: Test Information Enquiry_1 steps:
  - intent: greet
  - action: utter_greet
  - intent: biostat_analysis
  - action: utter_fb_quick_reply_biostat_analysis
  - intent: info_test
  - action: info_test_form
  - active_loop: info_test_form
  - slot_was_set: 
    - requested_slot: indepgroup
  - slot_was_set: 
    - indepgroup: categorical
  - slot_was_set: 
    - requested_slot: depgroup
  - slot_was_set:
    - depgroup: numerical
  - slot_was_set:
    - requested_slot: null
  - active_loop: null
  - action: action_info_test_form

actions.py

class ValidateInfoTestForm(FormValidationAction):
    def name(self) -> Text:
        return "validate_info_test_form"

    def validate_indepgroup(
        self,
        slot_value: Any,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> Dict[Text, Any]:
        """Validate `independent_group` value."""

        if slot_value is None:
            dispatcher.utter_message(response="utter_ask_indepgroup")
            return {"indepgroup": None}
        else:
            return {"indepgroup": slot_value}

    def validate_depgroup(
        self,
        slot_value: Any,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> Dict[Text, Any]:
        """Validate `dependent_group` value."""

        if slot_value is None:
            dispatcher.utter_message(response="utter_ask_depgroup")
            return {"depgroup": None}
        else:
            return {"depgroup": slot_value}

class ActionInfoTestForm(Action):
    """Action Info Test form"""

    def name(self) -> Text:
        return "action_info_test_form"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
        
        indepgroupl = tracker.get_slot("indepgroup")
        
        depgroupl = tracker.get_slot("depgroup")
        
        if "numerical" and "categorical" in indepgroupl:
            if "numerical" in depgroupl:
                dispatcher.utter_message(response="utter_indepnumcat_depnum")
            elif "categorical" in depgroupl:
                dispatcher.utter_message(response="utter_indepnumcat_depcat")
            elif "time to event" in depgroupl:
                dispatcher.utter_message(response="utter_indepnumcat_deptimetoevent")
        
        if "factor" in indepgroupl:
            if "count" in depgroupl:
                dispatcher.utter_message(response="utter_indepfac_depcount")
            elif "numerical" in depgroupl:
                dispatcher.utter_message(response="utter_indepfac_depnum")
        
        return [SlotSet("indepgroup",""), SlotSet("depgroup","")]
'''

  • story: Test Information Enquiry_1 steps:
    • intent: greet
    • action: utter_greet
    • intent: biostat_analysis
    • action: utter_fb_quick_reply_biostat_analysis
    • intent: info_test
    • action: info_test_form
    • active_loop: info_test_form
    • slot_was_set:
      • requested_slot: indepgroup
    • slot_was_set:
      • indepgroup: categorical
    • slot_was_set:
      • requested_slot: depgroup
    • slot_was_set:
      • depgroup: numerical
    • slot_was_set:
      • requested_slot: null
    • active_loop: null
    • action: action_info_test_form

You should follow the example rules/stories from the forms documentation. That long story is likely the problem.

Thank you @stephens! The slots get filled when I changed the slot mapping type (from_entity to from_text). Details:

domain.yml

   indepgroup:
    type: list
    influence_conversation: true
    mappings:
      - type: from_text
        conditions:
         - active_loop: info_test_form
           requested_slot: indepgroup