Click here to Skip to main content
15,868,141 members
Articles / Hosted Services / Azure
Tip/Trick

New Look of LUIS (Language Understanding Intelligent Service)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
15 Jan 2018CPOL5 min read 5.7K   2  
This article is mainly focused on the new release of the Microsoft LUIS.

Introduction

Among the many Cognitive services introduced by Microsoft LUIS (Language Understanding Intelligent Service) is one which plays an important role in adding the natural language understanding capability to your apps.

LUIS allows your application to attain the capability of understanding whatever the user wants or asks for in their own words or language. To keep it simple, its main purpose is to understand the user’s intention and respond accordingly.

LUIS is the key part of the bot brain that allows the bot to understand natural language input and reason about it to take the appropriate action.

It is always important to plan your LUIS app before you actually create a one. LUIS app is usually centered on a domain-specific topic. For example, you want to track the person’s position or travel, ordering and tracking of the food, fitness track.

Once you start building the LUIS model with a use case, then the initial step you need to do is to list down the general user intensions like “bookflight” or “cancelappointment”, etc.

Background

Hope you have a pretty good knowledge on Microsoft Azure and LUIS as you are reading this article. If you don't have understanding on the same, then please do visit Microsoft Docs to read them.

LUIS Key Concepts

Some of the key concepts you need to be aware of prior to creating a new LUIS app are:

Intents: It represents actions the user wants to perform. It is always advisable and recommended to have a prior identification of your intents that are important and needed to resolve user’s input in building the app. Plan properly when defining the intents as too many or few intents may keep your app in trouble, i.e., either confusing with too many or general overlap with too few. Example: “BookaCab”, “scheduleAppointment”, “CancelMeeting”, etc.

Entities: These are the keywords in the utterances that helps to provide the detailed information. For example, “schedule an appointment at 1pm today”, “1pm today” is the date time entity. By picking the entities, LUIS helps your app to take the necessary action for the user’s input. There are pre-built entities as well like location, geography, number, date, etc. which come in handy for quick app build. We have different types of entities which help in cases of related (words):

  • Simple entity: defines a single concept. E.g.: number, name
  • Hierarchical entity: defines a main category and its members. E.g.: Flight class – Economy, Business, First
  • Composite entity: combination of other entities that forms part of a whole. E.g.: book a cab to airport at 4am today – includes place, time, day entities
  • List entity: List entities represent a fixed set of related words in your system. Each list entity may have one or more forms. List entities don't have to be labeled in utterances or trained by the system. E.g.: Delhi Airport, EI Arish International Airport, Anaa Airport, and so on.

Utterances: These are the user’s text input that your app needs to understand. Usually, these are the sentences like “book me cab at 10am from Delhi airport”, “Remember me the meeting with John at 11am today”, etc. You can add as many utterances as needed, but it is advisable to train your LUIS app as much as possible instead of keeping on adding the utterances.

Intent is used for triggering an action with entity as a parameter to execute the same.

New Features

Now, let's have a look at some of the new features that are introduced as part of the new release of LUIS.

  • We can edit the intent names/utterance when we have a spell error by using the option of the edit provided against the intent/utterances.

    Image 1

  • When creating a new LUIS app, you can select your desired language. The selected language is the one which your app can speak & understand and has nothing to do with the interface language.

    Image 2

  • On top of five existing regions, LUIS is now available in additional 7 regions which improves the network latency and bandwidth. The region selection criteria is available during the app publish.
  • LUIS app can be directly created from the Azure bot service as well, i.e., when you are creating your bot service in the Azure portal, then select the LUIS template for your app which in turn creates the LUIS new app in the luis.ai site (the created new LUIS app will be visible when logged in with the same account as that of the Azure portal and navigate to My apps). This integration of the language understanding with the Azure bot service makes the developer’s job easy in creating sophisticated bots.
  • Apart from integrating the LUIS with the bot framework, LUIS can be used with the Microsoft cognitive services as well. When we integrate the Bing speech API in our bot. then when the user gives the voice input then the Bing Speech API converts the speech to text and then sends the response to the LUIS which is further processed and taken care in the LUIS dialog.

Prebuilt Domain Models

This is the new feature introduced which helps to build and deploy a solution more quickly. Some of the pre-built domains are calendar, camera, entertainment, fitness, gaming, music, movietickets, etc. When you select a prebuilt domain, let’s say Taxi, then all the related intents, entities, utterances will be added to your app.

Image 3

The entities are:

Image 4Image 5

The intents provided are:

Image 6

Utterances provided for an intent are:

Image 7

When you observe the intents and entities of your app assets, against each intent/entity, you can see the number of the utterances that are being consumed by that particular intent/entity. This availability of the utterances helps the developers a lot in building the apps quickly which also reduces the effort of the navigation.

We selected the Taxi domain for building our app but if we need some of the calendar intents or entities, then there is a provision over the intent/entities section to add some of the prebuilt domain entities/intents (please re-visit the above pictures)

On similar lines, you can make use of the different prebuilt domain models available as per your choice and need.

Conclusion

Microsoft keeps on updating their APIs to make the life of the consumers easier. The new user interface of the LUIS gives developers more flexibility in training, changing, publishing the app rapidly.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
-- There are no messages in this forum --