bewilderd
bewilderd

Reputation: 11

How to Intent classification with similar examples in nlu.md in Rasa

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 -

“inform_supplier_start_date” and “inform_contract_start_date”.
“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
-what is the supplier  [Microsoft] (supplier_name) start date
-[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-

customer_email & supplier_email & reviewer_email
total_spend_contract & total_spend_supplier & total_spend_customer
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.

Upvotes: 1

Views: 1027

Answers (1)

tabergma
tabergma

Reputation: 101

As the examples for your intents are very similar, the model will not be able to differentiate between them. Also the intent is actual the same, inform_suppler_start_date and inform_contract_start inform the bot about a start date. What kind of start date it is should be figured out via the entity recognition. So I would propose to merge the similar intents and check what the entity recognition detected as entities. Depending on whether a supplier or a contract was found, you can execute query A or B.

Upvotes: 2

Related Questions