Enhancing Customer Experience with GenAI Applications: Harnessing the Power of OpenAI LLMs, AWS Kendra, AWS Transcribe, and AWS Polly Services

Chandra Manohar
3 min readOct 30, 2023

--

Introduction:

In this blog, we will explore the creation of GenAI applications that significantly enhance the customer experience by leveraging OpenAI’s Large Language Models (LLMs) through their APIs, as well as key AWS services like Amazon Kendra, AWS Transcribe, and AWS Polly. Additionally, we’ll discuss the pivotal role of AWS S3 and In-Memory Cache for storing indexed data, chat history, and serving the GenAI application’s various functions.

The Process Flow:

GenAI Application using OpenAI LLMs & AWS Services

Let’s walk through the process flow from the user’s perspective:

1. Users initiate requests to the GenAI application via different channels, such as voice, chat, registered mobile numbers, or the application’s website.

2. The GenAI Exchange module identifies the user’s request and forwards it to the Authentication and Authorization module for validation, as well as to identify the user’s persona. Personas can range from HR-related queries to finance-related ones, allowing for personalized responses.

3. If the GenAI endpoint channel is a voice bot, the GenAI Exchange module employs AWS Transcribe for voice-to-text conversion and AWS Polly for text-to-voice conversion.

4. The GenAI Exchange module queries the AWS Kendra index service using the user’s request, and the results, along with relevant document excerpts, are relayed back to the GenAI Exchange module.

5. The overall GenAI application, including interactions with endpoints, can be developed using ReactJS and Java.

6. The GenAI Exchange module sends the AWS Kendra response to OpenAI LLMs for contextualization and generating concise responses to user requests.

7. The LLM-generated responses are then returned to users. In the case of voice bot channels, these responses are converted into voice messages using AWS Polly.

8. Documents, FAQs, product catalogues, and other content are fed into AWS Kendra for searching and indexing, and they are stored in AWS S3. In-memory cache is also utilized for quicker response times, and chat history is stored within this layer.

Services Overview:

Here’s a brief overview of the important services used in creating GenAI applications:

AWS Kendra: Kendra service provides the capabilities such as,

  • Easy-to-use enterprise search service powered by Machine Learning (ML).
  • Implement a unified search experience quickly across multiple structured and unstructured content repositories.
  • Uses natural language processing (NLP) to get highly accurate answers without the need for machine learning (ML) expertise.
  • Fine-tune search results based on content attributes, freshness, user behaviour, and more.

AWS Transcribe: This service automatically converts the speech to text. Amazon Transcribe is an automatic speech recognition service that makes it easy to add speech to text capabilities to any application. Transcribe’s features enable to ingest audio input, produce easy to read and review transcripts, improve accuracy with customization, and filter content to ensure customer privacy.

AWS Polly: This service provides high-quality, natural-sounding human voices in dozens of languages. Amazon Polly provides an API that enables you to quickly integrate speech synthesis into your application. You simply send the text you want converted into speech to the Amazon Polly API, and Amazon Polly immediately returns the audio stream to your application so your application can begin streaming it directly or store it in a standard audio file format, such as MP3.

OpenAI LLMs: OpenAI provides GPT-3 series access to LLM using API access which revolutionized the field of natural language processing (NLP). These models are capable of generating human-like responses to a variety of prompts, making them a valuable asset for businesses.

Use Cases:

GenAI applications have a multitude of use cases, including:

  • Virtual Assistants and Smart Voice/Chat Bots with Conversational AI Capabilities
  • Handling User Requests, including Dialogue State Management for FAQs, Open Domain Questions & Answers, and Backend Application Responses
  • Building Domain-Specific Knowledge Databases for HR, Finance, E-Commerce, and more
  • Integration with Phone Gateways for communication through Registered Mobile Numbers

Conclusion:

Building conversational AI bots with GenAI applications has become more accessible than ever, thanks to AWS Kendra, OpenAI’s GPT-3 series LLMs, and the interaction experience offered by AWS Transcribe and AWS Polly. By including personas and context-aware features, these applications can significantly enhance the customer experience across various departments.

--

--

Chandra Manohar

Chandra Manohar is a Technology, Digital Transformation, Consulting Leader with over 29+ years of global and cross-domain industry experience