Chatbot gives incorrect response

Hey @asimzaman. I am guessing you followed ‘From zero to hero: Creating a chatbot with Rasa NLU and Rasa Core’ tutorial? :slight_smile: If yes, then you are absolutely right, that a bot is reusing previously filled slots because it doesn’t have an action which can reset slots at the end of the conversation. You can read more about this action here. To implement it in your code you can initialise a class for this action in your custom actions file. For example:

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()]

Once you have your action implemented, you can add this action at the end of the stories which contain the slots.