# Intent based entity extraction

**URL:** <https://forum.rasa.com/t/intent-based-entity-extraction/22737>\
**Category:** Rasa Open Source\
**Created:** [December 23, 2019, 11:20am UTC](https://forum.rasa.com/t/intent-based-entity-extraction/22737 "2019-12-23T11:20:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbhishekChandra7](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abhishekchandra7/32/6434_2.png) [@AbhishekChandra7](https://forum.rasa.com/u/AbhishekChandra7)\
**Post date:** [December 23, 2019, 11:20am UTC](https://forum.rasa.com/t/intent-based-entity-extraction/22737/1 "2019-12-23T11:20:36Z")

</div>

Is there a way in rasa Nlu to extract the entities after intent classification? I realise that intent classification and entity extraction happen independently of each other but in certain cases rasa is giving me the entity that doesn’t belong to that particular intent. For example, in ‘Mr.X is your Driver’ and ‘Mr.Y is your delivery partner’ Mr.Y is being recognised as driver\_name instead of delivery\_partner\_name. Is there a way to localise the entities to specific intents?

---

<div class="post-metadata">

**Author:** ![samscudder](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/samscudder/32/4466_2.png) [@samscudder](https://forum.rasa.com/u/samscudder)\
**Post date:** [December 23, 2019, 3:41pm UTC](https://forum.rasa.com/t/intent-based-entity-extraction/22737/2 "2019-12-23T15:41:56Z")

</div>

You can do it with custom actions.

Use the same entity for extraction, (let’s say `person`) and in the “… is your driver” intent, call a custom action that sets a `driver` slot from the `person`, and in your “… is your delivery partner”, call a custom action that sets a `delivery_partner` slot from the `person` entity.
