Should slots generally be reset to None after action is executed?

@akelad @Ghostvv and others: Would you generally recommend resetting slots to None after an action “consumed” all the information from relevant slots?

There’s two issues I’m not confident about. For example, let’s say in the restaurant example, I want to book a table:

  1. If I don’t reset it, how can I avoid booking the same table again, just because the slots were still filled from the previous attempt?
  2. If I reset it though, the bot always forgets about the past immediately. Therefore, in followup actions the bot cannot act on any information from previous messages

Any thoughts and experiences with this common issue are very much appreciated.

For example I might have a situation like this:

* book_table
 - action_book_table
 - slot{"status": some_status}  # e.g. confirmed or cancelled
* thanks
 - utter_thanks

Which could be either followed by something like:

* book_table  # book another table
 - action_book_table

Or

* confirm_booking
  - action_confirm_booking

In the former scenario, I’d want the slots to be reset, to guarantee the booking will not be based on any previous booking. The latter, however, would be unnecessarily complicated if I reset all the slots and require to ask about booking details prior to confirming the details.

In the action_book_table you could check whether any of the slots are set and ask the user whether that’s the table they want to book (listing their preferences, i.e. slot values)? if they say no, reset those slots and ask for everything again

That’s a good idea for some situations, thanks!

In my concrete situation, however, it’s very unlikely that the person is ordering the same product twice. So my default strategy should be to always ask for the information, even if the slot is already filled. Can I force a FormAction to ignore some specific slots that were set before the message that triggered the FormAction?

E.g. let’s say I have a situation like this:

* order_product
  - form_order_product
* ...
 - slot{"product_id": 123}
* ...
 - form{"name": null}
* confirm_order
 - action_confirm_order # can lookup last order because it's still stored in tracker

Then ten minutes later:

# Now the slot `product_id` should be ignored ...
* order_product
  - form_order_product

@akelad is there even a built-in way to ask the user to confirm an already set slot? Or do I need to override the request_next_slot method?

Edit: Please also see my remaining question from above (how to force Form Action to always (re-)ask all required slots)

@akelad @Ghostvv: Running into a similar issue like this one regarding “forcing” slots to be asked at least once during a FormAction.

I realized that resetting slots doesn’t solve issue #1 from my initial post:

Because, e.g. situations like these might appear, which still suffer from the same problem:

* user_likes{"item": "strawberries"}  # "I like strawberries"
  - utter_user_likes
* order_food
  - form_food
  - form{"name": "food"}
  - form{"name": null}

Is there a “thought-through” solution for how to avoid that forms automatically “pre-filled” slots? It’s very inconvenient in situations like the one above to ask the user for confirmations (like “Do you want to order strawberries?” in the story from above). Ideally, I want to achieve something like this:

Requirement

Every slot that is at some point during the FormAction part of the required_slots, must be asked or confirmed at least once during a FormAction.

You would need to override the request_next_slot method I think yes. That way you can ask users to confirm pre-filled slots

@smn-snkl…i have the same questions for this issue too…assume i have filled a form for booking an appointment…after that the slots are filled and okay no problem i want to use it for later purpose,asssume i want to book an appointment for another person and asks the bot please book an appointment for me again and instade of saying taking pre-filled slots in the debug mood why it should not activate a form with empty or not filled slots?? can we solve this kind of issue…if so how?