DoorDash’s official engineering blog reveals that its LLM-powered search system cut costs by 98% while maintaining the same accuracy level.
It is easy to recast that result as a familiar story: switch to a cheaper model, add caching, or reduce token usage. In practice, the more consequential question is different: which queries should never reach an LLM in the first place?
The article scored 61 points and drew 20 comments on HN. The discussion focused less on which model was strongest than on what the 98% figure included, how the evaluation baseline was defined, and whether retrieval and engineering labor were counted.
Original article: How DoorDash Reduced LLM Search Costs by 98% Without Losing Accuracy
Where the 98% Savings Came From
The default assumption that lower costs mean switching to a smaller model needs to be challenged.
DoorDash published an account of its own production engineering work, not an independent benchmark. Its costs can be divided into at least three categories:
- Model calls: LLM requests for query understanding, generation, classification, and similar tasks
- Retrieval: embeddings, vector database queries, keyword search, and caching
- Ranking and post-processing: reranking, rule-based filtering, and business constraints
Solutions that achieve 98% savings rarely do so by replacing GPT-4 with a cheaper model on every request. More often, they prevent the majority of requests from entering an expensive path in the first place.
The price per model call is only one line on the bill. Request volume, request length, retrieval frequency, and duplicate processing all have a larger effect on total spending.
This is why focusing only on token prices can be misleading. Suppose the cost of an LLM call falls from $10,000 to $2,000, an 80% reduction. If the number of calls also falls to 1% of its original level, total costs decline by 99%.
Engineering optimizations often multiply rather than add.
Moving the LLM from Every Query to Only the Hard Cases
DoorDash’s central idea was to make the LLM an on-demand component rather than the default executor for every query.
When a query enters the system, it can first follow a low-cost path:
User query
↓
Rule or cache hit? ── Yes → Return directly
↓ No
Can simple retrieval answer with high confidence? ── Yes → Return candidates
↓ No
Escalate to LLM + full retrieval + rerank
The goal is not to make the LLM speak as little as possible. It is to reserve the LLM for difficult cases.
Low-confidence queries escalate to the full pipeline, while high-confidence queries return directly. The LLM shifts from generating an answer for every request to classifying, routing, or reranking the hard cases.
If 99% of queries can be resolved at a shallower layer, LLM call volume could theoretically fall by two orders of magnitude. Whether to use a smaller model becomes secondary.
This design also offers a practical benefit: simpler paths have lower latency. Search services are not offline batch jobs. Eliminating one model call can improve p50 latency, p95 latency, and peak capacity at the same time.
Routing can fail, however. Sending a difficult case down a simple path reduces answer quality, while escalating every simple query brings costs back. Routing thresholds therefore cannot be chosen arbitrarily. They require an evaluation set and production monitoring.
Retrieval Determines How Much Model Spending Can Be Avoided
Reducing LLM calls is viable only if shallow retrieval is reliable enough. Otherwise, the system merely shifts costs from the model bill to worse search results.
Search systems like DoorDash’s generally combine several techniques:
- Keyword search: Well suited to dish names, merchant names, proper nouns, and exact matches
- Vector search: Covers synonyms, colloquial expressions, and semantic queries
- Embedding caches: Reuses vectors for repeated queries or products
- Reranking: Produces a more precise relevance ordering of the candidate set
- Business rules: Enforces hard constraints such as delivery range, inventory, promotions, and store status
The order matters: retrieve cheaply first, then apply more expensive ranking.
The first stage can be treated as a high-recall phase. It is better to retain extra candidates than to exclude the correct result too early. Later stages, including reranking and the LLM, narrow the set.
This allows the system to allocate resources according to query difficulty instead of applying the same effort to every query.
A practical routing interface could look like this:
from dataclasses import dataclass
from typing import Sequence
@dataclass(frozen=True)
class SearchCandidate:
item_id: str
score: float
@dataclass(frozen=True)
class SearchRoute:
use_llm: bool
candidates: Sequence[SearchCandidate]
reason: str
def route_search(
query: str,
candidates: Sequence[SearchCandidate],
cache_hit: bool,
confidence_threshold: float = 0.82,
) -> SearchRoute:
if cache_hit:
return SearchRoute(False, candidates, "cache_hit")
top_score = candidates[0].score if candidates else 0.0
if top_score >= confidence_threshold:
return SearchRoute(False, candidates, "high_confidence")
return SearchRoute(True, candidates, "low_confidence")
This code neither generates answers nor represents DoorDash’s internal implementation. It simply expresses the core decision: skip the LLM when the cache hits or confidence is high; otherwise, escalate the request.
The most difficult parameter is confidence_threshold. A higher threshold saves less, while a lower threshold causes more incorrect escalations. Engineering teams need to monitor accuracy, LLM request volume, latency, and cost per search together.
How DoorDash Measured “No Loss in Accuracy”
“Accuracy did not decline” is the statement most likely to be misinterpreted.
It does not refer to an absolute measure of accuracy or a cross-company comparison with other search systems. DoorDash’s claim is that its search system reduced costs by 98% relative to its own baseline while maintaining accuracy.
The exact evaluation set, sample size, metric definitions, and A/B test significance should be verified against the original article.
When reading an engineering blog, readers should ask four questions before accepting a claim such as “98%” and “no decline in accuracy”:
- What was the baseline?
- How was the test set constructed?
- Which metric does “accuracy” refer to?
- How long did the production A/B test run, and how much traffic did it include?
A percentage without its denominator has no meaningful boundaries.
Search accuracy is not a single concept. It might refer to exact match, nDCG, MRR, click-through rate, order conversion, or even manually labeled top-k relevance. Different metrics can support very different conclusions.
Offline evaluations are also vulnerable to distribution bias. If the test set consists mainly of historically frequent queries, cache hits and shallow paths may perform unusually well. Production A/B tests better reflect live traffic, but their cost calculations may include only model fees while excluding retrieval, reranking, and maintenance labor.
“Accuracy did not decline” can therefore be valid, while “total cost of ownership fell by 98%” requires separate evidence. The two claims should not be treated as interchangeable.
61 Points and 20 Comments on HN: Where the Skepticism Centered
The article reached the Hacker News front page with 61 points and 20 comments.
The engineering community’s concerns focused on several areas.
First, whether the cost comparison was complete.
If the old system used an expensive model to generate rankings while the new system relies mainly on keyword search, vector retrieval, and rule-based filtering, the comparison covers the entire search stack rather than model prices alone.
Second, whether the baseline was favorable.
What formed the denominator of the 98% figure? If the baseline included many LLM calls that could have been avoided, the result would naturally look impressive. The issue is not necessarily a poorly chosen baseline, but whether readers can see how that baseline was designed.
Third, whether averages concealed differences in performance.
Stable overall accuracy does not mean accuracy remained stable for every query category. Popular dish names may be easier to handle than vague requests. If difficult queries escalate to the LLM while simple queries use shallow paths, segmented evaluation is more informative than a single average.
Fourth, whether maintenance costs were hidden.
Routing thresholds, embedding caches, indexing strategies, and reranking all require engineering investment. Moving expenses into the retrieval system does not make those expenses disappear.
The most useful contribution of the HN discussion was not to declare a new conclusion on DoorDash’s behalf, but to remind readers to distinguish among:
- Cost per model call
- Cost per search request
- Total cost per successful search
- Engineering cost of maintaining the search system
Editorial Takeaways
The claim of “98% cost savings” can be misleading because the headline attributes the work of a systems redesign to the model bill. Readers may assume the team found a cheaper, smaller model and then try to apply the same percentage to their own projects.
DoorDash’s approach is different from the small-model replacement narrative. It first reduces unnecessary LLM calls, then reserves the model for low-confidence, difficult cases. The model remains part of the system, but it is no longer a toll booth that every query must pass through.
It is better viewed as a change in how the system allocates its budget rather than a model-selection exercise. What will determine whether the approach can be replicated is not the 98% figure, but whether segmented evaluations remain stable, what safeguards catch routing errors, and whether maintaining the retrieval pipeline costs less. The summary and HN discussion do not provide enough detail to answer those questions or independently verify the claimed production gains.