Microsoft Luis

Language Understanding Cognitive Services

Nandita Hans
3 min readApr 5, 2021

The most comprehensive cloud based services for text understanding and the simplest to use for developers with no AI expertise.

LUIS interacts with the user in the natural language to complete a task

Examples of applications that can be make with the help of Luis are:

  • AI ChatBots
  • Speech Enabled Desktop Application
  • Social Media Apps

Luis

Improves recognition through machine learning and teaching

Extract intents and entities from utterances

Basic Terminology in LUIS

Intents

An intent represents a task or action the user wants to perform.

For eg: A Travel app have following intents

By default a None intent is made which is a fallback intent

There are some pre built intents that LUIS provide by default

Entities

Entities are data you want to pull from the utterance, such as names, dates, product names, or any significant group of words. An utterance can include many entities or none at all.

These are some pre built entities present in LUIS

List Entity

List entity is used to add the list of entities that can be found in an intent

For eg: Create an entity CourseList

Add values in the List

It will be automatically identified in your Intents

Utterances

It is the input from the user that needs to be analysed

To train LUIS to extract intents and entities from them, it’s important to capture a variety of different example utterances for each intent.

Test

You can test your model after training it with multiple intents, entities and utterances

You will get the topic score as well as sentiment and entities related to the sentence

Publish

You can publish your model on staging or on production

You can turn on or off Sentiment Analysis for the Report as per as your requirement and publish the model

Once you publish the model you will get a Query Endpoint which can be appended at the end with the query and you will get a json result corresponding to that Query and the result includes topScore,intents,entities,sentiment analysis(optional) etc.

Now let’s fire the following Query in the API

https://testnandita.cognitiveservices.azure.com/luis/prediction/v3.0/apps/6373702d-1552-4aad-8785-cb4a6d0c47da/slots/staging/predict?subscription-key=f848502a91a946dca396665b0aa3ec3b&verbose=true&show-all-intents=true&log=true&query=What time is science lecture

The JSON Response for the result is

You can clearly see that the response consists of topIntent and respective intents with there scores ,entities and sentiment analysis with it’s score

For more information about LUIS you can refer to this docs

https://docs.microsoft.com/en-us/azure/cognitive-services/luis/

--

--