Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change FallbackClassifier confidence to fallback threshold #8801

Closed
1 task
wochinge opened this issue Jun 3, 2021 · 2 comments · Fixed by #8923
Closed
1 task

change FallbackClassifier confidence to fallback threshold #8801

wochinge opened this issue Jun 3, 2021 · 2 comments · Fixed by #8923
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ml/nlu-components Issues focused around rasa's NLU components area:rasa-oss/ml 👁 All issues related to machine learning effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@wochinge
Copy link
Contributor

wochinge commented Jun 3, 2021

Context

Problem
The FallbackClassifier currently sets its confidence as 1 - top intent confidence when trigger the nlu_fallback intent. This looks weird in the Rasa X NLU inbox as the messages might have the intent nlu_fallback but when users look at the confidence scores nlu_fallback doesn't have the highest confidence score.

Solution
We need to revisit this in Rasa X. For now we've decided to change the FallbackClassifier score to the fallback threshold.

Definition of Done

  • When FallbackClassifier triggers the nlu_fallback it does that with confidence self.component_config[THRESHOLD_KEY]
@wochinge wochinge added area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ml 👁 All issues related to machine learning area:rasa-oss/ml/nlu-components Issues focused around rasa's NLU components type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. labels Jun 3, 2021
@wochinge wochinge changed the title change FallbackClassifier confidence change FallbackClassifier confidence to fallback threshold Jun 3, 2021
@TyDunn TyDunn added the effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label Jun 4, 2021
@ancalita
Copy link
Member

ancalita commented Jun 15, 2021

@wochinge to double-check, the change needs to be made in this line? Do I need to check that message.data[INTENT] is nlu_fallback and set confidence as instructed in DoD, otherwise keep existing confidence assignment?

@wochinge
Copy link
Contributor Author

the change needs to be made in this line

Exactly.

I need to check that message.data[INTENT] is nlu_fallback and set confidence as instructed in DoD, otherwise keep existing confidence assignment?

That check should already be done by this.

The way the FallbackClassifier works is that it replaces the predicted intent with the nlu_fallback. should_fallback checks if the prediction confidence was below the threshold which the user configured for FallbackClassifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ml/nlu-components Issues focused around rasa's NLU components area:rasa-oss/ml 👁 All issues related to machine learning effort:atom-squad/1 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants