This article is also published in Medium –
https://medium.com/@chandramanohar/enhancing-customer-experience-with-genai-applications-harnessing-the-power-of-openai-llms-aws-272d713965abIntroduction:
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:
Let’s walk through the process flow from the user’s perspective:
- Users initiate requests to the GenAI application via different channels, such as voice, chat, registered mobile numbers, or the application’s website.
- 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.
- 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.
- 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.
- The overall GenAI application, including interactions with endpoints, can be developed using ReactJS and Java.
- The GenAI Exchange module sends the AWS Kendra response to OpenAI LLMs for contextualization and generating concise responses to user requests.
- 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.
- Documents, FAQs, product catalogs, 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, o Easy-to-use enterprise search service powered by Machine Learning (ML). o Implement a unified search experience quickly across multiple structured and unstructured content repositories. o Uses natural language processing (NLP) to get highly accurate answers without the need for machine learning (ML) expertise. o 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 iteasy to add speech to text capabilities to any application. Transcribe’sfeatures 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 Assistant / Smart Voice/Chat bot with Conversational AI Capabilities
- Handle User Request along with Dialogue State Management for
- FAQs
- Open Domain Questions & Answers (Like Product Catalog Search)
- Fulfil request through getting response from Backend Applications
- Build Domain Specific Knowledge Database so that Bot can be used for different departments such as HR, Finance, e-Commerce and so on
- Integrate with Phone Gateways for interaction through RMN