I Built an Insanely Complex RAG Flow with LangGraph – You Won't Believe How Easy It Is

preview_player
Показать описание
I've been working on an open source git repo for advanced RAG techniques with LangChainAI 's LangGraph🦜🕸️, heavily inspired by the LangChain Cookbook by @RLanceMartin and @sophiamyang!

This repo not only implements Corrective RAG, Adaptive RAG, and Self-RAG with LangGraph but also focuses on structuring the code for maintainability, testing & clean code. 🌟

We leverage LangGraph to build an advanced RAG flow using ideas from 3 papers:
Corrective-RAG (CRAG): Self-grading on retrieved documents and web-search fallback.
Self-RAG: Self-grading on generations for hallucinations.
Adaptive RAG: Routes queries based on complexity.

Explore the repo here:

Original cookbook:
Official LangChain video:
Рекомендации по теме
Комментарии
Автор

Really nice work, Eden. Thank you for such a great content.

tee_iam
Автор

Really great and intuitive refactoring of the original code - well done!

Leonid.Shamis
Автор

yet another awesome tutorial that takes advanced AI concepts and makes them dead simple 🎲
thanks Eden !

ShaiAlon
Автор

Can you make a video going through at a high level each branch in order?
Also could you cover LangGraph workflows involving tool use / function calling? Thank you!

covertassassin
Автор

Thank you for clearly explaining the system architecture, helps everyone understand.

leonardjin
Автор

amazing! but i'm struggling to understand when RAG should be used and when it should not be used

matthewmolinar
Автор

thank you!, one idea I saw and think is a good improvement to the architecture is adding a search into a knwoledge graph module, like dbpedia or similar KGdatabase with the posibilty of adding triplets extracted from the RAG documents itself. The result of the semantic and keyword queries to vectorDb and KGDb will enrich the context provided to the LLM

pedromoya
Автор

Thank you very much. It's really cool <3

mahoanghai
Автор

Eden, lang graph doesn't have any good checkpoint libraries apart from sqlite for production use cases like you have for langchain. Do you know anything about that?

dhavalthakkar
Автор

🎯 Key points for quick navigation:

00:13 *📁 The speaker has been working on a public GitHub repository that implements advanced RAG workflows using LangGraph.*
00:40 *💡 The speaker felt that the existing notebook was missing a software engineering perspective on how to structure an advanced LangGraph application and write maintainable code.*
01:07 *🔩 The speaker refactored the notebook to make it more maintainable, splitting it into sub-modules and writing tests for each chain.*
01:47 *📊 The speaker emphasizes the importance of writing unit tests for code.*
02:44 *🚀 The Advanced RAG workflow involves choosing whether to retrieve documents from a vector store or use a web search, grading documents, and generating an answer while checking for hallucinations and relevance.*
04:23 *💡 The implementation is a combination of three papers on Advanced RAG, corrective RAG, adaptive RAG, and self-RAG.*

Made with HARPA AI

hxxzxtf
Автор

drop that bullshit thumbnail. Be better!

amiranvarov