# Fill slots according to a predicted intent

**URL:** https://forum.rasa.com/t/fill-slots-according-to-a-predicted-intent/8896
**Category:** Rasa Open Source
**Created:** [April 23, 2019, 10:02am UTC](https://forum.rasa.com/t/fill-slots-according-to-a-predicted-intent/8896 "2019-04-23T10:02:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mounabenayed](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mounabenayed/32/3097_2.png) [@mounabenayed](https://forum.rasa.com/u/mounabenayed)
#### Post date: [April 23, 2019, 10:02am UTC](https://forum.rasa.com/t/fill-slots-according-to-a-predicted-intent/8896/1 "2019-04-23T10:02:19Z")

</div>

Hello, In my dialogue flow I have multiple Yes/No questions. The user of course is free to answer by his own words and nlu will predict what intent is (affirm /deny) . I need, after predicting the intent to fill a slot referring to the question by a specific value (for example 0 and 1) representing the predicted intent. Is there a way to do that ? I’d appreciate your help.

---

<div class="post-metadata">

### Author: ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)
#### Post date: [May 10, 2019, 2:25am UTC](https://forum.rasa.com/t/fill-slots-according-to-a-predicted-intent/8896/2 "2019-05-10T02:25:21Z")

</div>

Sure, just write a custom action, you can use the tracker to get the latest intent to make logic that sets a slot based on the intent. You’ll want something ilke this:

```auto
intent = tracker.latest_message["intent"].get("name")

```
