# Multiple entity extractors in pipline

**URL:** <https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104>\
**Category:** Rasa Open Source\
**Created:** [June 6, 2019, 9:36pm UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104 "2019-06-06T21:36:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahimakhavan](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rahimakhavan](https://forum.rasa.com/u/rahimakhavan)\
**Post date:** [June 6, 2019, 9:36pm UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/1 "2019-06-06T21:36:10Z")

</div>

I have 3 different extractors in the pipeline:

- SpacyEntityExtractor
- CRFEntityExtractor
- DucklingHTTPExtractor

I am wondering, when all of them extract the same entity, the value of which one will be taken to set slots and how?

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [June 19, 2019, 7:28am UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/2 "2019-06-19T07:28:28Z")

</div>

Hey @rahimakhavan welcome to the forum 😃 and sorry for the late response… So `SpacyEntityExtractor` and `DucklingHTTPExtractor` by default don’t have any entity names that are the same. And ideally you shouldn’t name any of your entities in `CRFEntityExtractor` the same way they’re named in the other two. If you do do this, I believe Rasa will just take the value of the extractor that’s last in your pipeline to fill the slot. If you want to do any custom logic to slot filling, you’d do that in a custom action – you can access all entities extracted there

---

<div class="post-metadata">

**Author:** ![rahimakhavan](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rahimakhavan](https://forum.rasa.com/u/rahimakhavan)\
**Post date:** [June 19, 2019, 3:12pm UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/3 "2019-06-19T15:12:56Z")

</div>

Hey @akelad, Thanks for your response!

Yes, this is what we concluded after a couple of tests, but it would be nice if Rasa adds a feature to prioritize the extractors and let the user pick the entity he wants, even if the entities are named the same.

---

<div class="post-metadata">

**Author:** ![akshay2000](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akshay2000/32/415_2.png) [@akshay2000](https://forum.rasa.com/u/akshay2000)\
**Post date:** [June 19, 2019, 4:29pm UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/4 "2019-06-19T16:29:36Z")

</div>

That just seems unnecessarily complicated. I’d personally go with naming entities differently.  
But if you really do have a use case where the entity names collide, you can write a custom component and add the selection logic yourself. You should have all the extracted entities available in your component if you put it as the last component of your pipeline.

---

<div class="post-metadata">

**Author:** ![rahimakhavan](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rahimakhavan](https://forum.rasa.com/u/rahimakhavan)\
**Post date:** [June 21, 2019, 9:00pm UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/5 "2019-06-21T21:00:37Z")

</div>

Thanks @akshay2000!

For now we fixed the issue by naming differently the entities which I think is the easier approach.

But, good, your approach is gonna work for the entities which are the named the same.

---

<div class="post-metadata">

**Author:** ![foye501](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/foye501/32/11028_2.png) [@foye501](https://forum.rasa.com/u/foye501)\
**Post date:** [July 19, 2021, 3:39am UTC](https://forum.rasa.com/t/multiple-entity-extractors-in-pipline/11104/6 "2021-07-19T03:39:10Z")

</div>

How can I fill a slot by custom action if I extract it from multiple extractors. Thank you
