BlogAI Economics

DoorDash Cut Its LLM Search Costs by 98%.

It moved web search out of the model, and accuracy held.

John TanNovember 30, 20264 min read

DoorDash's engineering blog says its search-query system now grounds LLM answers in web results for 98% less search spend, at the same accuracy. The move: take web search out of the model provider's API and put it behind one gateway that DoorDash controls.

DoorDash diagram in two panels. Left, Native Search: Agent, then Model with Built-in Search, then Answer, with a note that cost and behaviour are opaque and tightly coupled. Right, Decoupled Search Grounding: Agent, then Reasoning Model, then a DSG box holding Exact Cache, Semantic Cache, Provider Router with primary and fallbacks, Result Normalization, and Telemetry for cost, latency and quality, then Answer. Below DSG sit five search APIs: Bright Data, Firecrawl, Serper, Tavily and Exa. A footer lists lower cost, higher reliability, full control and better visibility.
From DoorDash's post, 29 OctLeft: search bundled inside the model call. Right: search as a gateway DoorDash owns.Tap the image to open it full size.

Copy the recipe

Paste this into your coding agent.

Prompt · decouple search
# 1. Find it
List every LLM call in this repo that turns on the provider's built-in search (web_search, google_search grounding, or similar). For each: what it asks, what format it must return, how often it runs.

# 2. Measure it
Log search cost and latency per query, apart from model tokens.

# 3. Build one search tool every call shares
normalize query
-> exact cache -> semantic cache
-> providers: primary, then fallbacks
-> return {title, url, snippet} as a tool result
Cache per provider. Short TTL for fresh facts. Make result count a setting; start at 6.

# 4. Prove it
Run 500+ labelled queries both ways. Keep built-in search as one provider for freshness-heavy queries. Report accuracy and search cost per 1,000 queries.

The numbers

Same answers, under 2% of the search bill.

DoorDash tested its query intent system, which decides what a shopper's search means, on two sets. The baseline was Gemini Flash with Google search grounding built in. The new path used the same model with Serper behind the gateway.

Test setBuilt-in searchGateway + Serper
Retail, 7,988 queries93.40% right, $7.90 per 1,00093.90% right, $0.110 per 1,000
Long tail, 2,335 queries87.62% right, $10.37 per 1,00087.79% right, $0.146 per 1,000
Figure 1. Search cost per 1,000
The gateway's bar is barely there. Accuracy did not move.
RETAIL, 7,988 QUERIES Built-in search $7.90 · 93.40% Gateway + Serper $0.110 · 93.90% LONG TAIL, 2,335 QUERIES Built-in search $10.37 · 87.62% Gateway + Serper $0.146 · 87.79% RETAIL, 7,988 QUERIES Built-in search $7.90 · 93.40% Gateway + Serper $0.110 · 93.90% LONG TAIL, 2,335 QUERIES Built-in search $10.37 · 87.62% Gateway + Serper $0.146 · 87.79%
Data from DoorDash's Table 1, published 29 October 2026. Gemini Flash reasons in both cases. Costs are search-provider charges only and exclude model inference. Bars to scale. Figure by nativefirst.

A warm cache did the rest. On a second pass over the same queries, the hit rate rose from 6.2% to 99.4%, average latency fell from 4,570 ms to 1,465 ms, and search cost fell from $0.7385 to $0.0045 per 1,000 queries.

What sits in the gateway

Seven steps, in the order a query hits them.

  1. Normalize the query, so trivial rewordings share a cache entry.
  2. Exact cache. A hit returns with no provider call.
  3. Semantic cache. Reuse a past result with a close enough embedding.
  4. Provider chain. Serper, BrightData, Firecrawl, Exa or Tavily, with fallback on timeouts and errors.
  5. Normalize results to title, source URL and snippet.
  6. Write both caches, per provider, with a TTL set by how fast the answer goes stale.
  7. Return a tool response, and log provider, cache outcome, depth, latency and cost.

New providers plug in through a YAML adapter with no code change. The gateway speaks MCP, so any agent can call it. Because the cache is shared, a query one team pays for is free for the next.

Search made the model chatty

A bug you may already have.

Many of DoorDash's LLM calls must return bare JSON, an enum or a yes or no. With built-in search on, models stopped obeying. On the HotpotQA benchmark, Claude Sonnet 4 with native search broke an explicit "answer only" instruction 78.1% of the time, opening with lines like "Based on the search results". DoorDash says returning evidence as a tool result largely avoided that, though not completely.

Public benchmarks agree, mostly

Close on accuracy, not on fresh news.

DoorDash scatter chart titled Cost vs. Accuracy on Public Benchmarks, SimpleQA accuracy against search cost per 1,000 queries on a log scale. No search: 30.8 percent at $0. DSG with Serper: 83.3 percent at $0.67. DSG with BrightData: 86.1 percent at $1.80. Native search: 87.7 percent at $20.00.
From DoorDash's post, 29 OctGateway setups land at 83 to 86% on SimpleQA, against 87.7% for built-in search.Tap the image to open it full size.

DoorDash also ran five models (GPT-4o, GPT-4o-mini, Gemini 2.5 Flash, Gemini 2.5 Pro, Claude Sonnet 4) on three public benchmarks. Built-in search kept a small accuracy edge there. On SimpleQA it cost $20 per 1,000 queries, against $0.67 to $1.80 through the gateway. On SimpleQA, raising results per query from 2 to 6 lifted average accuracy from 78.7% to 84.9%; going to 10 added 0.6 points.

Where built-in search still wins

  • Fresh facts. On FreshQA, native search beat the gateway on all five models.
  • Multi-step questions. On HotpotQA, search of either kind helped only a little.
  • Vendor risk. Search API prices can change; DoorDash calls the interface, not the price, the lasting result.

What we could not check

All numbers are DoorDash's own evaluation; we did not rerun it. The 98% covers search-provider charges only, not model tokens, and DoorDash gives no total spend or traffic volume. This follows Spotify's 90% Claude Code token cut and our guide to routing tasks by model.

What's next

  1. Run the prompt above on every repo that calls an LLM with search on.
  2. Log search cost per query, apart from model tokens.
  3. Test one search API against built-in search on 500 of your own queries.
Portrait of John Tan
John Tan ↗

Founder of nativefirst.ai. Runs everything on agents and writes down what works.

Sources
1DoorDash Engineering, How DoorDash Reduced LLM Search Costs by 98% Without Losing Accuracy (29 October 2026): Decoupled Search Grounding architecture, request lifecycle, Table 1 (query intent accuracy and search cost per 1,000 queries, native vs DSG + Serper), Table 2 (cold vs warm cache), retrieval depth, the 78.1% HotpotQA instruction violations, FreshQA and multi-hop limits. Both DoorDash figures on this page come from it. careersatdoordash.com
2Hacker News discussion of the DoorDash post (30 November 2026). Used for ranking only, not as a source for claims. news.ycombinator.com

Read next

AI is moving really fast. Keep up.

What's Trending?