awslabs / genai-bedrock-chatbot

A demo application that uses Amazon SageMaker manuals and pricing data tables as an example to explore the capabilities of a generative AI chatbot.
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/develop-advanced-generative-ai-chatbots-by-using-rag-and-react-prompting.html
MIT No Attribution
32 stars 9 forks source link
aws aws-bedrock chatbot genai

GenAI Chat Assistant on AWS

Introduction

This demo Chat Assistant application centers around the development of an advanced Chat Assistant using Amazon Bedrock and AWS's serverless GenAI solution. The solution demonstrates a Chat Assistant that utilizes the knowledge of the Amazon SageMaker Developer Guide and SageMaker instance pricing. This Chat Assistant serves as an example of the power of Amazon Bedrock in processing and utilizing complex data sets, and it’s capability of converting natural language into Amazon Athena queries. It employs open source tools like LangChain and LLamaIndex to enhance its data processing and retrieval capabilities. The article also highlights the integration of various AWS resources, including Amazon S3 for storage, Amazon Kendra as vector store to support the retrieval augmented generation (RAG), AWS Glue for data preparation, Amazon Athena for efficient querying, Amazon Lambda for serverless computing, and Amazon ECS for container management. These resources collectively enable the Chat Assistant to effectively retrieve and manage content from documents and databases, illustrating the potential of Amazon Bedrock in sophisticated Chat Assistant applications.

Deployment

Please refer to this APG article for detailed deployment steps: Develop advanced generative AI chat-based assistants by using RAG and ReAct prompting.

For a chat-assistant solution using Agents for Amazon Bedrock, please refer:

  1. APG article: Develop a fully automated chat-based assistant by using Amazon Bedrock agents and knowledge bases
  2. Github Repo: genai-bedrock-agent-chat-assistant

Prerequisites

Target technology stack

Target Architecture

Architecture Diagram

Code

The code repository contains the following files and folders:

Note: The AWS CDK code uses L3 constructs and AWS managed IAM policies for deploying the solution.

Useful commands

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.