0% found this document useful (0 votes)
48 views25 pages

Digital Assistant for Travel Booking Phase I

NotSnapTravel is developing a digital assistant for travel booking that utilizes natural language processing to extract flight, hotel, and car rental information from user queries. The first phase involves creating a proof of concept model that classifies user intent and recognizes relevant entities using techniques like transfer learning and named entity recognition. Future steps include improving the model, integrating it with a travel API, and deploying it on platforms like Slack.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views25 pages

Digital Assistant for Travel Booking Phase I

NotSnapTravel is developing a digital assistant for travel booking that utilizes natural language processing to extract flight, hotel, and car rental information from user queries. The first phase involves creating a proof of concept model that classifies user intent and recognizes relevant entities using techniques like transfer learning and named entity recognition. Future steps include improving the model, integrating it with a travel API, and deploying it on platforms like Slack.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Development of a Digital

Assistant for Travel


Booking - Phase I
By: Anthony Leung
Agenda

1. Overview
2. Methodology & Results
a. Proof of Concept Model
3. Development Demo
4. Summary and Next Steps

2
1 OVERVIEW
Product Introduction
Development Plan
Product Introduction
NotSnapTravel wants to create a digital assistant (i.e., chatbot) that
allows users to query the following through conversation:

FLIGHT HOTEL CAR


PRICES BOOKINGS RENTALS

4
Development Plan
2020.01.31 20XX

Phase 1 Phase 2

Create a proof of concept Interface model with an API


model that can extract relevant and deploy it in a suitable
flight information from platform (e.g., Slack).
conversational text.

5
Development Plan
THIS PRESENTATION 20XX

Phase 1 Phase 2

Create a proof of concept Interface model with an API


model that can extract relevant and deploy it in a suitable
flight information from platform (e.g., Slack).
conversational text.

6
2
METHODOLOGY &
RESULTS
Natural Language Understanding
NLP Transfer learning (ULMFit)
Named Entity Recognition & Phrase Matching
Development Toolbox

Experiment/
Prototype Deep learning
environment modeling

Data
manipulation NLP

8
How does the chatbot know
?
what to respond to the user?
NLU: What is the intent when we say stuff?

● Natural Language Understanding:


The ability to interpret text.

SPEECH: “I am looking for one-way flight


from Toronto to Tokyo, leaving on Feb 6”

INTENT: SearchFlightPrice

10
Classification: Associating speech with intents

X_input =
“Looking for CLASSIFICATION
one-way flight MODEL
from Toronto to
Tokyo on Feb 6”

Y_pred = RESPONSE
“SearchOneWayFlight” FETCHER

11
Dataset size of 236 across 8 different intents
Intent Count
SearchOneWayFlight 41
SearchHotelPrice 37

SearchCarRentalPrice 35

Greeting 33

Goodbye 26

GiveThanks 25

SearchRoundTripFlight 24

Help 15

Total 236

12
Challenge: Obtaining an accurate model
with a small corpus of travel queries.
!?
How can we obtain one in a feasible
manner?
NLP Transfer Learning: ULMFit
● Universal Language Model Fine-tuning
(ULMFit) [*]
● A transfer learning approach to text
classification.
● Beneficial for tasks with small datasets
(i.e., it’s fast with great accuracy!).
● Can be perform on fastai.

[*] J. Howard & S. Ruder, arXiv preprint:1801.06146 (2018).


14
NLP Transfer Learning: ULMFit

[*] J. Howard & S. Ruder, arXiv preprint:1801.06146 (2018).


15
Training Datasets for LM and NN
a) LM Pre-training:
● Utilize the AWD-LSTM[**] pretrained model.

b) LM Fine-tuning:
● “General-Chat-Log-Telegram” (13,207 sentences) +
Present dialogues w/o intents (236 sentences).
c) Classification fine-tuning:
● Present dialogues w/ intents (236 sentences).

[**] S. Merity, N. S. Keskar, R. Socher, arXiv preprint:1708.02182 (2017)

16
Overall intent classification accuracy: 91%
Intent Accuracy

SearchRoundTripFlight 100%

SearchCarRentalPrice 100%

Greeting 100%

Goodbye 100%

SearchOneWayFlight 92%

SearchHotelPrice 83%

Help 83%

GiveThanks 78%

17
Chatbot blueprint

X_input =
“Looking for CLASSIFICATION
one-way flight MODEL
from Toronto to
Tokyo on Feb 6”

Y_pred = RESPONSE
“SearchOneWayFlight” FETCHER

18
? How can the chatbot recognize
locations and dates from text?
Named entity recognition (NER):
Recognizing places, dates, etc.

● Utilize spaCy library.

? ● E.g., “Looking for one-way flight


from Toronto to Tokyo on Feb 12”

Which one is origin and


destination?

20
How can the chatbot distinguish
?
between origin and destination?
Phrase Matcher: Match sequence of
tokens based on pattern rules
● Can combine Parts-of-Speech tags and NER labels.

# Pattern: “from [this loc]”


start_loc = [{‘LOWER’: ‘from’},
{‘ENT_TYPE’: ‘GPE’}
]
# Pattern: “to [that loc]”
end_loc = [{‘LOWER’: ‘to’},
{‘ENT_TYPE’: ‘GPE’}
]

22
DEVELOPMENT
3
DEMO
(Subject to Changes)
SUMMARY AND
4
NEXT STEPS
Summary and Next Steps
● Transfer learning (ULMFiT) was used to train a neural network that
can classify speech intent.
● Relevant entities of travel queries are extracted by using NER and
can be differentiated by Phrase Matching.
● Next Steps:
○ Further improve the speech intent classifier by including
more dialogue and fine-tuning hyperparameters.
○ Interact chatbot model with a travel API.
○ Deploy chatbot onto a platform (e.g., Slack).

25

You might also like