I have a problem while trying to build a rasa bot. I have tree slots, tracks entities which I use as keys for a dictionary data. Very primitive, but it the only way I can think of for my task–QA problem. It can answer questions in this sequence:
user: ‘who is lebron james?’
bot: ‘a NBA player, currently playing the los angeles lakers’
user: ‘how tall is he?’
bot: ‘lebron is 6’8’’ tall’
but right after this sequence, when user asks:
user: ‘who is Kevin Love’
bot: ‘Love is 6’10" tall’
I only have the slot ‘person’ to track the person in the topic. I want to solve this by tracking the change of person slot. If the person in the Person slot changes from ‘lebron’ to ‘kevin’, I would reset the second slot instead of leaving it as ‘height’ (it’s not ideal, as user may ask ‘how about kevin love’ and the ‘love is 6’10" tall’ would be the right answer, but I still like to have this option to manipulate the dialogue).
I can spend more time digging the docs and the source code, but if anyone can give me some pointers, I would appreciate it very much.
Besides the access to previous slots technique, if anyone can give me some advise about how to store the not too big knowledge better than a dictionary, I thank you in advance.
Sorry for the Chinesed character, but the intents are obvious, I think. I am not distrust rasa‘s inference power. It is just that sometimes, given a Chinese sentence, it hard to tell whether it’s asking questions or stating facts without knowing the previous dialogue context. There is no reordering of subject and predicate like it is in English. I am not an expert of Chinese grammar, and my store is poorly designed. I think accessing to the previous slots is a little bit useful.
If your conversation has only two rounds, you can add a custom function in the last round to clear all slots. There is really no good solution at the moment.
I set an additional slot called ‘last_obj’ with some initial value. Everytime when custom action is invoked, I would load the obj slot and compare it with the last_obj slot. If the new obj does not equal to the last_obj, all slots get reset and the last_obj gets assigned with the new obj value.
I have some nlu problems too. As my train value gets larger, my nlu trainer does not get trained very well. It can’t recognize greetings and goobyes such as ‘hello’, '你好’,‘88’ etc。
by the way, would you like to add my wechat_id: MaDaOSimon? @majian We can help each other out (mainly and probably you help me), if you are interested. My profile picture is the Starry Night painting in a coffee mug. Sorry, if i have the wrong assumption that you maybe a Chinese and use wechat.
You should probably have different intents, like e.g. ask_about_height or ask_about_player. This means you can distinguish based on context, and won’t have the problem to have to figure out what response to give within the action_knowledge_retrieve action