Hi @SamS,
very happy to read your considerate reply!
My code is all checked in at GitHub - andreaschuch/purchase_dialog at entity_groups, in case you want to take a look to point out specific mistakes on my side.
For the entity groups, I did annotate the NLU-example just like you describe, except that I don’t annotate the word “some” as it does not provide quantity information.
However, Rasa interactive learning comes back with a different annotation, for example:
Is the intent 'order' correct for '[15]{"entity": "quantity", "group": "1"} [apples](commodity)[apples]{"entity": "commodity", "group": "1"}' and are all entities labeled correctly? (Y/n)
which is also stored in the training data. (NB: Also know that whenever I correct something in interactive learning, the training data gets all messed up.)
So is
[apples](commodity)[apples]{"entity": "commodity", "group": "1"}
correct, or should it rather be
[apples]{"entity": "commodity", "group": "1"}
?
One NLU-error I see frequently is that a the groups get messed up, for example:
Is the intent 'order' correct for '[2]{"entity": "quantity", "group": "1"} [apples](commodity)[apples]{"entity": "commodity", "group": "1"} and [3]{"entity": "quantity", "group": "1"} [pears](commodity)[pears]{"entity": "commodity",
"group": "2"}' and are all entities labeled correctly? (Y/n)
even though the exact utterance is in the NLU training data. Not sure if there is hope, to get correct group classifications for “2 apples and 3 pears”, “3 apples and 2 pears”, “3 pears and 2 apples” and “2 pears and 3 apples”?
Regarding the dialog flow, I did indeed implement a custom action (see purchase_dialog/actions.py at entity_groups · andreaschuch/purchase_dialog · GitHub)
My main obstacle with the forms was that they would not ask for quantities as soon as at least 1 quantity was set. So for example, “apples and pears” would ask for quantities, because no quantities were set. But “1 apple and pears” would not ask for quantities, even though the quantity was missing in the second group.
I have a question for you: Do you think asking for every value missing in any of the groups would make sense as default behavior of forms? Or is it that I’m just thinking along my own usecase, and you can imagine other usecases where this behavior is not desirable?
I would like to start another attempt using forms, if you could elaborate a little more how the “required_slots” method can help with the problem?