DoorDash Decoupled Search Grounding (DSG) Slashes AI Costs 98%
DoorDash engineers have slashed their AI search costs by over 98% using a new system called DoorDash Decoupled Search Grounding (DSG). This setup pulls web search out of the model provider's API.
DSG is crushing it. DoorDash engineers have achieved something remarkable, dramatically reducing their Large Language Model web search costs by over 98%, a feat that represents a fundamental shift in their approach to AI information retrieval. It's not just a small tweak. They've essentially removed the search engine from the LLM provider's API and brought it in-house, implementing a sophisticated system they've dubbed DoorDash Decoupled Search Grounding (DSG).
DoorDash Slashes AI Search Costs
Here is the deal: instead of letting the LLM provider's API handle web searches every single time, DoorDash built their own search gateway. This gateway is compatible with the Model Context Protocol (MCP), acting as a central hub. Think of it as a smart traffic controller for information. When an LLM needs to look something up on the web, it doesn't go directly to a single, often expensive, vendor. Instead, it queries this gateway. This innovative approach is central to DoorDash Decoupled Search Grounding (DSG).
It routes intelligently. DoorDash has integrated five different search providers into their system: Serper, Bright Data, Firecrawl, Exa, and Tavily, allowing for exceptional adaptability and granular command over their search functionalities, ensuring they can always access the most relevant information for any given query. Plus, they can still use native search from the LLM provider as one of the options. This modular approach gives them incredible flexibility and control.
Why Native Search Was Causing Problems
- Control: When a model provider changes their pricing or swaps out their search technology, DoorDash had to go back and tweak their core model integrations. That's a headache and a bottleneck.
- Reuse: If two different AI agents within DoorDash needed the same piece of information, they'd each pay for a separate web search. That's inefficient and costly.
- Observability: Keeping track of exactly how much each query cost and how long it took was nearly impossible. The per-query costs and latency were hidden within the provider's API.
DSG truly shines here. They gain granular control, externalizing search. This allows them to swap providers on the fly, react to price changes instantly, and see exactly where their money is going, providing unparalleled flexibility and cost-efficiency in their operations.
Caching Powers DoorDash's Search Gateway
How does it work? Each AI agent and reasoning model connects via a single, standardized MCP interface. Behind this interface resides a registry of those pluggable search backends we discussed, ready to receive requests. The system then meticulously processes each incoming query through a carefully orchestrated series of steps, precisely engineered to ensure both maximum efficiency and absolute accuracy, thereby guaranteeing a superior user experience. This is the core functionality of DoorDash Decoupled Search Grounding (DSG). It's quite remarkable.

First, the query is normalized. This means even slightly different ways of asking the same question will hit the same cached result. Then, it checks an exact cache. If nothing matches there, it moves to a semantic cache, which uses embedding similarity to find relevant past searches. Only if both caches miss does the system engage the fallback chain of actual search providers.
Results map. A shared schema for title, URL, and snippet organizes everything. Both cache layers are written to, scoped per provider, and possess carefully tuned time-to-live settings, a design choice that guarantees fresh data when it's needed and maximizes reuse whenever possible. New HTTP search providers can be onboarded quite simply by configuring a YAML adapter, meaning no new application code is required whatsoever. Every request gets logged. It notes the provider used, whether the data was found in the cache, how deep the retrieval went, latency, and, of course, the cost.
DSG Matches Native Search Accuracy
The big question, of course, is whether this cost-saving measure comes at the expense of accuracy. The DoorDash engineers tested this thoroughly. On public benchmarks like HotpotQA, SimpleQA, and FreshQA, their DSG configurations achieved accuracy scores between 83% and 86%. This demonstrates the robust performance of DoorDash Decoupled Search Grounding (DSG). This is very close to the 87.7% accuracy seen with native search.
The real win. DoorDash managed to reach accuracy levels on par with native systems, but at a much lower price , between ten and thirty times less expensive than their old methods. This showed impressive savings. One specific configuration, employing BrightData, achieved results just 1.6 points shy of native search accuracy, yet it did so at approximately eleven times less expense, a remarkable economic advantage. Another provider, Serper, dramatically reduced the cost, bringing it down to under $0.70 per 1,000 queries, making it an incredibly affordable option.
In their own production environment, focusing on query intent understanding (QIU), essentially mapping ambiguous searches to specific shopping intents, the results were even more dramatic. Using Gemini Flash as the reasoning model, the native baseline (which used Gemini's integrated Google search) cost $7.90 per 1,000 queries. With DoorDash Decoupled Search Grounding (DSG), this plummeted to just $0.110 per 1,000 queries. That’s a staggering cost cut of about 98.6%, according to their calculations. On a specific test of 7,988 retail queries, DSG matched or slightly beat native search accuracy, hitting 93.90% compared to native's 93.40%.
Caching Boosts Speed and Efficiency
Caching plays a massive role in both cost and performance. A warm, shared cache dramatically increased the hit rate from a mere 6.2% to an impressive 99.4%. This means nearly all repeat queries were served instantly from cache. The average latency dropped from 4,570 milliseconds to 1,465 milliseconds, a 68% reduction. And, as mentioned, the search cost per 1,000 queries slashed from $0.7385 down to $0.0045. Retrieval depth is now a tunable parameter. On SimpleQA, increasing the number of results from 2 to 6 boosted accuracy from 78.7% to 84.9%. Going further to 10 results only added a minimal 0.6 points, showing diminishing returns.
DSG Improves LLM Output Formatting
One of the subtle but critical benefits of DSG is how it handles output formatting. Many DoorDash LLM calls need to output structured data like JSON, specific enums, or simple booleans. With native search integrated directly into the LLM's generation stream, models can sometimes ignore "answer only" instructions. For example, on HotpotQA, Claude Sonnet 4's native-search answers violated this instruction 78.1% of the time. In one instance, native search returned a verbose answer starting with "Based on the search results," when only a simple "Yes" was required and parseable. DSG solves this by returning search results as a distinct tool response, separate from the main text generation. This separation ensures that the LLM receives the evidence cleanly, making it far more likely to adhere to output format constraints and provide parseable, actionable data. This is a key benefit of DoorDash Decoupled Search Grounding (DSG).
Frequently Asked Questions about DoorDash Decoupled Search Grounding (DSG)
- What is DoorDash Decoupled Search Grounding (DSG)? DoorDash Decoupled Search Grounding (DSG) is a system developed by DoorDash engineers to externalize web search from Large Language Model (LLM) providers' APIs, bringing it in-house to reduce costs and gain more control.
- How does DSG reduce search costs? DSG reduces costs by using a custom search gateway that integrates multiple search providers, implements caching at exact and semantic levels, and logs all requests for granular cost observability, leading to significant savings compared to native LLM search.
- Does DSG maintain accuracy compared to native search? Yes, DoorDash's tests show that DSG configurations achieve accuracy scores very close to or even slightly exceeding native search on public benchmarks and in production environments, while being significantly more cost-effective.
- What are the main benefits of DoorDash Decoupled Search Grounding (DSG)? The primary benefits include dramatic cost reduction, enhanced control over search providers and pricing, improved observability of search queries and costs, better output formatting from LLMs, and increased flexibility in system architecture.
DSG Delivers Control and Savings
DoorDash Decoupled Search Grounding (DSG) is a powerful demonstration of how decoupling components can lead to massive gains. By moving web search outside of the LLM API and into their own managed gateway, DoorDash achieved significant cost reductions while maintaining or even slightly improving accuracy on key tasks. The flexibility, control, and observability gained are substantial. While native search might still hold an edge for highly freshness-sensitive questions, for the bulk of information retrieval needs, DSG offers a compelling, cost-effective solution. This approach sets a new benchmark for how organizations can manage LLM search efficiently.
💬 Comments (0)
No comments yet. Be the first!













