Code Monkey home page Code Monkey logo

aws-qa-agent-with-bedrock-kendra-and-memory's Introduction

RAG with history memory agents using Amazon Bedrock, Amazon Kendra, Amazon Lambda Function, and Amazon DynamoDB qa-agent-with-bedrock-kendra-and-history-memory

πŸ‡»πŸ‡ͺπŸ‡¨πŸ‡± 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.

Multilingual (limited to the LLM you use) agent with memory capable of following a more fluid conversation (learn more about using memories with agents here) to query the re:invent 2023 agenda by session ID or by description or general information, it also recommend a list of sessions according to your input.

Digrama parte 1

βœ… AWS Level: Intermediate - 200

Prerequisites:

πŸ’° Cost To Complete:

Let's build!

βœ… Clone the repo

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

βœ… 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.txt

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

cdk synth

βœ…πŸš€ The Deployment:

cdk deploy

βœ… Review what is deployed in the stack:

Then go to the resources tab and explore what's deployed:

Digrama parte 1

βœ… Test The Agent Locally: Here

βœ… Test The Agent:

Go to the Lamnda Function console, serarch and choose the lambda function that starts with the name ReInventAgentStack-Fnagent

Digrama parte 1

Choose the Test tab.

Digrama parte 1

Under Test event, choose Create new event, in Event Json create a event like this:

{
  "prompt": "I'm looking for a session about generative ai",
  "session_id": "1"
}

Digrama parte 1

Saved event and Test.

Check the response when finished.

Digrama parte 1

When we ask for ID, the agent consults Amazon DynamoDB

Digrama parte 2

In this notebook you can find the code to test locally.

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.

aws-qa-agent-with-bedrock-kendra-and-memory's People

Contributors

elizabethfuentes12 avatar

Stargazers

Adeel Ahmad avatar  avatar louix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.