Goal: I want a specific action triggered on the first user message if the confidence is within a range (.75 to .85) for only a specific intent.
Current plan: Within the existing FallbackClassifier class, I would like to add an additional condition to check the confidence and intent and send back a custom intent to trigger a rule
eg: The model is 76% confident of intent ‘hungry’ (the target for this case). Within FallbackClassifier the new intent will be ‘maybe_hungry’ and get pushed into the top confidence index (but have the same confidence level). Then a rule will check for ‘conversation_start: true’ and respond with a custom action.
Problem: If it is not the start of the conversation, changing the top intent name will obviously cause problems with story structures.
I’ve considered making another rule that will check for ‘conversation_start: false’ and then ‘maybe_hungry’ to trigger a different action that would revert ‘maybe_hungry’ to ‘hungry’, but I don’t know if that will still cause problems for stories. I saw the “undo fallback prediction” method could potentially be used for this, but I can’t find any usage examples. I assume it would be in a custom action somehow?
Alternatively, would checking within the FallbackClassifier itself for “first message” status work? After digging through the code I found that a generator can be used to make a list of prior trackers/actions, which is checked to see if it’s empty to verify ‘conversation_start’, but I can’t figure out how to leverage this within the FallbackClassifier.