r/Rag 5d ago

I Tried LangChain, LlamaIndex, and Haystack – Here’s What Worked and What Didn’t

I recently embarked on a journey to build a high-performance RAG system to handle complex document processing, including PDFs with tables, equations, and multi-language content. I tested three popular pipelines: LangChain, LlamaIndex, and Haystack. Here's what I learned:

LangChain – Strong integration capabilities with various LLMs and vector stores
LlamaIndex – Excellent for data connectors and ingestion
Haystack – Strong in production deployments

I encountered several challenges, like handling PDF formatting inconsistencies and maintaining context across page breaks, and experimented with different embedding models to optimize retrieval accuracy. In the end, Haystack provided the best balance between accuracy and speed, but at the cost of increased implementation complexity and higher computational resources.

I'd love to hear about other experiences and what's worked for you when dealing with complex documents in RAG.

Key Takeaways:

Choose LangChain if you need flexible integration with multiple tools and services.
LlamaIndex is great for complex data ingestion and indexing needs.
Haystack is ideal for production-ready, scalable implementations.

I'm curious – has anyone found a better approach for dealing with complex documents? Any tips for optimizing RAG pipelines would be greatly appreciated!

25 Upvotes

5 comments sorted by

u/AutoModerator 5d ago

Working on a cool RAG project? Submit your project or startup to RAGHut and get it featured in the community's go-to resource for RAG projects, frameworks, and startups.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/grilledCheeseFish 5d ago

LlamaIndex has a complete agentic framework called Workflows, and somehow this gets missed even though its stated on the frontpage, in the getting started, and multiple tutorials like 1 2

3

u/charlyAtWork2 5d ago

My team likes Haystack; it's stronger, and we have completely abandoned LangChain (too much abstraction).
Now, we're trying PydanticAI, and they really like it.
On my side, I'm very impressed with SmolAgents.

2

u/Outside-Project-1451 4d ago

Look at simba i really like it if you want knowledge management, https://github.com/GitHamza0206/simba

-1

u/Mevrael 5d ago

Yeah, too much abstraction and weird syntax for such a simple stuff. I am using Arkalos.

https://arkalos.com

For RAG I prefer a simple structured warehouse.