I have created an intent with entity annotations for amount_of_money using enitity “roles” to be either “to” or “from”. here are a couple of examples
am looking for [mobiles](product_type) in range between [1k]{"entity": "amount-of-money", "role": "from"} to [2k]{"entity": "amount-of-money", "role": "to"} dollars
mobiles between [2k]{"entity": "amount-of-money", "role": "from"} to [3k]{"entity": "amount-of-money", "role": "to"}
…and many more such examples.
But when I test it with a new amount say “5k” that is tagged in examples only at one place as “to”, it always get role assigned to it as “to”. Whereas as per my testin utterance it should come in role “from”.
Thanks for the question. We have definitely received this as feedback from some of our users before as well.
We recently tweaked the role prediction algorithm and implemented the tweak on an experimental branch. Would you be willing to try it out?
You’ll have to install Rasa from source on that branch. Here are the installation docs to help you with that. (Don’t forget to switch to the roles-attn branch after cloning the repo )
Do let us know about your findings / observations on how the performance of the model trained on this branch is compared to the performance of your earlier model.