# Intent classification with similar examples in nlu.md

**URL:** <https://forum.rasa.com/t/intent-classification-with-similar-examples-in-nlu-md/23366>\
**Category:** Rasa Open Source\
**Created:** [January 11, 2020, 11:06am UTC](https://forum.rasa.com/t/intent-classification-with-similar-examples-in-nlu-md/23366 "2020-01-11T11:06:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranay\_raj](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@pranay\_raj](https://forum.rasa.com/u/pranay_raj)\
**Post date:** [January 11, 2020, 11:06am UTC](https://forum.rasa.com/t/intent-classification-with-similar-examples-in-nlu-md/23366/1 "2020-01-11T11:06:04Z")

</div>

Hello Everyone, I am developing chatbot using Rasa for a Contract Manager Organisation. I am facing few issues and after reading a lot on the forums and Rasa blog, I am unable to conclude to a solution for this. I have several similar intents with similar examples like :- [1]- “inform\_supplier\_start\_date” and “inform\_contract\_start\_date” . [2]-“inform\_supplier\_email” and “inform\_customer\_email” and “inform\_reviewer\_email”

Now the issue is, for both the categories of intents the example sentence in nlu.md is same. What I exactly mean is-

> ```
> ##intent:inform_suppler_start_date
> 1)what is the supplier [Microsoft] (supplier_name) start date
> 2)[EON Digital] (supplier_name) start date
> 
> ```

> ```
> ##intent:inform_contract_start
> 1) start-date of [O2 Mobile phones] (contract_name) 
> 2) [O2 Mobile phones] (contract_name) start date
> 
> ```

The model isnt able to differentiate and identify the correct intent. It is getting confused and identifying the wrong intent, since the words in these intents are similar.

I need correct intents to be recognised ,so that accordingly, In custom action i can query the Database and get the corresponding result for supplier and contract.

I have many fields like this for which the example data and user queries will be same. For Example-

> 1. customer\_email & supplier\_email & reviewer\_email
> 2. total\_spend\_contract & total\_spend\_supplier & total\_spend\_customer
> 3. contract\_number\_for\_supplier & contract\_number\_of\_contract & contract\_number\_organisation

What exactly I should be doing to get correct classification. One solution i am thinking of is merging the intents like **“supplier\_start\_date”** and **“contract\_start\_date”** as one “ **start\_date** ” and check for the extracted entity inside custom actions in both supplier and contract database. But I dont think that would be proper usage of Natural Language.

Please Suggest, I shall be highly greatful for the same. Regards.

---

<div class="post-metadata">

**Author:** ![mloubser](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mloubser/32/13021_2.png) [@mloubser](https://forum.rasa.com/u/mloubser)\
**Post date:** [January 13, 2020, 8:58am UTC](https://forum.rasa.com/t/intent-classification-with-similar-examples-in-nlu-md/23366/2 "2020-01-13T08:58:39Z")

</div>

The solution you suggested sounds about right - merge intents with similar example sentences, and use [Slots](https://rasa.com/docs/rasa/core/slots/) (set by entity extraction) to affect the flow of the dialogue, or use the slot info directly in your action to query the data base.
