Slots with Entity Roles - Inconsistent Behavior

Hi,

i have tried to create a simple bot in order to use the roles. It is sometimes not picking the slots correctly. In fact in one instances it simply goes in a loop and keep saying “Please select the destination (To) app”.

You can see the bot in the git repo - My Bot

i would really appreciate if anyone can help me understand if I am doing something incorrect which is causing the failure.

i have also uploaded the logs of all my 5 runs.

thanks !

Hi guys - any suggestions or help? Do I need to fix my story or is it the issue of training data ?

Hi guys - can anyone help me understand the issue here ? is there some problem in my story or this is an issue in Rasa feature ??

Hi @utsuk.prani, The github link that you provided doesn’t work. Can you please provide small snippets of your stories and some of the relevant NLU data here for us to see. Going through the whole repository of the assistant can be time consuming. :slight_smile: Thanks

Hi @dakshvar22 thanks for taking out time to help. I made the repo public now. It is very small repo. I believe you just need to see the stories, nlu nd actions files.

I have also added the verbose logs in the repo incase someone might want to see the details rasa was logging.

Hope you can access the repo now.

any suggestions / help please ?

Anyone from Rasa team willing to help or share suggestions ?

Hi @utsuk.prani, I just checked the data and the failed log. In the failed log you shared, your assistant is asking Please provide the destination (To) app. and you answered with CRM. In your training data you just list interfaces in combination with keywords like from or to. All your entities in your training data have a source or a destination role assigned. If you now simple provide CRM as user message, your assistant recognizes it as interface and also assigns a role to it as it does not know better. You should provide also some training data that just name an interface without any role. For example

- [CRM](app)
- [UFE](app)

Your assistant should then not assign a role label to your input CRM anymore. You also need to update your slot mapping to something like

        return {
            "src": [
                self.from_entity(entity="app",intent="iml_query",role="src"),
                self.from_entity(entity="app",intent="iml_query",
            ]
            "dest": [
                self.from_entity(entity="app",intent="iml_query",role="dest")
                self.from_entity(entity="app",intent="iml_query",
            ]
        }

so that the slot is still filled. Does that help?

hi @Tanja - thanks for your reply. really appreciate it. i tried the changes you suggested in the following files (u can also see the changes in git).

  • nlu.md - added three new lines as you suggested for each app.
  • actions.py - updated as you suggested. corrected the syntax a bit as i guess some “,” were mislaced.

However, now when i run the flow it doesn’t seem to be asking for the dest at all. and it seems to be taking the input i gave for (To) app as both src and dest. You can refer to the new log files -

  • FAILED_run5_shell_command.log
  • FAILED_run5_actions.log

Please let me know if changes I made look OK and if there is anything else I should try.

Thanks a ton for your help and time!

@utsuk.prani The upload of the failed log files did not work. Can you please upload them again? Thanks.

hi @Tanja,

are you not able to see the new logs in the git repo MyBot

i had uploaded there.

in case not, I am also attaching both logs here now.FAILED_run5_actions.log (3.9 KB) FAILED_run5_shell_command.log (14.3 KB)

This is due to an issue with the slot mapping in the SDK, which is already fixed (Only fill other slots if slot mapping contains a group/role restriction by tabergma · Pull Request #237 · RasaHQ/rasa-sdk · GitHub). I am not sure if it is available in the latest 1.10.x version, but it is definitely fixed in the Rasa 2.0 release candidate.

Just released a new micro release for rasa-sdk. If you update your rasa-sdk to 1.10.3 the problem should be solved.