Add intents to your LUIS app to identify groups of questions or commands that have the same intention.
Intents are managed from top navigation bar's Build section, then from the left panel's Intents.
Create an app
Sign in to the LUIS portal.
Select Create new app.
Name the new app
MyHumanResourcesApp. Select the English culture. The description is optional.
The app opens to the Intents list.
On the Intents page, select Create new intent.
In the Create new intent dialog box, enter the intent name,
GetEmployeeInformation, and click Done.
Add an example utterance
Example utterances are text examples of user questions or commands. To teach Language Understanding (LUIS), you need to add example utterances to an intent.
On the GetEmployeeInformation intent details page, enter a relevant utterance you expect from your users, such as
Does John Smith work in Seattle?in the text box below the intent name, and then press Enter.
LUIS converts all utterances to lowercase and adds spaces around tokens such as hyphens.
Intent prediction discrepancy errors
An utterance in an intent might have an intent prediction discrepancy between the selected intent and the prediction score. LUIS indicates this discrepancy with a red box around the Labeled intent on the row of the example utterance.
In the top navigation, select Train. The prediction discrepancy is now gone.
Add a custom entity
Once an utterance is added to an intent, you can select text from within the utterance to create a custom entity. A custom entity is a way to tag text for extraction, along with the correct intent.
Select the word,
Seattle, in the utterance. Square brackets are drawn around the text and a drop-down menu appears.
This example selects a single word to mark as an entity. You can mark single works and phrases as entities.
In the top text-box of the menu, enter
Location, then select Create new entity.
In the What type of entity do you want to create? pop-up window for entity creation, validate that the entity name is Location, and the entity type is Simple. Select Done.
Entity prediction discrepancy errors
The entity is underlined in red to indicate an entity prediction discrepancy. Because this is the first occurrence of an entity, there are not enough examples for LUIS to have a high-confidence that this text is tagged with the correct entity. This discrepancy is removed when the app is trained.
The text is highlighted in blue, indicating an entity.
Add a prebuilt entity
For information, see Prebuilt entity.
Using the contextual toolbar
When one or more example utterances is selected in the list, by checking the box to the left of an utterance, the toolbar above the utterance list allows you to perform the following actions:
- Reassign intent: move utterance(s) to different intent
- Delete utterance(s)
- Entity filters: only show utterances containing filtered entities
- Show all/Errors only: show utterances with prediction errors or show all utterances
- Entities/Tokens view: show entities view with entity names or show raw text of utterance
- Magnifying glass: search for utterances containing specific text
Working with an individual utterance
The following actions can be performed on an individual utterance from the ellipsis menu to the right of the utterance:
- Edit: change the text of the utterance
- Delete: remove the utterance from the intent. If you still want the utterance, a better method is to move it to the None intent.
- Add a pattern: A pattern allows you to take a common utterance and mark replaceable text and ignorable text, thereby reducing the need for more utterances in the intent.
The Labeled intent column allows you to change the intent of the utterance.
Train your app after changing model with intents
Learn more about adding example utterances with entities.