Nlu Editor
Natural Language Understanding (NLU) is the branch of artificial intelligence that deals with the understanding of human language by machines. NLU algorithms can be trained to perform tasks such as language translation, sentiment analysis, question answering, intent extraction...
In the VDK, we use NLU to perform intent and slot extraction from a text most commonly received as a result of a prior speech recognition process.
The Nlu Editor widget provides an intuitive graphical interface to create a model able to perform such a task and to test it.
In the VDK, only a single intent can be extracted at a time.
Providing good training data for a NLU model can sometimes be quite tedious.
You can refer to How-to: Design your NLU Data to learn pro tips and best practices on how to create a good NLU model.
http://youtube.com/watch?v=K2EvyQkV1Gs&list=PLxpkg3kmxJgii81jzA9lgohtwcxSm0SHBhttps://www.youtube.com/watch?v=QfkJ4ulCvKM&list=PLxpkg3kmxJgii81jzA9lgohtwcxSm0SHB
Glossary
Intent
An intent refers to the goal or purpose behind a user's input or request. It is the intended action or meaning behind the words or phrases used in the user's input, which must be recognized and classified correctly to provide an appropriate response or output.
What is the weather like today?
The intent behind this input could be to retrieve the current weather conditions in their location.
Slot
A slot refers to a specific piece of information to extract from a user's input. It is a placeholder for a specific type of data, such as a name, date, or location, to be extracted from the user's input to properly understand the intent behind the input.
I want to book a flight from New York to Los Angeles on May 15th
In this input, we can extract several pieces of information, such as the departure city (New York), the arrival city (Los Angeles), and the departure date (May 15th). Each of these pieces of information can be represented by a slot, such as a "from_city" slot, a "to_city" slot, and a "departure_date" slot, which need to be extracted and labeled correctly in order to understand the user's intent and respond appropriately.
Interface
Placeholder
The first time you arrive in the NLU Editor, you will face this view, meaning your model does not contain any data yet and will invite you to create your first intent!
Link that redirects to the page How-to: Design your NLU Data.
Shortcut to add a new intent.
This area will allow you to train, cancel a training or download a NLU model (note that the download will only appear after your first training). Train a new NLU model will cost you credits and once you run out of them, you will have to reach to Vivoka to buy more and continue training new NLU models. Beware, canceling a training will not refund your invested credits into that specific training.
This button pops up a view to enable you to test the last NLU model you have downloaded (note that it will remain disabled until you download your first model).
Link that redirects to the page How-to: Design your NLU Data.
Intents
The list of all intents you have created so far. You can also filter among those to perform a search and create new ones.
This is where you can specify all your examples for the selected intent (area 1). To input a new one, simply type in the first empty row and press enter to validate your example. If you want to use a slot in your example, type
$
followed by the name of the slot. If this slot does not exists yet, it will be created automatically.Click this button to rename your intent. An intent name has a restricted range of possible characters which is
[A-Za-z0-9_-]
.This button will remove the current selected intent from your model. If an empty slot becomes unused, it will get removed as well. This operation cannot be undone.
Slots
The list of all slots you have created so far. You can also filter among those to perform a search. Slots are created through examples from intents.
This is where you can specify all your entities for the selected slot (area 1). To input a new one, simply type in the first empty row and press enter to validate your example.
This is your slot’s color. It is purely a visual indicator and does not impact in any way your model.
Click this button to rename your slot. A slot name has a restricted range of possible characters which is
[A-Za-z0-9_]
.Click this button to change the color of the current slot. The change will also automatically propagate in the area 1.
This button will remove the current selected slot from your model. If that slot was used in some intent examples, those will also get removed. This operation cannot be undone.
Quick Testing
Once you have successfully trained and downloaded your NLU model, you will be able to test it by clicking the Testing
button at the bottom of the widget.
This is where you can write the sentence you want to test your model against. If you press enter, a test will proceed with your text.
Once the test has finished, you can see in this area which intent has been recognized by the engine. At most one intent will ever get returned by the engine so do not use a multiple intent text such as
turn on the lights and close the door
. In this kind of multiple intent sentence, the main one will only be returned.
The confidence in parentheses will tell you how sure the engine is that the text you typed contains this intent.If your NLU model contains slot, the engine will be able to detect those. The text in bold will be your entity and the one in parentheses will be your slot name.
Export
When exporting your project or installing your project’s resources into your project directory, the following files will be created/copied:
├── config
│ └── vsdk.json
└── data
└── vnlu
└── nlu
└── parsers
└── smart_blender.vum
The configuration block corresponding to our smart blender example will look like this:
"vnlu": {
"nlu": {
"parsers": {
"smart_blender": {
"model": "smart_blender.vum"
}
}
},
"paths": {
"data_root": "../data/vnlu/nlu"
},
"version": "1.0"
}