VOOZH about

URL: https://thenewstack.io/rag-retrieval-scaling-architecture/

⇱ Why production RAG systems give confident, wrong answers at scale - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2026-05-19 10:00:00
Why production RAG systems give confident, wrong answers at scale
sponsor-vespa-ai,sponsored-post-contributed,
AI Engineering / AI Infrastructure / Large Language Models

Why production RAG systems give confident, wrong answers at scale

Why production RAG systems break at scale and how a unified multi-stage retrieval architecture restores recall and keeps latency low.
May 19th, 2026 10:00am by Jenny Morris
👁 Featued image for: Why production RAG systems give confident, wrong answers at scale
Imkara Visual for Unsplash+
Vespa.ai sponsored this post.

In production RAG systems, the biggest bottleneck usually isn’t the LLM. It’s retrieval.

Most teams start with a simple pattern: Encode the query, retrieve a handful of documents from a vector database, pass them to the model, and generate an answer. With small, well-organized datasets, this feels almost magical. The right document is usually among the top results. Context is clean. The system appears fast, accurate, and reliable.

But this success is an illusion.

As data grows, a few hundred documents become millions with messy metadata, duplicate versions, access controls, and ambiguous language, all under real latency constraints. The probability that the right document appears in the top results drops sharply. Retrieval quality degrades quietly, long before anyone notices.

The system still produces answers. But now the model is working with an incomplete or irrelevant context. It compensates by filling in the gaps. Responses remain fluent and confident, but increasingly wrong. What looked like intelligence starts to feel unreliable.

“RAG systems rarely break because the model is weak. They break because retrieval architectures designed for tidy demos collapse under production scale.”

At that point, teams often blame embeddings, prompts, or model size. But the failure happens earlier. RAG systems rarely break because the model is weak. They break because retrieval architectures designed for tidy demos collapse under production scale.

The problem is not intelligence. It is recall.

The retrieval gap

Imagine a company building an internal knowledge assistant for ten thousand employees. The system must search ten million documents: financial memos, technical specs, project plans, and meeting notes. Responses must arrive within 2 seconds. Financial answers must be correct.

An engineer asks:

“What was the final decision on the Helios project budget in Q4, ignoring drafts?”

The system retrieves ten documents. None contains the approved budget memo. Several contain early discussions. The language model produces a confident but incorrect answer.

Nothing is broken. The model behaved exactly as designed. It summarized the context it received. The failure isn’t “LLM hallucination.” The right evidence never made it into the context.

👁 Workflow diagram showing how a query can cause an LLM to output a wrong answer

This isn’t an edge case. It’s what happens when retrieval systems built for small datasets meet production scale.

Why retrieval fails at scale

Large corpora behave differently from small ones. Relevant documents are buried deeper in ranking distributions. Metadata matters more. Exact terminology matters more. Permissions and filtering become essential. Latency budgets become strict.

Retrieving only a handful of candidates becomes statistically unreliable. The best document might be ranked 300th by semantic similarity but first by exact keyword match. Or filtered out by metadata. Or overshadowed by drafts.

“Once retrieval misses the target, the rest of the pipeline cannot recover. No prompt can fix missing context.”

Once retrieval misses the target, the rest of the pipeline cannot recover. No prompt can fix missing context. No larger model can infer information that was never retrieved.

The architecture that actually scales

Production RAG is not just a smarter prompt or a bigger model. It is a different retrieval architecture.

Instead of fetching a few candidates and hoping one is correct, scalable systems cast a wide net, apply filtering during retrieval, and progressively refine results through multiple ranking stages. Retrieval becomes a unified serving pipeline rather than a chain of disconnected services.

👁 Workflow diagram showing how scalable systems cast a wider net, receiving higher-quality context and generating a more grounded response.

The system retrieves many candidates quickly, filters early, ranks cheaply, reranks selectively, and sends only the best evidence to the model.

Deep retrieval and progressive ranking

Scalable retrieval works like a funnel. First, gather a large candidate pool using fast approximate methods. Then score all candidates using cheap signals such as lexical relevance and embedding similarity. Finally, apply expensive neural rerankers only to the most promising subset.

This structure controls both quality and cost. Expensive computation is focused where it matters most.

👁 Workflow diagram showing how scalable retrieval applies expensive neural rerankers to the most promising subset.

Wide recall at the top. Precision at the bottom. Without this funnel, systems face a tradeoff between accuracy and latency. With it, they achieve both.

The four scaling cliffs

Seen this way, the failure modes become clear:

Cliff #1: Candidate generation is too shallow. The correct document never enters the ranking pipeline.

Cliff #2: Retrieval is fragmented across multiple services. Each network call adds latency and introduces data inconsistency. Scores from different systems are not directly comparable.

Cliff #3: Expensive reranking is applied too broadly. Neural models run on hundreds or thousands of candidates, inflating cost and response time.

Cliff #4: Prompt engineering is used as a substitute for retrieval quality. When context is wrong, output remains wrong.

These are not model problems. They are serving architecture problems.

Building RAG that actually scales

Production RAG requires a different retrieval architecture.

At a small scale, retrieval can behave like a loose pipeline of disconnected components. At the production scale, that approach breaks down. Retrieval must operate as a unified serving system that maximizes recall, controls latency, and progressively refines results.

The following four principles define what scalable retrieval systems get right.

Principle #1: Treat retrieval as a serving system

The first shift is conceptual: retrieval is not a workflow;, it is a serving problem.

Stop thinking in terms of disconnected steps:

embedding service → vector database → filter script → reranker → LLM

Start thinking in terms of a unified system:

retrieval engine (hybrid search + filtering + ranking) → LLM

In production, these components cannot operate in isolation. Hybrid search, metadata filtering, and ranking must execute together, on the same data, within a single query path.

Vector similarity alone is not enough. Real queries depend on semantic understanding, exact keyword matching, structured filters such as time, entity, and permissions, andas well as learned ranking signals. These signals need to interact directly, not be stitched together across multiple services.

Systems like Vespa are designed around this idea, executing hybrid retrieval and multi-stage ranking inside a single serving layer. This avoids synchronization issues and eliminates unnecessary network hops.

The specific platform matters less than the architecture. What matters is that retrieval is integrated rather than fragmented across services, low latency rather than distributed across multiple execution paths, and progressively selective, moving from broad recall to precise ranking.Once retrieval is treated as a system, the next question becomes: how do you ensure it actually finds the right information?

Principle #2: Hybrid retrieval + large candidate sets

Maximize recall in the candidate generation stage by combining hybrid retrieval with a sufficiently large top-K.

Semantic search captures conceptual similarity, while keyword search captures exact matches. Real-world queries depend on both. For example, a financial approval memo may not be semantically close to “budget decision,” yet it will contain exact project names, dates, and approval language. Pure semantic retrieval can miss it, while pure keyword search can miss related context. Hybrid retrieval combines both signals, significantly increasing coverage.

But the retrieval method alone is not enough. Candidate generation is fundamentally a recall problem, not a precision problem. If the relevant document never enters the candidate set, no downstream ranking model can recover it. That is why top-K should be set intentionally large, especially as corpus size and query ambiguity grow. Hybrid retrieval expands coverage across semantic and lexical signals, while larger candidate sets increase the probability that the correct document survives into later ranking stages. At this stage, recall matters more than precision.

High recall creates the conditions for effective ranking. Without it, the system is operating on an incomplete shortlist. 

With a strong candidate set in place, the next challenge becomes efficiency.

Principle #3: Multi-stage ranking matters

Neural rerankers are powerful, but too expensive to run across large candidate sets.

The solution is a multi-stage ranking pipeline. Early stages use fast, lightweight methods to eliminate obvious mismatches, while later stages apply more expensive models, such as cross-encoders or LLM-based rerankers, only to a smaller and higher-quality subset.

This structure balances relevance, latency, and cost. Early filtering reduces unnecessary computation, while expensive ranking models focus only on plausible candidates.

Without staging, systems face a difficult tradeoff: either run expensive models across everything and sacrifice latency, or restrict the candidate set too early and sacrifice recall. Multi-stage ranking removes that tradeoff, allowing systems to maintain large candidate pools while remaining efficient.

At this point, we have the mechanics. The final principle explains why all of this matters.

Principle #4: Retrieval quality determines system quality

Language models do not verify facts. They synthesize responses from the evidence they are given.

If the retrieved context is precise, answers are precise. If the context is noisy, answers become uncertain. If the context is wrong, the answers are wrong.

This makes retrieval the dominant factor in system performance. Importantly, retrieval quality is not the result of a single decision, but of the entire pipeline: how candidates are generated, how many documents are retrieved, how ranking is staged, and how much irrelevant context ultimately reaches the model. Focusing on any one component in isolation misses the point because these decisions interact.

That is why retrieval should be evaluated as a system. Measure recall during candidate generation, track how recall changes across ranking stages, inspect how much irrelevant context reaches the prompt, and understand where latency is introduced throughout the pipeline.

When recall is low anywhere in the system, nothing downstream can recover. Improving prompts without improving retrieval is cosmetic optimization. Improving retrieval changes outcomes.

“Improving prompts without improving retrieval is cosmetic optimization. Improving retrieval changes outcomes.”

RAG does not fail because language models are limited. It fails because retrieval pipelines are underspecified.

Small systems can tolerate shallow retrieval, fragmented components, and brute-force reranking. Large systems require deep candidate generation, unified serving, and staged computation. Scale forces discipline.

Production systems succeed when retrieval is treated as an end-to-end serving problem built around deep candidate generation, hybrid search, early filtering, progressive ranking, and precise context selection.

When the right evidence reaches the model, correct answers follow naturally.

The gap between a working demo and a reliable production system is not mysterious. It is architectural.

Vespa.ai is a platform for building AI-driven applications for search, recommendation, personalization, and RAG. It handles large data volumes and high query rates, offering efficient data, inference, and logic management. Available as both a managed service and open source.
Learn More
The latest from Vespa.ai
Hear more from our sponsor
TRENDING STORIES
Jenny Morris is a Senior Principal Solutions Architect at Vespa.ai, where she operates at the intersection of AI infrastructure and enterprise strategy, working with organizations to build scalable AI search, personalization, and retrieval-augmented generation (RAG) systems. With deep expertise in...
Read more from Jenny Morris
Vespa.ai sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Real.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.