AI Engineer World's Fair 2026

Distill the LLM, Don't Serve It: Search & Personalization at DoorDash — Raghav Saboo, DoorDash

Read the talk

Distill the LLM, Don't Serve It: Search & Personalization at DoorDash

DoorDash uses expensive reasoning offline to teach fast retrieval and ranking models what shoppers mean. Graded relevance labels, semantic IDs and reusable consumer memory then support everything from better search results to personalized store collections.

From a talk by Raghav Saboo

At a glance

Ideas worth remembering

  • Graded relevance separates satisfying a shopper’s constraints from merely being popular or related. DoorDash uses offline LLM labels to teach that distinction to both retrieval and ranking.

  • Two-stage retrieval training uses the first model’s mistakes to build a harder curriculum. Ranking adds an explicit relevance objective alongside clicks, add-to-cart events and conversion.

  • Semantic IDs and consumer memory supply reusable meaning: catalog neighborhoods help with sparse items and query reformulation, while text, vectors and graphs make shopper context useful to different model types.

  • Personalized collections combine offline LLM generation with existing item hydration and ranking. The broader architecture captures reasoning once and lets several fast serving systems benefit from it.

A shopping mission extends beyond one search

A shopper who has just adopted a puppy might begin with a search for puppy food. But the job is getting through the first week: food, a crate, a leash, training pads. Those needs can unfold through suggested searches and collections across several sessions and days. In this talk, Raghav Saboo, a staff machine learning engineer working on search and personalization at DoorDash, explains how shared semantic representations help different models follow that larger journey.

Source frame: A shopping mission extends beyond one search
Source frame: A shopping mission extends beyond one search

The expansion beyond restaurants into grocery, retail, pets and gifting makes this problem harder. Engagement optimization can learn which products people tend to click or buy. It does not automatically explain what an item means in a particular context, or what a shopper intends to accomplish. Saboo identifies semantic understanding as the bottleneck and develops four building blocks in order: supervision, catalog semantics, consumer memory and steerable content generation.

0:180:20
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Teach relevance before optimizing engagement

Consider the query “gluten-free pasta.” Regular spaghetti can rank well because it sells well. Gluten-free white bread can enter the candidate set because it shares part of the query. Both miss the request in different ways: the spaghetti violates the dietary constraint, while the bread misses the product type. Graded relevance gives the system a more useful target. True gluten-free pasta is highly relevant; chickpea pasta is presented as a possible substitute; popular regular spaghetti fails the stated constraint.

Source frame: Teach relevance before optimizing engagement
Source frame: Teach relevance before optimizing engagement

Two existing sources of supervision each have a cost:

  • Human annotation: People can judge query–item relevance, but labeling is expensive and slow. A rapidly changing catalog also makes those judgments stale.
  • Behavioral signals: Clicks and purchases are abundant, but exposure, position, price, promotions and earlier model choices all influence them. An item selling well is therefore a reason to investigate its relevance, rather than a complete answer.

DoorDash starts with a human-labeled seed set of query–item pairs on a three-level relevance scale: 0, 1 and 2. Suspicious disagreements receive extra attention. If an item labeled irrelevant nevertheless has strong add-to-cart or conversion behavior, a stronger LLM reevaluates it with more granular prompts. Query-to-category models provide another check: a query mapping to valid categories can prompt a label adjustment when the item belongs to those categories. These checks build the high-precision golden dataset used to train the scalable labeler.

A lightweight LLM is then fine-tuned on that dataset and run offline across the catalog to generate graded query–item labels. Retrieval and ranking learn from the same target. This is the first concrete form of the title’s advice: spend on reasoning during preparation, then transfer what it learned into models that can serve quickly and cheaply.

3:263:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:14 · section reference included

Separate related items, then balance relevance with conversion

Retrieval needs more than a general sense that two things are related. At e-commerce scale, standard embeddings can place exact matches, substitutes and complementary products too close together. For the pasta query, that distinction determines whether the candidate set contains products satisfying the request or merely products associated with its words.

Source frame: Separate related items, then balance relevance with conversion
Source frame: Separate related items, then balance relevance with conversion

DoorDash uses two-stage contrastive training on the graded labels. The first stage shapes the overall embedding geometry with two-tower encoders and a multilevel supervised contrastive loss. The resulting model then exposes its own difficult cases: negatives ranked too high and strong positives ranked too low. Those cases are relabeled and used in a second stage of curriculum training. Training becomes more focused because the first model identifies the distinctions it still cannot make.

What changes between the two training stages? The flow below shows how a model’s ranking mistakes become the next training material. Saboo describes overlap between relevant and moderately relevant items after stage one, followed by substantially better separation after stage two. He reports a 2.3% improvement in relevance NDCG, a metric for the quality of an ordered result list. The talk’s percentage improvements do not specify experimental windows, sample sizes, baseline details or whether the changes are relative percentages or percentage points; they describe DoorDash’s reported outcomes rather than a portable expectation.

The ranking model receives a related change. An ordinal relevance tower learns from the LLM’s graded labels alongside existing towers predicting clicks, add-to-cart events and conversions. The towers share lower layers, so their training updates teach a common representation about both semantic fit and engagement. The relevance tower predicts probabilities across relevance levels; a value function blends those predictions with engagement objectives for each product surface. The system can therefore learn the difference between gluten-free pasta and popular regular spaghetti while retaining the business signals needed to order useful results.

The pasta example now has a causal path through the architecture: judgments distinguish constraint satisfaction from popularity; an offline labeler expands those judgments; retrieval learns finer separation; and ranking learns an explicit relevance prediction alongside conversion predictions. The observable result reported here is improved aggregate relevance, rather than a measured before-and-after result for that individual query. Keeping the production retrieval and ranking architecture also lets DoorDash test these improvements while retaining its serving and business objectives.

How it fits togetherTraining on the distinctions the first model misses

A shared relevance target for retrieval

The first stage establishes broad geometry. Mining and relabeling turn its errors into a focused second-stage curriculum, improving separation between relevance levels.

3:263:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:22 · section reference included

Give the catalog a learned, shared vocabulary

At DoorDash’s scale, the catalog contains a few billion store-level items. A unique item identifier distinguishes records but says nothing about meaning. A human-curated taxonomy supplies meaning, yet can be too coarse and rigid: placing products under sauces and hot sauces does not express the finer relationships among them. Semantic IDs provide a short hierarchical code whose granularity can be controlled and whose structure can be used by downstream models.

Source frame: Give the catalog a learned, shared vocabulary
Source frame: Give the catalog a learned, shared vocabulary

The beginning of a semantic ID identifies a broad neighborhood; later tokens express finer distinctions. In the hot-sauce example, products share their first and second prefixes, then split into specialties such as Mexican, Caribbean and Korean hot sauces. Saboo describes that structure as emerging from data with zero labels. Comparing prefixes gives models a way to recognize shared meaning at different resolutions, without requiring every distinction to be a manually maintained taxonomy branch.

That shared representation supports several distinct uses:

  • Cross-category relationships: Chips, salsa and guacamole may occupy different taxonomy branches, while a semantic neighborhood can connect them as parts of one shopping mission.
  • Cold starts: New store items can enter models through encoded semantic tokens used as sparse ID features.
  • Tail coverage: Items with little interaction data can inherit signal from semantically related items, reducing the need to wait for their own exposure and purchase volume.
  • Catalog audits: Comparing learned semantic groupings with human labels can reveal disagreements worth inspecting.

Semantic IDs reportedly improved ranking MRR by 4–5%, with conversion gains as well. MRR measures how early the first relevant result appears. The same representation also supports query reformulation: a search for Sriracha can lead to a suggestion for chili garlic sauce because the queries map into a catalog-grounded neighborhood. Inventory matters here. A plausible suggested query has little value if DoorDash has no products to satisfy it; connecting the query graph to catalog semantics makes the suggestion useful for shopping.

9:319:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:31 · section reference included

Make shopper context reusable across models

Once items have useful representations, the next question is what the system knows about the shopper. User embeddings are valuable, but they do not necessarily explain why someone has a preference or intent. An LLM also cannot readily consume an existing user embedding without additional work to learn its representation. Consumer memory supplies an explicit semantic counterpart that can be inspected and reused across recommendation models and LLM applications.

Source frame: Make shopper context reusable across models
Source frame: Make shopper context reusable across models

The framework combines three kinds of context. Saboo calls these three timescales, although the third describes how information is supplied rather than how long it lasts:

  • Long-term memory: Preferences inferred from orders, searches, browsing and support interactions.
  • Real-time context: The current cart and active searches within a session.
  • Stated preferences: Constraints and preferences explicitly supplied through agentic interactions, such as Ask DoorDash.

Long-term memory is organized into blocks that can grow as the system learns more: dietary preferences, dining preferences and substitution preferences, for example. Separating this representation from downstream applications means each application does not have to reinterpret the shopper’s history for itself. Each consumer’s memory is materialized in several forms: compact, human-readable text; embeddings of memory blocks for retrieval and ranking; and graph or hierarchical relationships connecting consumers with brands, taxonomies and revealed preferences.

A context graph is useful because shopping relationships are sparse and often require several hops. Connecting a consumer to extracted memory concepts creates relationships that direct consumer–item interactions may not provide, particularly at fine taxonomy levels. Saboo reports that graph-based embeddings outperform DoorDash’s existing taxonomy-based embeddings for retrieval. The resulting composite memory objects already feed personalized collections, Ask DoorDash sessions, and features for retrieval and ranking.

14:0314:05
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:03 · section reference included

Generate collections offline, assemble the shopping experience online

The fourth building block brings the earlier representations together. Semantic IDs, memory blocks and relevance supervision can feed LLMs, smaller language models and traditional models. Their outputs can take different shapes: ranked semantic ID lists, carousel titles and supporting copy. Personalized collections on store pages are a concrete application of that shared vocabulary.

Source frame: Generate collections offline, assemble the shopping experience online
Source frame: Generate collections offline, assemble the shopping experience online

Historically, store collections came from a fixed library or product attributes. The newer approach generates collections for individual consumers. An offline LLM process takes consumer memory and semantic IDs and synthesizes the title, subtitle and items. Control matters as much as generation: the system can shape collections around occasions and moments, then use its existing retrieval and ranking stack for item hydration and collection ranking when serving shoppers.

Where does the expensive generation end, and the serving stack begin? The diagram separates batch collection creation from item hydration and ranking. That division lets LLMs produce a richer collection concept while established models handle the delivery of the shopping experience. The talk specifies offline generation but does not detail its refresh cadence, which limits how precisely we can explain the timing of responses to new occasions or session changes.

The visible changes are specific to the shopper:

  • Plant-based affinity: A store page can show plant-based pantry rows.
  • Cat-only households: Collections can focus on cat dry food.
  • Pantry restocking: Session context can bias the experience toward pantry staples.

In early pets-category tests, Saboo reports order-rate increases close to 1% and a 6% increase in active users. These are the business outcomes of the collection experience, distinct from the earlier retrieval and ranking metrics.

How it fits togetherPersonalized collections across offline generation and serving

Reusable shopper preferences

Consumer memory and catalog semantics shape the generated collection. Existing retrieval and ranking systems hydrate its items and rank collections for the store page.

18:2218:32
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:22 · section reference included

An online LLM call is often the wrong unit of architecture

The ending returns to three decisions. Discovery needs an understanding of item meaning and shopper intent alongside engagement. Expensive reasoning can be captured offline in labels, semantic IDs and memory, then served through smaller, faster models. And those representations should be shared: the same work can support retrieval, ranking and content generation rather than being rebuilt separately for every feature.

Source frame: An online LLM call is often the wrong unit of architecture
Source frame: An online LLM call is often the wrong unit of architecture

Saboo’s closing architectural judgment is that an online LLM call is often not the product architecture you need. DoorDash’s examples give that judgment substance: a relevance label can teach both candidate retrieval and final ranking; a semantic code can improve ranking and suggest an inventory-backed search; consumer memory can personalize an agent session and a store collection. The useful output of reasoning is something the rest of the system can keep using.

20:4820:51
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

20:48 · section reference included

Read the complete timestamped transcript
  1. 0:12

    Thank you everyone for coming to this

  2. 0:14

    talk and Devanch for organizing this. Uh

  3. 0:18

    I'm Ragav. I'm a staff uh machine

  4. 0:20

    learning engineer at Door Dash. I work

  5. 0:22

    on search and personalization

  6. 0:24

    and uh today I'm going to talk about uh

  7. 0:28

    the ways that we're integrating LLMs for

  8. 0:30

    you know our marketplace discovery uh

  9. 0:33

    specifically in four pieces and um how

  10. 0:36

    these primitives are kind of uh uh

  11. 0:38

    working towards our integration of LLMs

  12. 0:42

    into traditional uh Rexus as well. So

  13. 0:45

    I'll start off uh today uh with a simple

  14. 0:48

    claim. Uh the claim is that to build

  15. 0:51

    effective discovery in this case for a

  16. 0:55

    marketplace like Door Dash the real

  17. 0:57

    bottleneck is semantic understanding. So

  18. 1:02

    that is knowing what you know actually

  19. 1:05

    what items mean uh for users given some

  20. 1:10

    context and what a shopper actually

  21. 1:13

    intends to do on you know an app like

  22. 1:16

    Door Dash. And historically we have

  23. 1:19

    treated these uh as engagement

  24. 1:22

    optimization problems. Um however LLMs

  25. 1:25

    give us a genuinely new lever to extend

  26. 1:29

    this. So this talk is about uh you know

  27. 1:32

    the four primitives that have allowed us

  28. 1:35

    to start leveraging LLMs for problems at

  29. 1:38

    Door Dash.

  30. 1:41

    As you may know Door Dash is now grown

  31. 1:44

    uh well beyond restaurants. So we're in

  32. 1:47

    grocery, retail, pets, gifting and more.

  33. 1:50

    And our goal is to capture every

  34. 1:53

    shoppable moment. Uh and we know that

  35. 1:56

    across these verticals, the users

  36. 1:59

    frequently have very broad shopping

  37. 2:01

    missions, right? So for example, a

  38. 2:04

    consumer may say when they come to our

  39. 2:06

    app is, you know, I just adopted a

  40. 2:08

    puppy.

  41. 2:10

    What do I need to get started this week?

  42. 2:13

    And this consumer start may start on

  43. 2:15

    like searching for puppy food because

  44. 2:18

    they just adopted the puppy. That one

  45. 2:21

    query could unfold into further query

  46. 2:24

    reformulations.

  47. 2:25

    Um they land on collections for you know

  48. 2:28

    other shopping needs, complimentary

  49. 2:31

    items such as crates, leashes, uh

  50. 2:35

    training pads all the way to checkout.

  51. 2:38

    And this could happen over multiple

  52. 2:40

    sessions, mult multiple days, right? And

  53. 2:44

    capturing that whole arc is pretty hard

  54. 2:46

    because it spans multiple models. Um,

  55. 2:49

    and this is where the four primitives I

  56. 2:52

    will cover come in.

  57. 2:55

    Specifically, supervision, catalog

  58. 2:57

    semantics, semantic personalization,

  59. 3:01

    and steerable content generation. As we

  60. 3:03

    heard previously as well, it's a system

  61. 3:06

    of shared representations that help us

  62. 3:08

    map this customer's journey uh with the

  63. 3:12

    use of LLMs.

  64. 3:14

    Now, with supervision, the question

  65. 3:16

    we're asking or looking to address is

  66. 3:19

    how do we teach our retrieval and

  67. 3:21

    ranking systems what good means for

  68. 3:24

    different tasks? And here's a simple

  69. 3:26

    example, right? A shopper searches for

  70. 3:28

    gluten-free pasta. And if we only rank

  71. 3:31

    from engagement, very popular regular

  72. 3:33

    spaghettes might show up and because it

  73. 3:36

    sells well, you know, it may continue to

  74. 3:38

    show up. Even gluten-free white bread

  75. 3:41

    might be retrieved and, you know, show

  76. 3:44

    up because it overlaps with gluten-free.

  77. 3:46

    But neither of these are clearly the

  78. 3:48

    right answer. What we actually want is

  79. 3:51

    graded relevance. A true, you know,

  80. 3:54

    gluten-free pasta should be a high

  81. 3:56

    relevance item. Chickpea pasta might be

  82. 3:59

    a reasonable substitute and regular

  83. 4:02

    spaghetti while it's popular it fails

  84. 4:04

    the constraint that the user has. Now to

  85. 4:07

    solve this there are obviously two

  86. 4:10

    sources of truth. We could look at human

  87. 4:12

    annotation

  88. 4:14

    but that's expensive slow and becomes

  89. 4:17

    quickly stale because our catalog

  90. 4:19

    changes quite rapidly.

  91. 4:22

    Second is behavioral signals. They're

  92. 4:23

    abundant but obviously as I mentioned

  93. 4:25

    biased by exposure, position, price,

  94. 4:29

    promotions

  95. 4:31

    and you know previous model choices. So

  96. 4:33

    the missing signal is a scalable

  97. 4:36

    reasoning signal. This is where LLMs are

  98. 4:39

    very useful as they offer a way to

  99. 4:41

    produce that supervision for such tasks.

  100. 4:44

    So in our case, you know, the PIP

  101. 4:46

    pipeline starts with human ground

  102. 4:48

    truths. uh we build a high quality seed

  103. 4:51

    set of example query item pairs and on a

  104. 4:55

    three three uh level relevant scale 012.

  105. 5:00

    We audit the suspicious cases. For

  106. 5:02

    example, if a human label says you know

  107. 5:04

    that an item is irrelevant but that item

  108. 5:07

    performs very well on add to cart or

  109. 5:09

    conversions, we send that case to a

  110. 5:12

    stronger LLM uh to re-evaluate with more

  111. 5:15

    granular prompts.

  112. 5:17

    We also reconcile with other models. You

  113. 5:20

    know, for example, our query to taxonomy

  114. 5:22

    or category models. And if a query, you

  115. 5:25

    know, query maps to a set of valid

  116. 5:27

    categories and the items belong to those

  117. 5:29

    valid categories, we may adjust the

  118. 5:32

    label accordingly. And through this

  119. 5:34

    process, we're able to achieve a pretty

  120. 5:36

    high precision golden data set that we

  121. 5:39

    then fine-tune a lightweight LLM, let's

  122. 5:42

    say, for example, a GPD 40 mini on top

  123. 5:45

    of it. And that's when it, you know,

  124. 5:48

    really pays off. We are able to use that

  125. 5:51

    fine-tuned labeler offline across, you

  126. 5:54

    know, our full catalog to generate uh

  127. 5:57

    full graded query item pairs. And those

  128. 5:59

    labels become one shared target for both

  129. 6:02

    retrieval and ranking systems. This

  130. 6:05

    pattern has been pretty important for us

  131. 6:07

    over the past uh few years. um use you

  132. 6:10

    know expensive reasoning once offline

  133. 6:14

    then distill it into models that can you

  134. 6:17

    know be served cheaply and quickly.

  135. 6:22

    Now let's take retrieval first. The

  136. 6:24

    challenge is you know standard

  137. 6:25

    embeddings um at e-commerce scale

  138. 6:28

    quickly collapse the relevance uh

  139. 6:31

    distinction. items that are merely

  140. 6:33

    related sit close to items that actually

  141. 6:36

    match and the model uh may know two

  142. 6:39

    items are related but not be able to

  143. 6:41

    separate uh exact matches, substitutes,

  144. 6:44

    compliments.

  145. 6:46

    So our fix is a two-stage contrastive

  146. 6:48

    method um trained on uh the same graded

  147. 6:51

    labels. Stage one, which we call mining,

  148. 6:55

    does a global geometry shaping. We use

  149. 6:58

    two tower encoders uh with multi-level

  150. 7:00

    supervised contrastive loss. Um after

  151. 7:03

    that we use that base model to mine

  152. 7:07

    harder negatives and uh these are items

  153. 7:10

    that the model confuses hard negatives

  154. 7:12

    that are ranked too high or strong

  155. 7:15

    positives ranked too low. And the second

  156. 7:17

    stage after that is where we really put

  157. 7:22

    the model through curriculum training.

  158. 7:24

    uh use those hard negatives, relabel

  159. 7:26

    them and our uh you know relevance of

  160. 7:30

    the retrieval layer improves sharply

  161. 7:33

    after that. So after stage one we see

  162. 7:35

    overlaps between you know relevant and

  163. 7:38

    uh moderately relevant but after stage

  164. 7:40

    two there is a significant difference

  165. 7:43

    and this has been one of like our

  166. 7:44

    biggest uh levers in retrieval

  167. 7:47

    improvement uh across the board. um you

  168. 7:50

    know we've improved NDCG of relevance by

  169. 7:53

    2.3%.

  170. 7:54

    And uh that's also been true with our

  171. 7:57

    downstream business metrics

  172. 7:59

    and we did the same with uh uh exercise

  173. 8:03

    with our ranking models as well

  174. 8:04

    distilling LM reason labels into our

  175. 8:07

    rankers. However, combining this with uh

  176. 8:11

    business and engagement objectives.

  177. 8:15

    Here we add a new tower uh in this case

  178. 8:17

    an ordinal uh relevance tower on top of

  179. 8:20

    the LLM graded labels and uh this

  180. 8:25

    prediction sits right alongside existing

  181. 8:27

    engagement towers uh click add to cart

  182. 8:30

    and conversion and since they share the

  183. 8:32

    same uh bottom layers the semantic fit

  184. 8:35

    and relevance fit gets distilled in the

  185. 8:38

    same backward pass and uh our model is

  186. 8:41

    able to predict uh you know probability

  187. 8:43

    of relevance across the different levels

  188. 8:47

    and we are able to blend uh through a

  189. 8:49

    value function on on top of this that

  190. 8:52

    allows us to uh fine-tune between

  191. 8:54

    engagement and relevance for different

  192. 8:56

    surfaces.

  193. 8:59

    Now these two examples are part of a

  194. 9:02

    larger theme of our work across similar

  195. 9:04

    projects uh where it seems right. We're

  196. 9:07

    not replacing the retrieval and ranking

  197. 9:09

    system with an LLM, but rather

  198. 9:11

    distilling the uh reasoning and

  199. 9:13

    understanding into some production

  200. 9:15

    ranking architecture. And this allows us

  201. 9:18

    to kind of quickly test and also

  202. 9:20

    scalably improve our models uh with LLMs

  203. 9:23

    while keeping uh you know the business

  204. 9:25

    and system objectives uh of these

  205. 9:28

    surfaces in mind.

  206. 9:31

    So once we have supervision, the next

  207. 9:33

    question is how do we represent a very

  208. 9:36

    large and constantly changing catalog uh

  209. 9:39

    in a way that every model be it language

  210. 9:41

    models or uh you know traditional

  211. 9:44

    retrieval and ranking models uh that

  212. 9:46

    they can understand and at you know Door

  213. 9:49

    Dash's scale uh you can imagine we're

  214. 9:51

    kind of surfacing items across stores

  215. 9:53

    across internationally actually uh now

  216. 9:57

    and you know that's easily a few billion

  217. 9:59

    items at the store item level and for

  218. 10:02

    these items you obviously have unique

  219. 10:04

    skew ids but it says nothing

  220. 10:06

    semantically. So we also have a human

  221. 10:09

    curated taxonomy that helps us classify

  222. 10:11

    and categorize these items into

  223. 10:14

    meaningful spaces. But often this is too

  224. 10:17

    coarse and too rigid.

  225. 10:19

    So for example something like hot sauces

  226. 10:22

    may just have like sauces hot sauces in

  227. 10:24

    the taxonomy

  228. 10:26

    uh but it doesn't tell you anything

  229. 10:27

    about the relationship between hoof or

  230. 10:30

    franks or tobasco.

  231. 10:33

    So that's where we've also adapted uh or

  232. 10:36

    adopted um semantic ids. Uh it's been

  233. 10:40

    introduced previously already. It's a

  234. 10:42

    backbone for a lot of our uh work uh

  235. 10:46

    now. And uh what it does is it gives us

  236. 10:50

    a you know a short hierarchical code

  237. 10:52

    that's analogous to our taxonomy but uh

  238. 10:56

    the ability to control the fine grain

  239. 10:59

    nature of it. And the result of this

  240. 11:01

    learn taxonomy is that each item gets

  241. 11:05

    this hierarchical code and the prefix

  242. 11:07

    captures broad neighborhoods and you

  243. 11:11

    know the later tokens capture finer

  244. 11:13

    distinctions.

  245. 11:15

    So for example in the map over on on the

  246. 11:18

    slide you'll see hot sauces and the

  247. 11:20

    structure emerging from the data with

  248. 11:23

    zero labels. each one share the same

  249. 11:26

    first and second prefix in this uh ID

  250. 11:29

    sequence but then split by specialtity.

  251. 11:32

    So now you've got Mexican, Caribbean,

  252. 11:34

    Korean hot sauces uh being split up. And

  253. 11:39

    the important property is that this code

  254. 11:41

    that's learned is you know comparable by

  255. 11:43

    as I said by prefix but also usable by

  256. 11:47

    all of our downstream models

  257. 11:50

    and that unlocks a few things for us. So

  258. 11:53

    the first is cross-category comparisons

  259. 11:55

    or relationships. You know chips, salsa,

  260. 11:58

    guacamole may live in different taxonomy

  261. 12:01

    branches but a shared semantic ID

  262. 12:03

    neighborhood can uh indicate that they

  263. 12:05

    belong together and maybe a shopping

  264. 12:07

    mission. Second cold start problems. uh

  265. 12:11

    oftentimes we get new catalog items

  266. 12:13

    added by stores and with techniques like

  267. 12:16

    engram and bite parent coding of these

  268. 12:19

    tokens we're able to scalably add these

  269. 12:21

    to our models as sparse ID features

  270. 12:24

    third tail coverage so sparse items uh

  271. 12:29

    and uh inherit a lot of signal from

  272. 12:32

    semantically related items and uh you

  273. 12:35

    know we don't have to wait for the

  274. 12:37

    volume or exposure uh to you um for to

  275. 12:40

    consumers for these items. And then

  276. 12:43

    lastly, nice to have is the fact that we

  277. 12:46

    can actually also do a reverse audit. So

  278. 12:48

    we can audit our catalog and how well

  279. 12:50

    our human labels agree with the

  280. 12:52

    semantically learned labels.

  281. 12:56

    So a couple of examples of where we're

  282. 12:58

    using it today uh just to get give some

  283. 13:00

    real metrics. Um it has been one of our

  284. 13:04

    biggest improvements to our ranker. Um

  285. 13:06

    in in this case it's actually improved

  286. 13:09

    our uh ranker by uh improving MRR

  287. 13:12

    between four to 5% and that's translated

  288. 13:15

    to pretty big conversion uh wins as

  289. 13:17

    well. The second one that I'm

  290. 13:20

    particularly

  291. 13:21

    fond of is query reformulation. So again

  292. 13:24

    going back to the hot sauce example,

  293. 13:26

    Sriracha can lead to garlic chili garlic

  294. 13:29

    sauce or sambell Ole and because these

  295. 13:33

    queries map onto like our catalog

  296. 13:36

    grounded semantic neighborhood uh that

  297. 13:40

    results in much more relevant queries

  298. 13:42

    that we're suggesting to users. Um

  299. 13:45

    ultimately if these are queries that we

  300. 13:47

    don't have inventory for on Door Dash,

  301. 13:50

    they're meaningless. And with the

  302. 13:52

    addition of semantic ids in this query

  303. 13:54

    graph, we were actually able to see

  304. 13:56

    pretty massive um MR gains as well uh

  305. 13:59

    for for this piece of work.

  306. 14:03

    So for now we've talked about you know

  307. 14:05

    item mapping and relevance and the next

  308. 14:08

    question is consumer context. What does

  309. 14:10

    the system know about the shopper and

  310. 14:14

    can that knowledge be reused across

  311. 14:16

    models again? And this is where uh our

  312. 14:19

    third primitive comes in memory. So

  313. 14:22

    memory in the agent context is pretty

  314. 14:25

    well understood now. Um we apply the

  315. 14:28

    same concepts to uh our recommendation

  316. 14:32

    systems. So user embeddings are clearly

  317. 14:35

    very useful. uh we have many

  318. 14:36

    representations of our consumers but

  319. 14:39

    they don't necessarily get to uh why a

  320. 14:43

    consumer may have certain intents um and

  321. 14:46

    why they might have certain preferences.

  322. 14:50

    Additionally, LLMs cannot uh readily use

  323. 14:53

    these uh embeddings. You could tokenize

  324. 14:55

    and like uh train these models to learn

  325. 14:57

    it. But oftentimes having some explicit

  326. 15:01

    LM native counterpart is very useful and

  327. 15:03

    that's what we found. So the idea of

  328. 15:06

    memory is to represent uh the consumer

  329. 15:09

    in multiple forms semantic in you know

  330. 15:13

    inspectable and reusable

  331. 15:16

    and uh the way we think about memory is

  332. 15:20

    uh in three time scales. So long-term

  333. 15:23

    memory captures durable preferences from

  334. 15:26

    orders, searches, browsing, support

  335. 15:29

    interactions.

  336. 15:31

    Real-time context captures uh agentic

  337. 15:34

    inter interactions um oh sorry in

  338. 15:37

    session interactions so cart state

  339. 15:40

    active searches and then we have stated

  340. 15:42

    preferences which come from agentic

  341. 15:45

    interactions so something like ask door

  342. 15:47

    dash for example where consumers are

  343. 15:50

    able to explicitly state their

  344. 15:51

    constraints and preferences as well

  345. 15:54

    and the way we represent consumers in uh

  346. 15:57

    in uh this long-term memory is through

  347. 16:01

    uh memory blocks. And these are

  348. 16:03

    structured in a way that allows uh us to

  349. 16:06

    add new dimensions of the user, you

  350. 16:08

    know, from dietary preferences to dining

  351. 16:10

    preferences to uh substitute pre uh

  352. 16:13

    preferences um as we learn more about

  353. 16:16

    the consumer and that is uh decoupled

  354. 16:19

    from like the downstream system that u

  355. 16:22

    that doesn't need to reinterpret uh this

  356. 16:24

    for their own use cases.

  357. 16:27

    So each consumer's memory is multi

  358. 16:29

    materialized in multiple forms. So first

  359. 16:32

    is text that's human readable. It's uh

  360. 16:35

    captures the consumer in a compact way.

  361. 16:37

    Second is are latent vectors embeddings

  362. 16:40

    of those memory blocks that can be fed

  363. 16:42

    into retrieval and ranking systems. And

  364. 16:45

    third are graph and tree or hierarchical

  365. 16:48

    approaches. So uh you know type

  366. 16:51

    relationships between consumers and

  367. 16:53

    brands taxonomies and memory uh revealed

  368. 16:57

    um preferences

  369. 17:00

    and these are assembled into you know

  370. 17:02

    composite memory objects that both ML

  371. 17:05

    models and LLM use downstream. So an

  372. 17:08

    example is you know this context graph

  373. 17:10

    uh where we connect consumers with

  374. 17:12

    extracted memory concepts and a graph

  375. 17:16

    needs fits neatly into shopping journeys

  376. 17:18

    because you know oftent times uh

  377. 17:21

    consumer item interactions are sparse

  378. 17:23

    and multihop. And in this case these

  379. 17:26

    context graphs are able to link

  380. 17:28

    consumers across memory concepts that we

  381. 17:30

    previously did not have uh relationships

  382. 17:34

    for. And it's particularly helpful uh at

  383. 17:38

    fine grain taxonomy levels. In our case,

  384. 17:41

    we're seeing uh for retrieval uh uh

  385. 17:44

    using uh graph uh based embeddings

  386. 17:47

    outperforming our uh existing taxonomy

  387. 17:51

    based embeddings.

  388. 17:54

    And today this memory framework shows up

  389. 17:56

    in three places. The first is

  390. 17:59

    personalized collections. I'll talk

  391. 18:01

    about that a bit later. Uh second is

  392. 18:03

    agentic personalization. So ask door

  393. 18:05

    dash for example uses this to

  394. 18:07

    personalize its sessions uh for you. And

  395. 18:10

    third in uh retrieval and ranking models

  396. 18:13

    as I said we encode these memory blocks

  397. 18:15

    and feed them as features in in

  398. 18:18

    downstream models as well.

  399. 18:22

    So the fourth primitive is steerable

  400. 18:24

    content generation. We heard quite a bit

  401. 18:26

    about it in the previous talk and this

  402. 18:30

    slide is my take on how we're p piecing

  403. 18:32

    all these uh primitives together. So all

  404. 18:37

    of these inputs, semantic ids, memory

  405. 18:39

    blocks um and graded relevance or um LLM

  406. 18:43

    supervision feed into multiple models

  407. 18:46

    you know be it LLMs or small language

  408. 18:48

    models or um uh you know traditional

  409. 18:52

    models and from these inputs we can

  410. 18:54

    generate different output shapes you

  411. 18:56

    know ranked semantic ID lists, carousel

  412. 18:58

    titles, subcopies

  413. 19:00

    and these show up across different

  414. 19:02

    surfaces today on Gord Dash and A direct

  415. 19:06

    example of this is uh our um

  416. 19:09

    personalized collections on store pages.

  417. 19:11

    So historically collections on store

  418. 19:14

    pages uh on Door Dash have been a fixed

  419. 19:17

    library or attribute-based

  420. 19:20

    um and we've been able to kind of expand

  421. 19:23

    that through uh consumer level

  422. 19:26

    collection generation. And today this is

  423. 19:29

    an offline uh LLM process where we take

  424. 19:32

    in consumer memory semantic ids and syni

  425. 19:35

    syn synthesize uh collections um all the

  426. 19:38

    way from title subtitle to the actual

  427. 19:40

    items.

  428. 19:42

    And the important part is that control

  429. 19:44

    and steerability. We're able to react to

  430. 19:47

    occasions and moments um and build those

  431. 19:50

    collections as needed uh for different

  432. 19:54

    consumers at serving time. uh because

  433. 19:57

    this is all batch and uh generated

  434. 20:00

    offline through LLMs, we are able to

  435. 20:03

    still use our uh existing retrieval and

  436. 20:05

    ranking stack for item hydration,

  437. 20:07

    collection ranking, etc.

  438. 20:11

    And you know this is for example what a

  439. 20:13

    shopper actually sees, right? For a

  440. 20:14

    shopper with plant-based affinity, the

  441. 20:16

    system can generate plant-based pantry

  442. 20:19

    rows. For cat-only households, it can

  443. 20:21

    generate cat dry food rows. And if a

  444. 20:24

    session indicates that you know a person

  445. 20:26

    is going through pantry restocking it

  446. 20:28

    can bias towards pantry staples. And our

  447. 20:31

    early tests show that you know consumers

  448. 20:33

    are feeling the benefits of these

  449. 20:35

    tailored experiences. Uh an example is

  450. 20:38

    uh within our pets vertical we've been

  451. 20:40

    able to drive uh close to 1% uh order

  452. 20:44

    rate increases and 6% in uh active

  453. 20:46

    users.

  454. 20:48

    So to conclude uh there are three

  455. 20:51

    takeaways I would love for you to take

  456. 20:53

    away from this talk and how LLM fit into

  457. 20:56

    search and recommendations. First

  458. 20:59

    discovery is a semantic understanding

  459. 21:02

    problem. It's not only about engagement.

  460. 21:04

    LMS give us a way to reason about item

  461. 21:07

    meaning and shopper intent. Uh in in

  462. 21:09

    Door Dash's case for example. Second uh

  463. 21:13

    distill LM reasoning into primitives.

  464. 21:16

    capture you know reasoning uh offline as

  465. 21:19

    labels, semantic ids, memory and then

  466. 21:23

    let smaller and faster models serve it.

  467. 21:26

    The online LLM call is often not the

  468. 21:29

    product architecture you need. Third,

  469. 21:32

    shared representations create many use

  470. 21:34

    cases. Uh once you have these

  471. 21:36

    primitives, they can power, you know,

  472. 21:38

    retrieval, ranking, content generation,

  473. 21:41

    etc.

  474. 21:43

    So last but not least, thank you and

  475. 21:45

    thank you to all the collaborators at

  476. 21:47

    Door Dash who have helped ship a lot of

  477. 21:50

    these things as well.