Client Background
Client: A leading tech firm in USA
Industry Type: IT
Services: eCommerce
Organization Size: 40+
Project Objective
Create a Voice and chatbot using AWS lex which can book flights, hotels, cars and book some fun activities in a city.
Project Description
We need to create a voice and chatbot using AWS lex and lambda function. The bot should book a flight, a hotel, and a car by asking some relevant questions to the user like destination, origin, date, etc. We also need to create a combination of all these which can plan the whole trip, flight, hotel, car and book some fun activities.
Our Solution
We have created aws lex intents and lambda functions for all bookings. Intents manage front ends like utterances (user can ask to the bot) and slots (bot replies with relevant questions). Lambda functions manage backend parts like which intent should be triggered if the user says “ book a flight” or “book a hotel” or “book a car”. For search results we have used some external APIs like Amadeus for flight, sabre for hotels and blablacar for car booking. We have modified search results by using Data Analytics (for getting the cheapest and good star flight and hotel), Machine learning (for getting user’s preferences by analyzing user’s history) and NLP (Differentiate search results by text analysis) techniques so users can get the best search results.
Project Deliverables
An aws lex voice and chatbot which can book flight, hotel, car and fun activities. This can be integrated with IOS applications.
Tools used
AWS Lex, AWS Lambda, AWS Cognito, AWS EC2, Google colab, VS code, FAST API, Uvicorn.
Language/techniques used
python, machine learning, data analytics, NLP.
Models used
TfIdf-Vectorizer and cosine similarity
Skills used
Data Analytics, Machine learning, NLP, Python, AWS, REST APIs.
Databases used
MySQL
Web Cloud Servers used
AWS
What are the technical Challenges Faced during Project Execution
- The first challenge we have faced is the integration of AWS lex and lambda functions.
- Amadeus and Sabre APIs data was not in a good format so we have to clean some data and organize it in a usable format.
- We need to make some APIs so we can pass flight or hotel parameters and the APIs will give flight or hotel related data.
- Create a book button in the bot for booking flights, hotel,s and car.
How the Technical Challenges were Solved
- So the integration of AWS lex and lambda function was very tough for us. Because lex uses some intentes to show responses from the lambda function. So we have created different lex intents to pass messages to lex bot from lambda function. And put some good coding to the lambda function so different messages can be handled by different intents.
- For flight, hotel and car search results we were using some external apis like amadeus, sabre and blablacars apis. These APIs have a lot of data and are not in a format we need. So first we cleaned data and then sorted data according to cheaper and best ratings results. We have used the best two results among all the results.
- We cannot use all the machine learning and data analytics part in aws lambda function. So what we did was we created some REST APIs which can handle all the data analytics and machine learning part and we hosted these APIs on AWS EC2 instance. We used these APIs in our lambda functions.
- So Creating a button in a chat bot or voice bot is always so different from providing text messages. For creating a button we used a response card structure in lambda function which can handle button and button related responses.