0
votes

I am currently developing a Microsoft Teams bot using the Microsoft Bot Framework. It works perfectly fine in web chat, the bot emulator, and 1-on-1 for how we need it to work in Teams. However, once we side-loaded it into our specific team in Teams, we are getting undesired behavior. Some of our intents are being wrongly triggered or no longer working at all now that we have to @mention the bot to talk with it. For example, when the user says "@mention hello", the StopVM intent is being triggered rather than our Greeting intent. When trying to just try out phrases using "@mention hello" or "mention hello" (where mention is our bot name), in the web chat or the bot emulator it properly triggers the Greeting intent. Yet, in the 1-on-1 chat in teams when we @mentioned the bot again this gave the StopVM intent again.

Is there any way to account for the @mention in our LUIS model? Or perhaps is there a way we could use REGEX to strip out the @mention before it is sent to our LUIS?

But then there is the other problem that responding to the bot to go through our form flows also sends @mention or mention to the form fields when we are not currently expecting this.

I guess the overall question is how do we account for the @mention in the user responses?

1
Please read How to Ask and take the tour . If you provide the code and tell us,in short, what the issue is, we might be able to help - Christopher H.
Please check the documentation on how to retrieve and remove mentions. - Wajeed-MSFT
Have you tried the regex entity? Here is the quickstart - DFBerry

1 Answers

1
votes

LUIS regex entities are not used to strip things; they are used to recognize entities.

Create a regex to recognize @mentions by creating a new entity of a regular expression type called AtMention or perhaps BotOrPerson as described in the article mentioned above, and then just include @mentions in your utterances. Your model will then recognize them for what they are.

The AtMention/BotOrPerson entities can either have no significance in your model or you can do something different if they are present - for example if the utterance @mentions someone other than the bot, it can trigger special behavior.

(@wajeed-msft - your suggestion won't work because LUIS sees the user's input before the bot does.)