The architecture behind the number
A monolithic agent call does two jobs in one prompt: it selects what the model should look at, and it reasons over what it selected. Those jobs have different cost curves and different failure modes. Retrieval is mostly token classification and ranking against a corpus; reasoning is synthesis, planning and judgement. Bundling them means every retrieval decision is billed at frontier-model rates, because the same call that picks the context also has to be smart enough to use it.
DoorDash's widely discussed search-cost reduction comes from refusing that bundle. The pipeline is split: a cheap stage retrieves and narrows candidates, an expensive stage reasons over the narrowed set. The published figure is large because the expensive model no longer touches the whole corpus on every request. But the interesting part is not the saving. It is that the split turns retrieval into a bounded, cacheable stage with its own model choice, its own latency profile and its own evaluation suite.
Once retrieval is a separate stage, it becomes a contract. The retrieval stage promises the reasoning stage a candidate set with certain properties: a recall floor against the known-good documents, a freshness bound, a maximum token footprint, a stable ordering. The reasoning stage is then evaluated only against inputs that satisfy that contract. This is what makes the split tractable. Without the contract, you have two models guessing at each other and no way to attribute a quality drop to either.
The contract also changes what "cheap" means. A retrieval stage is cheap not because it uses a small model, but because its work is bounded, cacheable and independently measurable. A small model doing unbounded work is not cheap; it is just slower to fail.
Placing the boundary
The boundary is a latency budget decision because every placement trades retrieval latency against reasoning latency at a fixed quality target. Move the boundary earlier — retrieve more, reason over a larger set — and reasoning latency grows with context length. Move it later — retrieve less aggressively — and reasoning gets faster but recall drops, and the reasoning stage starts confabulating over gaps. There is no free direction.
The practical method is to define a recall floor for the retrieval stage and measure reasoning quality as a function of it. Pick the floor from the evaluation set, not from intuition: at what recall does the reasoning stage stop recovering correct answers? The answer is usually a curve with a knee, and the boundary belongs at or slightly above the knee, not at maximum recall. Retrieving to 100% recall is a way of paying reasoning-model prices for retrieval work.
Two mechanisms make the boundary enforceable.
First, cache keys must include the retrieval policy version. If the cache key is just the query, then changing the retrieval model, the chunking strategy or the ranking weights silently serves stale candidates to a reasoning stage that was evaluated against different inputs. A cheap cache becomes a silent quality regression that no model-upgrade alarm will catch. Version the policy, and invalidate on change.
cache_key = hash(
query_normalised,
retrieval_policy_version, # bump on model, chunking or ranker change
corpus_snapshot_id,
reasoning_prompt_version,
)
Second, route by query class. Not every request deserves the two-stage path. Short, high-confidence lookups can go straight to a single cheap call with a tight context window. Ambiguous or multi-hop queries need the full retrieval-then-reason path. Long-tail queries may need retrieval widening plus a reasoning-stage fallback. The router itself is a classifier with its own evaluation; treat a routing change as a model change, because it is one.
The honest trade-off: decoupling adds a network hop, a serialisation boundary and a second failure surface. A single-call pipeline fails once; a two-stage pipeline can fail at retrieval, at the handoff, or at reasoning, and the handoff failures are the ones that look like reasoning errors. You pay for that observability in engineering time, and you pay for the router in evaluation time. The cost saving is real, but it is a consequence of the architecture, not the reason to adopt it.
What to instrument
A blended per-request cost and latency figure is useless for maintaining a two-stage pipeline. You cannot tell whether a regression came from a slower retriever, a larger candidate set or a reasoning model that started emitting longer chains. Instrument per stage: retrieval latency, candidate count, recall estimate against the evaluation set, cache hit rate; reasoning latency, input token count, output token count, and the quality score on the held-out set. Attribute both cost and latency to the stage that produced them.
The alarms should be tied to the right trigger. Quality regression alarms belong to retrieval-stage changes — model swap, chunking change, ranker update, corpus refresh — not to reasoning-model upgrades. A reasoning upgrade that degrades quality against a fixed retrieval contract is a different bug from a retrieval change that starves the reasoning stage. Separate the alarms or you will spend the incident debugging the wrong stage.
Track the handoff explicitly. Log the candidate set size and the recall estimate alongside the reasoning output for a sample of requests. When quality drops, the first question is whether the reasoning stage received inputs that satisfy the contract. If it did, the bug is in reasoning. If it did not, the bug is upstream and the reasoning stage was never given a fair test.
A rollback contract
The split pipeline needs a way to be re-coupled without redeploying the whole system. Keep the monolithic path as a fallback behind the same interface: the router can send a request to the two-stage path or the single-call path, and both return the same response shape. That lets you roll back a bad retrieval policy by flipping routing for the affected query class, not by shipping a new pipeline.
The rollback contract has three parts. A feature flag per query class that selects single-call or two-stage. A versioned retrieval policy so a rollback is a version pin, not a code revert. And a shadow mode where the two-stage path runs alongside the single-call path on a sample, logging both outputs and their quality scores, so the decision to roll back or forward is made on evidence rather than on a latency graph.
This is the part most teams skip, and it is the part that makes the boundary safe to move. If you cannot re-couple the stages cheaply, you will not experiment with the boundary, and the boundary will drift to wherever it was first set. A latency budget you cannot renegotiate is not a budget; it is a constraint you inherited.
The design question, then, is not how much the split saves. It is where the contract sits, what it guarantees, and how quickly you can move it when the guarantee no longer holds.
