RAG or LoRA for "Talk with Documents"
What makes the most sense when trying to interact with PDF files? RAG or LoRA? I’ve been trying with LoRA for months now, but I can’t get a satisfying result…
2025-01-09T14:27:11Z
If you have to choose between the two, it’s definitely RAG. You should think of LoRA as something you use to improve the accuracy of your tasks after you have a certain degree of idea of the overall flow.Not just for you, but if you are stuck on training AI and your questions span across other fields, I recommend asking on HF Discord.There are far more people there who are actually training and operating models.
2025-01-09T14:30:22Z
thank you very much
2025-01-09T14:30:32Z
Hi,@Luli1409!First, I will appreciate your effort.And RAG and LoRA are both good methods to chat with your document.If you don’t satisfy the result, I recommend you to use RAG.In RAG you can use vector database. This is very effective way to chat with your document.But you should consider the response time. Which db service you choose, the time limit is different.You can also view my examples.kaggle.comLangchain agent 1Explore and run machine learning code with Kaggle Notebooks | Using data from No attached data sourceshuggingface.coArxiv Pdf Summarization - a Hugging Face Space by Alanturner2This is the project for arxiv pdf summarization
2025-01-16T17:39:39Z
RAG is the way to go! because the document will be embedded and stored in a vector DB which you will query (talk to the document) via a vector similarity_search with score. The results will be the contents of the document that have closer vector values compared to the vector of the search query.