What is Language Understanding (LUIS)?

Language Understanding (LUIS) is a cloud-based service that applies custom machine-learning to a user's conversational, natural language text to predict overall meaning and pull out relevant, detailed information.

Your client application sends user text of what a person wants in their own words to LUIS in an HTTP request. LUIS applies your learned model to the natural language to make sense of the user input and returns a JSON format response. Your client application uses the JSON response to fulfill the user's requests.

Conceptual imagery of LUIS working with Chat bot

What is a LUIS app?

A LUIS app is a domain-specific language model you design. You can start your app with a prebuilt domain model, build your own, or blend pieces of a prebuilt domain with your own custom information.

A model begins with a list of general user intentions, called intents, such as "Book Flight" or "Contact Help Desk." You provide user's example phrases, called utterances for the intents. Then mark significant words or phrases in the utterance, called entities.

Prebuilt domain models include all these pieces for you and are a great way to start using LUIS quickly.

Once your model is built and published, your client application sends utterances to the LUIS endpoint API and receives the prediction results as JSON responses.

Example of JSON endpoint response

The JSONe endpoint response, at a minimum contains the query utterance, and the top scoring intent.

{
  "query": "I want to call my HR rep.",
  "topScoringIntent": {
    "intent": "HRContact",
    "score": 0.921233
  },
  "entities": [
    {
      "entity": "call",
      "type": "Contact Type",
      "startIndex": 10,
      "endIndex": 13,
      "score": 0.7615982
    }
  ]
}

What is a LUIS model?

A LUIS model includes:

  • intents: categories of user intentions (intended action or result)
  • entities: specific types of data in utterances such as number, email, or name
  • example utterances: example text a user enters in your client application

A client application but be anything but typically it has a conversational interaction between a user and the software such as a chat bot, virtual reality game, or a digital personal assistant such as Cortana.

Intents

An intent, short for intention, is a purpose or goal expressed in a user's utterance, such as booking a flight, paying a bill, or finding a news article. You create an intent for each action. A travel app may define an intent named "BookFlight." Your client application can use the top scoring intent to trigger an action. For example, when "BookFlight" intent is returned from LUIS, your client application could trigger an API call to an external service for booking a plane ticket.

Entities

An entity represents detailed information found within the utterance that is relevant to the user's request. For example, in the utterance "Book a ticket to Paris", a single ticket is requested, and "Paris" is a location. Two entities are found "a ticket" indicating a single ticket and "Paris" indicating the destination.

After LUIS returns the entities found in the user’s utterance, your client application can use the list of entities as parameters to a triggered action. For example, booking a flight requires entities like the travel destination, date, and airline.

LUIS provides several ways to identify and categorize entities.

  • Prebuilt Entities LUIS has many prebuilt domain models including intents, utterances, and prebuilt entities. You can use the prebuilt entities without having to use the intents and utterances of the prebuilt model. The prebuilt entities save you time.

  • Custom Entities LUIS gives you several ways to identify your own custom entities including machine-learned entities, specific or literal entities, and a combination of machine-learned and literal.

Example utterances

An example utterance is text input from the user that your app needs to understand. It may be a sentence, like "Book a ticket to Paris", or a fragment of a sentence, like "Booking" or "Paris flight." Utterances aren't always well-formed, and there can be many utterance variations for a particular intent. Add 10 to 20 example utterances to each intent and mark entities in every utterance.

Example user utterance Intent Entities
"Book a flight to Seattle?" BookFlight Seattle
"When does your store open?" StoreHoursAndLocation open
"Schedule a meeting at 1pm with Bob in Distribution" ScheduleMeeting 1pm, Bob

Improve prediction accuracy

After your application is published and receives real user utterances, LUIS provides several methods to improve prediction accuracy: active learning of endpoint utterances, phrase lists for domain word inclusion, and patterns to reduce the number of utterances needed.

Active learning

In the active learning process, LUIS allows you to adapt your app to real-world utterances by selecting utterances it received at the endpoint for your review. You can accept or correct the endpoint prediction, retrain, and republish. LUIS learns quickly with this iterative process, taking the minimum amount of your time and effort.

Phrase lists

LUIS provides phrases lists so you can indicate important words or phrases to your model domain. LUIS uses these lists to add additional significance to those words and phrases that would otherwise not be found in the model.

Patterns

Patterns allow you to simplify an intent's utterance collection into common templates of word choice and word order. This allows LUIS to learn quicker by needing fewer example utterances for the intents. Patterns are a hybrid system of regular expressions and machine-learned expressions.

Using LUIS

You can build your LUIS app from the www.luis.ai website or your can build your app programmatically with the authoring APIs. Access your published LUIS app by the query endpoint.

What technologies work with LUIS?

Several Microsoft technologies work with LUIS:

  • Bing Spell Check API provides text correction before prediction.
  • Bot Framework allows a chat bot to talk with a user via text input. Select 3.x or 4.x SDK for a complete bot experience.
  • QnA Maker allows several types of text to combine into a question and answer knowledge base.
  • Speech converts spoken language requests into text. Once converted to text, LUIS processes the requests. See Speech SDK for more information.
  • Text Analytics provides sentiment analysis and key phrase data extraction.

Next steps

Create a new LUIS app.