Chatbot gives incorrect response

When I start server chatting is normal and chatbot respond correctly as

but after some chatbot response is not according to my intent, e,g if I ask weather outside, Chatbot respond with weather info any previous location and do not ask for location, why? I think Its uses filled slots of location data?

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.

4 Likes

@Juste thank you so much, Now Iā€™m starting my actual project Chatbot for learning Management System.

Awesome! Keep us posted with you progress! :slight_smile:

Can I ask how did you deploy it locally because I am facing a lot of problem

1 Like

It will be easier to help you out if you can tell me what you already tried and what issues are you facing :slight_smile:

Thank you for replying I am building a simple banking bot assistant .and I am using ConsoleInputChannel to run the dialogue and I want to deploy it in a local server as asimzaman did in order to make interaction more easier but I donā€™t know how

First create UI in flask app, take user input and pass to function and that function pass the user input to rasa core server using custom httpinput channel and bot listen user input and response back accordingly: From UI post user input here:

Post the user input to rasa server listening at port http://localhost:5004/chat/ and Your flask app is running on port http://localhost:8000 Here is custom HttpInputChannel backend1 Running the chatbot as: backend2

itā€™s not that clear can you explain it more?

Hi, and what if I want to reset all slots except one? In fact, I would like to restart the tracker but saving this slot. Why if I do tracker._reset() 2018-08-29 11:01:52 DEBUG rasa_core.processor - Logged UserUtterance - tracker now has 91 events is not set to 0 events? And, say, I save this one slot everytime (for example, the user_mail), will having this slot filled affect to the action decisions of Rasa? Iā€™m facing with a problem when I have filled the user_mail and then user asks to send an sms (which is similar to send an email), and despite the nlu part detects ā€œintent_send_smsā€, the core part chooses ā€œsend_mail_actionā€. Thx!

1 Like

excuseļ¼ŒHow to apply ā€œnitialise a class for this action in your custom actions file.ā€ to the above code ļ¼Œi don/t know how to use my action file in my httpsever fileļ¼Ÿ

Hello Friends, i am working on rasa chatbot from last few week, i am building a bot to book an appointment for doctors, currently i am facing an issue with the bot. my bot is not giving any response for few intent, I check my stories.md file and domain.yml file all look good, so i retrained my bot again now it is giving reply to old once but few responses which are given previously are not responding. It is not even displaying any error. I never face such issue previously. Please help me. Thank you,