https://github.com/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://github.com/awslabs/genai-bedrock-chatbot

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary

Keywords

aws aws-bedrock chatbot genai
Last synced: 5 months ago · JSON representation

Repository

A demo application that uses Amazon SageMaker manuals and pricing data tables as an example to explore the capabilities of a generative AI chatbot.

Basic Info
Statistics
  • Stars: 43
  • Watchers: 2
  • Forks: 12
  • Open Issues: 2
  • Releases: 0
Topics
aws aws-bedrock chatbot genai
Created about 2 years ago · Last pushed 9 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

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

  • Docker
  • AWS CDK Toolkit 2.132.1+, installed installed and configured. For more information, see Getting started with the AWS CDK in the AWS CDK documentation.
  • Python 3.11+, installed and configured. For more information, see Beginners Guide/Download in the Python documentation.
  • An active AWS account
  • An AWS account bootstrapped by using AWS CDK in us-east-1. The us-east-1 AWS Region is required for Amazon Bedrock Claude and Amazon Titan Embedding model access.
  • Enable Claude and Titan embedding model access in Bedrock service.

Target technology stack

  • Amazon Bedrock
  • Amazon ECS
  • AWS Glue
  • AWS Lambda
  • Amazon S3
  • Amazon Kendra
  • Amazon Athena
  • Elastic Load Balancer

Target Architecture

Architecture Diagram

Code

The code repository contains the following files and folders:

  • assets folder – The various static assets like architecture diagram, public dataset, etc are available here
  • code/lambda-container folder– The Python code that is run in the Lambda function
  • code/streamlit-app folder– The Python code that is run as the container image in ECS
  • tests folder – The Python files that is run to unit test the AWS CDK constructs
  • code/code_stack.py – The AWS CDK construct Python files used to create AWS resources
  • app.py – The AWS CDK stack Python files used to deploy AWS resources in target AWS account
  • requirements.txt – The list of all Python dependencies that must be installed for AWS CDK
  • requirements-dev.txt – The list of all Python dependencies that must be installed for AWS CDK to run the unit test suite
  • cdk.json – The input file to provide values required to spin up resources

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

Useful commands

  • cdk ls list all stacks in the app
  • cdk synth emits the synthesized CloudFormation template
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk docs open CDK documentation

Security

See CONTRIBUTING for more information.

License

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

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 12
  • Delete event: 3
  • Issue comment event: 1
  • Push event: 3
  • Pull request event: 6
  • Fork event: 4
  • Create event: 6
Last Year
  • Watch event: 12
  • Delete event: 3
  • Issue comment event: 1
  • Push event: 3
  • Pull request event: 6
  • Fork event: 4
  • Create event: 6

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 16
  • Average time to close issues: 2 days
  • Average time to close pull requests: 17 days
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 13
  • Bot issues: 1
  • Bot pull requests: 12
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 months
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 1
  • Bot pull requests: 4
Top Authors
Issue Authors
  • quadrupole (1)
  • feelec1 (1)
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (12)
  • jundongq (4)
Top Labels
Issue Labels
question (2) dependencies (1) python (1)
Pull Request Labels
dependencies (12)

Dependencies

code/lambda-container/Dockerfile docker
  • public.ecr.aws/lambda/python 3.11@sha256 build
code/streamlit-app/Dockerfile docker
  • python 3.11@sha256 build
code/lambda-container/requirements.txt pypi
  • PyAthena *
  • boto3 ==1.28.62
  • langchain ==0.0.340
  • llama-index ==0.9.7
  • sqlalchemy ==2.0.23
code/streamlit-app/requirements.txt pypi
  • PyAthena *
  • boto3 ==1.28.66
  • langchain ==0.0.340
  • llama-index ==0.9.7
  • sqlalchemy ==2.0.23
  • streamlit ==1.28.0
  • streamlit_chat ==0.1.1
requirements-dev.txt pypi
  • aws-cdk-lib ==2.106.1 development
  • cdk-nag >=2.10.0 development
  • constructs >=10.0.0,<11.0.0 development
  • pytest ==6.2.5 development
requirements.txt pypi
  • aws-cdk-lib ==2.106.1
  • cdk-nag >=2.10.0
  • constructs >=10.0.0,<11.0.0