Easy 100% Local RAG Tutorial (Ollama) + Full Code

  Рет қаралды 11,488

All About AI

All About AI

Күн бұрын

Easy 100% Local RAG Tutorial (Ollama) + Full Code
GitHub Code:
github.com/AllAboutAI-YT/easy...
👊 Become a member and get access to GitHub and Code:
/ allaboutai
🤖 Great AI Engineer Course:
scrimba.com/learn/aiengineer?...
📧 Join the newsletter:
www.allabtai.com/newsletter/
🌐 My website:
www.allabtai.com
Links:
huggingface.co/sentence-trans...
ollama.com/download
In this video I create a 100% local RAG in around 70 lines of code. Feel free to share and rate on GitHub :)
00:00 Local RAG Intro
02:01 Local RAG Full Tutorial

Пікірлер: 43
@streetroller1000
@streetroller1000 20 күн бұрын
Just want to say that you're probably one of the easiest to follow and most intuitive persons I've seen on KZfaq doing guides for LLMs! Thanks!
@AllAboutAI
@AllAboutAI 20 күн бұрын
thnx mate:) appriciate it!
@crawfordscott3d
@crawfordscott3d 19 күн бұрын
Really appreciate all your content and how much energy you put into learning all this and sharing it. Thanks buddy
@SSHVWork-px6ry
@SSHVWork-px6ry 18 күн бұрын
it works after ollama run mistral this thank you
@ia360graus
@ia360graus 20 күн бұрын
Thank you so much for this tutorial, Could you make a video with some use cases with RAG in your daily life?
@enesgul2970
@enesgul2970 20 күн бұрын
Harikasınız
@nic-ori
@nic-ori 20 күн бұрын
👍Thanks! Useful information.👍
@AllAboutAI
@AllAboutAI 20 күн бұрын
no problem:) tnx for tuning in!
@Dylan-jq7hu
@Dylan-jq7hu 19 күн бұрын
Will you be doing a video’s on ChatGPT the App version anymore?
@pm1234
@pm1234 18 күн бұрын
Great! Thank you! I'd like to have the same for local code (django). One liners won't work, so how to do this?
@gumshoe9496
@gumshoe9496 20 күн бұрын
The discord link is still not working for me. Says it’s expired. Did you update the link or is this something on my end?
@JonathanDeCollibus
@JonathanDeCollibus 19 күн бұрын
same
@JNET_Reloaded
@JNET_Reloaded 19 күн бұрын
very good stuff
@mrkubajski9528
@mrkubajski9528 17 күн бұрын
can I add a folder including multiple PDFs and txts?
@gilzonme
@gilzonme 12 күн бұрын
Oh Man that worksssssssssss!
@user---------
@user--------- 17 күн бұрын
Which video card and how much memory?
@cclementson1986
@cclementson1986 12 күн бұрын
How would you deploy this in AWS for production? Would you use ollama and download the entire LLM model on an EC2 instance?
@ashishkgp
@ashishkgp 6 күн бұрын
use an inference endpoint for llm and a cpu based ec2 instance. It may be cheaper
@joshuapaul8042
@joshuapaul8042 6 күн бұрын
very interesting. issues: 1. it uses tkinter! 2. it strips the text from the pdf so it doesn't preserve page numbers - so you can't ask questions about where the text was found.
@positivevibe142
@positivevibe142 19 күн бұрын
What if my pdf has like a 1 million word/token, would this still work?
@rickmarques10
@rickmarques10 14 күн бұрын
Hey! There's any solution to make a good RAG like this using ollama on Openwebui?
@CharlesOkwuagwu
@CharlesOkwuagwu 19 күн бұрын
Please how would you advice we run this on JSON files, not PDF. I have several Q-A in . JSON format, not PDF.
@ClipsofCoolStuff
@ClipsofCoolStuff 17 күн бұрын
I made a pull request to the repo and he accepted it. If you repull the repo you should now have access to uploading PDF, TXT, and JSON files into the context.
@frudhammy2371
@frudhammy2371 16 күн бұрын
pdf.py has been replaced with upload.py (which handles pdf, txt and json)
@ThriftyEngineer
@ThriftyEngineer 2 күн бұрын
Thank you! I was stuck here.
@fernabot
@fernabot 19 күн бұрын
Really nice work! .. but is this really fully local? ... OpenAI?
@DoctorMandible
@DoctorMandible 2 күн бұрын
... Huh?
@brianclark4639
@brianclark4639 7 күн бұрын
Getting this error: import PyPDF2 File "C:\Anaconda\lib\site-packages\PyPDF2\__init__.py", line 12, in from ._encryption import PasswordType File "C:\Anaconda\lib\site-packages\PyPDF2\_encryption.py", line 34, in from ._utils import logger_warning File "C:\Anaconda\lib\site-packages\PyPDF2\_utils.py", line 55, in from typing_extensions import TypeAlias ModuleNotFoundError: No module named 'typing_extensions'
@sebastianbecerra1034
@sebastianbecerra1034 12 күн бұрын
no working in mac
@TheHistoryCode125
@TheHistoryCode125 18 күн бұрын
This video is a misleading tutorial that oversimplifies the process of creating a local RAG (Retrieval Augmented Generation) system. While the presenter claims to create a "100% local RAG in around 70 lines of code," they fail to address the complexities and limitations of such a system. The tutorial relies heavily on pre-built libraries and models, such as Ollama and sentence-transformers, without providing a deep understanding of how these components work together. Moreover, the presenter does not discuss the potential drawbacks of using a local RAG system, such as the limited amount of data it can handle and the lack of real-time updates. The video may give viewers a false sense of ease in implementing a RAG system, without considering the necessary expertise and resources required for a robust and reliable solution.
@sluggy6074
@sluggy6074 18 күн бұрын
Thanks, GPT 4.
@pm1234
@pm1234 18 күн бұрын
FYI GPTZero states this comment is 100% AI generated.
@userou-ig1ze
@userou-ig1ze 14 күн бұрын
Jeez, it almost academic if it weren't reeking of AI
@pojomcbooty
@pojomcbooty 16 күн бұрын
This is pretty epic !! I wonder if pdfplumber might be a better fit than pypdf2 ? I have been working with plain text and that works great, but a simple text-only PDF downloaded from google docs gets quite garbled. maybe pdfplumber might not be much better tbh but I've generally heard it's very solid. I also wonder how difficult would it be to add re-ranking / recursive retrieval / corrective RAG ? are any of those even necessary given the way sentence transformers work ? Either way - big kudos for all your awesome work and sharing it with the commuity !!
@pojomcbooty
@pojomcbooty 16 күн бұрын
would also love a comparison with a RAG based on knowledge graph (high level) - if anybody can graph this out and explain this well, it's you !! I've watched pretty much every youtube video there is that promises the earth from PrivateGPT etc. but you are dispensing actual knowledge !!!
@BalvinderNagi
@BalvinderNagi 9 күн бұрын
I get the following error: python localrag.py Traceback (most recent call last): File "/Users/eil-its/Documents/experiments/workspace-python/llama3rag/localrag.py", line 130, in response = ollama.embeddings(model='mxbai-embed-large', prompt=content) File "/Users/eil-its/Documents/experiments/workspace-python/llama3rag/llama/lib/python3.9/site-packages/ollama/_client.py", line 198, in embeddings return self._request( File "/Users/eil-its/Documents/experiments/workspace-python/llama3rag/llama/lib/python3.9/site-packages/ollama/_client.py", line 73, in _request raise ResponseError(e.response.text, e.response.status_code) from None ollama._types.ResponseError: failed to generate embedding
@chriskingston1981
@chriskingston1981 7 күн бұрын
me too, found any solution?
@kumarrohit557
@kumarrohit557 7 күн бұрын
same facing this error
@SSHVWork-px6ry
@SSHVWork-px6ry 18 күн бұрын
raise self._make_status_error_from_response(err.response) from None openai.NotFoundError: Error code: 404 - {'error': {'message': "model 'mistral' not found, try pulling it first", 'type': 'api_error', 'param': None, 'code': None}}
@grahaml6072
@grahaml6072 13 күн бұрын
You have to download the model. ollama pull mistral
@kumarrohit557
@kumarrohit557 7 күн бұрын
i found an error when i run localrag.py File "D:\easy-local-rag-main\localrag.py", line 134, in response = ollama.embeddings(model='mxbai-embed-large', prompt=content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\ollama\_client.py", line 198, in embeddings return self._request( ^^^^^^^^^^^^^^ File "C:\Users\HP\AppData\Local\Programs\Python\Python312\Lib\site-packages\ollama\_client.py", line 73, in _request raise ResponseError(e.response.text, e.response.status_code) from None ollama._types.ResponseError: failed to generate embedding
@kumarrohit557
@kumarrohit557 7 күн бұрын
please guide
@EduardoJGaido
@EduardoJGaido 3 күн бұрын
@@kumarrohit557 have you tried before doing that ollama pull mxbai-embed-large ?
Solving My Hacker News Problem with AI (Full Code)
10:36
All About AI
Рет қаралды 3,1 М.
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
McDonald’s MCNUGGET PURSE?! #shorts
00:11
Lauren Godwin
Рет қаралды 27 МЛН
Парковка Пошла Не По Плану 😨
00:12
Глеб Рандалайнен
Рет қаралды 14 МЛН
Reliable, fully local RAG agents with LLaMA3
21:19
LangChain
Рет қаралды 59 М.
How To Connect Llama3 to CrewAI [Groq + Ollama]
31:42
codewithbrandon
Рет қаралды 17 М.
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
Llama3 Full Rag - API with Ollama, LangChain and ChromaDB with Flask API and PDF upload
47:09
Python Advanced AI Agent Tutorial - LlamaIndex, Ollama and Multi-LLM!
53:57
How I Made AI Assistants Do My Work For Me: CrewAI
19:21
Maya Akim
Рет қаралды 632 М.
Getting Started on Ollama
11:26
Matt Williams
Рет қаралды 19 М.
ИГРОВОЙ ПК от DEXP за 37 тысяч рублей из DNS
27:53
Компьютерная мышь за 50 рублей
0:28