How to build a chat bot in 10 minutes

Written by Natalie Afshar

This blog post is inspired by a workshop on Azure and Chatbots by Ray Fleming at the Microsoft Learning Partner Summit in January 2018.

It was Arthur C Clarke’s third law that “any sufficiently advanced technology is indistinguishable from magic.”  And Ray Kurzweil, who likened modern day technology to the spells and magic in Harry Potter: “Harry unleashes his magic by uttering the right incantation. Our incantations are the formulas and algorithms underlying our modern-day magic. With just the right sequence we can get a computer to read a book out loud or understand human speech…”

Through Microsoft Azure’s cognitive services and bot framework, we can help our students and teachers discover exactly that.

In this post I’ll outline some simple bots you can take advantage of: 

But first of all: What is the bot framework? And how do you explain a bot?

The bot framework lies within Microsoft’s cloud offering, Azure, with a multifaceted host of solutions best summarised by the graphic below. The bot framework lies under the intelligence offerings, along with Microsoft’s cognitive services, and Cortana.

So what is a bot?

When I first heard of a chat bot, I imagined small robots buzzing around to complete tasks. Actually, a bot is an application that performs one or more automated tasks. You can find them all over the internet.

Chatbots use conversation as the interface.

What can bots do?
  1. Information Retrieval: Lookup, reference and information seeking, scenarios backed by a data source. E.g. “What subjects are offered for year 12 in 2018?”  “When are the trains leaving on Thursday?”
  2. Transactional: Look up info, make amendments, scenarios backed by a data source. “Upgrade my account to plan B” or “book two tickets for film A on Monday using my credit card”
  3. Advisory Role: Prescriptive guidance via ‘expert systems’ based on user input.“Are these school shoes appropriate?” “Should I add an additional component to my service plan? ”
  4. Social Conversations: Ability to sense sentiment and engage in open-ended conversation within the bots area of expertise.“Your product is terrible, I would like a refund.” “I have had a terrible experience, who can I talk to?”

Bot services can be used in a very different way to how we conventionally think about IT, and setting them up can be simple enough that students can take it on as a task. It is making a request to an internet service to do something for you, translate a text, bot conversation or tell you what is in an image.

Explore Bots around the web

One example is Microsoft’s CaptionBot that can interpret photos by suggesting a caption. You can play around with this tool by uploading your own photo or link a photo from the web.

Other bots that exist around the web include: Microsoft summarize bot, Bing image bot, Bing news bot, build bot and Murphy bot, to name a few.

Murphy Bot, is an online chatbot running on Azure that is powered by the intelligence of Microsoft Cognitive Services, including the knowledge of Bing. You can chat with Murphy using Skype and ask it hypothetical “what if …” questions like “what if I were superman?” Murphy will try to respond with an image that visualizes an answer to your question. Murphy is brand new and still learning so it sometimes doesn’t have an answer right away, but the more people interact with it, the more creative it will become, gradually improving the results.

Make a bot right now: QnA maker

One quick and easy way to create a bot, right now, is through Qnamaker.ai – it is a chatbot service that runs on Microsoft Azure, and is a super quick way to build a bot.

It will take you 5-10 minutes, simply link it to an existing FAQ document or webpage and it will generate a bot to answer QnA’s. These can be embedded onto a variety of mediums, from Websites, to Skype, SMS or voice services, WhatsApp, Facebook messenger or even WeChat.

Here’s a bot that I made in about 10 minutes.

Are there scenarios you could imagine using a bot within your school or university? Such as admissions information or building a student service bot?

If you school has a STEM club, perhaps you could build a bot for parents of the school as a lesson for students.

Bots built on Microsoft Azure have language understanding built into them. For example, if you ask “can I donate clothes”, even if that exact phrase isn’t on the website, the bot will work out what you are trying to ask and give you an answer.

Although still in its early stages, one future use for this in education can be asking a bot to find you all the photos of the school library with students standing in front of it, or parents sending a photo of black school shoes via text message to the bot to get feedback if they will be approved by the school’s shoe policy – or even texting the bot for ideas on a healthy school lunch recipe while at the supermarket.

If you are interested in learning more about Machine Learning, to use in your classrooms or to explore more generally, visit our Cognitive Services website for information on how our intelligence APIs work, such as our vision, speech, language, knowledge and search APIs.

Our mission at Microsoft is to equip and empower educators to shape and assure the success of every student. Any teacher can join our effort with free Office 365 Education, find affordable Windows devices and connect with others on the Educator Community for free training and classroom resources. Follow us on Facebook and Twitter for our latest updates.