Trying to figure out interactive learning features

Hello! I am trying to figure out and experiment different things with interactive learning. It would be great if someone can help me clarify some of the doubts I have.

If I try to correct the intent for my input “Whatsup?” from None to one of the existing intents, I retrain the NLU model and then the core model. On running interactive learning again, shouldn’t the same input “Whatsup?” be identified as “utter_greet” intent in the example below? Or does it take multiple iterations before the model learns that?

? Next user input: whatsup? 127.0.0.1 - - [2018-10-28 10:25:15] “POST /conversations/default/messages HTTP/1.1” 200 635 0.051240 127.0.0.1 - - [2018-10-28 10:25:15] “GET /conversations/default/tracker?include_events=AFTER_RESTART HTTP/1.1” 200 635 0.000918 ? Is the NLU classification for ‘whatsup?’ with intent ‘None’ correct? No ? What intent is it? 0.00 goodbye
? Please mark the entities using value notation whatsup?^Z

Cancelled by user

? Do you want to stop? Start Fresh 127.0.0.1 - - [2018-10-28 10:31:35] “POST /conversations/default/tracker/events HTTP/1.1” 200 327 0.001171 127.0.0.1 - - [2018-10-28 10:31:35] “POST /conversations/default/tracker/events HTTP/1.1” 200 388 0.001108 2018-10-28 10:31:35 INFO rasa_core.training.online - Restarted conversation, starting a new one. 127.0.0.1 - - [2018-10-28 10:31:35] “GET /conversations/default/tracker?include_events=APPLIED HTTP/1.1” 200 388 0.000889 ? Next user input: whatsup? 127.0.0.1 - - [2018-10-28 10:33:13] “POST /conversations/default/messages HTTP/1.1” 200 637 0.002239 127.0.0.1 - - [2018-10-28 10:33:13] “GET /conversations/default/tracker?include_events=AFTER_RESTART HTTP/1.1” 200 637 0.008806 ? Is the NLU classification for ‘whatsup?’ with intent ‘None’ correct? No ? What intent is it? 0.00 greet
? Please mark the entities using value notation whatsup? 127.0.0.1 - - [2018-10-28 10:33:23] “PUT /conversations/default/tracker/events HTTP/1.1” 200 388 0.001117 127.0.0.1 - - [2018-10-28 10:33:23] “POST /conversations/default/messages HTTP/1.1” 200 601 0.001103 127.0.0.1 - - [2018-10-28 10:33:23] “POST /conversations/default/predict HTTP/1.1” 200 988 0.152463 127.0.0.1 - - [2018-10-28 10:33:23] “GET /conversations/default/tracker?include_events=AFTER_RESTART HTTP/1.1” 200 601 0.001445

Chat History

Bot You

──────────────────────────────────────────── 1 action_listen
──────────────────────────────────────────── 2 whatsup? intent: greet 0.00

? The bot wants to run ‘utter_greet’, correct? Yes 127.0.0.1 - - [2018-10-28 10:33:25] “POST /conversations/default/execute HTTP/1.1” 200 882 0.001500 127.0.0.1 - - [2018-10-28 10:33:25] “POST /conversations/default/predict HTTP/1.1” 200 1191 0.003358 127.0.0.1 - - [2018-10-28 10:33:25] “GET /conversations/default/tracker?include_events=AFTER_RESTART HTTP/1.1” 200 803 0.000987

Chat History

Bot You

──────────────────────────────────────────────── 1 action_listen
──────────────────────────────────────────────── 2 whatsup? intent: greet 0.00 ──────────────────────────────────────────────── 3 utter_greet
Hey! How are you?

? The bot wants to run ‘action_listen’, correct? Yes 127.0.0.1 - - [2018-10-28 10:33:25] “POST /conversations/default/execute HTTP/1.1” 200 901 0.001764 127.0.0.1 - - [2018-10-28 10:33:25] “GET /conversations/default/tracker?include_events=APPLIED HTTP/1.1” 200 875 0.001476

Second! If I want to add a new intent (apart from the existing list of intents I have), how does that work? I have a running example below but I think I am doing something wrong while choosing the entities, I am not sure how all of this works in the background. For my input “I want to eat Chinese today”, I want to assign a new intent “order_food” with the entity cuisine: chinese for the input. I end up with the same error!

? Next user input: I want to eat chinese today 127.0.0.1 - - [2018-10-28 10:38:58] “POST /conversations/default/messages HTTP/1.1” 200 1145 0.005320 127.0.0.1 - - [2018-10-28 10:38:58] “GET /conversations/default/tracker?include_events=AFTER_RESTART HTTP/1.1” 200 1145 0.001087 ? Is the NLU classification for ‘I want to eat chinese today’ with intent ‘None’ correct? No ? What intent is it? ? Please type the intent name order_food ? Please mark the entities using value notation I want to eat chinese today 127.0.0.1 - - [2018-10-28 10:39:19] “PUT /conversations/default/tracker/events HTTP/1.1” 200 875 0.001380 127.0.0.1 - - [2018-10-28 10:39:19] “POST /conversations/default/messages HTTP/1.1” 200 1167 0.001186 2018-10-28 10:39:19 ERROR rasa_core.server - Caught an exception during prediction. Traceback (most recent call last): File “/anaconda3/lib/python3.6/site-packages/rasa_core/server.py”, line 340, in predict responses = agent.predict_next(sender_id) File “/anaconda3/lib/python3.6/site-packages/rasa_core/agent.py”, line 317, in predict_next return processor.predict_next(sender_id) File “/anaconda3/lib/python3.6/site-packages/rasa_core/processor.py”, line 102, in predict_next self._get_next_action_probabilities(tracker) File “/anaconda3/lib/python3.6/site-packages/rasa_core/processor.py”, line 457, in _get_next_action_probabilities tracker, self.domain) File “/anaconda3/lib/python3.6/site-packages/rasa_core/policies/ensemble.py”, line 216, in probabilities_using_best_policy probabilities = p.predict_action_probabilities(tracker, domain) File “/anaconda3/lib/python3.6/site-packages/rasa_core/policies/fallback.py”, line 101, in predict_action_probabilities nlu_confidence = nlu_data[“intent”].get(“confidence”, 1.0) AttributeError: ‘NoneType’ object has no attribute ‘get’ Traceback (most recent call last): File “/anaconda3/lib/python3.6/site-packages/gevent/pywsgi.py”, line 963, in handle_one_response self.run_application() File “/anaconda3/lib/python3.6/site-packages/gevent/pywsgi.py”, line 911, in run_application self.process_result() File “/anaconda3/lib/python3.6/site-packages/gevent/pywsgi.py”, line 895, in process_result for data in self.result: File “/anaconda3/lib/python3.6/site-packages/werkzeug/wsgi.py”, line 870, in next return self._next() File “/anaconda3/lib/python3.6/site-packages/werkzeug/wrappers.py”, line 82, in _iter_encoded for item in iterable: TypeError: ‘Response’ object is not iterable 2018-10-28T17:39:19Z {‘REMOTE_ADDR’: ‘127.0.0.1’, ‘REMOTE_PORT’: ‘52325’, ‘HTTP_HOST’: ‘localhost:5005’, (hidden keys: 23)} failed with TypeError

127.0.0.1 - - [2018-10-28 10:39:19] “POST /conversations/default/predict HTTP/1.1” 500 161 0.014684 2018-10-28 10:39:19 ERROR rasa_core.training.online - An exception occurred while recording messages. Traceback (most recent call last): File “/anaconda3/lib/python3.6/site-packages/rasa_core/training/online.py”, line 860, in record_messages finetune=finetune) File “/anaconda3/lib/python3.6/site-packages/rasa_core/training/online.py”, line 589, in _predict_till_next_listen response = request_prediction(endpoint, sender_id) File “/anaconda3/lib/python3.6/site-packages/rasa_core/training/online.py”, line 98, in request_prediction return _response_as_json® File “/anaconda3/lib/python3.6/site-packages/rasa_core/training/online.py”, line 62, in _response_as_json response.raise_for_status() File “/anaconda3/lib/python3.6/site-packages/requests/models.py”, line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:5005/conversations/default/predict

Here is my nlu.md file

intent:greet

  • hey

  • hello

  • hi

  • good morning

  • good evening

  • hey there

intent:goodbye

  • bye

  • goodbye

  • see you around

  • see you later

intent:mood_affirm

  • yes

  • indeed

  • of course

  • that sounds good

  • correct

intent:mood_deny

  • no

  • never

  • I don’t think so

  • don’t like that

  • no way

  • not really

intent:mood_great

  • perfect

  • very good

  • great

  • amazing

  • wonderful

  • I am feeling very good

  • I am great

  • I’m good

intent:mood_unhappy

  • sad

  • very sad

  • unhappy

  • bad

  • very bad

  • awful

  • terrible

  • not very good

  • extremly sad

  • so sad

Let me know if you need any more information or extra examples to understand my question!

1 Like