# Online training : automatic interactive training user/bot

**URL:** <https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795>\
**Category:** Rasa Open Source\
**Tags:** varsha\
**Created:** [March 6, 2019, 1:58pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795 "2019-03-06T13:58:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anojoual](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@anojoual](https://forum.rasa.com/u/anojoual)\
**Post date:** [March 6, 2019, 1:58pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/1 "2019-03-06T13:58:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pwessel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pwessel](https://forum.rasa.com/u/pwessel)\
**Post date:** [April 12, 2019, 12:50pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/2 "2019-04-12T12:50:22Z")

</div>

You can do [Interactive Learning](https://rasa.com/docs/core/interactive_learning/#id1), but you’ll have to confirm every prediction the bot makes.

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 12, 2019, 2:03pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/3 "2019-04-12T14:03:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pwessel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pwessel](https://forum.rasa.com/u/pwessel)\
**Post date:** [April 12, 2019, 2:54pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/4 "2019-04-12T14:54:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 12, 2019, 3:05pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/5 "2019-04-12T15:05:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pwessel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pwessel](https://forum.rasa.com/u/pwessel)\
**Post date:** [April 12, 2019, 3:49pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/6 "2019-04-12T15:49:58Z")

</div>

what do you mean by

> [@aman19](#):
>
> how i make sure that the trained data works properly?

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?

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 12, 2019, 3:55pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/7 "2019-04-12T15:55:14Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 12, 2019, 3:56pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/8 "2019-04-12T15:56:09Z")

</div>

> how i make sure that the trained data works properly?

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

---

<div class="post-metadata">

**Author:** ![pwessel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pwessel](https://forum.rasa.com/u/pwessel)\
**Post date:** [April 12, 2019, 4:16pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/9 "2019-04-12T16:16:36Z")

</div>

Does it detect the intent correctly?

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 12, 2019, 4:28pm UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/10 "2019-04-12T16:28:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aman19](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@aman19](https://forum.rasa.com/u/aman19)\
**Post date:** [April 13, 2019, 8:25am UTC](https://forum.rasa.com/t/online-training-automatic-interactive-training-user-bot/5795/11 "2019-04-13T08:25:01Z")

</div>

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
