# Ask again for a not set slot in form

**URL:** <https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387>\
**Category:** Rasa Open Source\
**Created:** [February 16, 2022, 3:28pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387 "2022-02-16T15:28:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Belen](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@Belen](https://forum.rasa.com/u/Belen)\
**Post date:** [February 16, 2022, 3:28pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/1 "2022-02-16T15:28:48Z")

</div>

I have a question about how to ask for the slots in the forms.

I have defined a slot that is mapped with “from\_entity” and whose values are in a lookup table.

Everything works fine when the user types one of the values included in the look up table.

However, when the slot is asked and the phrase written by the user does not contain any entity, the chatbot does not ask for the slot again.

Should this happen like this or is there a way to make the chatbot ask for the slot again?

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [February 16, 2022, 6:42pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/2 "2022-02-16T18:42:32Z")

</div>

Got a chatlog from `rasa interactive` that gives a demo of something going wrong?

Are you using custom actions to validate the data? If not, that might fix it too. There’s more information on validation in the [custom forms section on our learning center](https://learning.rasa.com/conversational-ai-with-rasa/custom-forms/).

---

<div class="post-metadata">

**Author:** ![Belen](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@Belen](https://forum.rasa.com/u/Belen)\
**Post date:** [February 16, 2022, 7:32pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/3 "2022-02-16T19:32:30Z")

</div>

Thanks for the reply @koaning

I have not indicated the version of Rasa in the original post, I include it here

```auto
Rasa Version : 3.0.8
Rasa SDK Version : 3.0.4
Python Version : 3.8.12
Operating System : Windows-10-10.0.22000-SP0

```

Looking at the chatlog of the interactive version I see the same thing that does not ask again for the slot that has not been fixed. I attach the story here

```auto
- story: interactive_story_1
  steps:
  - intent: book_restaurant
  - action: book_restaurant_form
  - active_loop: book_restaurant_form
  - slot_was_set:
    - requested_slot: food
  - intent: book_restaurant

```

What happens in the story is that it detects the intent `book_restaurant` and asks for the slot `food ` with the phrase “What kind of food do you want?” and if I answer “Sushi” (which is not in the look up table of the `food` entity) it re-enters the form to execute the validation and returns to the `action_listen` action but without asking for the slot again.

Right now I don’t have a validation function, should I add one so that if the slot value is None it tells the user ‘I didn’t understand that’?

Is there any way to indicate that the slot should be asked again if it has not been filled?

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [February 17, 2022, 11:46am UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/4 "2022-02-17T11:46:27Z")

</div>

> [@Belen](#):
>
> Right now I don’t have a validation function, should I add one so that if the slot value is None it tells the user ‘I didn’t understand that’?

Sending back a message that helps the user what to do next is a good practice either way.

> [@Belen](#):
>
> Is there any way to indicate that the slot should be asked again if it has not been filled?

A form should do that on it’s own, so I think something strange is happening.

Could you share the full log of something going wrong in a `rasa interactive` session? That way I can see the slots being set and that might help me debug.

---

<div class="post-metadata">

**Author:** ![Belen](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@Belen](https://forum.rasa.com/u/Belen)\
**Post date:** [February 17, 2022, 12:11pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/5 "2022-02-17T12:11:37Z")

</div>

> [@koaning](#):
>
> Sending back a message that helps the user what to do next is a good practice either way.

I have defined a validation function that checks if the value of the slot has been set, if not, it tells the user ‘I haven’t understood what kind of food you want, can you tell me in another way?’ but it does not enter the validation if no slot value is previously extracted.

I have observed that if I create a custom extraction method in which I return `{'food': None}` if no entity value is detected, it does enter the validation and displays the message asking again for the slot.

---

<div class="post-metadata">

**Author:** ![iamsid](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamsid](https://forum.rasa.com/u/iamsid)\
**Post date:** [January 18, 2023, 7:03pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/6 "2023-01-18T19:03:41Z")

</div>

@Belen is this problem resolved as i am facing same issue in rasa 3.x. For first unfound slot prompt is asked to provide entity value to be stored on slot. But if somehow the slot is not filled on the response after prompt was asked then neither the flow is going into validation\_form action nor the prompt is repeated. The conversation halts and if response provided is somehow detected as another intent the response to that intent is returned.

---

<div class="post-metadata">

**Author:** ![iamsid](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamsid](https://forum.rasa.com/u/iamsid)\
**Post date:** [January 18, 2023, 7:04pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/7 "2023-01-18T19:04:06Z")

</div>

@koaning is this issue resolved?

---

<div class="post-metadata">

**Author:** ![KangliZhang](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kanglizhang/32/22171_2.png) [@KangliZhang](https://forum.rasa.com/u/KangliZhang)\
**Post date:** [April 10, 2023, 7:11am UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/8 "2023-04-10T07:11:44Z")

</div>

i am facing the same issue in rasa 3.x, If the slot is not filled the first time, the slot will not be asked again

---

<div class="post-metadata">

**Author:** ![KangliZhang](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kanglizhang/32/22171_2.png) [@KangliZhang](https://forum.rasa.com/u/KangliZhang)\
**Post date:** [April 10, 2023, 7:35am UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/9 "2023-04-10T07:35:16Z")

</div>

I tried this method，Although able to achieve asking again for the slot, but it introduces a new problem, doing so will cause all operations that interrupt the form to be ineffective

---

<div class="post-metadata">

**Author:** ![Jawahar96](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Jawahar96](https://forum.rasa.com/u/Jawahar96)\
**Post date:** [December 19, 2023, 12:55pm UTC](https://forum.rasa.com/t/ask-again-for-a-not-set-slot-in-form/51387/10 "2023-12-19T12:55:44Z")

</div>

Was anybody able to solve this? I am facing the same issue in 2.8.x. if the request slot entity is not detected, it jumps out of the form.
