Microsoft Bot Framework - Part 1

By: Rachel Scanlon on 12/14/2016

What is the Microsoft Bot Framework?

This framework allows developers to create intelligent BOTS that can communicate with your users, wherever mediums they may be utilizing. This could be Skype, Twitter, Facebook or your customer facing business website.

The BOT Framework consists of several components. These include the BOT connector, Bot Builder SDK and the BOT directory.

The BOT Directory is a public directory for BOTS. When a BOT is published, it will be reviewed and potentially listed publicly.

The BOT Connector helps the developer to connect with social media (Facebook, Twitter etc.), chat programs (such as Skype). The purpose of the BOT Framework connector is to forward messages from your BOT to a user and then relay back the user’s responses. To use the BOT connector, you will need;

  • A Microsoft Account to log into the BOT Framework developer portal to register your BOT.
  • An Azure account to enable you to publish your BOT and expose its endpoint. You don’t have to use Azure but, for the purposes of this blog post and the parts that will follow, we will make that assumption.
  • Developer accounts for the services you wish your BOT to communicate with.

The connector documentation can be found here.

https://docs.botframework.com/en-us/restapi/connector/

The BOT Builder SDK is open source and includes features to enable us to model our conversation, maintain state and include attachments within our messages. It is available in C# AND Node.js. The SDK versions can be found here.

https://docs.botframework.com/en-us/downloads

What are Microsoft Cognitive Services?

This is a collection of APIs to assist developers in giving their applications capabilities that are very difficult to achieve as a single developer (or even a team of developers). Examples of these might be speech recognition and facial recognition.

 

When Microsoft first got started with developing this collection of services it was codename “Project Oxford” and was initially announced at the Build 2015 Conference. Project Oxford is being continually expanded and has been renamed “Microsoft Cognitive Services. Examples of these services are;

Language Understanding Intelligence Service (LUIS)

Luis is a service that allows a developer to take input from the user and allow their intent to interpret it.  Each intent has several utterances that a user may use to obtain information. For example, you may have an Intent named “Place Order”. This might include Utterances such as “I would like to order…” or “I would like to place an order for…”. You can then have LUIS train your model to take an utterance and correctly interpret what the user is trying to achieve. As you add more utterances, you can continue to re-train your model as you get more requests to help improve the results that the user receives. LUIS also has utilities to define prebuilt or custom entities to define part of the utterance and a specific type, such as a number or date. In the case of a custom entity, you can define (for example) a product name or id and categorize part of an utterance as that type. We will explore this in more detail in a future post.



Face API

This enables an application to recognize human faces in a picture (like Facebook does when it enables you to “tag” other users in a picture). Some features of the face verification API are to check if a face is the same person and using queries to find similar looking faces from a collection of faces.

What components do developers need to use Microsoft Bot Framework and Microsoft Cognitive Services to create intelligent bots?

For the purposes of this series of blog posts, I am having you download and install *all* the components you will eventually need.


In the next blog post (Part 2), I will walk you through configuring your environment for BOT development. We will also write a basic BOT with support for LUIS.

Microsoft Bot Framework- Part 2 - Outline

  • Configuring your environment for BOT development
  • Setting up test project for basic BOT used with emulator
  • Setting up LUIS account with Azure
  • Training LUIS to recognize utterances


We will attach sample source code.

Microsoft Bot Framework - Part 3 – Outline

Walkthrough of the development of an MVC app to use basic order enquiries for an ecommerce site.

Again, we will attach sample source code.

Stay tuned!!