Slots overwritten in Forms with Duckling entities

I have a form that asks a user for a date, a number, then a free text field. Using duckling to extract the date and number works perfectly fine, but if the free text contains contains either entity it updates the previous slot values as seen below.

Screenshot 2020-12-17 170046

I know a feature of RASA is to auto-fill slots when the entity is present, but when the question has already been asked, and the slot set why does the slot get overwritten?

For reference I have seen similar posts and the docs saying to put auto_fill: False in the slot declaration, but this still happens.

Is there any other way I can ‘lock’ the value of the slot to prevent it being overwritten?

RASA versions: rasa = 2.1.0, rasa_sdk = 2.1.2

Relevant domain:

slots:
  test_date:
    type: text
    auto_fill: False
    influence_conversation: false
  test_free_text:
    type: text
    auto_fill: False
    influence_conversation: false
  test_number:
    type: text
    influence_conversation: false

forms:
  test_form:
    test_date:
    - type: from_entity
      entity: time
    test_number:
    - type: from_entity
      entity: number
    test_free_text:
    - type: from_text

It looks like you’re missing auto_fill: false for test_number.

Hi @kearnsw! While that is true, the test_date field does have the auto_fill: false argument, and that is still being overwritten by the date entity picked up in the free text question

One other thing I noticed is that you have auto_fill: False instead of auto_fill: false. From what I understand about how the domain.yml file is parsed, this will not be interpreted as a Boolean as written and instead will default to true. Try lower casing those values.

Hi @kearnsw,

I’ve updated the domain so the slots are defined as below:

slots:
  test_date:
    type: text
    auto_fill: false
    influence_conversation: false
  test_free_text:
    type: text
    auto_fill: false
    influence_conversation: false
  test_number:
    type: text
    auto_fill: false
    influence_conversation: false

But I still get the same behaviour with the slots being overwritten: stilldoesn'twork

I’ve tried this on a fresh project as well and I’m still getting the same problems, is there something within RASA that I can overwrite to stop this behaviour happening for this form?

Hi @FGA-Traverse,

I located the source of the issue in the FormAction function extract_other_slots:

Unfortunately, it’s not checking the auto_fill property at all. I submitted a pull request to fix the issue.

How about validating the slots in the form?

Hi @Tobias_Wochinger,

There is validation on each of the slots, but the main problem is more that the actual slot value is not what the user originally answered.

Is there a way of checking if the slot value has changed in the validation, or simply locking the value of the slot once it has been filled?

Unfortunately not. How about dropping the mappings in the domain and have a more restrictive custom slot mapping in the custom action?