# Missclassification

**URL:** <https://forum.rasa.com/t/missclassification/40509>\
**Category:** Rasa Open Source\
**Created:** [February 23, 2021, 5:26am UTC](https://forum.rasa.com/t/missclassification/40509 "2021-02-23T05:26:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yugalahir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yugalahir/32/13331_2.png) [@yugalahir](https://forum.rasa.com/u/yugalahir)\
**Post date:** [February 23, 2021, 5:26am UTC](https://forum.rasa.com/t/missclassification/40509/1 "2021-02-23T05:26:15Z")

</div>

Hello guys! Need Help!   
In below image, there is a database of rasa  
My question is when the intent is goodbye with 99% confidence, why it is not replyed by a bot , it reply with another action

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/82c70b391466b51b162b6109e89c34fc8c10ced3.png)

I am using the following in config.yml   
pipeline:

- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer analyzer: char\_wb min\_ngram: 1 max\_ngram: 4
- name: DIETClassifier epochs: 150
- name: EntitySynonymMapper
- name: ResponseSelector epochs: 150
- name: FallbackClassifier threshold: 0.8

policies:  
- name: TEDPolicy  
max\_history: 5  
epochs: 150

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [February 23, 2021, 8:02am UTC](https://forum.rasa.com/t/missclassification/40509/2 "2021-02-23T08:02:22Z")

</div>

Hi @yugalahir, this depends entirely on how your stories are written, as well as what policies you are using. I see you’re using only the `TEDPolicy` - is there a reason you’re not using the `RulePolicy` or `MemoizationPolicy` as well?

---

<div class="post-metadata">

**Author:** ![yugalahir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yugalahir/32/13331_2.png) [@yugalahir](https://forum.rasa.com/u/yugalahir)\
**Post date:** [February 23, 2021, 8:32am UTC](https://forum.rasa.com/t/missclassification/40509/3 "2021-02-23T08:32:44Z")

</div>

Thank you for your reply   
When I am using `TEDPolicy` with `RulePolicy` some stories results are not appropriate, that’s why I remove the rule policy, please suggest which policy to use

---

<div class="post-metadata">

**Author:** ![snek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/snek/32/13510_2.png) [@snek](https://forum.rasa.com/u/snek)\
**Post date:** [February 23, 2021, 11:08am UTC](https://forum.rasa.com/t/missclassification/40509/4 "2021-02-23T11:08:45Z")

</div>

Interesting. `RulePolicy` makes predictions entirely based on the rules you set for it. Maybe this inappropriate behaviour stems from a bad or over-generalized rule, and not because of the `RulePolicy`. Are you using any rules at all?

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [February 23, 2021, 1:57pm UTC](https://forum.rasa.com/t/missclassification/40509/5 "2021-02-23T13:57:13Z")

</div>

hm yeah, i’d be interested to see your stories/rules and the issues you were having with the RulePolicy. Because the RulePolicy is the recommended policy for single turn interactions like `goodbye`

---

<div class="post-metadata">

**Author:** ![yugalahir](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yugalahir/32/13331_2.png) [@yugalahir](https://forum.rasa.com/u/yugalahir)\
**Post date:** [February 24, 2021, 5:24am UTC](https://forum.rasa.com/t/missclassification/40509/6 "2021-02-24T05:24:42Z")

</div>

snek yes using 2 rules@akelad ok will share, as I developed the WhatsApp chatbot using rasa.  
It is misclassification solved by using   
1 MemoizationPolicy   
2 TEDPolicy (max\_history: 5 , epochs: 150)

BUT RULES NOT WORKING ☹  
  
` **`RULES.yml`** `

- rule: Say goodbye anytime the user says goodbye steps:

- rule: Say ‘I am a bot’ anytime the user challenges steps:

- story: happy path steps:

- story: confirm path c steps:

- story: confirm path r steps:

- story: consent path steps:

- story: loc whats app steps:

- story: thank you steps:

---

<div class="post-metadata">

**Author:** ![snek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/snek/32/13510_2.png) [@snek](https://forum.rasa.com/u/snek)\
**Post date:** [February 24, 2021, 8:35am UTC](https://forum.rasa.com/t/missclassification/40509/7 "2021-02-24T08:35:57Z")

</div>

> [@yugalahir](#):
>
> - rule: Say goodbye anytime the user says goodbye steps:
> - intent: goodbye
> - action: utter\_goodbye
> - rule: Say ‘I am a bot’ anytime the user challenges steps:
> - intent: bot\_challenge
> - action: utter\_iamabot

When your bot responds with `utter_goodbye` to the `/goodbye` intent, what policy is it using to determine the next action?

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [February 24, 2021, 11:36am UTC](https://forum.rasa.com/t/missclassification/40509/8 "2021-02-24T11:36:03Z")

</div>

Do you have the `RulePolicy` specified in the config file for this case as well? And also your `rules.yml` should start with a `rules:` entry, just like in your stories file
