Building Corrective RAG from scratch with open-source, local LLMs

preview_player
Показать описание
Building LLM apps with more complex logical flows can be challenging with smaller, local LLMs. Graphs offer one way to tackle this, laying out the logic flow as a graph and using local LLMs for reasoning steps within specific nodes. Here, we show how to build complex reasoning flows with local LLMs using LangGraph. We walk through the process of building Corrective RAG from scratch, a recent paper that uses self-reflection to improve RAG performance.

Paper:

Code:
Рекомендации по теме
Комментарии
Автор

I did not find before a simpler and more practical explanation of running local model and using Langchain. Congrats

NS-trej
Автор

That is one of best explanations of using local models, langchain and langGraph that I have seen. Awesome job!

jim
Автор

I love Lance’s teaching style. He makes this topic so accessible! 👏

joshuacunningham
Автор

Ok, this was a jewel of a find and I couldn't have said it better than you did in your closing.

Up until now I was looking for a local model solution to perform the agents and only could find
OpenAI for LainGraph.

Your description of how each node is performing a specific discpline with an ability to have a Boolean to proceed to the next step is really simplifying the experience.

I have been saying to myself how this is really just writing code with some functions so why is it so exciting?

It's basically integrating the AI into our everyday coding sandbox that we are so familiar with and giving it that Python Syntactic sugar experience.

Anyway I really really appreciate you sharing this approach. It is so straightforward and clean to just Build whatever you want and now maybe reuse the code for other models instead of agents.

It's endless

SolidBuildersInc
Автор

Great job explaining the process and keeping it understandable to a non-programmer!

michaelwallace
Автор

Your videos continue to be pure gold. Keep 'em coming!

JoshuaMcQueen
Автор

Thank you. Wow. This example is even in the TS/JS repo. That is so awesome

jofus
Автор

This is a very helpful and practical video. And I would be interested in seeing an implementation of a chat application using Langraph and FastAPI.

Egorfreeman
Автор

Thanks for another great video and notebook driven tutorial. Appreciate the heads up on JSON mode in Ollama - a lot of great functionality built into their API.

donb
Автор

Same question on the different configurations (The Windows ll PC is actually an i7). "Why is the sky blue". It took 3 minutes on the I7, 45 seconds on the old server and 17 seconds on the Mac.

jim
Автор

Thanks for this. I see the value and now I have a way to toy around with it and learn.

kenchang
Автор

Rerank model that is trained on relevant dataset will help, and that is the most important

nguyenanhnguyen
Автор

Good explanation, only about the topic

aladinmovies
Автор

Thank you very much for your efforts, your videos are very helpful to me!

MikewasG
Автор

This was usefull, thank you so much for this.

preben
Автор

I ran it on a i5 PC running windows 11 with 16GB of RAM and it can process 1 token per second. It is better with 32GB of RAM. I am trying an M2 Mac with 8GB next and an old i5 server with 80 GB of RAM.

jim
Автор

Great explanation, why we used graph in the end to make the process works, can we do this through procedural or functional way ?

harshgupta
Автор

For example I want to set up a rag sistei . Thanks to this RAG and LLM, it will calculate the data in my query according to the data in the PDF. For this, I get different results every time. How can I make this consistent?

klncgty
Автор

Awesome explanation. Thank you! But I have one question. I’m pretty new in this field. Why did you choose to use mistral instruct on behalf of mistral?

lucianst.
Автор

Is web search called when even one context is irrelevant?or does it have to be that all are irrelevant?

hari