Using LLMs to infer grocery preferences from DoorDash restaurant orders

Yucong Ji, Raghav Saboo, Vivek Paharia, Isa Lyubimova29 Sep 2025

Problem

DoorDash wants to show useful grocery and convenience items to customers who have never shopped in those verticals, but who order from restaurants. The platform has more than 200 million active restaurant customers. Sending each customer's order history and the full grocery taxonomy to an LLM degrades output (long context, hallucinated categories) and would cost seven figures per full refresh.

Example from the article: one author's restaurant history produced a carousel with hot pot soup base, potstickers and burritos, items he says he buys often.

Solution in brief

Compress each user into weighted tagsets (dish, cuisine and dietary tags) and call the LLM once per unique tagset, not once per user. A retrieval step first narrows the grocery taxonomy to the nearest candidates. Per-user scores then combine recency, frequency and the LLM's relevance scores, and the result feeds the existing retrieval and ranking stack.

Questions this case answers
  • How to bootstrap recommendations in a new vertical from a user's history in an adjacent vertical when per-user LLM inference is too costly
  • How to map a free-form behavioral signal onto a large fixed taxonomy with an LLM without hallucinations and at low cost
  • How to recommend grocery items to customers who have only ordered from restaurants?
  • How to use an LLM for personalization when running it per user is too expensive?

Tools and methods

  • RAG over the taxonomy — embeddings plus k-nearest-neighbors narrow the candidate taxonomy nodes before the LLM prompt
  • Few-shot prompt with rubric and strict JSON format — makes tagset-to-taxonomy mapping consistent and machine-readable
  • Recency-frequency scoring — turns a six-month order history into scores per tagset
  • LLM-as-judge — compares prompt variants offline by judge-vs-model agreement
  • Two-tower retrieval and multi-task ranking — DoorDash's existing online stack that consumes the preferences
Continue reading — it's free

Google or a one-time email code. No password.