Wrong intent classification and how to correct it

I want to get the Intent of user message.

My training data just like

- intent: buy_tv
  examples: |
    - I want to buy a tv
    - I would like to buy this tv

After training the model and I test the model with rasa shell: If the input is ‘I want a tv’, the output intent is ‘buy_tv’, that is what we need. However, if the input is “I want to buy a refrigerator”, the output intent is also ‘buy_tv’ with pretty high confidence, that is wrong. And there is nothing concerning ‘refrigerator’ of intent or example in the training data.

The problem is:

  • I want to buy a tv
  • I want to buy a refrigerator

It’s very similar

You can try:

intent: buy_electronic_product
examples: |
 - I want to buy a [tv] (electronic_product)
 - I want to buy a [refrigerator](electronic_product)

Reference: Training Data Format

Please, see this topic. I think can help you :smiley:

Difficulties in training the bot with similar text for differrent intents - #7 by jainkrunal


Thanks @ChrisRahme to made my post better :smiley:

2 Likes