1. Overview of LUIS
Lauguage Understanding intelligent Service(LUIS) is a service that makes it possible for your application to understand the what the user wants in their own word. It uses machine learning algorithms to help developers create apps that could receive input from user in the form of natural language and extract meaning from it.
A LUIS appliaction that interacts with the user can pass the user input to a LUIS service and receive relevant information back.
As you know MS Bot Framework works with LUIS to allow a bot to converse with a user through a text input
Bing Speech API converts voice communication into text format which can be passed on to LUIS for processing.
2. What is a LUIS App
A LUIS application is a domain-specific language model you can build and tailor to you particular needs. You can use an existing modelor create your own model from the scratch. You can even put pieces of a prebuilt domain together and create a customized model.
What is a Model? A model contains a list of general user intention such as the following:
“Book a Meeting”
“Create an Appointment”
“Send an Email”
Then for each intention, you need ot provide example phrases that may correspond to it. The uttrances are labeled with specific details you need LUIS to extract from it. For example, an uttrance that would correspond to the last intent is “Book a meeting for tommorrow by 5 pm with Jones”
However there is already prebuild domain models, that could fit your needs.
After the model is designed, it is trained and published. Then it is ready to recieve and process uttrancess. The LUIS app recieves uttrances in the form of HTTP requests and provided response of user’s intentions.
The LUIS app then sends the uttrance to LUIS service which processes it returns an evaluation as JSON object.
You application the takes action base on this evaluation.
3. Key Concepts of LUIS
We would examine three key concept used in LUIS.
Intents: This represents action which the user wants to carry out.The intent is an objective that is expressed in the user’s input such as booking a meeting, sending an email or finding a news item. You need to define and name the intents that correspond to these actions. For example “BookMeeting”, “SendEmail” etc
Utrances:An uttrance is a text inputed by user that your application needs to understand and process. There can be many different variations of an uttrance with the same intent.
Entities: An entity represents particular information that is relevant to the uttrance. Entities are normally extracted from uttrances.
For example, in the uttrance, “Book a meeting with John”, John is an entity which would actuall be a person in your contacts list. LUIS recognized and labels entities recognized from the user’s uttrance and in this way is able to help the application choose how to respond.
4. How to Get LUIS
There a two ways to build the LUIS model
Through the LUIS website
Combination of both
Using both of this methods, you can still have complete access to you model and make neccessary modification according to your needs. Additionally, you can use a combination of the two methods. Once your model is completed and published, then you can use it for you client application. This you can do by passing uttrances to it and receiving the JSON object results via enpoint APIs.
5. Creating Your LUIS Model. How to Start
The first step is by making a list of the intents that your client application can resolve. You can reveiw what intents are here.
After idendifying the intents, then create sample uttrances that LUIS needs to map to your intents. For instance, the uttrance “Book a meeting with John at 5 pm” maps to the intent “BookMeeting”.
Next you need to label the differen parts of the uttrance that is relevant to your application domain as entities and set a type such as date and person.
Normally, an intent is used to trigger an action while entity are given as arguments to execute an action.
There are three ways to identify entities
- LUIS Prebuilt Entities: There are several domain models available in LUIS. Each of these models include intents, uttrances and prebuild entities. For a beginner it is safe to use the entities available here than to build your own from the scratch
- Custom Entities: In this case, you have to option of identifying your own custome entities
- Phrases in LUIS: Phrase list is provided by LUIS which can also be useful in identifying entities
6. Improving Performance
Just like in any other machine learning system, the model created in LUIS could be improved with time through the learning process. This means that as users enter real uttrances LUIS could use these uttrances to train your model to improve identification using active learning.
This means that if uttrances are entered that LUIS is not sure on the exact resolution, you can help by providing labels for them. This can be done iteratively and over the time the performance of your model continues to improve
7. Final Notes
What we have discussed in whole lot of theories which is important for you to know before we start building LUIS apps.
Howevers since successully creating a working LUIS model and app depends on a clear understanding of these concepts, I would recomment, you take some more time to read creafully again, making notes of the important points in this lesson.
Then we can go on to How to Build LUIS app.
Thank you for reading! Please do leave a comment using the form at the left side of this page that says “Your Opinion Matters”