Recently I have been developing a number of bots using the Microsoft Bot Framework, with the LUIS service to allow users to use natural language to interact with them. One thing that struck me when we released the bots to a wider user base was just how polite everybody was towards them. The bot was receiving messages like “hi”, “how are you?”, “thanks” and “bye bye” – the only problem was that the bots didn’t know how to deal with these messages. Sure, they could deal with a ton of more complex messages / intents using LUIS, but wasn’t able to ‘understand’ and provide such common responses.
I set out to think about how I could solve this problem in a re-usable way and whilst doing so I ended up looking through the open source code for the Bot Framework on GitHub to see how dialogs like the LUIS dialog worked. Then, whilst browsing I came across some code in the Node section of the Framework that handled the matching of Intents within the IntentDialog – a few hours later I had my first version of the BestMatchDialog. Read More