Provide a cooldown period for NLU so that an intent is not detected for the time period

Hi,

Have googled about this a bit. Could not land on a solution. I have a peculiar case where I don’t want the NLU to detect the same intent for some specific period of time. I wish to do this the hacker-way rather than modifying the stories for it.

Any help is appreciated.

Hi Labeeb,

I think the best way to do so would be to have a custom component on the end of the config pipeline where you’d pass in metadata related to the last events (obtain them from tracker) and then in that component you’d be able to blacklist intents for specified time periods.

Regards, Nikola

I am still trying to learn how to code custom components. Do you have any resource recommendations?

When I was first starting with implementing custom NLU components I was mostly relying at custom nlu examples like this one rasa-nlu-examples/dateparser_extractor.py at main · RasaHQ/rasa-nlu-examples · GitHub so I’d recommend those.

In your case, you’d process metadata available in the message (send metadata by providing it through connector; you can refer to Custom Connectors for metadata insight) and choose from available intents based on that.