Bot not forgetting previous entities

Hi all! I am creating a chat-bot that uses slots. After I trained the bot, and used it on slack, bot is remembering previous slots and replying based on them. For instance, if a user asks details about one company, the bot is giving response based on some previous companies details. How do I resolve this issue?

You can make a custom action that resets them.

actions.py

from rasa_core.events import SlotSet, AllSlotsReset

class ActionSlotReset(Action):  
    def name(self):         
        return 'action_slot_reset' 
    
    def run(self, dispatcher, tracker, domain):         
        return[AllSlotsReset()]

stories.md

## end session and reset slots 
* int_confirm
    - act_utter_thank_you_goodbye
    - action_slot_reset

Hi krogsager! thanks for the reply that was really helpful and my issue is now resolved.

Hi, when you set AllSlotReset, can you stiil predict right action?

hi i want to do, if i am one intent then call for new intent then all slots value should be reset e.g. I call for an intent “Add Bank” fill one slot then move to another intent “Manage Bank” then slots value should be reset

hi, I am having a similar but different need, namely how to remove slot values within 3 turns of dialog, like I said in this example.:

In a multi-turn dialog, how to determine what slot values should be carried over to the next utterance? A simple rule may be to let the robot memorize the most 3 recent dialogs. Anything more than that will be destroyed. Is there a way to achieve that? The approaches discussed above seems not working, since it has nothing to do with a particular intent. It is a general rule.