Forms not requesting list slot

In a form, the slot that I want to request is a list. This slot is never requested What I’m seeing is that when the form action is called, the slot is set to an empty list before we get to actions I can control in stories or rules. My guess is it’s not being requested is because it’s not null or None. Has anybody else seen this? Is there a work around?

Using Rasa 2.8.7

domain.yml

version: "2.0"
config:
  store_entities_as_slots: true
session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

intents:
  - form_initializer
  - other_intent

entities:
- list_slot
- text_slot

slots:
  list_slot:
    type: list
    initial_value: null
    auto_fill: true
    influence_conversation: true
  text_slot:
    type: text
    initial_value: null
    auto_fill: true
    influence_conversation: true

responses:

  utter_ask_repo_form_list_slot:
  - text: Add to list_slot

  utter_ask_repo_form_text_slot:
  - text: Add to text_slot

  utter_done:
  - text: done

  utter_other_intent:
  - text: other_intent

actions:
  - utter_done

forms:
  repo_form:
    required_slots:
      list_slot:
      - entity: list_slot
        type: from_entity
      text_slot:
      - entity: text_slot
        type: from_entity

rules.yml

version: "2.0"

rules:

- rule: respond to other intent
  steps:
  - intent: other_intent
  - action: utter_other_intent

- rule: activate form
  steps:
    - intent: form_initializer
    - action: repo_form
    - active_loop: repo_form

- rule: submit form
  condition:
  - active_loop: repo_form
  steps:
    - action: repo_form
    - active_loop: null
    - action: utter_done

nlu.yml

version: "2.0"

nlu:
- intent: form_initializer
  examples: |
    - I want [mexican](text_slot) [rice](list_slot) and [beans](list_slot) food
    - I want [indian](text_slot) [curry](list_slot) food
    - I want [chinese](text_slot) food
    - I want food

- intent: other_intent
  examples: |
    - This is a good example for training
    - Are you a good example for training
    - You are a bad example of training
    - We can train on this example

- lookup: list_slot
  examples: |
    - rice
    - beans
    - curry
- lookup: text_slot
  examples: |
    - mexican
    - chinese
    - indian

Hey @boristhescot , try change utterances for slots like this “utter_ask_<slot_name>”.

1 Like

@EvanMath It still skips prompting for the list slot.

Just in case there is confusion, the form does prompt for the text slot. It only skips the list slot

1 Like

Hey @boristhescot , have you defined the “entities” section in your domain file? Because I can’t see that above.

Yes, the problem is that an empty list is still a list. Check this thread for a solution with two slots.

@EvanMath, I updated the domain to include entities. It doesn’t make a difference for purposes of reproduction, but it’s good to make sure things are correct

@Gehova, Thanks for pointing me to that solution. I came back to Rasa because I saw that they fixed the issue of single elements not being stored as an element of a list. It’s disappointing that they didn’t see the case of prompting for an empty list as they were working on it. If there’s no way to do this outside of a custom solution, I guess that’s what I’ll have to do.