Join Sahil Malik for an in-depth discussion in this video What are bots?, part of Microsoft Teams Bot Development.
- [Presenter] What are bots? Well let's talk of various kinds of user interfaces for those of us who have been around for a while. You know, there used to be this huge computer with punch cards, and you had to punch a card to talk to a computer, and the computer'd punch one for you if it wanted to talk back to you. Well that took all day. So then somebody invented a CRT with a very high contrast ratio and we got terminal-based UI. Now I could type in commands and the computer would type commands back out to me.
Cards were gone. Times are good. But then I had to learn a whole bunch of commands, so they came up with menu-driven user interfaces. So you start the program and it shows you three or five choices to pick from, and you pick one, and then it shows you five more choices, et cetera. If you think about it, these days when you call a phone call number for help, like 1-800-support something, they present you with a menu-driven system, don't they? So these concepts, well they don't ever go away.
But then those menu-driven systems weren't very powerful, so we came up with GUIs, graphic user interfaces. Apple, Microsoft, Xerox, other companies, they came up with GUIs because now, with this amazing invention called as the computer mouse, you could simply click on the screen and tell the computer what you wanted. These were more user friendly. An extension to this was a touch-based UI, iPhone, perhaps even a little bit before that. Who needs these mice and styluses when we have 10 of them attached to our hands, right? The next natural evolution in this process is bots.
So let me ask you a question. What comes to your mind when I say, "bots?" Hmm, bots. Things like natural language, artificial intelligence, we're all going to lose our jobs, computers going to take over, they'll hit singularity, there'll be a big world war, and end of humanity as we know it, right? Well, calm down. This course is certainly not going to end humanity as we know it. Neither will the bot framework.
A bot simply is an app that lets users interact with it in a conversational way. It can offer text, cards, or even speech in return to your questions. So one of the bots that we're very familiar with is Cortana, or another one is Siri, or Google has one too, Google Assistant. So yes, this is a bot. You just talk to it in a conversational way. But, the interesting thing is that when I say, "Hello," to a bot, or any other command, the bot can recognize what I try to say.
I just said, "Hello." So it can do an exact match? Matches the string hello like any other program would? It can try do a pattern match. I can say, "Hello bot," and if my string starts with Hello *, you know, then maybe I'm saying hello. Or I could do a regex match, so I can say, "Dear bot, hello." Entrusting regex expression there and it'll match. Maybe something even more complicated. Or you can use something called LUIS, Language Understanding Intelligent Service.
Now LUIS, obviously, is a part of the Microsoft AI stack, and you don't have to use LUIS to use the Microsoft bot framework. You can do simple text matching. In fact, even though there are facilities in the Microsoft bot framework to interact with LUIS, in order to understand the bot framework, and certainly from a Teams perspective, you need to know nothing about LUIS. I will cover LUIS in other courses though. Not in this course. But all we're trying to do, is that we're trying to understand the user's intent.
As long as you can understand the user's intent, and in this course we're going to keep that part very simple, basic string matching, et cetera, and once you understand those concepts, then we can build on that, introduce AI, and so on and so forth. I'll cover LUIS and all those things in other courses. And obviously, once the bot understands the user intent, it needs to reply back. And it can reply back, if you think about it, with further questions. Now this is an interesting thing, because we are in the infancy of best practices in bot design.
When you ask Siri a question, sometimes it tries to be cute. It tries to answer with a joke. Is that useful? I think we're still trying to make up our mind about that, but certainly it may reply back with some possible actions, cards. Now as you can guess, that you are writing this program, so one of the best things you can do is that you can narrow down the scope of your bot. For instance, if there is a bot that I said, "Hello," to, and it replied to me with a hello, would that be confusing? Versus if it replied back by saying, "Hello Sahil.
I can help you book an air ticket, a hotel or a car." Well which bot do you think I'll be less confused with? So the possible actions cards is very, very useful. Or it can return with results. It can say, "Sahil, there are three flights going to Los Angeles. Which one would you like me to book?" Then it's like a dialogue, like you would have with, you know, any other program. So the important thing is that users interact with bots via channels, and yes, Microsoft Teams is just a channel.
So the bot can surface itself through websites, Slack, yes Slack, Teams, Skype, SMS, Facebook, others.
- What are bots?
- Creating bots
- Testing using ngrok
- Deploying bots to Microsoft Teams
- Testing bots
- Bots as Azure AD applications
- Updating bot registration in Azure
- Building the bot package