This is my architecture: Chatbot for GlassOn with Amazon Lex

Quyen P.K
SK Geek
Published in
3 min readJun 28, 2021

Nowadays, customer service has become an important part of any company in the world. Missing any question from customers can affect to company’s revenue. To automatically answer progress and improve reply speed, many companies have chosen chatbot as an option. And in my company Spring Knowledge Global, we also create our own chatbot for the GlassOn product. This story will show you the progress of how we create it.

What is GlassOn?

GlassOn is my company product that helps people can try on any eyewear with their smartphone or browser powered by AR technology. Our customers come from any country in the world, and because we don’t have a customer service. So we decide to create a chatbot that helps fast reply to any customer question and reduces human cost.

What is Amazon Lex?

Amazon Lex is an AWS service for building conversational interfaces into your applications powered by Amazon Alex, it supports both text and voice.

Amazon Lex provides powerful concepts: automatic speech recognition (ASR), natural language understanding (NLU), and UI tools to help developers building a user-friendly chatbot in minutes.

To begin with Amazon Lex, you need to understand some definitions that share with other chatbot platforms:

  1. Intent: Intent refers to the customer’s goal when typing in a question or comment.
  2. Utterance: Spoken or typed phrases that invoke your intent.
  3. Slot: Slots are input data from customers to fulfill the intent.
  4. Fulfillment: Data return from chatbot based on user request.

A sample for customer question

With Amazon Lex, you just simply define all intent, utterances, slots, and fulfillment follow your business, then voilà your bot is ready. I don’t want to make a demo in detail, but this is a great article about Amazon Lex you can refer to.

And now, time to showing the architecture

Architecture for GlassOn chatbot

Architecture for GlassOn chatbot powered by AWS

Components used:

  • API Gateway: Provide API endpoints for GlassOn Bot UI that can interact with chatbot hosted in AWS Lex.
  • Lex Runtime Lambda: Help handle request from the user and call Amazon Lex
  • Amazon Lex: This contains our chatbot logic
  • Fulfillment Lambda: Help custom fulfillment before sending it to the user. We also use it to integrate Amazon Lex with others AWS services like DynamoDB, SES, SNS, S3, … for advanced usage.
  • Cloudwatch: To store conversation logs. You can use that logs to review the performance of your bot and troubleshoot issues with conversations.
  • Stream Logs Lambda: Stream conversation logs from Cloudwatch, transform them before store meaningful data to Elasticsearch Service.
  • Elasticsearch Service: To analyze conversations, get needed data like what is the most asked topic? what are topics our bot can’t understand? … From that, we can improve our chatbot intelligence.

Summary

Thank you for reading my story. I hope it can help you with some understanding about chatbot. If you have any questions, don’t hesitate to leave a comment. I’m happy to answer it.

--

--