# Utterance based on slot value

**URL:** <https://forum.rasa.com/t/utterance-based-on-slot-value/981>\
**Category:** Rasa Open Source\
**Created:** [September 10, 2018, 5:08am UTC](https://forum.rasa.com/t/utterance-based-on-slot-value/981 "2018-09-10T05:08:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Sandy](https://forum.rasa.com/u/Sandy)\
**Post date:** [September 10, 2018, 5:08am UTC](https://forum.rasa.com/t/utterance-based-on-slot-value/981/1 "2018-09-10T05:08:15Z")

</div>

Hi,

I am looking for a way in which the bot can utter option1 or oprtion2 based on slot value. For example- me: Which are my top 5 products[slot =product] (want bot to say): Would you like them by stores?

Case 2: me: Which are my top 5 stores[slot=store] (want bot to say): Would you like them by products?

I guess the naive way is to create stories of the above types. But is there a better way where the bot can decide on the utterance based on slot value?

Thank you, Shruti

---

<div class="post-metadata">

**Author:** ![jloutz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/jloutz/32/389_2.png) [@jloutz](https://forum.rasa.com/u/jloutz)\
**Post date:** [September 10, 2018, 5:13am UTC](https://forum.rasa.com/t/utterance-based-on-slot-value/981/2 "2018-09-10T05:13:33Z")

</div>

Hi, I would say this is not the naive way, but the ONLY way 🙂 If you create enough example stories with differing slot values leading to different bot actions, eventually your dialog model will learn the difference. Might take quite a bit of training data before this starts to work reliably though.

---

<div class="post-metadata">

**Author:** ![Sandy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Sandy](https://forum.rasa.com/u/Sandy)\
**Post date:** [September 10, 2018, 5:15am UTC](https://forum.rasa.com/t/utterance-based-on-slot-value/981/3 "2018-09-10T05:15:13Z")

</div>

Thanks John for the candid reply 🙂
