I don’t think this is the right approach but I got the fallback to work.
I modified rasa_core.train to suport a new argument, in short:
fallback = FallbackPolicy(core_threshold=fallback_threshold,
agent = Agent(domain_file, policies)
- "You are speaking nonsense my friend"
I start the training with:
python -m rasa_core.train -d domain.yml -s “$STORY” -o models/current/dialogue --epochs 120 --fallback 0.3
So I came across ´ActionDefaultFallback´ in the changelog, and found ´utter_default´ in the documentation. But when I add ´utter_default´ to my domain.yml, there still isn’t any fallback in the bot. What else do I need to set up for the default fallback to work?
I want to define a default fallback action
action_default_fallback but I get the error when I run
ValueError: Action names are not unique! Found two actions with name ‘action_default_fallback’. Either rename or remove one of them.
Hmm what’s the most recent edit on this? is it working now or not? So yeah the fallback policy isn’t currently part of the train script, we’re aware of that and it should be. At the moment we just have a separate python file for the specific bot and define all the policies we want there. However, since you’ve already modified the train script – do you mind submitting a PR to Core for this?
I will clean it up and submit for a PR.
Actually looks like it was already implemented with this PR https://github.com/RasaHQ/rasa_core/pull/828
Sorry about that, but thanks for bringing it to our attention!
Yes I noticed today as well when I did a pull. Good timing that I didn’t finish the code myself
Is the default fallback disabled by default?
rasa_core.constants.py the vars
DEFAULT_NLU_FALLBACK_THRESHOLD are set to 0.0.
If I understood the theory behind intent classification then the probability can never be equal zero.
I am tempted to set a float value myself, unless 0.0 is actually a valid value.
Yes it’s disabled by default, but you can pass the nlu/core thresholds with the
--core_threshold flags to the train script
In action server i see action_default_fallback is triggered
I0822 18:59:21.712826 139684754990912 executor.py:173] Received request to run ‘action_default_fallback’
I0822 18:59:21.712929 139684754990912 executor.py:186] Successfully ran ‘action_default_fallback’
But, in cmd test bot answer nothing, nevertheless i have utter_default in domain.yml and copied class ActionDefaultFallback(Action): class to actions.py
What is wrong?
You don’t actually need to copy the class to your actions file. Did you retrain your model since adding
utter_default to your domain?
ERROR:rasa.core.actions.action:The model predicted the custom action ‘my_fallback_action’, but you didn’t configure an endpoint to run this custom action. Please take a look at the docs and set an endpoint configuration via the --endpoints flag. https://rasa.com/docs/rasa/core/actions
ERROR:rasa.core.processor:Encountered an exception while running action ‘my_fallback_action’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
I am getting this error. I have mentioned the utter_default in domain file also, but it is not calling
@karthik1 please don’t post your issue in multiple different threads, instead create a new topic and someone will get back to you there