New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slots not populating #1987
Comments
Try running with |
--debug shows nothing.. will try to add more training data and try again, thanks |
It should show you the intent of the messages as well as detected entities, you need to pass that to the training script, e.g. |
with 170 examples for intent "pay" and 15 examples for intents "greet" and "bye" |
still not getting slots populated via train_online.py.. |
if you can try to reproduce please, thanks |
The machine is going to know what slots to fill via the stories file. I looked at your stories, and they seem very random. I doubt that with the few stories you have, your model will be at all effective in predicting story flow. For instance:
You're telling the machine that the intent In the same story, you then have a user intent of It looks like you need more user intents, to start. And your stories should look a little more like this:
In the above story, the are multiple user intents to correspond to different categories of intent that could be possible. When the user indicates an intent and an entity is extracted (e.g., I hope this helps! |
thank you, but not quite sure how to define "inform" intent in nlu training data and "action_check_details" should be some custom action I suppose? |
i don't understand how you define those 2 actions (check_details and complete_payment) |
Yeah, those are all custom. I'm just giving you some ideas for how you could expand your content to allow smarter interactions. As far as how to create those NLU objects, have a look at the documentation. |
@foxjr - One question, in the above story you described
if NLU identifies the intent as "Pay" and the entity "Value" as "3000", do you really need to set the slot again? By using - slot{"value": "3000"} ? |
why can't i use intent PAY instead of INFORM? "pay 200" and bot should ask me for person and currency, why i need another intent inform? and how do I write custom action for "check_details", sorry for so much questions, but documentation isn't helping me much |
@surya103 Yeah, that's it; in my example, value is both an entity and a slot. I played around with some different methods for slot-filling, and the most consistently good outcome I achieved was by doing it like that. The format given tells the machine that the entity should be extracted from the user's statement, and then the slot by that same name should be filled with the same value given. The slot fill is also the cue for the machine to check the details next to confirm whether all details have been given. Here's some example code to illustrate what I had in mind with those bool slots, which may also be helpful for @dejanmarich :
Slot-filling isn't just a way to pass data to actions--it's really important for the conversational flow. Filling a certain |
@dejanmarich Having the |
@foxjr Understood the logic to find what else needs to be filled. But, my question was primarily on "value" slot - i.e. assuming that, the slot is filled and also explicitly setting in the story. Isn't that redundant? |
Extracting an entity and filling a slot are completely different things, and are independent of each other by default. In my stories, I show explicitly the entities being extracted and the slots being filled to create the association between the two.
The Does this answer your question? |
I will have "change", "pay", "credit", "funds", "balance" intents.. what I don't understand is when should I use "inform" and when "pay"?! idk if i'm getting something wrong, but how should bot recognize intent as "pay" if i define in NLU "pay 200" as "inform" |
With enough examples, you could get either of those to work. I'm just giving you some options to consider to get your project up and running. |
still wondering why can't I fill the slot with online training method. When I used weatherbot, it was same logic, with only 3 stories and was working just fine. Entities and slots have same name. Should I try to add more stories or more NLU examples then? And I'm bit confused with using custiom actions, if i name my file "actions.py" then in domain.yml I just use actions.name_of_action or I need to define somewhere else source file (actions.py)? (can you give me some contact, skype/mail/slack, I would really appreciate some input/help) tnx (mail: dejan.marich@gmail.com , skype: dmaricsb) |
@foxjr your example is perfect in case of dependent entities i mean in order to execute something you need all those entities. In my case i'm having two entities which are also slots, which are independent. Those two entities will be of numerical data(three digit eg:123). Here rasa fails to fill the value of that entity into it's respective slot instead it is filling the two value slots only into one slot For example consider my entities(also slots) are orderId, tId
slot : orderId : 123, tId : none
slot : orderId : 623, tId: none How to overcome this situation ? |
@dejanmarich getting same issue, Slots are not populating. Values are not getting set in slot. |
@Harish0596 Personally, I would create a category slot that allows only
|
|
Looks good, up until not recognizing |
i tried EUR, USD, $, HRK.. none of these works.. in another example it's not recognizing "person", only value works fine |
Looks like you're still going with the single intent of |
And keep in mind that entity ranges are specified in NLU objects using [n,m) intervals; for example, text |
this is my custom action for checking if curreny is set (if not then it should ask for it), but it's not getting populated either. my nlu data is in attachment and yes, I use only "pay" intent.. |
Ah, okay. I see a problem. You're using dispatcher.utter_message to do what your flow should be handling. When you use that backdoor to say things, you're bypassing the flow. Instead, have I posted this a while up as an example for part of the action:
In effect, you're setting the slot of the first missing detail to 0 and then moving on. Your stories will show that when a As it is now, you're using dispatcher.utter_message to request information, and then expecting the bot to understand that the next thing the user says belongs to a particular slot. |
Also, I don't see any NLU objects that are currencies alone, such as:
That's going to come into play when users are simply answering a template question. |
Hi, could you provide complete code for |
I haven't written it. Post what you have so far, including the errors. |
I think it would be more helpful to others if we close this question and create new ones as needed. It's become quite a long thread for others to sift through for information. |
Yes, very true. Please if you have any issues, create separate ones on github. 👍 |
Rasa Core version: 0.8.3
Python version: 3.6.3
Operating system (windows, osx, ...): OSX 10.11.16 (El Capitan)
Issue: When using train_online.py script for dialogue training, when i enter my answer, slots does not fill. Slot "person" is filled most of the time, slot "currency" never and slot "amount" always. Wish I can figure out what is wrong, because they are all the same name as entities in NLU model.
Content of domain file (if used & relevant):
The text was updated successfully, but these errors were encountered: