Design with intent and entity models

Important

LUIS will be retired on October 1st 2025 and starting April 1st 2023 you will not be able to create new LUIS resources. We recommend migrating your LUIS applications to conversational language understanding to benefit from continued product support and multilingual capabilities.

Language understanding provides two types of models for you to define your app schema. Your app schema determines what information you receive from the prediction of a new user utterance.

The app schema is built from models you create using machine teaching:

Authoring uses machine teaching

LUIS's machine teaching methodology allows you to easily teach concepts to a machine. Understanding machine learning is not necessary to use LUIS. Instead, you as the teacher, communicates a concept to LUIS by providing examples of the concept and explaining how a concept should be modeled using other related concepts. You, as the teacher, can also improve LUIS's model interactively by identifying and fixing prediction mistakes.

Intents classify utterances

An intent classifies example utterances to teach LUIS about the intent. Example utterances within an intent are used as positive examples of the utterance. These same utterances are used as negative examples in all other intents.

Consider an app that needs to determine a user's intention to order a book and an app that needs the shipping address for the customer. This app has two intents: OrderBook and ShippingLocation.

The following utterance is a positive example for the OrderBook intent and a negative example for the ShippingLocation and None intents:

Buy the top-rated book on bot architecture.

Entities extract data

An entity represents a unit of data you want extracted from the utterance. A machine-learning entity is a top-level entity containing subentities, which are also machine-learning entities.

An example of a machine-learning entity is an order for a plane ticket. Conceptually this is a single transaction with many smaller units of data such as date, time, quantity of seats, type of seat such as first class or coach, origin location, destination location, and meal choice.

Intents versus entities

An intent is the desired outcome of the whole utterance while entities are pieces of data extracted from the utterance. Usually intents are tied to actions, which the client application should take. Entities are information needed to perform this action. From a programming perspective, an intent would trigger a method call and the entities would be used as parameters to that method call.

This utterance must have an intent and may have entities:

Buy an airline ticket from Seattle to Cairo

This utterance has a single intention:

  • Buying a plane ticket

This utterance may have several entities:

  • Locations of Seattle (origin) and Cairo (destination)
  • The quantity of a single ticket

Entity model decomposition

LUIS supports model decomposition with the authoring APIs, breaking down a concept into smaller parts. This allows you to build your models with confidence in how the various parts are constructed and predicted.

Model decomposition has the following parts:

Features

A feature is a distinguishing trait or attribute of data that your system observes. Machine learning features give LUIS important cues for where to look for things that will distinguish a concept. They are hints that LUIS can use, but not hard rules. These hints are used in conjunction with the labels to find the data.

Patterns

Patterns are designed to improve accuracy when several utterances are very similar. A pattern allows you to gain more accuracy for an intent without providing many more utterances.

Extending the app at runtime

The app's schema (models and features) is trained and published to the prediction endpoint. You can pass new information, along with the user's utterance, to the prediction endpoint to augment the prediction.

Next steps