Back in April 2017 I attended the dotnetsheff meetup talk on chatbots by the excellent James Mann from Black Marble. His passion and knowledge meant I walked away from the talk desperate to try and create my own bots!
As I was leaving the talk a friend suggested a great use case for a bot ‐ acronyms. Often the curse of most people’s work lives where you’re expected to know what they mean and are thrown about with abandon by people trying to sound intelligent. Well, no more!
Imagine sitting in a meeting and you hear an acronym, now you can simply take out your phone and get an explanation in seconds.
The bot was created using the Bot Framework C# SDK and uses LUIS for the language recognition.
LUIS is a great option if you want a more conversational bot as opposed to a simpler Q and A type bot. With LUIS you can teach language understanding which your bot can utilise to interpret user intents through the use of natural language. LUIS is broken down as follows:
These are the verbs or actions that you expect users will want to perform. For Acrobot these are find, create and help.
These are the messages that you expect a user will send to your bot. You can then assign them to a specific intent. For Acrobot an example would be “What does TLA stand for?” which would be assigned to the find intent. You can keep adding utterances to train a better model and LUIS actively learns as it receives more messages which you can check and retrain if necessary.
These are the nouns that you want to extract from utterances. For Acrobot we need to extract the acronym and definition. In the LUIS dashboard you highlight portions of an utterance and assign it to an entity. LUIS provides built-in entities for common intents like booking, ordering, reserving etc. For Acrobot we used a regular expression entity to recognise a collection of 3 or more letters as an acronym. For definitions we just had to train the model so it could eventually recognise that anything after “TLA stands for…” or “TLA means…” was the definition. This demonstrated the power of LUIS, give it enough data and it will eventually understand.
LUIS exposes an endpoint which you can call with an utterance to receive an intent. Intents are scored based on the confidence the model has. Your bot can then act on the intent, receive any extracted entities and respond as necessary.
The bot has been rolled out across my company and has received great feedback getting around 100 hits per day. The bot utilises the Web Chat channel (Bot Framework bots can be integrated across multiple channels such as Slack, Facebook Messenger, Twitter etc. to reach more people) which means users can simply navigate to a web page to use it.
Housewrk is a start up I’m involved in with my good friend Faizan Patankar. He had an issue where he couldn’t book a cleaner without going through agencies which was a long, drawn out process. Instead why not connect cleaners and customers directly?
Most cleaners advertise online, Facebook especially, so a Facebook chatbot was created. The bot asks questions about what is required (property type, number of rooms, etc.) to calculate a price. The request can then be sent to cleaners who have registered with us so they can respond and take the job.
The product is still in progress. The initial chat bot is complete and has been approved by Facebook. We’re currently working on the next stage of the workflow, connecting customers and cleaners, so if you need a cleaner, keep checking back for updates!
Some useful tips I picked up during development of my own bots which may prove useful: