Every time I book a flight from an airline website those input boxes, controls and dropdowns really annoy me epically when I need to click many times to find the date from the calendar control. It makes me thinks if there is a conversational interface with natural language processing ability will be fantastic.

What it does

Basically, it provides a conversational interface to allow the users to query flight information. Highlight features:

  • Conversational interface which is quite intuitive and can integrate with other services
  • Much easier to chose the date, like you can say next Monday, 12 Dec, 20 days later or so.
  • Extract as much as information from one input, e.g. "I would like to book a flight from AKL to LAX departs on next Sunday returns on 12 Sep Economy"

How I built it

By using the AWS Lex and Lambda server I managed to build an NLP service with a backend which translates the user input to query parameters. Then a 3rd party API is called to retrieve the flight information. By integrating with Slack, a more intuitive interface is build to accept user input and display rich information such as attachments, response cards etc.

Challenges I ran into

  • Understanding the data flow of Lex service
  • Embedding multiple slots into utterance - the error not quite clear while the format is not correct especially no space left from {slot}and texts
  • Looks like sometime Lex clear slot unexpectedly
  • Make the NLP more accurate
  • Make the Slack message more readable

Accomplishments that I'm proud of

  • It can take a long sentence as input and extract multiple slots which are very convenient
  • It's working and fully integrated with Slack
  • It solved my real problem.

What I learned

How to build a chatbot in a cloud native environment. AWS lex service - how it works, tips and tricks. AWS Lambda service and Slack integration.

What's next for aws flight booking bot

  • DynamoDB or Redis to cache the request
  • Build user identity so the user can store preference etc
  • Make a mobile app work with the bot and make use of Polly
  • Integrate with airline websites to make real reservations.
  • More features and bugfixes.
Share this project: