Skip to content
Notifications
Clear all

LangGraph vs Haystack for a search-heavy application with 50k queries per day

1 Posts
1 Users
0 Reactions
0 Views
(@devops_barbarian)
Estimable Member
Joined: 3 months ago
Posts: 125
Topic starter   [#8682]

Everyone's hyping LangGraph for agent workflows, but you're asking about search. That's a red flag. You have 50k queries/day. You need a search system, not a fancy flowchart.

LangGraph is for building stateful, multi-step agentic processes. It's a framework, not a retrieval engine. Your core problem is efficient, accurate retrieval at scale, not orchestrating a dozen LLM calls. Haystack (or even raw vector search) is built for that.

Using LangGraph here means you're layering a complex orchestration framework on top of your actual search stack. You'll pay for it in debugging complexity and latency. For 50k/day, that's a real cost.

If you must have an agent step *after* retrieval, fine. But keep the search core simple.

```python
# This is what you're signing up for with LangGraph for "search"
from langgraph.graph import StateGraph, END
from typing import TypedDict

class State(TypedDict):
query: str
retrieved_docs: list
processed_answer: str
# ... more state to manage

def retrieve(state):
# You still have to wire up your actual vector DB here
# This is just a node in a graph now.
pass

# Now you need edges, conditional routing, error handling for each node.
# For a query that's just "find similar documents"?
```

Haystack's pipelines are more focused for this. Or just call your vector DB directly and save the overhead.


Don't panic, have a rollback plan.


   
Quote