> ## Content Index
> Fetch the complete content index at: https://blog.netpy.in/llms.txt
> Use this file to discover other available public pages before exploring further.

# DoorDash cut search costs 98% by moving grounding out of the model
- URL: https://blog.netpy.in/doordash-decoupled-search-grounding/
- Published: 2026-12-01T02:45:20.000Z
- Updated: 2026-12-01T02:45:20.000Z
- Description: DoorDash's Decoupled Search Grounding gateway reaches native-search accuracy on its query-intent workload at $0.11 instead of $7.90 per 1,000 queries. Here is what the numbers actually measure, where decoupling still loses, and the checklist for teams running search inside their agents.
- Author: Netpy Technologies
- Tags: AI, Agents, MCP, Architecture, Engineering

A shopper types "450 north" into a food delivery app. No cuisine, no dish, no brand — just a street and a direction. DoorDash's query intent understanding (QIU) system must decide whether that is a restaurant, a grocery item, or a craft brewery, because that decision routes the rest of the retrieval stack. Ungrounded, the model said restaurant. With catalog evidence and a web search, it found the brewery and resolved the intent to Alcohol.

The lesson DoorDash published in October goes further: it cut search-provider costs by more than 98% on that workload without losing accuracy, by moving retrieval out of the model's API into a gateway it controls. The mechanism is Decoupled Search Grounding (DSG), and most teams building agents on GPT-4o, Gemini, or Claude still use the bundled search it replaces.

## What the 98% actually measures

The production comparison is concrete. On 7,988 general non-food retail queries, with Gemini 2.5 Flash as the reasoning model, native Google search grounding scored 93.40% accuracy at $7.90 per 1,000 queries. DSG with Serper scored 93.90% at $0.11\. On 2,335 synthetic long-tail queries it was 87.62% at $10.37 versus 87.79% at $0.146.

Two caveats before anyone quotes those in a board deck. The figures are search-provider charges only and exclude model inference, frequently the larger line item. And DoorDash's own decomposition credits provider selection, not caching, with most of the saving: before cache reuse DSG+Serper was about 59× cheaper on Retail and 70× on Tail. Vendor choice is the lever; caching is the multiplier.

## Why coupling search to the model hurts

When an agent calls a provider's built-in search, one request goes out and one answer comes back. DoorDash's engineers name three costs in their arXiv paper: no seam between the model that reasons and the backend that grounds it, so reacting to a price change means editing model integration code; two agents asking the same question paying for two separate searches, because there is nowhere to intercept the query; and per-query cost and latency staying invisible.

The fourth cost is subtler and, for anyone running agents in a pipeline rather than a chat window, the most expensive. Turning search on changes how the model behaves, not just what it knows. Asked to compare two building heights under the instruction "Provide ONLY the final answer entity," native search returned 245 characters opening "Based on the search results…" and DSG returned three: "Yes." On HotpotQA, Claude Sonnet 4 answers with native search broke the "answer only" instruction 78.1% of the time. If your node output is parsed as JSON, that is a broken contract you pay for twice in retries.

## The architecture, in order

DSG is an MCP-compatible gateway between agents, the reasoning model, and a registry of backends — Serper, Bright Data, Firecrawl, Exa, Tavily — with native provider search registrable as one more provider. Every request runs the same lifecycle:

- Normalize the query, so trivial rephrasings land on the same cache entry.
- Check the exact cache; a hit returns with no provider call.
- Check the semantic cache, reusing a result whose embedding is close enough.
- Walk the fallback chain only on a double miss; timeouts advance to the next provider.
- Normalize the response into one schema of title, source URL, and snippet.
- Write both caches per provider, with a TTL tied to how fast the answer goes stale.
- Return a structured tool response, which preserves the output contract.

New HTTP providers onboard through a YAML adapter — endpoint, request template, response mapping, cost metadata.

Retrieval depth is the knob vendors bury. On SimpleQA, going from 2 to 6 results raised average accuracy from 78.7% to 84.9%; going to 10 added 0.6 points more. Six is a defensible default.

The warm-cache replay is worth stealing for a capacity plan. Over 500 identical queries, the cold pass hit 6.2%, cost $0.7385 per 1,000 queries, and averaged 4,570 ms. The warm pass hit 99.4%, cost $0.0045, and averaged 1,465 ms — 68% lower latency and effectively zero marginal search spend.

## Where it loses

DoorDash does not claim native search is obsolete, and the losses instruct as much as the wins. On FreshQA, which targets recency-sensitive questions, native search beat DSG across all five models tested — 72.6% versus 68.0% on the five-model mean — reflecting real freshness advantages inside proprietary stacks. On multi-hop reasoning the paper is blunt: search of either kind gave only modest HotpotQA gains, and deep questions likely need iterative retrieval loops. A gateway routing to third parties also inherits their stability, latency, and pricing. The durable asset is the interface, not today's $0.11 per 1,000 queries.

## Checklist before you copy this

- Inventory every place your agents call provider-native search. More than two, and you have the reuse problem.
- Normalize queries first. Hit rate is a function of query hygiene, not cache size.
- Scope exact and semantic caches per provider so results never overwrite each other.
- Set TTLs by content type: short for prices and stock, long for stable facts.
- Configure a fallback chain, then test it by killing a provider in staging.
- Return evidence as a structured tool response, never inside the generation stream, and assert on the contract in CI.
- Log provider, cache branch, depth, latency, and cost per query, or the tuning above is guesswork.
- Sweep retrieval depth yourself. Six results is a starting point, not a law.

For teams in India building agentic products on one vendor's API, the idea is unglamorous: grounding is an interface, not a feature. That is how NetPy builds AI systems for clients — the model is swappable; the retrieval layer is what you own and can migrate. If you run agents in production and want a second opinion on where the coupling lives, our [AI engineering practice](https://netpy.in/?ref=blog.netpy.in) does exactly that, and [NetPyCloud](https://cloud.netpy.in/?ref=blog.netpy.in) covers the self-hosted infrastructure when the gateway has to sit inside your own network.

---

*Source:* [*DoorDash Engineering, "How DoorDash Reduced LLM Search Costs by 98% Without Losing Accuracy"*](https://careersatdoordash.com/blog/how-doordash-reduced-llm-search-costs-by-98-without-losing-accuracy/?ref=blog.netpy.in)*, reported by* [*InfoQ*](https://www.infoq.com/news/2026/11/doordash-decoupled-search/?ref=blog.netpy.in)*. Figures are DoorDash's own measurements on its QIU workload and public QA benchmarks; search-provider costs exclude model inference.*