# Entity lookup in DIET Classifier

**URL:** <https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386>\
**Category:** Rasa Open Source\
**Created:** [May 4, 2020, 10:44am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386 "2020-05-04T10:44:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vimal](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@vimal](https://forum.rasa.com/u/vimal)\
**Post date:** [May 4, 2020, 10:44am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/1 "2020-05-04T10:44:36Z")

</div>

Hi all…I’m using rasa for my chat bot developement and i’m using DIET classifier in the pipeline, i have a usecase to add lookup tables foi specific entities and lookup tables work on CRFextractor and i’m using DIET Classifier. My question is, is there a way we can add lookup tables for DIET classifier

---

<div class="post-metadata">

**Author:** ![n2718281](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@n2718281](https://forum.rasa.com/u/n2718281)\
**Post date:** [May 4, 2020, 3:47pm UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/2 "2020-05-04T15:47:47Z")

</div>

I saw some messages about that. Are lookup tables really not working with DIET?

---

<div class="post-metadata">

**Author:** ![vimal](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@vimal](https://forum.rasa.com/u/vimal)\
**Post date:** [May 5, 2020, 5:14am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/3 "2020-05-05T05:14:46Z")

</div>

yes

---

<div class="post-metadata">

**Author:** ![n2718281](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@n2718281](https://forum.rasa.com/u/n2718281)\
**Post date:** [May 5, 2020, 7:16am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/4 "2020-05-05T07:16:38Z")

</div>

What is not working? I didn’t find opened issue on the github. I looked quickly at the code, the regex seems to do the featurization job also for DIET?

---

<div class="post-metadata">

**Author:** ![vimal](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@vimal](https://forum.rasa.com/u/vimal)\
**Post date:** [May 5, 2020, 10:55am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/5 "2020-05-05T10:55:23Z")

</div>

No my question is when using CRF extractor we have to add ner\_crf in pipeline to add lookup tables for entity extraction, but now i’m using DIET classifier instead of CRF in my pipeline , so my question is can i use lookup table for entity extraction using DIET classifier in my pipeline or should i add any config on my pipeline

---

<div class="post-metadata">

**Author:** ![n2718281](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@n2718281](https://forum.rasa.com/u/n2718281)\
**Post date:** [May 5, 2020, 11:25am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/6 "2020-05-05T11:25:05Z")

</div>

There is nothing to add by default. Just be sure you have RegexFeaturizer in your pipeline

---

<div class="post-metadata">

**Author:** ![akshayg11](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@akshayg11](https://forum.rasa.com/u/akshayg11)\
**Post date:** [August 26, 2020, 10:28am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/7 "2020-08-26T10:28:42Z")

</div>

@Tanja @akelad @souvikg10 Could you pls confirm if lookup tables can be used with DIET? If yes then how?. Because I have followed everything from the rasa blog on Look Up tables but still it does not recognize any new entity outside of the training data, even if that entity is in the look up table. If i have to add training data for each and every entity, then what is the use of look up table.

---

<div class="post-metadata">

**Author:** ![dav-92](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dav-92/32/14875_2.png) [@dav-92](https://forum.rasa.com/u/dav-92)\
**Post date:** [June 2, 2021, 9:37am UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/8 "2021-06-02T09:37:09Z")

</div>

any updates on this?

---

<div class="post-metadata">

**Author:** ![tomp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tomp/32/21142_2.png) [@tomp](https://forum.rasa.com/u/tomp)\
**Post date:** [May 2, 2022, 8:04pm UTC](https://forum.rasa.com/t/entity-lookup-in-diet-classifier/28386/9 "2022-05-02T20:04:58Z")

</div>

Similar discussion here: [Lookup table is not working - #13 by azizullah2017](http://forum.rasa.com/t/lookup-table-is-not-working/4976/13)

Adding a lookup table feature might be harder to debug because its influence is not deterministic: the feature should be highly correlated with the named entity class it is designed to indicate, but there is no guarantee that DIET will extract it with 100% consistency. I have found that these lookup table feature help extract some examples but not others. I’m still looking into this to see if I can improve its accuracy. Let me know if anyone has clear evidence that lookup table features are broken or any hints and tips on how to improve their applicability or how to debug DIET. A suggestion for Rasa is to make the pipeline more transparent and debuggable such as showing intermediate internal representations (such as featurized text) and perhaps providing feature-importance plots (easier to do with tree-based classifiers, but still probably possible to do with neural-based classifiers).
