Build an End-to-End RAG API with AWS Bedrock & Azure OpenAI

preview_player
Показать описание
In this tutorial, I show you how to build an end-to-end Retrieval-Augmented Generation (RAG) tool. I've used AWS Bedrock Service for the embedding models and knowledge base, Amazon OpenSearch Service for the vector database, and Azure OpenAI models for the language model. I'll walk you through setting up a Lambda function and creating a Python API using FastAPI to tie everything together into a seamless system.

Don't forget to like, comment, and subscribe to stay updated with more content like this. Let's dive right into it!

Join this channel to get access to perks:

To further support the channel, you can contribute via the following methods:

Bitcoin Address: 32zhmo5T9jvu8gJDGW3LTuKBM1KPMHoCsW

#aws #ai #llm
Рекомендации по теме
Комментарии
Автор

Awesome tutorial and a very important use case. Just one thing you forgot to give the lamda function code in the repo. Thanks for everything Sir.

entranodigital
Автор

@AI Anytime, Thank you for the great video and demo. Wanted to reiterate that the code for the Lambda function is missing on Github. Thanks.

Ghwallis
Автор

import os
import boto3

boto3_session = boto3.session.Session()
bedrock_agent_runtime_client =

kb_id =

def retrieve(input, kb_id):
response =
knowledgeBaseId=kb_id,
retrieveQuery={
'text': input_text
},
retrievalConfiguration={
'vectorSearchConfiguration': {
'numberOfResults':1
}
}
)
return response

def lambda_handler(event, context):
if 'question' not in event:
return {
'statusCode': 400,
'body': 'No Question Provided'
}

query = event['question']
response = retrieve(query, kb_id)
return {
'statusCode': 200,
'body': {
'question': question.strip(),
'answer': response
}
}

HamzaKhan-zjdn
Автор

Hi Bro could you mention what role we need to give for an IAM user when we need to use Amazon OpenSearch Serverless vector store

azharudeensalim
Автор

Fascinating! Could u make a vid to show how to do it all programmatically? Like, upload data to S3, trigger bedrock to process the new data using the knowledge base ID. Basically set up a chat app for users to upload files, let bedrock process it, update the vector storage and finally we call the lambda and get results. Thx!

unclecode
Автор

Please make a video on creating Sidebar like CHATGPT. please

AngelWhite
Автор

Hii how can i improve the rag retrievals i am using cohere reranking but can plz make a video on how make a pipeline on how to make RAG better !!

Aditya_khedekar
Автор

lamda function code is missing...please upload in description or make it publicly available in repo

HamzaKhan-zjdn
Автор

Can you create a reactjs+ fastapi project without using openai, that is, using llm running locally (example: lama2)?

oguzhanylmaz
Автор

Interesting video. Please make similar E2E tutorial videos using Vertex AI

susheelkumarvashulal
Автор

Whoever uses basically in a tutorial is not an expert at it. Just my experience...
Thanks for the video! :)

lesptitsoiseaux
Автор

Cool with the explanation! But two questions

Is the LLM calling not available in bedrock ?

if it is available, Can we use Azure OpenAI models over there ?

SaiKiranAdusumilli
Автор

cant we deploy rag chatbot in aws is there a way like hosting the chatbot?

lokesh
Автор

Is this better than NVIDI’s rerank RAG with the inference

criticalnodecapital
Автор

request you to make more videos on Amazon Bedrock projects

sauravmohanty