# Slot filling based on intent

**URL:** <https://forum.rasa.com/t/slot-filling-based-on-intent/4638>\
**Category:** Rasa Open Source\
**Created:** [January 24, 2019, 5:33pm UTC](https://forum.rasa.com/t/slot-filling-based-on-intent/4638 "2019-01-24T17:33:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Partha\_Goopta](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/partha_goopta/32/1552_2.png) [@Partha\_Goopta](https://forum.rasa.com/u/Partha_Goopta)\
**Post date:** [January 24, 2019, 5:33pm UTC](https://forum.rasa.com/t/slot-filling-based-on-intent/4638/1 "2019-01-24T17:33:41Z")

</div>

Hi, We know that the slots are provided to save the context of the intent, now what I need to know is how to set same value to different slots, based on the intent of the utterance. For example,

Let’s say we have two places ‘A’ and ‘B’, and two slots ‘source’ and ‘destination’. Now, to the question “What is the starting point of your journey?” if the user utters, “A”, ‘A’ should be set to ‘source’ slot, or if the user utters “B”, then ‘B’ should be set to source slot.

Similarly, to the question “What is the destination of your journey?” if the user utters, “A”, ‘A’ should be set to ‘destination’ slot, or if the user utters “B”, then ‘B’ should be set to ‘destination’ slot.

I tried to achieve it by regular training, but in some cases, it’s setting the value to the wrong slot. How do I fix this?

---

<div class="post-metadata">

**Author:** ![lgrinberg](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lgrinberg/32/1659_2.png) [@lgrinberg](https://forum.rasa.com/u/lgrinberg)\
**Post date:** [February 6, 2019, 8:59pm UTC](https://forum.rasa.com/t/slot-filling-based-on-intent/4638/2 "2019-02-06T20:59:36Z")

</div>

Try the approach described here:X

> [@Providing conversation context to the NLU using microservices](http://forum.rasa.com/t/providing-conversation-context-to-the-nlu-using-microervices/4972):
>
> OVERCOMING LIMITATIONS OF CONTEXT-INDEPENDENT RASA NLU SERVER English, especially in its American variety, is a language whose words tend to be highly ambiguous in their meaning. It has multiple words that can simultaneously be nouns, verbs and adjective (e.g. access, hit, cool). Names, both personal and entity, such as business, represent a similar problem. Unlike other languages, where specialized words are used for first (given) names and even for last names (surnames), in English (once a…

Essentially, you’ll need a general “inform” intent, that you probably already have. Then you’ll need to make 2 more NLU models, one dedicated to “origin” and one to “destination”. This way whatever the “origin” NLU server identifies as an entity is “origin” and then you can set your “origin” slot to that value.

And the same for destination
