A machine learning-based service to build natural language into apps, bots, and IoT devices. Quickly create enterprise-ready, custom models that continuously improve.
1. Language Understanding
Intelligent Service
BY MUHAMMAD BILAL AMJAD
CEO INSTACARE PVT LTD | CEO ATTRAYNT DESIGNS PVT LTD
MICROSOFT MOST VALUABLE PROFESSIONAL
Mentor LMKT Spark/Microsoft AppFactory Program
2. www.bilalamjad.net
WHAT IS LUIS
Language Understanding Intelligent Service
(LUIS) enables developers to build smart
applications that can understand human
language and respond accordingly to user
requests.
3. www.bilalamjad.net
Understanding the need
• Scenario 1: How Do You Communicate With a Web Application?
• In a web application, you search for a functionality in the menu. The menu, menu
items, screen layout, and navigation vary for each application.
• Before you use any application, you need to familiarize yourself with the menu
items and the navigation.
• The same functionality may have different names in different applications. The UI
will be updated from time to time as part of enhancements. Thus, learning to use
a web application is a continuous process.
4. www.bilalamjad.net
Example
• For example, see the following screenshots of a few online pizza sites. They
provide 90% similar functionality but have only 10% similar user interfaces.
5. www.bilalamjad.net
Scenario 2
"How do you communicate with humans in any business?"
You ask. It is the same everywhere, whether it is a bank, retail, or a hospital. There
is no learning or training involved.
6. www.bilalamjad.net
Scenario 2: Continued
• What if you could achieve the same with software? Imagine the usability and
comfort levels this would bring. It takes the user experience to a different level.
• Rather than human, the software will be trained to understand the intent and
provide the requested data. It will keep learning from user interactions and
provide better service over time.
• This need for software that can understand human language has been around for
a long time.
7. www.bilalamjad.net
How Do You Communicate with a bot?
1. You speak or type.
2. It is the same way you
communicate with any kind
of business.
3. The bot understands your
language and gets the intent.
4. Based on the intent, it asks
for the required inputs and
provides the required service.
5. This is possible only if the
software has the ability to
understand human language.
8. www.bilalamjad.net
Introduction to cognitive services
• Read the following sentences:
• What is your name?
• Your name?
• Your good name, please?
• Name?
• I am Bilal. You?
• How do I call you?
• Sorry. I don’t remember your name.
• Sorry. I don’t remember you.
• My bad. Not able to recollect your name.
• May I know your name?
• Myself Bilal. You?
• Your name, please?
Observation
If you observe, there is so much
variation in the above sentences but
we can still understand the intent,
which is to know the name of the
person.
This kind of human intelligence like
understanding language, identifying
a picture, predicting — among other
mental capabilities — is cognitive
intelligence.
10. www.bilalamjad.net
LUIS
• LUIS is a service that provides a language understanding cognitive intelligence to
bots or any other application.
• LUIS uses the power of machine learning to solve the difficult problem of
extracting meaning from natural language input so that your application does not
have to. Any client application that converses with users, like a dialog system or a
chatbot, can pass user input to a LUIS app and receive results that provide natural
language understanding.
• LUIS is a service developed by Microsoft that has algorithms to understand
human language and come up with intents that can be used to execute specific
commands/code snippets in the client application.
11. www.bilalamjad.net
LUIS APP (www.luis.ai)
• A LUIS app or LUIS model is defined by a developer for a specific application/domain.
• The output of a LUIS app is a web service with an HTTP endpoint that you reference from your
client application to add natural language understanding to.
• The user utterance is the input.
• Intents and entities are returned to the client application.
• The client application can then take appropriate action based on the user intentions that LUIS
recognizes.
12. www.bilalamjad.net
Intent
• Intents are similar to verbs in a sentence.
• An intent represents actions the user wants to perform.
• It is a purpose or goal expressed in a user's input, such
as booking a flight, paying a bill, or finding a news article.
• You can define a set of named intents that correspond to
actions users want to perform in your application.
• A travel app may define an intent named "BookFlight,”
which LUIS extracts from the utterance "Book me a
ticket to Paris."
• A maximum of 80 intents is allowed in a LUIS model.
13. www.bilalamjad.net
Intents Example
• For example, all the following questions (utterances), which do not appear similar in any way,
have only one intent:
To know whether the current user licenses quota has exceeded the upper limit.
• Were there any issues with user quota exceeding the limit?
• How was user quota utilization?
• User quota exceeded?
• Any instants when user quota exceeded?
• How many times user quota exceeded?
• Exceeded user quota count?
• How many times did the user quota get exceeded?
• License limit exceeded events.
• Get the quota exceeded events.
14. www.bilalamjad.net
Utterance
• An utterance is a textual input from the user that the app needs to interpret.
• It may be a sentence, like "Book me a ticket to Vizag" or a fragment of a sentence,
like "Booking" or “Vizag flight."
• Utterances are not always well-formed and there can be many utterance
variations for a particular intent.
• The maximum length of an utterance is 500 characters.
15. www.bilalamjad.net
Entity
• If intents are verbs, then entities are nouns.
• An entity represents an instance of a class of object that is relevant to a user’s
intent.
• Entities are parameters required to process the user request.
• In the utterance, "Book me a ticket to Vizag," “Vizag" is an entity of type location.
• By recognizing the entities that are mentioned in the user’s input, LUIS helps you
choose the specific actions to be executed to fulfill an intent.
• A maximum of 30 entities is allowed in a LUIS model.
16. www.bilalamjad.net
Entity - Example
• For example, your intent is to find service tickets raised for each company. The
company will be a required parameter for you and will be defined as an entity in
LUIS Model.
• The utterance, "How many service tickets were raised for [Company]?" could identify all the
following queries from the user. Adequate training is required to achieve this.
• How many service tickets were raised for HP company?
• How many service tickets were raised for Sony company?
• How many service tickets were raised for TCS company?
• How many service tickets were raised for ABC company?
17. www.bilalamjad.net
Types of Entities
1. Prebuilt
• These are built-in types that represent common concepts like dates, time, and geography. These
do not count towards the maximum number of entities you may use in your LUIS app.
• Example: ordinal, datetimeV2, age, and so on.
• Custom
• There are many types of custom entities.
• Simple
• A simple entity is a generic entity that describes a single concept. These count towards the maximum
number of entities you may use in your LUIS app.
• Example: company, travel agency, and so on.
• Book my travel through Gobibo travel agency.
• Please book my travel with MakeMyTrip agency.
• Arrange my travel with Yatra travel agency.
• Prefer to book my travel through ClearTrip.
18. www.bilalamjad.net
List Entities - Types of Entities Continued
• List entities represent a fixed set of synonyms or related words in your system. Each list entity
may have one or more synonyms.
• They are not machine-learned and are best used for a known set of variations on ways to
represent the same concept.
• List entities do not have to be labelled in utterances or trained by the system.
• A list entity is an explicitly specified list of values.
• Unlike other entity types, LUIS does not discover additional values for list entities during training.
Therefore, each list entity forms a closed set.
• Your app may use up to 50 list entities, and they do not count toward the maximum number of
list entities you may use, which is 30. Each list can contain up to 20,000 items.
19. www.bilalamjad.net
Hierarchal Entities - Types of Entities Continued
• A hierarchical entity defines a category and its
members. It is made up of child entities that form
the members of the category.
• A hierarchical entity can consist of up to ten child
entities. These count towards the maximum number
of entities you may use.
• For example, in a travel agent app, you can add
hierarchical entities like Location, including
FromLocation and ToLocation, as child entities that
represent origin and destination locations.
• Book a cab from Faisalabad to Lahore
• Book a cab from my home to Faisalabad
20. www.bilalamjad.net
Composite Entities - Types of Entities Continued
• A composite entity is made up of other entities that form
parts of a whole.
• A composite entity can consist of up to 20 child entities.
These count towards the maximum number of entities you
may use.
• For example, to book a flight, the inputs required can be
travel date, travel class, location, number of travelers, and
so on.
• A composite entity “FlightBookingInputs” can be defined
composing all the entities for number of travelers, travel
class, travel date, from location, to location, and so on.
• Book a flight ticket for 3 members in economy on 01 - sep
from hometown Islamabad to Lahore
• Book a flight for two in executive from Lahore to Karachi
next monday
22. www.bilalamjad.net
Conclusion
LUIS brings in artificial intelligence (AI) to applications so that computers and
humans can speak with each other seamlessly. It is built on machine learning and
complex algorithms. It will continue to gain momentum and transform business in
the upcoming years.
23. www.bilalamjad.net
Reach Me Out
Email: muhammadbilalamjad@live.com
LinkedIn: https://www.linkedin.com/in/muhammadbilalamjad/
Facebook: https://facebook.com/bilal.amjad
Youtube: https://www.youtube.com/channel/UCCSbtINrNnCX2je_vfn1NqQ