How do you pimp your festival? With a chat bot!
Last week, we teamed up with 20 different developers for a hackathon to create a chat bot for the Eurosonic Noorderslag festival. Eurosonic Noorderslag is an annual festival for new and upcoming artists with over 40,000 attendees. The purpose of our bot is to provide the attendees with near real-time answers to everything related to the festival. Together with these developers we built a fully functioning bot using the Azure Bot Framework.
In this blog I'll briefly introduce the technology we have used for the bot, and I'll go over our approach for getting the chat bot ready in two days without any prior experience with creating bots.
Bot Framework
The fundament of our bot is based on the Azure Bot Framework. This framework comes with several advantages:
- Easy integrations with all popular chat platforms (i.e. Skype, Messenger, Slack, etc.)
- Serverless bot environment where you can easily scale and pay as you go (per execution)
- Developer SDKs which expose easy-to-use bot functionalities available in both C# and Node.JS (e.g. Chat cards)
New bots can be either created via botframework.com or in the Azure Portal. When you create a bot an easy walkthrough is provided to pick a programming language (C# or Node.JS), set up a basic template for your desired functionality, connect to the appropriate chat platforms and provide connectors to enabled external providers (e.g. LUIS).
LUIS
The biggest reasons why bots are so powerful today is because of the newly trained language interpretation systems behind the bots. Microsoft's flavor for this is known as Language Understanding Intelligent Service (LUIS) and it serves as the interpretation system between the text input and the data processing used to provide an output that makes sense. The different capabilities are explained in the remainder of this section and illustrated in the figure below:
Intent
Whenever LUIS is queried with a sentence, it first tries to determine its intent. For example, if you have a GetFood intent to return food places, you want this functionality to trigger with a variety of sentences, like 'I am hungry', 'I want food', 'I am starving' etc. Completely different sentences as you can see, but because of the built-in language interpretation, LUIS knows there's a relation between starving/hungry/want food and LUIS will trigger the GetFood intent for all three sentences.
Entities
Another building block which LUIS provides are entities. Whenever a sentence is put through LUIS, it can extract certain keywords in these sentences and pass them to the BotFramework as separate entities. Think of the earlier example to get food. When a user for example asks 'I want pizza' or 'I am looking for a restaurant that serves orange juice', LUIS can be trained to detect food entities and extract relatively pizza and orange juice from these two sentences.
Phrase lists
Lastly, phrase lists in LUIS are ideal to link certain keywords to each other. Different food entities as described in the previous section, can be easily linked together with phrase lists so you don't have to train LUIS to detect every type of food. Instead, you can train LUIS to recognize e.g. pizza, and add a comma-seperated food phrase list with all the different types of food you wish to detect.
Code collaboration
Since we only had two days to finish the bot, we didn't organize a traditional hackathon where each team competes with each other for the best idea. We decided to collaborate with each other and to split the group up into different teams for different features. We also had an additional team which went out on the street to ask the festival attendees what functionalities they would be looking for when talking with the festival bot.
Even though every team worked on different functionalities, every functionality got merged into the same GitHub repository. After 30 hours, +300 commits and a lot of last minute bug fixing we managed to create our chat bot: Sonic.
To experience the bot yourself, you can try out the bot on Facebook Messenger. Or have a look at the video below showing most of its functionalities: