Problem
DoorDash users type compound queries such as "vegan chicken sandwich". An embedding-based retriever returns vegan, vegetarian, chicken and vegan chicken sandwiches, but only the last group matches. Attributes also differ in weight: a shopper may accept any vegan sandwich but rejects a chicken sandwich that is not vegan. Search must generalize to new queries and still enforce such rules.
Example from the article: for "small no-milk vanilla ice cream" the catalog item "Non-Dairy Milk & Cookies Vanilla Frozen Dessert - 8 oz" is a correct match, although its text contains neither "no-milk" nor "ice cream".
Solution in brief
Annotate catalog items with attributes from a knowledge graph. At query time, an LLM splits the query into segments labeled with taxonomy categories, then links each segment to a concept in the graph. The linking step picks from 100 candidates found by approximate nearest neighbor (ANN) search, so the model cannot invent concepts. Retrieval then treats strict attributes as MUST and soft ones as SHOULD.
Questions this case answers
- How to retrieve only items that satisfy every constraint of a multi-attribute query when embedding similarity returns partial matches
- How to map free-text query fragments onto a closed taxonomy with an LLM without inventing concepts that do not exist
- How to make search retrieval respect every requirement in a compound query such as 'vegan chicken sandwich'?
- How to segment a query and link each part to catalog attributes without LLM hallucinations?
Tools and methods
- LLM segmentation with taxonomy categories — splits a query into segments and labels each with a taxonomy category
- Entity linking with RAG — ANN retrieves candidate concepts, the LLM chooses among them
- Knowledge graph and taxonomies — controlled vocabulary for items and queries (cuisines, dish types, dietary preferences, brands)
- MUST/SHOULD retrieval logic — hard conditions for diet, soft ones for flavor
- Manual audits — annotators score samples of every processed batch
Google or a one-time email code. No password.