Rasa x changes the order of the slots

When I run rasa x the order of the slots changes, any update for this known issue?

Rasa Version      :         2.8.1
Minimum Compatible Version: 2.8.0
Rasa SDK Version  :         2.8.1
Rasa X Version    :         0.39.3
Python Version    :         3.8.10
Operating System  :         Linux-5.11.0-37-generic-x86_64-with-glibc2.29
Python Path       :         /home/dell/Desktop/Chatbot/env/bin/python3

I have opened an issue on Github for this, here

Hi @Pain, are your bot is working fine, if the slot position is changed? Yes or No? can you share the slots before and after? It some times happen with us also, mostly in VS code. Even when we use buttons syntax, the text position should be in starting, but when we train the model, it changed its position at the bottom of the button syntax. So, yes it’s a general process, but surely we will investigate this issue for the future reference. Till the time our bot is working fine, nothing to worry :slight_smile: Thanks.

  • Is your bot is working fine if the slot position is changed? No

  • Sharing the Slots:

    • Before:
forms:
  simple_reg_form:
    required_slots:
      Id_number:
        - entity: Id_number
          type: from_entity
      place:
        - entity: place
          type: from_entity
      confirm_simple_reg_form:
        - intent: affirm
          type: from_intent
          value: yes
        - intent: deny
          type: from_intent
          value: no
  • After:
forms:
  simple_reg_form:
    required_slots:
      Id_number:
        - entity: Id_number
          type: from_entity
      confirm_simple_reg_form:
        - intent: affirm
          type: from_intent
          value: yes
        - intent: deny
          type: from_intent
          value: no
      place:
        - entity: place
          type: from_entity

@Pain Strange, it should not effect the conversation for the bot, what ever is the position of the slots, hope your stories syntax is fine? please delete the model and re-train it and let me know please.

Still the same problem.

@Pain please share the error screenshot while running rasa shell --debug or if you are training rasa train --debug

Actually, the order in which the slots are asked depends on their order in the required_slots.

And Rasa X has an issue in which it changes that order to sort the slots in alphabetical order.

Since it’s an issue with Rasa X, we cannot fix it and have to deal with it by either:

class ValidateSimpleRegForm(FormValidationAction):
    def name(self) -> Text:
        return "validate_simple_reg_form"

    async def required_slots(self, domain_slots, dispatcher, tracker, domain):
        return ['Id_number', 'place', 'confirm_simple_reg_form']
  • Or changing the slot names to be in alphabetical order
forms:
  simple_reg_form:
    required_slots:
      a_Id_number:
        # ...
      b_place:
        # ...
      c_confirm_simple_reg_form:
        # ...
1 Like