What's achievable with n8n RAG for document analysis?

I’ve been playing around with RAG setups for analyzing academic papers and reports. My goal is to get really accurate answers when I ask questions about these documents. But I’m not too happy with the results so far.

Sometimes the answers are okay, but other times they’re way off. I’ve seen weird stuff like made-up info, random code snippets, and even generic responses that don’t fit the question.

I’m using free tools like Ollama and open-source models (mxbai-embed-large for embeddings, Mistral, Supabase). Is this why I’m getting mixed results?

What kind of setup would give me the best shot at consistent, high-quality answers? Am I expecting too much compared to paid RAG services out there?

Any tips or insights would be super helpful. Thanks!

hey emma, i’ve been there too. free tools can be hit or miss. paid services might give better results, but they’re pricey. have u tried fine-tuning ur model on academic papers? that could help. also, experiment with different chunking methods and prompt engineering. don’t give up, RAG has potential!

As someone who’s worked extensively with RAG systems for document analysis, I can relate to your frustrations, Emma. Free tools can definitely be hit-or-miss, especially for specialized tasks like academic paper analysis.

One thing that’s helped me is focusing on query preprocessing. I’ve found that breaking down complex questions into simpler sub-queries often yields better results. Also, don’t underestimate the power of context engineering - providing relevant background info with each query can significantly improve accuracy.

Have you considered using a hybrid approach? Combining RAG with a knowledge graph or structured data extraction might help mitigate some of the inconsistencies you’re seeing. It’s more work upfront, but I’ve found it pays off in terms of result quality.

Lastly, while paid services can offer better out-of-the-box performance, there’s still a lot you can achieve with open-source tools. It just requires more fine-tuning and experimentation. Keep at it!

I’ve encountered similar challenges with RAG setups for document analysis. Free tools can sometimes provide promising results, but they often struggle with specialized tasks like analyzing academic papers. The inconsistencies you’re facing, such as irrelevant or erroneous responses, are common in these setups.

Improving your results might involve refining your chunking strategy to better capture the nuances of academic content and testing embedding models that are geared towards scientific text. Additionally, incorporating a post-processing step to filter out nonsensical responses and fine-tuning your model on academic material could make a noticeable difference. It’s a process of continual refinement, but persistent experimentation should lead to more consistent outcomes.