Learn RAG from Scratch in Python without using frameworks (langchain or llamaIndex)

preview_player
Показать описание
In this video, I'll show you how to create a fully functional chat system using your own documents with just 10 lines of Python code. We'll dive into Retrieval Augmented Generation (RAG) without relying on frameworks like LangChain, LamaIndex, or vector stores such as Chroma.

💻 RAG Beyond Basics Course:

LINKS:

Let's Connect:

Signup for Newsletter, localgpt:

00:00 Introduction to Building a Chat System without Frameworks
00:26 Understanding Retrieval Augmented Generation (RAG)
02:12 Setting Up the Python Environment
03:39 Data Preparation and Chunking
05:12 Embedding the Chunks
06:31 Retrieving Relevant Chunks
08:53 Generating Responses with LLM
09:50 Advanced Techniques and Recommendations
11:15 Conclusion and Further Learning

All Interesting Videos:

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

This is exactly what I've been trying to find for the last couple of days. Simple instructions on how to do this with pure python and local LLM. Thank you!

michaelponce
Автор

I just got done implementing an almost identical setup. Used SQLite and fastBart all in C# it’s amazing

CreativeEngineering_
Автор

Excelent and concise description. Thank you.

madbike
Автор

Great video, nice style and easy to listen to, subscribed 👍🏼

Connor
Автор

Brilliantly explained with clarity and insight, thank you!

Also really pleased you point out that RAG emerged from IR ideas and wasn't brand new: when I saw it I was like, haven't people seen Facebook's DrQA from 2017?!? And even that wasn't out the blue, there's a long established history with IR 👍

nmstoker
Автор

yes! i did the same a year ago in research duration.. it works.

vaishnokmr
Автор

Problem with RAG solutions is they don’t hold up with bigger amounts of unstructured data. I wish there was a solution that includes long term memory for chat agents so that they get smarter about your context as you chat with them

vitalis
Автор

Can this also be implemented with a local model through Ollama?

LEANSCH
Автор

could you please make a video on a a chatbot that can interact with pdf files and answer questions with recent tech ? I'm having the most difficulties with outdated tutorials. It would be a great help!

aryandhakal
Автор

Hello sir!
I want to build a question answering chatbot which gives answer form provided knowledge base in pdf or text format with python language. I'm working on this since last 10 days but failed to do till now! Can you please guide me through this project sir?

ujjwalsrivastava
Автор

What are the best ways of importing documents into the RAG system From corporate systems, such as Google Docs or Confluence or Notion without asking your IT?
I have actually done a few things manually, but they are very labour-intensive and manual for example using scraping tools and chrome extensions but is there something that is a bit more streamlined?

MoFields
Автор

Hello!
I’ve a doubt. The similarities is a way to reduce the number of tokens that is sent to the openAi api? So basically when you make a query to the llm you are not sending the entire text of the wikipedia page?
I ask it because of tokens cost, to know exactly what openai will charge us.

Your content is probably the best on youtube! Really appreciate all your videos

Francotujk
Автор

can u also show how to make structured output?

poynniu
Автор

I never liked RAG frameworks .. thanks for the useful content

bastabey
Автор

Great job. I'd try to make this work with free/opensource AI Models

I also wants to see if this will work with bigger corpus.

MrJekyllDrHyde
Автор

Hi, could you convert complex PDF documents (with graphics and tables) into an easily readable text format, such as Markdown? The input file would be a PDF and the output file would be a text file (.txt).

ignaciopincheira
Автор

Thanks for the video! However, RAG never convinced me. I'm looking for fine-tuning in 10 lines of code.

drp
Автор

... yes, you can do it that way - but, you lose functionality in terms of accuracy of relevance between topics

themaxgo
Автор

No frameworks, but please install RAGatuille? WTF!

MeinDeutschkurs
Автор

Thanks for this great video. I tried to run your juypter notebook. When calling the line "from google.colab import userdata"
I get the error: ModuleNotFoundError: No module named 'google'. and somewhere I see pkg_resources is deprecated as an API
Is python 3.12.3 too new?
OK, I replaced the google part. There are other ways to create an OpenAI client !
Now it works !

uwegenosdude