How To Use Microsoft LUIS With Bot Framework Composer

Here Is A Simple Tutorial To Get You Started With NLU

Introduction

Setup Composer Recognizer

Image for post
Image for post
Composer Has Three Recognizer Types

LUIS File Format

# BookFlight
- I want to book a flight
- I need to book a flight
- book a flight for me please
#FlightDetail
- My family and I want to go on holiday to {toCity=Seattle}
- We are thinking of traveling to {toCity=Denver}
- Our destination will be {toCity=Milan} for our holiday
- We want to visit {toCity=Lisbon}
- On our trip our first stop will be at {toCity=Lisbon}
- We want to travel to {toCity=Lisbon}
Image for post
Image for post
Microsoft Bot Framework Composer LUIS File

Greeting Dialog

Image for post
Image for post
Creating a Bot from Scratch
Image for post
Image for post
Adding a “Send a response” Conversational Node
Image for post
Image for post
Two Dialogs Are Visible: Greeting & BookFlight

Travel Dialog With NLU Integration

Image for post
Image for post
Create a new Dialog on the left and Define the Intent Criteria on the Right
I want to book a flight
- I need to book a flight
- book a flight for me please
Image for post
Image for post
Dialog Flow for Booking a Flight

Application Deployment

Image for post
Image for post
LUIS Credential Window
Image for post
Image for post
Deploy the Composer Application
Image for post
Image for post
LUIS.ai view with the app loaded
Image for post
Image for post
Image for post
Image for post

Bot Framework Emulator

Image for post
Image for post
Emulator View of Our Conversation
Image for post
Image for post
LUIS return JSON

Reservations & Observations

Intents Only

Compound Entities

I would like to take a bus from
{From_City=Madrid}
to
To_City=Lisbon}
tomorrow.

Nested Entities

I would like to take a 
{Travel Detail={Mode=bus}}
from
{Travel Detail={City={From City=Madrid}}}
to
{Travel Detail={City={To City=Lisbon}}}
{Travel Detail={Time Frame=tomorrow}}

Fragmented NLU Model

Training the NLU Model

LUIS Tools

Conclusion

Written by

NLP/NLU, Chatbots, Voice, Conversational UI/UX, CX Designer, Developer, Ubiquitous User Interfaces. www.cobusgreyling.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store