Missclassification

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

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

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?

1 Like

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

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?

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

1 Like

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 :frowning:

**RULES.yml**

  • 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

      Stories.yml
      stories:
  • story: happy path steps:

    • intent: greet
    • action: action_set_slot
    • action: utter_greet
    • intent: date_picker
    • action: action_step_one_menu
    • intent: date_picker
    • action: action_step_one_menu
  • story: confirm path c steps:

    • intent: confirm_c
    • action: action_confirm_c
    • intent: loc_whats_app
    • action: action_loc_whats_app
  • story: confirm path r steps:

    • intent: confirm_r
    • action: action_confirm_r
    • intent: date_picker
    • action: action_confirm_r
    • intent: am_pm
    • action: action_confirm_r
    • intent: loc_whats_app
    • action: action_loc_whats_app
  • story: consent path steps:

    • intent: consent
    • action: action_consent_api
  • story: loc whats app steps:

    • intent: loc_whats_app
    • action: action_loc_whats_app
  • story: thank you steps:

    • intent: thank_you
    • action: utter_welcome
    • action: utter_menu

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

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

1 Like