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…
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.
thank you very much
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.
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.