Someone asked Hacker News a plain question: agentic search vs RAG — what’s your production experience? The original poster had already switched to agentic search while building AI-native apps with Claude Code. It gave better accuracy, at a higher cost per query. The one reply that came back mattered more than the question. Cost climbs fast once you leave a single retrieval pass. Cost per successful task is a more honest number than cost per query. Here’s the decision that thread was reaching for, laid out in one place.
- Three real options exist: plain RAG, agentic search, and long context — not two, and not a spectrum.
- The decision comes down to three questions: does it fit in context, is the question a simple lookup, and can you afford the extra cost.
- Agentic search wins on hard questions — a Microsoft benchmark found it drove a 5.9x jump in retrieval accuracy over single-shot search.
- It costs real money to get there. The honest default is plain RAG first; agentic search only for the queries that need it.
The Three Options on the Table#
Three different systems get lumped into “how do I get an LLM to answer from my documents,” and they trade off in different places.
Plain RAG is the pipeline you already know: embed the question, retrieve the top chunks once, generate an answer from whatever came back. One retrieval, one model call, done — see the full RAG breakdown if you need the basics.
Agentic search turns retrieval into a decision instead of a fixed first step. Microsoft’s own description of its Azure AI Search agentic retrieval pipeline is a good vendor-neutral definition. An LLM decomposes a complex question into smaller sub-queries, runs them in parallel against your knowledge sources, reranks each set, and merges the results into one grounded answer. That’s the packaged version of the same idea behind agentic RAG. The difference is scope, not concept: agentic RAG is the loop you build yourself; agentic search is that behavior bought as a platform feature or a heavier in-house harness.
Long context skips retrieval entirely — you paste the whole document set into the model’s context window and let it read everything. No embeddings, no chunking, no ranking.
These aren’t tiers of the same technology. They’re three different places to spend your budget: engineering time, per-query dollars, or context tokens. The right choice depends on which budget you actually have room in, not which one sounds newest.
The Agentic Search vs RAG Decision Flowchart#
Three questions sort almost every case. Answer them in order and stop at the first “yes.”
- Does your corpus fit in one context window? If your whole knowledge base is small enough to paste in whole — a handful of PDFs, not a growing wiki — long context is the simplest thing that works. No pipeline to maintain.
- Is the question a simple, single-hop lookup? “What’s our refund window?” needs one fact from one place. Plain RAG’s single retrieval handles this correctly almost every time, and it’s the cheapest, most predictable option on the table.
- Can you name the failure agentic search fixes, and afford to pay for it? If questions are routinely multi-part, ambiguous, or a wrong answer is expensive, the extra calls are buying you something real.
That logic is a router, not a philosophy — you can write it as one:
def route_query(query, corpus_tokens, is_high_value=False):
"""Cheap default first. Only escalate when it's worth it."""
if corpus_tokens < 100_000:
return "long_context" # small enough to just paste in
if is_simple_lookup(query) and not is_high_value:
return "plain_rag" # the default — cheap, predictable
return "agentic_search" # ambiguous or high-stakes: pay for the loop
def is_simple_lookup(query):
"""One cheap classifier call — not a full agent loop."""
out = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[{"role": "user", "content":
f"Is this a single, direct lookup (YES) or does it need multiple "
f"facts combined (NO)? Reply only YES or NO.\n\nQuestion: {query}"}],
)
return out.choices[0].message.content.strip().upper().startswith("YES")Wire the three branches to whatever you’ve already built — generate_from(query, retrieve(query, store)) for the plain-RAG branch (from the from-scratch RAG post), and agentic_answer(query, store) for the escalation branch (from the agentic RAG post). The router is the entire decision — everything downstream of it is code you likely already have.
The top reply on the original HN thread described exactly this pattern: a cheap default path for most queries, with only ambiguous or high-value questions routed into the heavier agentic flow — and judged cost by successful task, not by query.
The Cost Reality#
Agentic search costs more, and the mechanism is worth understanding before you commit to it. Every sub-query, rerank, and re-plan step is another round of LLM inference on top of the search infrastructure itself. Microsoft’s Azure AI Search bills agentic retrieval by token, not by query. Its own worked example runs 2,000 retrievals at three sub-queries each — 6,000 total queries, 300,000 reranked chunks — for a combined bill around four dollars. That’s on top of whatever your LLM provider charges for the query-planning calls. Classic single-query search bills a flat rate per query; agentic search’s bill moves with how many sub-queries and reranks a question actually triggers.
That’s the honest shape of the cost: not a fixed multiplier, but a bill that scales with how hard the question turns out to be. A simple question that only needed one sub-query costs barely more than plain RAG. A genuinely ambiguous one spins up three sub-queries, reranks a few hundred chunks, and still needs a rewrite. That one costs meaningfully more — and you don’t know which kind you’ve got until the loop runs.
Measure cost per successful task, not cost per query. A cheap query that returns a wrong answer and triggers a support ticket or a manual fix costs more than an expensive query that gets it right the first time.
When Plain RAG Is Genuinely Enough#
Most production question-answering never needed the loop in the first place. If your documents are clean, your questions are direct, and a single retrieval reliably contains the answer, plain RAG’s single pass is not a compromise — it’s the correct architecture. It’s also the one your team can debug at 2 a.m., because there’s exactly one retrieval to inspect, not a variable-length chain of sub-queries and rewrites.
Stay on plain RAG by default. The HN thread’s own top comment made this the whole strategy: keep retrieval tight, and only reach past it when the tight version visibly fails.
When to Pay for Agentic Search#
The case for agentic search is strongest exactly where plain RAG’s single pass runs out of chances. A 2026 Microsoft research paper on exactly this question, AgenticRAG (Suresh et al.), measured it directly. Shifting from single-shot search to an agentic, tool-using loop was the single largest factor in a 5.9x jump in recall@1 on a hard multi-hop benchmark. The same harness landed at 92% answer correctness on a financial-document benchmark, within two points of having the correct evidence handed to it directly. That’s not a marginal accuracy bump. It’s the gap between a system that mostly guesses right and one that reliably finds the actual answer.
Pay for agentic search when you can point at the specific failure it fixes. That’s compound questions your single retrieval keeps splitting in half, ambiguous phrasing that needs a rewrite before it retrieves anything useful, or a cost of being wrong that dwarfs the cost of a few extra model calls. Turning it on for every query because it scored well on a benchmark is how teams 3–5x their bill to fix the fraction of questions that actually needed the help.
Quick Recap#
- Corpus fits in context? Use long context — no pipeline needed.
- Simple, single-hop question? Use plain RAG — cheap and predictable.
- Ambiguous, multi-part, or high-stakes, and worth the cost? Use agentic search.
- Default to plain RAG and route only the hard cases up.
- Measure cost per successful task, not cost per query.
Conclusion#
Agentic search vs RAG was never really a “which is better” question — the Hacker News thread that prompted this post proves it, with practitioners landing on a hybrid rather than picking a side. Plain RAG stays the default because it’s cheap and predictable; agentic search earns its keep only on the questions that name a real failure it fixes; long context quietly handles the cases too small to need a pipeline at all.
Which did you ship, and did the cost surprise you? Tell me in the comments — I’m especially curious whether anyone’s hybrid router looks different from the one above.
Read next: Agentic RAG: Why Static Retrieval Isn’t Enough — the build-it guide for the escalation path this post’s flowchart points to.
- Need the RAG foundation first? What Is RAG? covers the retrieve-augment-generate core in plain language.
- Ready to build the agentic branch? Agentic RAG walks through the retrieve-grade-rewrite loop in runnable code.
- Deciding if you need an agent at all? AI Agent vs Workflow is the same “do I need the extra machinery?” question one level up the stack.

