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

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • 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:
    / @aianytime
    To further support the channel, you can contribute via the following methods:
    Bitcoin Address: 32zhmo5T9jvu8gJDGW3LTuKBM1KPMHoCsW
    UPI: sonu1000raw@ybl
    GitHub Repo: github.com/AIA...
    #aws #ai #llm

ความคิดเห็น • 28

  • @entranodigital
    @entranodigital 4 หลายเดือนก่อน +3

    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.

    • @Tout-Le-Monde02
      @Tout-Le-Monde02 2 หลายเดือนก่อน

      Must have forgotten to download it from the original creator ...... 🤣🤣🤣🤣🤣

  • @unclecode
    @unclecode 4 หลายเดือนก่อน +1

    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!

  • @HamzaKhan-zj6dn
    @HamzaKhan-zj6dn 6 วันที่ผ่านมา

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

  • @Ghwallis
    @Ghwallis 3 หลายเดือนก่อน

    @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.

  • @lesptitsoiseaux
    @lesptitsoiseaux 2 หลายเดือนก่อน

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

  • @susheelkumarvashulal8951
    @susheelkumarvashulal8951 4 หลายเดือนก่อน +1

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

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      I have one in RAG playlists. Check it out.

  • @Aditya_khedekar
    @Aditya_khedekar 4 หลายเดือนก่อน +1

    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 !!

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      I have many of these in RAG playlists.

    • @kashishsukhwani6176
      @kashishsukhwani6176 3 หลายเดือนก่อน

      @@AIAnytimecan you please give the lambda function code

  • @AngelWhite007
    @AngelWhite007 4 หลายเดือนก่อน +1

    Please make a video on creating Sidebar like CHATGPT. please

  • @oguzhanylmaz4586
    @oguzhanylmaz4586 3 หลายเดือนก่อน

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

  • @SaiKiranAdusumilli
    @SaiKiranAdusumilli 4 หลายเดือนก่อน

    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 ?

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน +1

      OpenAI model isn't available. You can call LLM in bedrock also. I wanted to show different ways like how LLM can be called from outside AWS.

  • @azharudeensalim2898
    @azharudeensalim2898 3 หลายเดือนก่อน

    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

  • @lokesh4935
    @lokesh4935 4 หลายเดือนก่อน

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

  • @criticalnodecapital
    @criticalnodecapital 4 หลายเดือนก่อน

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

  • @sneharoy3566
    @sneharoy3566 4 หลายเดือนก่อน

    Very helpful

  • @muhammedaslama9908
    @muhammedaslama9908 4 หลายเดือนก่อน

    Great video

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      Glad you enjoyed it

  • @kreddy8621
    @kreddy8621 4 หลายเดือนก่อน

    Brillaint thanks a lot

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      Thanks

  • @sauravmohanty3946
    @sauravmohanty3946 4 หลายเดือนก่อน

    request you to make more videos on Amazon Bedrock projects

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      This is the video. It's on bedrock .

  • @abhishekchintagunta8731
    @abhishekchintagunta8731 4 หลายเดือนก่อน

    nice tutorial bro

    • @AIAnytime
      @AIAnytime  4 หลายเดือนก่อน

      Glad you liked it!

  • @HamzaKhan-zj6dn
    @HamzaKhan-zj6dn 6 วันที่ผ่านมา

    import os
    import boto3
    boto3_session = boto3.session.Session()
    bedrock_agent_runtime_client = boto3.client('bedrock_agent_runtime_client')
    kb_id = os.environ.get("KNOWLEDGE_BASE_ID")
    def retrieve(input, kb_id):
    response = bedrock_agent_runtime_client.retrieve(
    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
    }
    }