AI developer on Azure

AI Developer on Azure

Learn how to build applications using Microsoft's Machine Learning and Artificial Intelligence services

AI Developer on Azure

Learn how to build applications using Microsoft's Machine Learning and Artificial Intelligence services
Beginner  | Intermediate |  Advanced

Learning Plan - Artificial Intelligence Applications on Microsoft Azure

Developed by the Microsoft Artificial Intelligence and Research Team

Level: Intermediate
Audience: Software Developer, Data Scientist
Requirements: Software development, working with Application Programming Interfaces (APIs), an Azure Subscription, and a Cognitive Services API account

Creating Artificial Intelligence applications with Natural Language Processing - With Cognitive Services API's

One of the "hard problems" within Artificial Intelligence is processing human speech. Many language constructs pose issues for AI systems because there are often more exceptions to the rules of a language than rules themselves. The Language Understanding Intelligent Service (LUIS) enables developers to build smart applications that can understand human language and react accordingly to user requests. LUIS uses the power of machine learning to solve the difficult problem of extracting meaning from natural language input, so that your application doesn't have to. Any client application that converses with users, like a dialog system or a chat bot, can pass user input to a LUIS app and receive results that provide natural language understanding.

A LUIS app is a place for a developer to define a custom language model. The output of a LUIS app is a web service with an HTTP endpoint that you reference from your client application to add natural language understanding to it. A LUIS app takes a user utterance and extracts intents and entities that correspond to activities in the client application's logic. Your client application can then take appropriate action based on the user intentions that LUIS recognizes.

You can use the following resources to create an application that follows the acquire/process/respond pattern in AI using Natural Language Processing with the Language Understanding Intelligent Service (LUIS). Once you've completed this application, you'll be able to code other applications that use more Cognitive Services.

Module Topic Description Test your skills
Introduction and setup Introduction to Language Understanding Intelligent Service (LUIS) - Microsoft Cognitive Services We'll start with an overview of the service, and how you can use it in your applications with this short video. It introduces the concepts we'll use in this Learning Path. Explain to a colleague what LUIS is using an example scenario.
Install and configure Visual Studio In this Learning Path, we'll stay in the Microsoft Azure Portal for most of the steps. To create a user-friendly UI, you'll need Visual Studio to create and run your Cognitive Services application using Node.js, Python, C# and other programming languages. The free Community Edition Works fine. Open Visual Studio and create a simple data application.
Creating Subscription Keys Via Azure You can create and manage your keys on the My Apps page in the Azure Portal. You can always access this page by clicking My Apps on the top navigation bar of the LUIS web page. This reference covers how to do that. Create your LUIS subscription keys in the Azure Portal.
Concepts - Intents As you saw in the Overview Video, Intents are a task or action the user wants to perform. It is a purpose or goal expressed in a user's input, such as booking a flight, paying a bill, or finding a news article. In this reference, you'll learn more about how to use Intents. Think of a LUIS application that you would like to create. Begin planning your application by identifying your domain and your main intents.
Concepts - Entities Now we're ready to understand Entities. Entities are important words in utterances that describe information relevant to the intent, and sometimes they are essential to it. Entities belong to classes of similar objects. This article covers the types of Entities and how you can use them. It also covers Hierarchical types. Identify your main entities and map out any hierarchical, composite, or list entities for the application you would like to create.
Concepts - Utterances Utterances are the input from the user. This reference covers training LUIS to extract intents and entities from Utterances. Come up with 3-4 utterances for each of the intents that you identified.
Concepts - Features LUIS is using machine learning in the background. A machine learning Feature is an attribute of data that affects the outcome you want. You add Features to a language model, to provide hints about how to recognize the input that you want to classify - called the Label. This article explains how Features help LUIS recognize both intents and entities. Determine which phrase lists and patterns might be useful to include in your app.
Concepts - Working with multiple languages Multiple languages are available in LUIS, and more are being added. In this reference, you'll cover how to detect rare words, and when and how you need to add tokens. Explain any words or characters you think should be added to a non-exchangeable phrase-list feature.
The Acquire Phase Create the application and get API keys Building a LUIS app ends up with an API that you can call from various languages, such as Node.js, Python, C# and more. The first step is creating the application itself, and getting the endpoint key. This article explains how to do that. Create the application you planned in the Introduction and Setup section above using the subscription key you created earlier, and obtain the API key.
Add Intents To take input from the user, we need to set up the Intents of the application first, as you learned about in the Introduction section above. This reference explains how to set those up. Add your intents to LUIS, checking first to see if there are any prebuilt domains you could use.
Add Utterances and Search Constructs Your users will submit Natural Language queries to your application. To ensure they are trained by the Machine Learning system behind LUIS, you need to give it some examples to work with. In this reference, you'll create some Utterances, and then label them as Intents or Entities. You'll also set up the search and filter constructs. Add all the utterances you came up with in Introduction and Setup. Next, label them with your intents and entities, adding additional intents/entities as needed.
Add Entities The next step is to add your Entities, which can be grouped into Classes to show similarity in your topics. This article shows you how to do that, and how to leverage the pre-built Entities in the system. Identify which entities could be satisfied by the prebuilt entities and add them. Next, add the remaining custom entities for your app.
Processing Phase Using Features to Increase Model Performance We now move to the Processing Phase of your application. Features help LUIS recognize both intents and entities, by providing hints to LUIS that certain words and phrases are part of a category or follow a pattern. When your LUIS app has difficulty identifying an entity, adding a feature and retraining the LUIS app can often help improve the detection of related intents and entities. This reference explains how to add them to your application. Add the phrase lists and patterns you developed from the Introduction and Setup section.
Train your Natural Language Processing Application When you "train" a model, LUIS generalizes from the examples you have labeled, and builds model to recognize the relevant intents and entities in the future, thus improving its classification accuracy. This article covers that topic. Train your app and observe its performance.
Retraining - or "Active Learning" Once a Machine Learning model is trained, you can provide it with real-world data to retrain it and make it perform more accurately. LUIS contains a system that examines all the utterances that have been sent to it, and calls to your attention the ones that it would like you to label. This process is called "Active Learning", and you can implement it using these steps. Address any errors you notice in testing by adjusting your intents/entities/utterances/features, retraining, and testing again.
The Response Phase Publish and Access the Application We're ready to use your application - you can either publish your app directly to the Production Slot where end users can access and use your model, or you can publish to a Staging Slot where you can iteratively test your app to validate changes before publishing to the production slot. This reference will help you do that. Publish and test your app by setting the URL parameter. After some testing, revisit the previous step and use active learning to view and labeled any additional suggested utterances. You can also perform interactive testing on current and published models.
Create a Complete LUIS Application with Python This quick application puts everything together for you to use in a Python application as an example. You can see how everything you've learned is put into production all the way out to a full client application. In the previous steps you created what should be a fairly robust LUIS app. Integrate it into a simple Python app.
Use a LUIS Application with Cortana While there are advantages to using prebuilt domains to extend your LUIS application, you can also use the Cortana system in Windows 10 to implement LUIS. This article shows you how. Detail 2-3 scenarios where the Cortana prebuilt app would be useful, and 2-3 scenarios where it would fail.
Next Steps Other Cognitive Services Now you're ready to branch out and create your own applications using more of the Cognitive Services. Take a look at the list here and follow the samples they have. Create and deploy more AI applications
Review The LUIS forums Have questions? There's a good chance someone else has the same question. Or maybe you're ready to help someone else. Review the forums, answer at least one question.