# Action prediction fails when slot for form is already filled

**URL:** <https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [July 8, 2020, 2:48am UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090 "2020-07-08T02:48:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatianaf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tatianaf/32/7906_2.png) [@tatianaf](https://forum.rasa.com/u/tatianaf)\
**Post date:** [July 8, 2020, 2:48am UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/1 "2020-07-08T02:48:17Z")

</div>

I have an action that requires a slot. I have a training story like this

```
## download slack - happy path 
* download_slack
  - device_type_form
  - form{"name": "device_type_form"}
  - slot{"requested_slot": "device_type"}
* inform{"device_type": "mac"}
  - slot{"device_type": "mac"}
  - form{"name": null}
  - action_download_slack
  - utter_something_else

```

So this works if the user reaches the `download_slack` intent the first time and goes through the form but if they reach this intent a second time in the same conversation, then Rasa gets confused and predicts no next action for the intent. Im assuming this means I need to create another training story that doesnt have the form/slot logic?

---

<div class="post-metadata">

**Author:** ![tatianaf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tatianaf/32/7906_2.png) [@tatianaf](https://forum.rasa.com/u/tatianaf)\
**Post date:** [July 8, 2020, 3:02am UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/2 "2020-07-08T03:02:09Z")

</div>

Figured it out. Doing this fixed it:

```
## download slack without form
* download_slack
  - device_type_form
  - form{"name": "device_type_form"}
  - slot{"requested_slot": "None"}
  - form{"name": null}
  - action_download_slack
  - utter_something_else
```

---

<div class="post-metadata">

**Author:** ![Paras](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Paras](https://forum.rasa.com/u/Paras)\
**Post date:** [July 8, 2020, 5:06am UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/3 "2020-07-08T05:06:24Z")

</div>

Hello @tatianaf, i am facing the same issue

are you saying

- form{“name”: “form\_name”}
- slot{“requested\_slot”: “None”}
- form{“name”: null}

using this will set slot value to Null

---

<div class="post-metadata">

**Author:** ![tatianaf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tatianaf/32/7906_2.png) [@tatianaf](https://forum.rasa.com/u/tatianaf)\
**Post date:** [July 8, 2020, 8:09pm UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/4 "2020-07-08T20:09:16Z")

</div>

I dont think that’s correct… im pretty sure it only clears the slot if your form logic clears the slot…

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [July 13, 2020, 6:08pm UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/5 "2020-07-13T18:08:46Z")

</div>

You should decide up front whether it makes sense to drive the user dialog via (1) forms; or (2) stories with featurized slots. In this case, forms make the most sense. So the story should look like the [basic form example](https://rasa.com/docs/rasa/core/forms/#form-basics):

```auto
* download_slack
  - device_type_form
  - form{"name": "device_type_form"}
  - form{"name": null}

```

Don’t try to force the requested\_slot or drive the next step of the dialog via the story. Instead, the form can do those things.

---

<div class="post-metadata">

**Author:** ![tatianaf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tatianaf/32/7906_2.png) [@tatianaf](https://forum.rasa.com/u/tatianaf)\
**Post date:** [July 14, 2020, 9:13pm UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/6 "2020-07-14T21:13:43Z")

</div>

the format used by my code in my original post was generated by the interactive rasa shell. are you saying i shouldnt use training stories created by rasa interactive @stephens ?

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [July 15, 2020, 11:31pm UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/7 "2020-07-15T23:31:31Z")

</div>

In this case, I would not use the generated story.

---

<div class="post-metadata">

**Author:** ![tatianaf](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tatianaf/32/7906_2.png) [@tatianaf](https://forum.rasa.com/u/tatianaf)\
**Post date:** [July 15, 2020, 11:37pm UTC](https://forum.rasa.com/t/action-prediction-fails-when-slot-for-form-is-already-filled/31090/8 "2020-07-15T23:37:02Z")

</div>

ok what is special about this case? should interactive stories not be trusted in general?..
