Engineering brief
DoorDash shows why LLM distillation beats real-time serving
At a glance
The brief is enough
- Relevance
- Practical value
- Radar
- Time horizon
- Now
- Warnings
- None
DoorDash doesn't serve LLMs in production. It distills their reasoning into offline labels, semantic IDs, and memory blocks that every model reuses.
Distilling LLMs offline into shared primitives is more practical than serving them online.
Watch if you're designing an LLM-enhanced search or recommendation system at scale.
Summary
The core claim. Raghav Saboo argues that marketplace discovery is fundamentally a semantic understanding problem, not an engagement optimization one. At DoorDash's scale—spanning restaurants, grocery, retail, and pets—users arrive with broad missions like "I just adopted a puppy." Historically, retrieval and ranking systems optimized for click-through and conversion, which rewards popular items even when they fail user constraints. LLMs offer a new lever: the ability to reason about item meaning and shopper intent, but only if integrated thoughtfully into existing infrastructure.
The supervision primitive. DoorDash uses LLMs to generate graded relevance labels at scale. Human annotators create a high-quality seed set on a three-level scale. A stronger LLM audits suspicious cases—for example, items humans marked irrelevant but that convert well. After reconciliation with taxonomy models, the cleaned dataset fine-tunes a lightweight model like GPT-4o mini. This cheap, fast labeler then scores the full catalog offline. The key insight: spend expensive reasoning once, distill it into a model you can serve at production latency.
The catalog semantics primitive. Standard embeddings at e-commerce scale collapse relevance distinctions—related items sit near exact matches. DoorDash's fix is a two-stage contrastive method trained on the same graded labels. Stage one shapes global geometry with multi-level supervised contrastive loss. Stage two mines hard negatives (items the model confuses) and runs curriculum training. The result improved retrieval NDCG by 2.3% and translated to business metrics.
The memory primitive. DoorDash represents consumers at multiple time scales: long-term durable preferences from orders and searches, real-time in-session context, and stated preferences from agentic interactions like "Ask DoorDash." Each consumer's memory is materialized in three forms—human-readable text, latent embedding vectors for ML models, and graph structures linking consumers to brands, taxonomies, and revealed preferences. Graph-based embeddings outperformed taxonomy-based ones for retrieval at fine-grained levels. This memory framework powers personalized collections, agentic personalization, and feeds into downstream retrieval and ranking models as features.
The steerable content primitive. All four primitives feed into an offline batch process that generates personalized collections on store pages. Using consumer memory and semantic IDs, an LLM synthesizes collection titles, subtitles, and item lists. Because this runs offline, DoorDash still uses its existing retrieval and ranking stack for item hydration and collection ranking at serving time. The result is steerable by occasion and consumer context—plant-based pantry rows for vegan shoppers, cat dry food rows for cat-only households.
My take
This is the right pattern for any team building LLM-enhanced search or recommendations at scale. Saboo's claim that "the online LLM call is often not the product architecture you need" is exactly right. I've seen teams burn budgets on real-time model calls when an offline distillation pipeline would serve better and cheaper. What's missing is the operational cost of maintaining those pipelines: the seed dataset, the auditor model, the reconciliation logic. That's not trivial. But it's cheaper than running GPT-4 on every query. I'd add that the semantic ID approach has hidden complexity, regenerating them when catalog structure shifts requires careful versioning. Still, the distillation-first pattern is worth adopting.
What to do with this
- Audit your current LLM usage: how many calls are online when offline distillation would work?
- Map your shared primitives: graded labels, semantic IDs, user memory blocks. Identify gaps.
- Run a pilot distillation pipeline on one search or recommendation surface. Measure cost vs quality.
Watch the video
This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.
Related breakdowns
Agent evaluations are broken: why you should stop chasing benchmarks
Agent evaluations are stuck in the past. Most teams still use methods from the chatbot era. Hylak argues for floor-raising: track the worst failures, not the…
Why closed AI labs will lose to open weights — it's about
As AI-generated PRs poison open source communities, the real shift is inference commoditization. Open weights models are winning on cost, not intelligence.
Graph Design Cut AI Tool Calls 40% in Code Search
A 40% drop in AI code-search tool calls wasn't from better models—it came from graph algorithms. But only if you build the graph right.
Get TL;DW
Too Long; Didn't Watch.
A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.
Free. Weekly. No hype.
Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.