Profile Generation with LLMs: Understanding consumers, merchants, and items

Xiaochang Miao, Heather Song, James Zhao, Sicong Fang29 Jul 2025

Problem

DoorDash search and recommendations run on embeddings that people cannot read. Nobody can say why two vectors are similar (for example, "0.83 cosine distance"), so recommendations are hard to debug and to explain to consumers or merchandisers. Nobody can correct a preference stored in a vector. New LLM features need a readable description of each consumer, store and item, and millions of them cannot be written by hand.

Example from the article: a profile says "prefers spicy Sichuan dishes, avoids dairy", so the app can show "We suggested this dish because you liked X and it matches your pescatarian preference."

Solution in brief

An LLM writes a JSON profile for each consumer, merchant and item from aggregated order, menu, review and item data. Facts such as order counts or top sellers come from SQL, and the LLM writes only the narrative facets. Prompts are built in PySpark and sent as bulk batch jobs, which cuts per-profile cost by about 50%.

Questions this case answers
  • How to represent entities as human-readable text so that recommendations can be explained and edited, when dense embeddings are opaque
  • How to bootstrap personalization for new entities that have no engagement history
  • How to run LLM generation over millions of entities per refresh within a limited compute budget
  • How to represent consumers, merchants and items in a form that people can read, explain and correct?

Tools and methods

  • Schema-first JSON profiles — shared facets plus entity-specific facets keep profiles consistent and extensible
  • Prompt engineering with a reasoning model — a medium reasoning effort captured subtle nuances better in offline comparisons
  • Apache Spark (PySpark) — preprocessing and prompt generation
  • Amazon S3 — storage for prepared data and batch ids
  • LLM-as-a-judge — scores profiles against source data and a rubric, and suggests prompt fixes
Continue reading — it's free

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