Better RAG with Merger Retriever (LOTR) and Re-ranking Retriever (Long Context Reorder)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • In today's tutorial, I dive deep into the world of advanced information retrieval, focusing on two essential concepts:
    LOTR (Lord of the Retriever), also known as the Merger Retriever. This intriguing technique utilizes a round-robin approach to merge results from multiple vector databases, ensuring a robust and diverse set of results.
    Long Context Reorder: This is all about the reranking of retrievers. Once you've retrieved your documents using multiple models, how do you optimally order them to ensure relevance and precision?
    For those dabbling with Retrieval Augmented Generation (RAG), implementing these techniques is pivotal. A more effective retrieval process directly enhances the quality and relevance of the generated content in RAG models.
    Throughout the tutorial, I've leveraged LangChain and its high-level abstract classes, which streamline the implementation of these advanced techniques.
    If you found this content valuable, please hit that like button, drop a comment below with your thoughts or questions, and don't forget to subscribe for more in-depth tutorials like this!
    GitHub Here: github.com/AIA...
    LOTR: python.langcha...
    BGE Embedding Model: huggingface.co...
    #generativeai #langchain #llm

Комментарии • 41

  • @420nyk
    @420nyk 6 месяцев назад +1

    Love these long form videos. Your commentry in between the code is superb and fills lot of knowledge gaps. In most other videos, people just finish up in 10 mins and dont talk more in the ecosystem, what is better, why something is picked , which paper can be used to learn more.
    This form really what helps to learn better. Thanks again

    • @AIAnytime
      @AIAnytime  6 месяцев назад

      Great to hear!

  • @shaileshhh5456
    @shaileshhh5456 10 месяцев назад +1

    Very Informative & Insightful Video Sir !! Awaiting for Next part of Video - Generation

    • @AIAnytime
      @AIAnytime  10 месяцев назад +1

      So nice of you. Thank you.

    • @shaileshhh5456
      @shaileshhh5456 10 месяцев назад

      Hi sir ,when the next part of this video with LLM will be out? Please can you do share ,☺️

  • @harshlodha1856
    @harshlodha1856 10 месяцев назад +3

    There is a new technique called selfrag. It has its llama2 version. Can you create a video on how to integrate it with langchain ?

  • @ahmadh9381
    @ahmadh9381 Месяц назад

    15:49 hello. The embedding model BAAI/bge-large-en that you used has sequence length 512. But the when doing recursive splitting you have set chunk size to 1000. So after 512 would the model truncate the rest of the sentences in the chunk?
    Is sequence length 512 of the embedding model words or only characters?

  • @user-st7gd3js7r
    @user-st7gd3js7r 3 месяца назад

    Hello sir, there is no next video on contextual compression, mitigate biases, remove redundant chunks, emsemble retriever(hybrid search) and other techniques to improve performance of rag chain. Please sir, can you share the video link. Thanks

  • @victorreyesalvarado8329
    @victorreyesalvarado8329 10 месяцев назад

    amazing video! greetings from Peru

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Thank you very much!

  • @asithakoralage628
    @asithakoralage628 10 месяцев назад

    This is a great video, thank you very much for sharing your valuable knowledge.

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Glad it was helpful!

  • @mahoanghai3364
    @mahoanghai3364 10 месяцев назад

    great video as usual

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Happy to hear that!

  • @user-iu4id3eh1x
    @user-iu4id3eh1x 10 месяцев назад

    Thanks for the tips... It helped me improve the accuracy

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Great to hear!

  • @rhiteshkumarsingh4401
    @rhiteshkumarsingh4401 5 месяцев назад

    Hi this video was awesome but there is no next video showing context compression retriever and the ensemble retriever

  • @divyad4058
    @divyad4058 7 месяцев назад +1

    Can we use this merging concept with parent-document retriever where i store my parent chunks in inmemory and child chunks in a chroma collection then i want to merge the output of the parent retriever with the self query retriever ?

  • @asifmehmood5704
    @asifmehmood5704 10 месяцев назад

    Waiting for the next video!

    • @AIAnytime
      @AIAnytime  10 месяцев назад +1

      Soon... Thanks

  • @GiridharReddy-hb5nv
    @GiridharReddy-hb5nv 10 месяцев назад +1

    Sir we want a video on RAG Evaluation using RAGAS or something, please bring it sir will be really helpful because it may be helpful to check how better our RAG did after these changes or something

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Will create today. Release soon. It's in the list.

  • @Canna_Science_and_Technology
    @Canna_Science_and_Technology 10 месяцев назад

    FYI there is a failure of direct retrieval with GPT-4 using the new OpenAI Assistant API. GPT tokenizes text and creates its own vector embeddings based on its specific training data. The new terms and sequences may not connect well to the pretrained knowledge in GPT's weight tensors.
    There was no semantic similarity between the new API terms and GPT's existing vector space. This is a fundamental issue with retrieval augmentation systems like Rag - external knowledge is not truly integrated into the model's learned weights. Adding more vector stores cannot solve this core problem.

  • @yuvrajharsh8763
    @yuvrajharsh8763 10 месяцев назад

    I've been watching your channel for quite some time now. I appreciate the hard work you put into these videos. Microsoft's new lida package is amazing for data visualization using LLMs. Can you please make a video on how to implement it on csv and other kinds of data.

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      See if this helps: ruclips.net/video/U9K1Cu45nMQ/видео.html thanks for the inputs. 1 more video will be available soon on LIDA.

    • @yuvrajharsh8763
      @yuvrajharsh8763 10 месяцев назад

      @@AIAnytime Thanks a lot for making this video.

  • @kumarmangalam9170
    @kumarmangalam9170 8 месяцев назад

    can you please mention the best embedding model..is the one you used still the best?

  • @SnehaRoy-xf3zv
    @SnehaRoy-xf3zv 10 месяцев назад

    Great video, Thank you ❤

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Glad you enjoyed it!

  • @vinidharpalakonda5555
    @vinidharpalakonda5555 5 месяцев назад

    I am getting Stopiteration when running cell 13

  • @arjunparmar6121
    @arjunparmar6121 7 месяцев назад

    You didndt pass query in reordering.transform_documents. how it was able to reorder ?

    • @sivi3883
      @sivi3883 6 месяцев назад

      I was wondering the same. My understanding is it needs the query based on which it could reorder the documents (passed). Commenting it here to see if AI anytime Guru checks this 🙂

  • @shaileshhh5456
    @shaileshhh5456 10 месяцев назад

    Great Video !! Hi sir ,when the next part of this video with LLM will be out? Please can you do share

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      As soon as possible

  • @user-ww1il5bo8m
    @user-ww1il5bo8m 10 месяцев назад

    Hi ,If you can share some document digitization video using Gen AI

  • @AshokKumar-vr3fs
    @AshokKumar-vr3fs 10 месяцев назад

    Greatvideo

  • @tushaar9027
    @tushaar9027 10 месяцев назад

    Hi AIAnytime great video , i was looking for something in same line with cohere ai , can please create a short video to use it with Normal Retrieval QA Chain

    • @AIAnytime
      @AIAnytime  10 месяцев назад

      Sure Tushaar, let me see if i can use cohere.

  • @AshokKumar-vr3fs
    @AshokKumar-vr3fs 10 месяцев назад

    Many2thinksforvideo