Skip to content

/restart in rasa shell results in "zombie" slots #10235

Closed
@samsucik

Description

Normally, you expect /restart to reset all slots (dump their values). However, I found a way to bring such "dead" slot values back to life 👻 which occurs in 3.0rc2 but not in 2.8.

Example set-up is similar to this: To a rasa init project add these domain parts:

intents:
  - inform

responses:
  utter_ask_slot_0:
  - text: "Let's start this form. Say something!"

  utter_ask_slot_A:
  - text: "Could you, possibly, please, give me a city."

  utter_ask_slot_B:
  - text: "Yo pal gimme a city!"

entities:
- city

slots:
  slot_0:
    type: any
    mappings:
    - type: from_text
      not_intent: greet
  slot_A:
    type: any
    mappings:
    - type: from_entity
      entity: city
      conditions:
      - active_loop: my_form
  slot_B:
    type: any
    mappings:
    - type: from_entity
      entity: city
      conditions:
      - active_loop: my_form
forms:
  my_form:
    required_slots:
        - slot_0
        - slot_A
        - slot_B

some NLU data for the new intent & entity:

- intent: inform
  examples: |
    - [Bratislava](city)
    - [Berlin](city)
    - [Prague](city)
    - [Amsterdam](city)
    - [Edinburgh](city)

the complete rules will look like this:

version: "2.0"

rules:

- rule: Say goodbye anytime the user says goodbye
  steps:
  - intent: goodbye
  - action: utter_goodbye

- rule: Say 'I am a bot' anytime the user challenges
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

- rule: Activate form
  steps:
  - intent: greet
  - action: my_form
  - active_loop: my_form

- rule: Submit form
  condition:
  - active_loop: my_form
  steps:
  - action: my_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - action: utter_happy

and you'll have to comment out all stories.

Then, rasa train the bot and rasa shell --debug talk to it. Below is the sequence of user messages and the interesting slots after the message has been processed, as reported by rasa shell:

message     slot_0      slot_A      slot_B
hi          None        None        None
Berlin      Berlin      None        None
Bratislava  Bratislava  Bratislava  None
Prague      Prague      Bratislava  Prague
/restart    None        None        None
hi          None        None        None
Bratislava  Bratislava  Bratislava  Prague

Notice how all slots are reported to be reset after /restart but old values come back to life after the last message.

Metadata

Assignees

Labels

3.0.0rc-QA-issueA problem found during the QA of rasa==3.0.0 release candidatearea:rasa-oss 🎡Anything related to the open source Rasa frameworkfeature:3.0/slot-mappingstype:bug 🐛Inconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions