Rasa Service-desk assistant's slots not getting filled correctly

Hi, I am building an Service Assistant for a website. The bot can change the phone number of registered users. I have two slots - CurrentPhoneNumber and NewPhoneNumber according to my stories, the bot asks for current phone number from user. The phone number entered from user should be in CurrentPhoneNumber slot, which is working fine. (Now bot asks for new phone number.) But, the phone number entered next that is New Phone Number, is not getting stored into the NewPhoneNumber slot but it is updating CurrentPhoneNumber slot value. My bot is not filling slots according to the stories, The training data in nlu.md is almost similar for both the intents that is currentPhoneEntry and newPhoneEntry since the data for both is 10 digit phone number.

P.S.

  • slots - CurrentPhoneNumber, NewPhoneNumber
  • intents - currentPhoneEntry, newPhoneEntry

Kindly help

Hey @vin0108, could you share some more information so I can help you? What version of Rasa are you using? Is the behaviour you’re describing happening inside a form? What does your domain and the relevant parts of stories/rules look like?

rasa version - 1.10.1
The behaviour happening is not inside forms, just slots. Example conversation. User - Hi
Bot - Hi, How may i help you?
User - i want to change my registered phone number
Bot - Please enter the current phone number
User - 9876543210 (This should be stored in slot - currentPhoneNumber)
Bot - Please enter your new phone number
User - 9123456780 (This should be stored in slot newPhoneNumber)
Bot - changed successfully

stories file snippet

  • greet
    = utter great
  • changePhone
    = ask_old_phone
  • inform{“currentPhoneNumber”:“9876543210”}
    =ask_new_phone
  • inform{“newPhoneNumber”:“9123456780”}
    =success

Both the current phone number and new phone number are getting stored in the slot currentPhoneNumber, the training data in nlu is same for both since it is a phone number. Hope My explaination is clear

Alright, thanks for the info. My only guess is that there could be something wrong with the domain. Could you share your domain file?

Ah, now I see! I think what’s happening is that the system extracts the second number as a currentPhoneNumber entity (you can check this if you run rasa shell or rasa interactive with the --debug option).

In general, if the current and new number can look the same, then a model has no chance to learn to distinguish between current and new numbers and extract them as separate entities. I recommend to use just one entity for both cases, and utilising a form that will ask for the two numbers and store them in the appropriate slots.

1 Like

okay. will try that. Thanks Sam.