RAG on AWS usign Amazon Bedrock, Amazon Kendra, Amazon Lambda Function, Amazon S3 and Amazon DynamoDB

πŸ‡»πŸ‡ͺπŸ‡¨πŸ‡± Dev.to Linkedin GitHub Twitter Instagram Youtube Linktr


In this repository you will find a use cases of RAG on AWS using CDK.

Additionally, you will find a notebook where you can run the agent localy.

What Are You Going To Learn.

  • How to create a vectordb using Amazon Bedrock - Titan Embeddings, chroma and langchain.
  • How to store the vectordb in an Amazon S3 bucket.
  • How to build an Agent with memory capable of following a more fluid conversation (learn more about using memories with agents here)
  • How to query vectordb stored in s3 bucket through a fluid conversation with langchain agent employed an LLM.
  • How to query a Amazon Dynamodb table through a fluid conversation with langchain agent employed an LLM.
  • How to put item to a Amazon Dynamodb table through a fluid conversation with langchain agent employed an LLM.

βœ… AWS Level: Intermediate - 200

πŸ’° Cost to complete:

βœ… Prerequisites:

This is a multilingual (limited to the LLM you use) agent is a spa assistant specialized in massages (with some data that I found on Google πŸ˜…... it is not very reliable), recommends types of massages based on the client's comments, schedules appointments and checks their status.

Digrama parte 1

Let's build!

βœ… Clone the repo

git clone https://github.com/elizabethfuentes12/aws-qa-agent-with-bedrock-kendra-and-memory.git

βœ… Create The DBvector Following The Code In This Notebook: Here

The dbvector will be saved within the CDK stack /vectordb, which will create an S3 bucket with the dbvector stored in it.

βœ… Go to:

cd re-invent-agent

βœ… Create The Virtual Environment: by following the steps in the README

python3 -m venv .venv
source .venv/bin/activate

for windows:

.venv\Scripts\activate.bat

βœ… Install The Requirements:

pip install -r requirements.txt0

βœ… Synthesize The Cloudformation Template With The Following Command:

cdk synth

βœ…πŸš€ The Deployment:

cdk deploy

Play with the agent and improve the prompt, remember that he has memory storage and you can have a fluid conversation with it.


🚨 Did you like this blog? πŸ‘©πŸ»β€πŸ’» Do you have comments?🎀 tell me everything here


Β‘Gracias!

πŸ‡»πŸ‡ͺπŸ‡¨πŸ‡± Dev.to Linkedin GitHub Twitter Instagram Youtube Linktr


Security

See CONTRIBUTING for more information.

License

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