Giter Club home page Giter Club logo

global-azure-bootcamp-2019's Introduction

Global Azure Bootcamp 2109 in Malta - talk about AI

This repository contains the examples and slides of the demo given at the bootcamp session on 27th of April 2019.

The goal of the demo is to showcase how easy it is to create a bot from scratch with the Microsoft BotFramework SDK. We also do a basic integration with the LUIS (Language Understanding) AI service and throw in some AI calls to Microsoft Computer Vision. Everything can be setup and run for free (based on the load, but for small projects you will be fine). If you don't have an Azure account, get one for free.

Questions

If you have any questions, feel free to open a new issue.

Setting up LUIS (NLP engine)

Browse to the LUIS portal (is region specific, we use EU), login with your account and create a new application.

Create LUIS app

Then navigate to intents under Build and create a new one named ´Registration´

Create LUIS intent

Then click the intent and create some utterances. The utterance is what you would expect the user to send to the bot to end up with this intent. So the intent the user has with his input.

Input LUIS utterances

After that, you can create an entity by hovering your previously created utterance. We create a new simple entity named eventType. The entity extracts data from the utterance that is predictable.

Create simple LUIS entity

Label utterance as entity

Let's train the app, so LUIS is up to date of all the changes we were making. You always need to train the app before you can test it.

LUIS train application

After training, let's test what we created so far. You should see that an utterance craeted before should match the Registration intent. It could also match the entity eventType if it contains an event type. Also try with utterances that are related but not a direct match in LUIS, it should give a lower score.

LUIS test application

When we want to use the LUIS functionality out of the portal, we should publish it to a slot. We can publish to Production and to Staging. If we publish to staging we need to add this parameter in the API request, so for this example we can just publish to Production.

LUIS test application

Connecting Azure to LUIS

If you want to use your cognitive resource from Azure and link it to your LUIS app so it can use that plan, you should first create a LUIS resource in Azure.

Create LUIS resource in Azure

Detailed LUIS resource in Azure

After that, you might want to relogin in LUIS and when you're using the same account as in the Azure Portal, you can link them.

Link LUIS Azure resource in LUIS portal

Assign LUIS Azure resource in LUIS portal

Start coding in Visual Studio 2019

To kickstart our project, we use the scaffolding templates provided by BotFramework. To use this, you can install the VSIX package.

BotFramework Template

Create a new project using the EmptyBot option template

BotFramework Template Project Template

BotFramework Create Project

Run the bot by pressing F5 in Visual Studio, you should see something similar like this

BotFramework Base Project

Use the snippets in the snippets folder in this repository. We are editing the Startup class, your bot class and the appsettings file.

Test the bot in the emulator

Download and install the latest BotFramework emulator. Open the .bot file in the emulator that got created in the project.

Emulator open bot

Running the bot

Setup Azure Computer Vision

Create a new Computer Vision resource in Azure.

Azure Computer Vision Creation

Azure Computer Vision Configuration

Setup Azure Bing Spellcheck

Create a new Bing Spellcheck v7 resource in Azure.

Azure Bing Spellcheck

Azure Bing Spellcheck Configuration

Enable Bing Spellcheck in LUIS. This is just a switch, you will use the spellcheck authorization key in the API call.

Enable Bing Spellcheck in LUIS

Register Azure bot channel

To use the bot in the cloud, you will have to provision a bot channels registrations in Azure. In the registration you can configure the channels (facebook, slack, web, ...) that the bot will be accessible from. Make sure you configure the endpoint in the settings page. The endpoint contains the address to the bot messages API that will be called when a user starts talking to the bot.

Register Azure bot channel

The easiest is to directly create a new Microsoft App, it will handle the security of your bot.

Microsoft App

Microsoft App Generate

Microsoft App Generate

DirectLine Jabber

While preparing this demo, I've create an automated testing tool that was already some time in the back of my head. You can read more about it

global-azure-bootcamp-2019's People

Contributors

jvanderbiest avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.