# Prediction priority for custom action and utter message

**URL:** <https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122>\
**Category:** Rasa Open Source\
**Created:** [October 21, 2019, 3:14pm UTC](https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122 "2019-10-21T15:14:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KabaninArtem](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kabaninartem/32/5349_2.png) [@KabaninArtem](https://forum.rasa.com/u/KabaninArtem)\
**Post date:** [October 21, 2019, 3:14pm UTC](https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122/1 "2019-10-21T15:14:26Z")

</div>

Hi all!

Guys, need help! I have a problem with prediction for my utter\_message and custom action

- slot{“my\_location”: null}

- my\_location\_search{“loc\_search\_type”:“benefits”,“loc\_search\_value”:“my location”}
  - slot{“my\_location”: null}
  - slot{“loc\_search\_value”: “my location”}
  - utter\_show\_my\_location\_absent
  - utter\_ask\_location

* * *

- slot{“my\_location”: “London”}

- my\_location\_search{“loc\_search\_type”:“benefits”,“loc\_search\_value”:“New York”}
  - slot{“my\_location”: “London”}
  - slot{“loc\_search\_value”: "“New York”}
  - action\_location\_search

Why in this case Rasa always run action? How can I fix that? Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 22, 2019, 6:26am UTC](https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122/2 "2019-10-22T06:26:40Z")

</div>

What exactly should not happen? The `action_location_search`? What should happen instead?

Also, what Rasa version are you using and how does your `config.yml` file look like? Thanks.

---

<div class="post-metadata">

**Author:** ![KabaninArtem](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kabaninartem/32/5349_2.png) [@KabaninArtem](https://forum.rasa.com/u/KabaninArtem)\
**Post date:** [October 22, 2019, 7:07am UTC](https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122/3 "2019-10-22T07:07:34Z")

</div>

Hi @Tanja , thanks for your answer!)

If my\_location slot has no value it need to trigger `utter_show_my_location_absent` and than trigger `utter_ask_location`, if value is present (it is a categorical slot) bot need to run `action_location_search`  
I use rasa 1.3.9 version  
Here is my config.yml:

 ![Screenshot_5](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/53b9436e361d448bb503d59cf768eed28bd12865.png)

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 28, 2019, 8:39am UTC](https://forum.rasa.com/t/prediction-priority-for-custom-action-and-utter-message/20122/4 "2019-10-28T08:39:53Z")

</div>

Sorry for the late response. How does your training data look like? Do you have both cases in your stories? In theory the bot should be able to distinguish between the two cases.
