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.
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:
- APG article: Develop a fully automated chat-based assistant by using Amazon Bedrock agents and knowledge bases
- Github Repo: genai-bedrock-agent-chat-assistant
- 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.
- Amazon Bedrock
- Amazon ECS
- AWS Glue
- AWS Lambda
- Amazon S3
- Amazon Kendra
- Amazon Athena
- Elastic Load Balancer
The code repository contains the following files and folders:
assets
folder – The various static assets like architecture diagram, public dataset, etc are available herecode/lambda-container
folder– The Python code that is run in the Lambda functioncode/streamlit-app
folder– The Python code that is run as the container image in ECStests
folder – The Python files that is run to unit test the AWS CDK constructscode/code_stack.py
– The AWS CDK construct Python files used to create AWS resourcesapp.py
– The AWS CDK stack Python files used to deploy AWS resources in target AWS accountrequirements.txt
– The list of all Python dependencies that must be installed for AWS CDKrequirements-dev.txt
– The list of all Python dependencies that must be installed for AWS CDK to run the unit test suitecdk.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.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.