How to chat with your PDFs using local Large Language Models [Ollama RAG]

preview_player
Показать описание
In this tutorial, we'll explore how to create a local RAG (Retrieval Augmented Generation) pipeline that processes and allows you to chat with your PDF file(s) using Ollama and LangChain!

✅ We'll start by loading a PDF file using the "UnstructuredPDFLoader"
✅ Then, we'll split the loaded PDF data into chunks using the "RecursiveCharacterTextSplitter"
✅ Create embeddings of the chunks using "OllamaEmbeddings"
✅ We'll then use the "from_documents" method of "Chroma" to create a new vector database, passing in the updated chunks and Ollama embeddings

The model will retrieve relevant context from the updated vector database, generate an answer based on the context and question, and return the parsed output.

TIMESTAMPS:
============
0:00 - Introduction
0:07 - Why you need to use local RAG
0:52 - Local PDF RAG pipeline flowchart
5:49 - Ingesting PDF file for RAG pipeline
8:46 - Creating vector embeddings from PDF and store in ChromaDB
14:07 - Chatting with PDF using Ollama RAG
20:03 - Summary of the RAG project
22:33 - Conclusion and outro

LINKS:
=====

Follow me on socials:

#ollama #langchain #vectordatabase #pdf #nlp #machinelearning #ai #llm #RAG
Рекомендации по теме
Комментарии
Автор

Im a medical researcher and, surprisingly, my life is all about pdfs i dont have any time to read; let alone learn the basics of code. And i think there's a lot of people on the same boat as mine. Unfortunately, its very fucking hard to actually find an ai tool thats barely reliable. Most of youtube is damped with sponsors for ai magnates trying to sell their rebranded and redudant worthless ai-thingy for a montlhy subscription or an unjustifiably costly api that follows the same premise. The fact that you, the only one that came closer to what i actually need - and a very legitimate need - is a channel with <1k subscribers is dismally scary. I only found you thx to you post on r/ollama.

I think you could really benefit from making a even more dumbed down tutorial for code cavemen like myself who got too used to ooga booga ai text input user interfaces and dont have any brainspace left for minimally more complex tasks.

Anyway, much appreciated. Thanks for your work.

levi
Автор

I don't subscribe easily even at gun point. But I like your way and now I'm a subscriber. Great technical clarity is what the modern world needs.

daixtr
Автор

I am a layman and have been trying to figure this out for a week, I've watched alot of video's but yours has been by far the best. You cadence is good, you are direct while making it accessible on a high level to follow along. No obfuscation or assumptions. etc etc etc. Great video thank you, have a comment like and subscribe.

maly
Автор

one of the best videos about RAG and LLM i have come across!! thanks a lot!!

Adinasa
Автор

Thank You. I have done several similar projects and I learn something new about 'local RAG' with each one !

davidtindell
Автор

You sir are awesome! It is easy to make things hard, yet hard to make them simple. Thanks for working so hard to make this simple. Excellent presentation. I will be coming back for more!!

tenthe
Автор

Such an amazing video, I didn't get a single video like this to get me started so easily. You are truly amazing!

nacksters
Автор

It is by far the easiest and excellent tutorial for learning RAG + PDF. I'd love to see more of topic with a bit more advance in the future. Thank you very much!

johnpark
Автор

Thanks for this amazing tutorial on building a local LLM. I applied it to my research paper PDFs, and the results are impressive.

DynamicMolecules
Автор

Good to see fellow Kenyans on AI. Perhaps the Ollama WebUI approach would be easier for beginners as one can attach a document, even several documents to the prompt and chat.

VairalKE
Автор

Welcome on my special list of channels I subscribe to. Looking forward to you making me smarter😊

claussa
Автор

You are a awesome teacher, thank you so much to explain this in a clean and objective way :)

thiagobutignonclaramunt
Автор

Useful tip : use a proper wifi dont use Mobile hotspot while pulling the model from ollama, i had a error with that, hopes it helps someone😊

Marques
Автор

Ahsante sana Kip. Working on a bank/ fintech chatbot and will use this info to build it.

wesleymogaka
Автор

Thats a pretty clean explanation.
looking for more videos.

Reddington
Автор

Thank you for this excellent intro. You are a natural teacher of complex knowledge and this has certainly fast-tracked my understanding. I'm sure you will go far and now you have a new subscriber in Australia. Cheers and thank you - David

deldridg
Автор

That cool be nice to see multiple pdfs loaded, to see if can be made handle different topics at once.

ArmandoSilvaVelázquez
Автор

this was super clear, extremely informative, and was spot on with the exact answers I was looking for. Thank you so much.

nmadcre
Автор

Congrats man. Really useful content. Well explained and effective.

ISK_VAGR
Автор

Really userful content and well explained. t would be interesting to see a video but with different types of files, like only PDFs, for example Markdown, PDF, and CSV all at once. It would be very interesting.

Marduk