With Language Understanding Intelligent Service (LUIS), we can build a smart app. By following this tutorial, you should learn how to create a backend AI service which will return you a set of entities and intention in JSON string.
Read more @ www.techconnect.io
By Marvin Heng
Twitter: @hmheng
Blog: www.techconnect.io
Breaking the Kubernetes Kill Chain: Host Path Mount
AI: Together We Make World Smarter With LUIS
1. { } LUIS
Together We
Make World
Smarter with LUIS
Marvin Heng
Twitter : @hmheng
Blog : http://hmheng.azurewebsites.net
Github: https://github.com/hmheng
2. What’s LUIS?
LUIS stands for
Language Understanding Intelligent Service
It is so smart that can take your sentences and interpret it in
terms of intentions they convey and even the entities that are
included in the sentences.
Why LUIS?
FAST SELF-
LEARNING
PRE-BUILT
DOMAINS
MULTI-
LINGUAL
3. Let’s Build Smarter AI with LUIS
1. Logon to https://www.luis.ai and click Sign In on the top
right corner.
1
4. Let’s Build Smarter AI with LUIS
2. Sign in with your Microsoft Account. If you do not have one,
learn how to create one with Azure here.
2
5. Let’s Build Smarter AI with LUIS
3. Welcome to LUIS! A platform that we can gets app smarter.
7. Let’s Build Smarter AI with LUIS
5. Enter Your Favourite App Name and Language/Culture.
Then click Create.
5
8. Let’s Build Smarter AI with LUIS
6. Click the App Name to train and configure.
6
9. Let’s Build Smarter AI with LUIS
7. For your ease, there are plenty of default templates which
can serve your apps’ intentions. However, we learn to create
one manually today.
7
10. Let’s Build Smarter AI with LUIS
8. To begin, click Create an intent which will tell your app to
serve some intentions.
8
12. Let’s Build Smarter AI with LUIS
10. Let’s check all Calendar.Add, Calendar.CheckAvailability,
Calendar.Delete, Calendar.Edit and Calendar.Find, then Save.
10
13. Let’s Build Smarter AI with LUIS
11. Now you should see list of intents being added.
12. Click Entities so we can add some entities that possibly
involved in the message.
11
12
14. Let’s Build Smarter AI with LUIS
13. Check both Calendar.Location and Calendar.Subject. Then
Save.
13
15. Let’s Build Smarter AI with LUIS
14. Now, we should add some custom entity, such as Name.
14
16. Let’s Build Smarter AI with LUIS
15. Also, we should add datetime since it is possibly part of
the Calendar message.
15
17. Let’s Build Smarter AI with LUIS
16. We can map part of the message with the custom entities
that we created just now, then Save it.
16b
16a
16c
18. Let’s Build Smarter AI with LUIS
17. Let’s go to Train & Test and hit Train Application.
17
19. Let’s Build Smarter AI with LUIS
18. It will take little a while to train the app…..
20. Let’s Build Smarter AI with LUIS
19. When done, you should now can try out with some
messages. However, you may notice the result is not capturing
all the entities, such as Name & DateTime.
19b
19a
21. Let’s Build Smarter AI with LUIS
20. You may go to Entities -> Suggested utterances. The
message may need your help to make it even accurate &
smarter! Map Name & datetime, then Save & Re-Train.
20
22. Let’s Build Smarter AI with LUIS
21. Finally, click Publish to bring it to Live!
21
23. Let’s Build Smarter AI with LUIS
22. Let’s copy the endpoint URL and try with some query
message with browser/Postman tool.
22b
22a
24. Let’s Build Smarter AI with LUIS
23. Paste the link with your message behind:
a: EndPoint we copied from the LUIS.AI portal
b: Your possible query message.
4
4
23a
23a
25. Let’s Build Smarter AI with LUIS
24. The result should be returned and telling you about:
a: The Top Scoring Intention – eg. Calendar.Add
b: The possible involved Entities – eg. Name, Date, Location
4
4
24a
24b
26. Let’s Build Smarter AI with LUIS
25. Now you can create an App with Model class and
deserializing the JSON data string to further your
development!
4
4
27. Awesome! Start Building Your AI Now!
Are you interested to know how to build Smart AI App? Let me know!
28. { } LUIS
Together We
Make World
Smarter with LUIS
Marvin Heng
Twitter : @hmheng
Blog : http://hmheng.azurewebsites.net
Github: https://github.com/hmheng