LightRAG: A More Efficient Solution than GraphRAG for RAG Systems?

  Рет қаралды 45,054

Prompt Engineering

Prompt Engineering

Күн бұрын

Пікірлер: 71
@kai_s1985
@kai_s1985 2 ай бұрын
Thanks so much! You are the best channel when it comes to RAG. Please keep informing us about the latest advancements in this field. I have played with GraphRag. It can be expensive if you have tons of data, but considering how cheap GPT-4o and GTP-4o-mini have become, the price is not the biggest concern at least for my use case. I processes more than a thousand page document with GPT-4o and it cost me cents. The biggest problem with MS GraphRag is the inference latency. It is not very practical if you want to build a chatbot based on this. Also, it is less customizable in my recent experience. Hope LightRag is better in terms of accuracy, customizability and inference speed.
@johnkintree763
@johnkintree763 2 ай бұрын
It looks like the pipeline is modular, and could work with different vector and graph databases. In the future, users could rate the responses, so highly rated responses could be stored and retrieved when similar queries are made by other users. Retrieving highly rated responses could improve overall system performance compared with generating responses for every query. Apply fast thinking instead of slow thinking when possible.
@KevinKreger
@KevinKreger Ай бұрын
It is modular. For example, if you want to replace Textract with MinerU for doc/pdf parsing it would be very easy.
@CAPSLOCK_USER
@CAPSLOCK_USER 2 ай бұрын
such a great channel, thanks for this guide, i was just about to implement a knowledge base!
@kenchang3456
@kenchang3456 2 ай бұрын
Thanks for this. I was looking for a way to add to the KG without having to rebuild it. Crossing my fingers that this is it. And cheaper too 🙂
@Imasoulinseoul
@Imasoulinseoul Ай бұрын
Thank you heaps for the diagrams and explanations!
@srhino14
@srhino14 2 ай бұрын
Thanks!
@engineerprompt
@engineerprompt 2 ай бұрын
thank you!!!
@AndrewNanton
@AndrewNanton 2 ай бұрын
Pretty cool - if you do more with this, I'd love to see some experiements combining this with late chunking
@engineerprompt
@engineerprompt 2 ай бұрын
good idea, when I get time, I want to implement a system that combines all these different approaches together.
@hiranga
@hiranga 2 ай бұрын
@@engineerprompt Has anyone recreated this in LangGraph or LangChain JS ?
@MrAhsan99
@MrAhsan99 Ай бұрын
@@engineerprompt looking forward!
@marktahu2932
@marktahu2932 15 күн бұрын
I am assuming that eventually all publications will come with a link to their embeddings pre-prepared on some database somewhere associated with the publishers.
@FunDumb
@FunDumb 2 ай бұрын
Definitely want to learn more about lite rag. Cost was a hindrance with regular rag. 😊
@amdenis
@amdenis Ай бұрын
I started using a recursive variant of this for a bit, which evolved to a multi-LLM approach due to the need to optimize cost-performance efficiencies, but still leverage external inference time optimizations and multi-step sequencing and solving. I think most of these RAG and TAG mechanisms (light, long, standard GR, and the various fine and related tuning methods) will all continue to be superseded at an accelerating rate. The biggest problems I see in the industry from startups to universities and research groups is that the choices made and implementations used are often too brittle and subject to rip and replace requirements to be anywhere near cost-performance optimal in the long term, which for AI means even 1-2 years. So, better design patterns, tooling and implementation architectures are needed.
@gunu3187
@gunu3187 2 ай бұрын
Thanks for sharing , however this is another smart config changes resulting in low prompt tokens , Microsoft GraphRag uses higher overlap window ( 300:100 ) whereas here it is using (1200:100) which itself reduces number of prompt tokens used significantly. we should deep dive to understand if researchers have done something different to ensure much lower overlap window
@greglinklater6331
@greglinklater6331 Күн бұрын
Thoughts about using late-chunking with Light RAG? Honestly I barely understand what's going on at a high level but conceptually is there anything obvious preventing late chunking from being applied in LightRAG?
@trytry6569
@trytry6569 2 ай бұрын
Please please please make a video in which we can use it with our local models.
@engineerprompt
@engineerprompt 2 ай бұрын
on it :)
@trytry6569
@trytry6569 2 ай бұрын
@@engineerprompt Thanks man🙌
@johnkintree763
@johnkintree763 2 ай бұрын
​@@engineerpromptThe Zamba2 family of models looks interesting for running locally with lower latency and more tokens/sec output.
@KevinKreger
@KevinKreger Ай бұрын
On the 'mixed' dataset, I don't think it had enough information on the various topics to create a comprehensive graph. I'm wondering if GraphRAG digs deeper or does some other technique with the graph meta-data like BM25.
@ahmadzaimhilmi
@ahmadzaimhilmi 2 ай бұрын
It costs me $0.02 per 10 page pdf document using openai api. I think it's pretty decent. Future improvements should also include storing all these json files in a database. Also, have you figured out how to get the reference chunks used to generate the response to the query?
@penguinmagehello
@penguinmagehello 2 ай бұрын
Mind sharing how/ which packages you use to split pdfs especially those with images?
@ahmadzaimhilmi
@ahmadzaimhilmi 2 ай бұрын
@@penguinmagehello google marker pdf to markdown
@KevinKreger
@KevinKreger Ай бұрын
@@penguinmagehello No images. The example on github is using textract for pdf text extraction, but you can use any other approach and save the images. You could add them to the graph by sending them to a VLM for a descriptive summary. That would go to the entity/relationship resolution step. Your chunking would have to respect the figure description (See figure 1, which blah blah) and the figure title.
@yvescourtois
@yvescourtois 2 ай бұрын
Great stuff, well done! I don't see any reason to use GraphRAG any more after that. I guess the technology will continue to surprise us, but the cost argument is powerful when you handle tons of data
@dawid_dahl
@dawid_dahl 2 ай бұрын
Thanks for the really great video, by the way.
@abhishekbose1081
@abhishekbose1081 2 ай бұрын
Can I use this with Hugging face inference api or Vertexai api ? Actually I have access to this api only.
@yigidovic
@yigidovic Ай бұрын
Use LiteLLM to standardize them to OpenAI API then configure BASE_URL and you are free!
@derekwang5982
@derekwang5982 Ай бұрын
I only processed 1 chunks for 2 hours, not 2 chunks being processed...not sure why
@emirishak7609
@emirishak7609 Ай бұрын
Using LightRAG with gguf?
@remusomega
@remusomega 2 ай бұрын
Graphs solve the problem of chunk embeddings being de-contextualized. Late Chunking solves this problem. I think we need to re-consider the use cases for GraphRags.
@muhammadshafiqsafian6149
@muhammadshafiqsafian6149 2 ай бұрын
how can i view the algo flowchart? a bit complex to understand
@WaylonLu
@WaylonLu 2 ай бұрын
how does integrate the vector dataabse?
@mclachan
@mclachan 2 ай бұрын
Have you tested it on structured data?
@axelwehmeyer9599
@axelwehmeyer9599 2 ай бұрын
cool. Is there an implementation for Groq-API like gpt_4o_mini_complete-API in LightRAG? How can i use a GUI-Chatbot for LightRAG, e.g. chainlit/streamlit/...? thx
@engineerprompt
@engineerprompt 2 ай бұрын
I think there are a couple of PRs for other models. Not sure about the GUI
@guscastilloa
@guscastilloa 2 ай бұрын
How do you record your screen so that it follows your cursos? It’s super useful to follow along specially when reading papers! Kudos on this amazing expose of this methodology!
@dylanmoraes990
@dylanmoraes990 2 ай бұрын
It's a video editing app called screen studio on mac
@ai_dart
@ai_dart 2 ай бұрын
Good Info
@syedsaifullahtarique
@syedsaifullahtarique 2 ай бұрын
How to create LightRAG object inside dicken folder
@ashgtd
@ashgtd 2 ай бұрын
great video thank you
@AIWhale3
@AIWhale3 2 ай бұрын
Is Lightrag supposed to be used with a vector database, a graph database or both?
@KevinKreger
@KevinKreger Ай бұрын
Both (nano vector database) along with the graph (which I believe is Neo4J by default)
@VaibhavPatil-rx7pc
@VaibhavPatil-rx7pc Ай бұрын
Awesome 🎉
@RickySupriyadi
@RickySupriyadi 2 ай бұрын
wow so many RAG system this year already
@engineerprompt
@engineerprompt 2 ай бұрын
Yup, its hard to track but nice to see the different ideas that are coming up.
@mirkoappel
@mirkoappel 19 күн бұрын
Thank you!
@ingenierofelipeurreg
@ingenierofelipeurreg 2 ай бұрын
Which of all RAG is cost effective and quality better?
@engineerprompt
@engineerprompt 2 ай бұрын
Its a hard question to answer. It will really depend on the task at hands. If you think its just search/looking up information, may be a standard RAG. If there are relationships between objects/entities then may be a knowledge graph.
@dawid_dahl
@dawid_dahl 2 ай бұрын
In a few years I suspect we will laugh at all these hacky RAG implementations as one will simply be able to dump everything into the context window and there will be some native mechanism to handle efficiency. What do you think?
@adegboyegaajenifuja1274
@adegboyegaajenifuja1274 2 ай бұрын
Or you just grant access to your document repositories and you're good to go
2 ай бұрын
Needle in haystack problem of big context Windows....
@BryantAvila
@BryantAvila 2 ай бұрын
To dump 10K documents each composed of at least 100 pages seems it will always be unrealistic. RAG of some sort will still be needed.
@dawid_dahl
@dawid_dahl 2 ай бұрын
@ Will be interesting to see how this comment ages over the coming years. (Or mine!)
@thunkin-ai
@thunkin-ai 2 ай бұрын
the native mechanism might probably be a graphrag implementation
@viiskb
@viiskb Ай бұрын
For the same book, graphRAG uses 1.1 million input tokens and 200k output tokens.
@Jvo_Rien
@Jvo_Rien 2 ай бұрын
thank you :)
@themax2go
@themax2go 2 ай бұрын
so essentially they implemented triples / triplets (sciphi/triplex) 🤔
@engineerprompt
@engineerprompt 2 ай бұрын
pretty much :)
@JoseAntonio-sn6sf
@JoseAntonio-sn6sf 2 ай бұрын
nice video, I am just starting with RAGs, so sorry if my question is a little stupid, but if you spend 80k tokens running LightRAG, why the necessity to even implement a RAG when the book it self has 40k tokens? I mean wouldn't be easier to send the whole book to chatgpt?
@ravigurram9884
@ravigurram9884 2 ай бұрын
Imagine large systems with terabytes of data.
@vap0rtranz
@vap0rtranz Ай бұрын
> "I mean wouldn't be easier to send the whole book to chatgpt?" because this stuff is for knowledge graphs, not simple doc Q&A. The graphs create relationships *between* content. We used to do this in KBs by manually (and slowly) tagging and hyperinking stuff that we thought was related. Now models can create the relationships for us without having to hire 1,000s of librarians. The possibility to have a system trained to create meaningful relationships between content and dynamically pull that content on demand is mind blowing. Pre-trained models are already coming out.
@AhmedMagdy-ly3ng
@AhmedMagdy-ly3ng 2 ай бұрын
Hey 👋 I'm one of the most exciting fans of you and I have the opportunity to come to India I wish I can see you and have a conversation.. Please 🥺🙏
@akshatgandhi7958
@akshatgandhi7958 2 ай бұрын
Thanks
@ahmadzaimhilmi
@ahmadzaimhilmi 2 ай бұрын
I like everything about lightrag. I wish we could see the reference chunk/document for the returned query too. Also, if there's a better way to query from a sql/nosql db instead of querying from drive.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 346 М.
[Webinar] How to Build a Modern Agentic System
1:00:55
Arthur
Рет қаралды 2,6 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Graph RAG: Improving RAG with Knowledge Graphs
15:58
Prompt Engineering
Рет қаралды 85 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,3 МЛН
PirateSoftware is right, this needs to stop
15:14
Theo - t3․gg
Рет қаралды 883 М.
LangGraph Deep Dive: Build Better Agents
46:13
James Briggs
Рет қаралды 34 М.
Small Language Models Explained: The Future of Business Transformation
32:24
Ragnar Pitla (Make it Happen)
Рет қаралды 11 М.
Local LightRAG: A GraphRAG Alternative but Fully Local with Ollama
18:55
Prompt Engineering
Рет қаралды 49 М.
Visualizing transformers and attention | Talk for TNG Big Tech Day '24
57:45
I Helped 2,000 People Walk Again
15:31
MrBeast
Рет қаралды 13 МЛН
LightRAG & LongRAG Explained: Cutting-Edge RAG Techniques in AI
17:21
The Best RAG Technique Yet? Anthropic’s Contextual Retrieval Explained!
16:14