LLM-Generated Entity Profiles for Personalized Food Delivery Platform

doordash · Tech · 2025 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Food delivery personalization

DoorDash needed interpretable representations of consumers, merchants, and items for personalization, recommendations, support, and downstream ML, where dense embeddings were compact but opaque and hard to debug.

Constraints:

Architecture

DoorDash built batch LLM pipelines that generate human-readable JSON profiles for consumers, merchants, and items. Data preparation gathers order history, menus, reviews, ratings, images, descriptions, and customization options; PySpark prepares prompts; Fabricator submits bulk LLM requests through Portkey files; batch outputs are downloaded, post-processed, stored in a low-latency feature store or database, and exposed through versioned APIs. Evaluation uses offline LLM-as-judge scoring and online product feedback loops.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Schema_definition["Schema definition"] --> Data_preparation_job["Data preparation job"]
  Data_preparation_job --> Amazon_S3["Amazon S3"]
  Amazon_S3 --> Prompt_generation_job["Prompt generation job"]
  Prompt_generation_job --> Batch_job_submission_job["Batch job submission job"]
  Batch_job_submission_job --> LLM_profile_generator["LLM profile generator"]
  LLM_profile_generator --> Batch_result_download_job["Batch result download job"]
  Batch_result_download_job --> Post_processing_jobs["Post-processing jobs"]
  Post_processing_jobs --> Feature_store["Feature store"]
  Feature_store --> Versioned_profile_API["Versioned profile API"]
  Versioned_profile_API --> Profile_powered_applications["Profile-powered applications"]
  Evaluation_loop["Evaluation loop"] --> LLM_profile_generator
  Versioned_profile_API --> Evaluation_loop
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Schema definition Defines entity profile structure and shared/different facets for consistency and future evolution. Data preparation job, Prompt generation job
Data preparation job Collects consumer, merchant, and item source data into Amazon S3. Amazon S3, Prompt generation job
Amazon S3 Storage for prepared base data and tracked batch IDs. Data preparation job, Prompt generation job, Batch job submission job, Batch result download job
Prompt generation job PySpark UDF workflow that generates prompts for each consumer, store, or item. Data preparation job, Batch job submission job
Batch job submission job Uploads prompts in Portkey files and creates bulk LLM batch jobs. Prompt generation job, LLM profile generator, Amazon S3
LLM profile generator LLM that synthesizes structured natural-language profiles from source data and prompts. Batch job submission job, Batch result download job
Post-processing jobs Append fields that do not require LLM inference and adapt profiles for use cases. Batch result download job, Feature store
Feature store Low-latency storage layer for downstream product retrieval. Versioned profile API
Versioned profile API Retrieval interface for downstream engineering teams and personalization features. Feature store, Profile-powered applications
Evaluation loop Offline LLM-as-judge and online feedback/A-B testing loop for profile quality and prompt iteration. LLM profile generator, Versioned profile API

Data flow

Structured source data is gathered into Amazon S3, prompt-generation jobs create per-entity prompts in PySpark, batch submission uploads Portkey files and tracks batch IDs in S3, batch download retrieves outputs about a day later, post-processing appends non-inferential fields, and downstream features retrieve versioned profiles from low-latency storage.

3 supporting quotes
“Data preparation job: Similar to base instances, this collects base data into Amazon S3.”article, stated
“Prompt generation job: Generates prompt for each entity — consumer, store, or item — in one Pyspark job using a user-defined function (UDF).”article, stated
“Batch result download job: Usually, a batch job is promised for completion within 24 hours.”article, stated

Why this architecture

DoorDash separates factual extraction from narrative synthesis: code and SQL compute objective facts, while LLMs synthesize human-readable preference, ambiance, and flavor narratives. Batch processing cuts cost and makes millions-scale profile generation practical.

3 supporting quotes
“The Principle: Use code for facts, use LLMs for narrative”article, stated
“We use traditional code such as SQL or scripts for factual extraction”article, stated
“Running in batch cuts per-profile spend by roughly 50%”article, stated

Models used: LLMs · reasoning models with medium reasoning effort · LLM-as-a-judge · DNN embeddings · semantic IDs · PySpark · Fabricator · Portkey

Scale

Alternatives considered (roads not taken)

Use dense embeddings alone for entity representation

Rejected because: Embeddings are compact and efficient but opaque, hard to debug, and difficult to explain to consumers and merchandisers.

“While embeddings are compact and compute-friendly, they come with trade-offs: They are opaque to humans, difficult to debug, and hard to interpret directly.”article, stated

Use LLMs for all fields including objective facts

Rejected because: DoorDash's guiding principle is to use code for facts and reserve LLMs for narrative synthesis.

“Use code for facts, use LLMs for narrative”article, stated
“Directly querying objective, structured data.”article, stated

Issue one LLM request per entity

Rejected because: Bulk batch submission amortizes latency, network overhead, and container start-up across thousands of rows.

“submit them to the LLM in bulk rather than issuing one request per entity.”article, stated
“we amortize latency, network overhead, and container start-up across thousands of rows.”article, stated

Patterns

semantic-caching (serving)

DoorDash generates profiles in bulk batch jobs, stores them in low-latency systems, and exposes a versioned retrieval API rather than regenerating profiles on demand.

“The profiles we generate are stored in a high-performance, low-latency feature store or database.”article, stated
“Versioning/serving API: We are working to expose a clear, versioned API for other engineering teams to easily retrieve profiles.”article, stated

llm-as-judge (evaluation)

DoorDash uses LLM-as-a-judge offline to score profile quality against source data, generated profile text, and a rubric.

“use LLM-as-a-judge to automatically score profile quality using source data, generated profile, and a rubric”article, stated

eval-driven-development (evaluation)

Profile quality is managed through offline comparisons, task-specific evaluation, online feedback, A/B experiments, and prompt updates.

“Offline evaluation: Assess new profile versions against current ones to make data-driven decisions.”article, stated
“The insights from both offline and online evaluations will be fed directly back into the development cycle.”article, stated

Tradeoffs

Use narrative profiles alongside embeddings.

Chose LLM-generated human-readable profiles plus traditional embeddings over Dense embeddings alone.

Rationale: Profiles add explainability, editability, prototyping, and human-readable insight while still feeding next-generation ML features.

“LLM-generated embedding as interpretable math representations to continue powering up DNN models.”article, stated
“Natural language profiles allow us to: * Build an explainable recommendation experience:”article, stated

Run profile generation as batch jobs.

Chose Bulk batch generation through Fabricator and Portkey files over Per-entity online LLM requests.

Rationale: Batch processing reduces per-profile cost and supports millions of records quickly.

“Running in batch cuts per-profile spend by roughly 50%”article, stated
“Spark distributes preprocessing and prompt generation jobs, while Fabricator’s batch API fans out the requests.”article, stated

Gotchas (what bit them)

Embeddings are hard to explain or debug.

Root cause: Dense vectors are compact mathematical representations but opaque to humans.

Resolution: Generate natural-language profiles that preserve semantic nuance and can be read, edited, or used for explainable recommendations.

“They are opaque to humans, difficult to debug, and hard to interpret directly.”article, stated
“These profiles preserve semantic nuance such as “prefers spicy Sichuan dishes, avoids dairy” for intuitive understanding”article, stated

LLM inference should not be used for objective fields.

Root cause: Facts such as average spend, order frequency, and explicit tags are better computed directly.

Resolution: Use code or SQL for factual extraction and LLMs only for narrative synthesis.

“We use traditional code such as SQL or scripts for factual extraction”article, stated
“We use LLMs for narrative synthesis”article, stated

Static generated profiles can become stale.

Root cause: Consumer preferences and profile quality change over time and with feedback.

Resolution: Build evaluation and feedback loops, treat prompts as code, and eventually fine-tune on validated examples.

“A static profile generation system will quickly become stale.”article, stated
“We will treat our prompts as code, with version control, testing, and a structured process for experimentation”article, stated

Evaluation

DoorDash plans offline profile-version comparison, model-based LLM-as-judge scoring with rubrics, task-specific profile evaluation, online A/B experiments, explicit profile feedback, and closed-loop prompt iteration.

Metrics: offline profile quality score · task-specific evaluation · online A/B experiment results · explicit feedback · profile version comparisons

3 supporting quotes
“Assess new profile versions against current ones to make data-driven decisions.”article, stated
“use LLM-as-a-judge to automatically score profile quality using source data, generated profile, and a rubric”article, stated
“In addition to an application-specific AB experiment, we can also surface the profile to the consumer and let them control the narrative.”article, stated

Outcomes

DoorDash states that the pipeline regularly pushes millions of records within an hour and cuts per-profile spend by roughly 50% in batch.

3 supporting quotes
“Both consumer and merchant profile pipelines now run in Fabricator as batch jobs.”article, stated
“The item profile generation job will be productionized by the end of 2025.”article, stated
“Teams can now explain recommendations, let users correct their profiles, and feed richer context to any future LLM feature.”article, stated