Online training : automatic interactive training user/bot

Hello community ! So, I’ve been using Rasa to build a chatbot but since i have a small dataset to train the model I thought about using online learning to train the model with more data and therefore create more stories. my question is how can I make this approach more automatic and therefore avoid doing the online learning manually ? Do you have any idea about that ? Thank you.

1 Like

You can do Interactive Learning, but you’ll have to confirm every prediction the bot makes.

I am using interactive learning to train my bot but each time i correct it and ask same question again, or i save the files to stories and nlu.md and start again it does not get updated every time i have to correct the action to be taken. It does not take the action properly, every time it tries to make fall back action and i correct it every time, Please help me.

That is correct, you have to retrain the model before your newly generated data can effect the model. Rasa does not have a functionality where the model is retrained at every step in interactive learning, since this would take a lot of extra time and computing power.

I understand your use case is not just a simple test of your bots functionality but writing stories and data in the first place. Rasa is working on solution to make data generation easier. I’m sorry I don’t have a better solution for you right now.

Okay thank you for reply, So i make it work for now, like when i load the bot it should talk as i had trained it, how i make sure that the trained data works properly?

what do you mean by

If you write your stories with interactive learning, and then train and run the model if you repeat your messages from interactive learning the bot will behave in the same way as you trained it too. If this is not the case there must be something else going wrong. Make sure you train te model on your correct data files.

May I ask which policies are you using?

If you write your stories with interactive learning, and then train and run the model if you repeat your messages from interactive learning the bot will behave in the same way as you trained it too

I have saved one story and again loaded the train_init.py still its not classifying properly,how many minimum stories it needs?

from rasa_core.policies.keras_policy import KerasPolicy

from rasa_core.policies.memoization import MemoizationPolicy

from rasa_core.policies.fallback import FallbackPolicy

these three policies i am using.

how i make sure that the trained data works properly?

it should work as trained when i actually run the bot.

Does it detect the intent correctly?

Yes it is detecting intent correctly 90% of times, just sometimes it is not detecting, when i say “how are you?” it classifies wrongly as intro intent. But most of the times the actions are not getting classified properly it always says “Bot wants to run action_default_fall_back”.

And should i create a nlu.md file bcz after i finish training it shows me

ValueError: Could not locate the resource ‘/root/rasa_chatbot2/data/nlu.md’

But its automatically creating file nlu_interactive.md

and i have given only one example in stories.md other all i am generating, should i write more examples in stories.md on my own or i should generate bcz when i run bot it only response hi and nothing happens after that.

hey its working a little bit accurate now. thank you for your help.

I think i got is the more stories you provide the more accurate your training becomes