# Error in intent classification - Without slots or entities

**URL:** <https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222>\
**Category:** Rasa Open Source\
**Created:** [April 29, 2020, 7:10pm UTC](https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222 "2020-04-29T19:10:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dociledevil](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dociledevil](https://forum.rasa.com/u/dociledevil)\
**Post date:** [April 29, 2020, 7:10pm UTC](https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222/1 "2020-04-29T19:10:42Z")

</div>

Hey. My query is wrt incorrect intent classification.

My **stories.md** file is

## story\_unmarried couple

- greet
  - utter\_greet

- unmarried\_couple
  - utter\_unmarried\_couple

- goodbye
  - utter\_goodbye

## story\_swimming pool

- greet
  - utter\_greet

- swimming\_pool
  - utter\_swimming\_pool

- goodbye
  - utter\_goodbye

## story\_checkin time

- greet
  - utter\_greet

- checkin\_time
  - utter\_checkin\_time

- goodbye
  - utter\_goodbye

## story\_greet

- greet
  - utter\_greet

- goodbye
  - utter\_goodbye

## story\_goodbye

- greet
  - utter\_greet

- goodbye
  - utter\_goodbye

and my **nlu.md** is

## intent:unmarried\_couple

- Do you allow unmarried couples?
- Are unmarried couples allowed?
- Do you allow couples with valid ID?
- Is your hotel couple friendly?
- Can I stay with my girlfriend if we are not married?

## intent:swimming\_pool

- Do you have a swimming pool?
- Is there a swimming pool in the hotel?
- Is there a pool in your hotel?
- Swimming pool?
- Can I use swimming pool in your hotel?

## intent:greet

- hey
- hi
- hello

## intent:goodbye

- bye
- goodbye
- haveaniceday
- seeyou

My config.yml is

language: en

pipeline:

- name: WhitespaceTokenizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer analyzer: “char\_wb” min\_ngram: 1 max\_ngram: 4
- name: DIETClassifier epochs: 100

policies:

- name: MemoizationPolicy
- name: TEDPolicy
- name: MappingPolicy
- name: FallbackPolicy nlu\_threshold: 0.8 fallback\_action\_name: ‘utter\_default\_fallback’

Now, if I start the conversation by asking Smoking?, it gets detected as unmarried\_couple intent with a confidence of 0.998. How is that possible?

P.S. I used to have a separate intent and corresponding for smoking but I removed it and then retrained the model. The intent and story have been removed

Smoking intent :

## story\_smoking

- greet
  - utter\_greet

- smoking
  - utter\_smoking

- goodbye
  - utter\_goodbye

Smoking story :

## story\_smoking

- greet
  - utter\_greet

- smoking
  - utter\_smoking

- goodbye
  - utter\_goodbye

To reproduce it, add the smoking intent and story, retrain the model and then remove it and retrain again. The idea behaviour should be that entering the text “Smoking” triggers the fallback but thats not the case here.

PPS. I am initiating a rasa shell after each retraining so the tracker state is cleared.

BTW @Juste I am a huge fan 🙂

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [April 30, 2020, 9:55am UTC](https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222/2 "2020-04-30T09:55:26Z")

</div>

Hi @dociledevil. Thank you so much and it’s great to have you in Rasa community! 🙂

Thats sounds like an issue with NLU for sure. Just to be clear - intents like `checkin_time` and `smoking` are in your training data, right?

---

<div class="post-metadata">

**Author:** ![dociledevil](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dociledevil](https://forum.rasa.com/u/dociledevil)\
**Post date:** [April 30, 2020, 6:38pm UTC](https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222/3 "2020-04-30T18:38:53Z")

</div>

Yeah. They **were** in my training data. When I trained my model again after **removing** them and then retried entering the intent, I was expecting rasa going to fallback. But, that did not happen. What did happen was that Rasa’s NLU predicted another intent(totally unrelated - swimming pool) with a confidence of 0.99.

Also, I would like to add that rasa shell **is** picking the latest trained model (as it should) from models/

---

<div class="post-metadata">

**Author:** ![dociledevil](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dociledevil](https://forum.rasa.com/u/dociledevil)\
**Post date:** [May 12, 2020, 10:27pm UTC](https://forum.rasa.com/t/error-in-intent-classification-without-slots-or-entities/28222/4 "2020-05-12T22:27:12Z")

</div>

Hey @Juste. Can you please look into this. I am stuck horribly and no matter what classifier I am using, I am getting bad predictions for this training data. Whats more alarming is the fact that if I train on the same dataset and config multiple times, I get confidence scores that vary greatly.
