ATRIUMsearch → argument graph
Article · 2026-07-28 · 5 moments

Why DoorDash, Instacart, and Uber Eats Integrated LLMs Into Search Three Different Ways

In this article, we will walk through their differing solutions and try to make sense of their choices and understand the pattern behind them. ✦ AI generated

01
Claim

Adding an LLM to an existing stack comes down to one question: how deeply should the LLM reach into the runtime?

The central design question for integrating LLMs into production systems is the depth of runtime integration, and the infrastructure already in place determines each company's answer.

transcript

The article author: Adding an LLM to an existing stack comes down to one question: how deeply should the LLM reach into the runtime? Ultimately, DoorDash, Instacart, and Uber Eats each answered that question differently, and the specific LLM each chose was secondary. The specific model each company picked was secondary. The infrastructure they already had in place is what determined the answer.

explains mechanism · 1provides context · 3

02
Mechanism

DoorDash's LLM lives mostly offline in batch, working on the periphery of the runtime — it enriches the knowledge graph and parses queries into chunks with constrained outputs linked back to graph fields.

DoorDash uses LLMs offline to extract attributes into their existing knowledge graph, and at runtime only for parsing queries into chunks that link to graph fields. RAG is inverted to define the output space, not just inject context.

transcript

The article author: DoorDash already had a knowledge graph for items and restaurants when LLMs became viable for production. The graph held structured attributes for every item, including dish type, dietary preference, cuisine, brand, and flavor. Their approach was to use LLMs to enrich this graph offline by extracting attributes from SKU data, and to use LLMs at runtime only for parsing queries into chunks that could link back to the graph. Retrieval itself stayed keyword and graph-driven... What distinguishes DoorDash's approach is how they constrain the LLM's outputs. They use retrieval-augmented generation as a guardrail rather than as a generator. For each query segment, an approximate nearest neighbor lookup retrieves the top 100 closest taxonomy concepts from the existing graph. The LLM is then prompted to pick from that list rather than invent labels. This is a clever inversion of the usual RAG pattern, where RAG typically injects context into a generator. Here, RAG defines the entire output space, so the system only ever produces concepts that the rest of the design already knows how to handle. The measured impact is a roughly 30% lift in the trigger rate for popular dish carousels, all delivered through an architecture whose runtime stays mostly classical. The takeaway is that DoorDash's LLM lives mostly offline, mostly in batch, working on the periphery of the runtime.

03
Mechanism

Food search breaks classical keyword retrieval in many ways simultaneously: subjective queries, long-tail traffic, multilingual catalogs, and compound constraints all sit in the same search bar.

Food search is a revealing domain because it exposes many failure modes of keyword search at once — subjective intent, synonyms, typos, shorthand, language mixing, word-sense ambiguity, long-tail rarity, and hard constraints.

transcript

The article author: This pattern repeats across several common failure modes in food search. For example: Synonyms: 'Soda' and 'soft drink' describe the same product, but a keyword engine treats them as different tokens. Typos: 'Mozzarela' should retrieve mozzarella results, but the spelling mismatch breaks the lookup. Shorthand: 'Gf pizza' meaning gluten-free pizza requires the system to recognize an abbreviation as a synonym for the full phrase. Language mix: The Spanish word 'pan' means bread, while the English word 'pan' means a cooking vessel, so a bilingual search bar has to disambiguate. Word-sense ambiguity: 'Apple' the fruit and 'Apple' the company share the same spelling but mean different things, and the right answer depends on context. Each one is a potential moment where the user's intent and the catalog's words fail to line up. Two harder problems lie beneath this: The long tail... The constraint problem... Food search is the right domain to watch this play out, because all of these failure modes show up at the same time.

04
Mechanism

Instacart uses LLMs at the query understanding layer, with offline RAG for head queries and a real-time fine-tuned Llama-3-8B for tail queries, while retrieval downstream is still traditional.

Instacart splits its approach across context engineering via RAG, post-processing guardrails, and fine-tuning Llama-3-8B. Head queries use an offline cached RAG pipeline, while tail queries hit a real-time fine-tuned model that keeps latency under 300ms.

transcript

The article author: Instacart's strategy is layered across three approaches: Context engineering: Retrieval-augmented generation pulls Instacart-specific context (top-converted categories, historical conversion data, catalog details) into the prompt before the LLM sees a query. Post-processing guardrails: Semantic similarity filters drop LLM outputs that drift away from the original query. Fine-tuning: For the most advanced tasks, the team fine-tunes Llama-3-8B on Instacart's proprietary data, so domain knowledge gets baked directly into the model weights... The serving architecture splits along the head-versus-tail distribution. Head queries hit an offline RAG-and-cache pipeline that is latency-tolerant and deeply context-engineered, while tail queries hit a real-time fine-tuned Llama-3-8B model that keeps latency under 300ms through adapter merging, H100 GPUs, and autoscaling... After this solution, query rewrite coverage jumped from 50% to over 95%, with 90%+ precision across substitutes, broader rewrites, and synonyms. The real-time fine-tuned model improved search quality for the bottom 2% of queries (the cold-start tail), cutting scroll depth by 6% and complaints about poor tail-query results by half. The takeaway is that Instacart's LLMs live at the query understanding layer, with some offline-cached and some online and fine-tuned, while retrieval and ranking downstream are still done by traditional machine learning and information retrieval systems.

05
Mechanism

Uber Eats fine-tuned a Qwen LLM into the embedding backbone of two-tower retrieval, so every query and every document gets an LLM-derived vector.

Uber Eats uses a two-tower architecture with a fine-tuned Qwen LLM as the shared embedding backbone. The query tower runs online, the document tower pre-embeds billions of documents offline into an HNSW index. Matryoshka Representation Learning, scalar quantization, and pre-filters make it viable at scale.

transcript

The article author: The architecture they decided on is a classic two-tower setup, where a query encoder and a document encoder each produce vectors in a shared space, and matching is done by similarity in that space. The twist is in what sits inside each tower, because both towers use a fine-tuned Qwen LLM as their backbone embedding layer. The query tower runs online, embedding each incoming query in real time, while the document tower runs offline and pre-embeds billions of documents into an HNSW vector index... What makes the system viable at scale is a stack of optimizations: Matryoshka Representation Learning trains a single model whose embedding can be truncated to different lengths, and Uber serves at 256 dimensions in production with under 0.3% recall loss compared to the full 1,536. Scalar quantization (int7 instead of float32) cuts latency in half again. Pre-filters on hexagon, city, and fulfillment type shrink the candidate set before the ANN search even runs... The takeaway is that Uber Eats' LLM is the embedding model itself, since every query and every document gets an LLM-derived vector, and retrieval at every level depends on LLM-produced representations.

explains mechanism · 1gives example · 1

Highlight slides
Related episodes