Self-reflective RAG with LangGraph: Self-RAG and CRAG

Sdílet
Vložit
  • čas přidán 6. 02. 2024
  • Self-reflection can greatly enhance RAG, enabling correction of poor quality retrieval or generations. Several recent RAG papers focus on this theme, but implementing the ideas can be tricky. Here, we show that LangGraph can be easily used for "flow engineering" of self-reflective RAG pipelines. We provide cookbooks for implementing ideas from two interesting papers, Self-RAG and C-RAG.
    Code:
    github.com/langchain-ai/langg...

Komentáře • 42

  • @girijeshthodupunuri1300
    @girijeshthodupunuri1300 Před 4 měsíci +3

    Excellent breakdown! This video really helped me grasp the concepts, and it's one of the first Langchain videos that clicked for me. While Harrison's brilliance is undeniable, Lance, you're truly a great teacher.I love your approach of using diagrams to break down complex code into easily understandable logic. It really enhances the learning experience!

  • @UGMurthy
    @UGMurthy Před 4 měsíci +1

    Thank you. This video was informative. Your explanation was clear. For me personally the examples that us local LLMs are interesting. Thanks once again.

  • @donb5521
    @donb5521 Před 4 měsíci +2

    great video Lance! The way you diagrammed the flow made it easy to understand the concepts.

  • @preston_is_on_youtube
    @preston_is_on_youtube Před 4 měsíci +3

    This is sooooo cool 🤯
    And I love that you guys are putting out all these educational videos - thank you!

  • @advfuk
    @advfuk Před měsícem

    Thanks Lance for more one great tutorial! Really useful and easy to follow.

  • @user-gy7tt5qm6x
    @user-gy7tt5qm6x Před 2 měsíci

    Lance, you are great! Thank you for your splendid video!

  • @hamzafarouk1538
    @hamzafarouk1538 Před 4 měsíci +1

    wow. Excellent demonstration.

  • @jim02377
    @jim02377 Před 4 měsíci +1

    Great tutorial. Keep up the great work!

  • @JoshuaMcQueen
    @JoshuaMcQueen Před 4 měsíci +1

    Really great video! Keep 'em coming

  • @SimonMariusGalyan
    @SimonMariusGalyan Před 4 měsíci

    Thank you for the great explanation!

  • @neonnftz
    @neonnftz Před 4 měsíci +11

    Please record your videos in 1080p

    • @r.lancemartin7992
      @r.lancemartin7992 Před 4 měsíci +2

      (This is Lance, guy in the video.) Good feedback. I record w/ Loom. It was a UX issue w/ Loom where vids were not defaulted recorded to 1080p. Apologies!

  • @VaibhavPatil-rx7pc
    @VaibhavPatil-rx7pc Před 4 měsíci

    Excellent !

  • @urd4651
    @urd4651 Před měsícem

    very helpful! thank you.

  • @carloszelabueno432
    @carloszelabueno432 Před 29 dny

    Great video! I have a question about recent RAG papers which talking about RAG paradigms such as advanced RAG and modular RAG. Could we say that using LangGraph have we applying modular rag? I’m not sure in which paradigm fall self rag and crag.
    Thanks!!

  • @StuartAtkinson4467
    @StuartAtkinson4467 Před 4 měsíci

    Wooooo Skynet wooooooo

  • @jzam5426
    @jzam5426 Před 2 měsíci

    Thank you for breaking this down!
    Is there a way to do cyclical/iterative agents when one produces an answer and the other checks the answer, and if not correct/satisfied with it, sends it back to the first agent to produce a better answer?

  • @MLA263
    @MLA263 Před 3 měsíci

    Thanks for that ! Do you have a video that helps build an ui associated for prompting ?

  • @anshubhatia6532
    @anshubhatia6532 Před 2 měsíci

    Hi, I have one question here related to the Retrieval Evaluator. Let's suppose we are not allowed to do a web search. Can we again play around with chunking and different retrieval methods?

  • @GREENDAYROKS1
    @GREENDAYROKS1 Před 4 měsíci +1

    Very interesting, I assume this would have very long response times?

    • @r.lancemartin7992
      @r.lancemartin7992 Před 4 měsíci +1

      (This is Lance, guy in the video.) I'm running on a Mac M2, 32GB. Latency is ~5-10 sec for final generations.

    • @Slimshady68356
      @Slimshady68356 Před 4 měsíci

      ​​@@r.lancemartin7992 lance from langchain has a nice ring to it😅😂

  • @corybilyeu4490
    @corybilyeu4490 Před 2 měsíci

    Do you have any resources for deploying this type of solution on AWS/GCP?

  • @janwillemaltink2216
    @janwillemaltink2216 Před 4 měsíci

    at around 13 minutes, based on your story i would assume that it wouldnt run web search as there are at least a few documents that are relevant, but as i understand even if 1 of the retrieved documents isnt relevant it will do a web search?

    • @r.lancemartin7992
      @r.lancemartin7992 Před 4 měsíci +1

      (This is Lance, guy in the video.) Yes, with this logic it will do web search if *any* documents are irrelevant.

  • @LordPBA
    @LordPBA Před 3 měsíci

    What are other possibly ways to utilize this on a local database? I mean, if there are no relevant docs what it can do?

  • @seansullivan6263
    @seansullivan6263 Před 4 měsíci

    is thsi still effective with conversational memory?

  • @user-wj4ys1bh6z
    @user-wj4ys1bh6z Před 4 měsíci +2

    Lance - isn't the workflow you outline here a DAG? The LangGraph docs are very explicit about not using LangGraph for DAGs - can you help us understand this nuance?
    "The main use is for adding cycles to your LLM application. Crucially, this is NOT a DAG framework. If you want to build a DAG, you should just use LangChain Expression Language."

  • @siddharthchauhan3404
    @siddharthchauhan3404 Před 2 měsíci

    How to deploy langgraph using langserve, can you please help me do it?

  • @dex001
    @dex001 Před 4 měsíci +1

    I'm working on developing RAG Application on CSV File. It is working fine for some queries, but queries like
    1. Get total count of persons
    2. Get average salary
    These type of questions that include to search all the rows of the given document Is not working fine. Is there any fix I can do or Implementing RAG is not a correct option.

    • @anuragmishra-yu2yx
      @anuragmishra-yu2yx Před 4 měsíci +2

      Are you using csv agent for the solution you built? if not, then you can try either csv agent or pandasAI.

    • @Tushii
      @Tushii Před 4 měsíci +2

      What worked for me was converting my CSV / multi page xlsx into a minimal database
      And then query that database, SQL queries worked much better for me

    • @sridevigogusetty8371
      @sridevigogusetty8371 Před 4 měsíci

      It works for csv's but if it's pdf @tushii

    • @Tushii
      @Tushii Před 4 měsíci

      @@sridevigogusetty8371 what would you like to do with your pdf ?

    • @sridevigogusetty8371
      @sridevigogusetty8371 Před 4 měsíci

      @@Tushii for example if I have some pdf which has financial transactions of i want to query how I will convert that to db

  • @B0tch0
    @B0tch0 Před 4 měsíci

    The video was great, thank you. Small comment about something that puzzled me. If you don't abbreviate documents as docs. Please don't use dic(t) for dictionary. I'm sure I won't be the last wondering 😅