Every "AI shopping assistant" demo works the same way: embed the product descriptions, retrieve the top-k similar chunks, let the LLM write a nice paragraph. It demos beautifully — and then a real user asks something the demo never covered:
None of these are questions about what a product says. They're questions about how products relate — to devices, to each other, to inventory state, to other customers' outcomes. The catalog is a relational database wearing a text corpus's clothing, and chunk-and-embed retrieval reads it like prose. That's the gap.
I ran an LLM shopping assistant in production for a Korean e-commerce community — thousands of members asking exactly these kinds of questions — and the failure pattern was consistent: the system answered what products are, while users asked what products work with, replace, contain, and cost right now.
Four mechanical failures, not a "bad embeddings" problem:
A single product page describes a product family: "Winter Jacket — navy/S/¥89,000, black/M/¥89,000, olive/L/¥92,000." Chunked and embedded as text, the SKU-level distinctions — which colorway is in stock, which size runs small per reviews — smear into one undifferentiated blob. The model answers about "the jacket" when the user asked about "the navy S."
"Fits iPhone 15 Pro" rarely appears verbatim in the case's description — it lives in a compatibility table, a structured attribute, or a fitment note buried in spec sheet row 14 of 22. Embedding similarity can't join "iPhone 15 Pro" to "Model A2849, A3089, A3090" — those are identifier lookups, and dense retrieval is famously weak on identifiers.
Price, stock, and promotions are mutable state. An embedding indexed last week confidently describes a jacket at ¥89,000 that's now ¥109,000 and sold out in the user's size. Retrieval returns descriptions of the past while the user needs the present.
"Everything in the bundle except X" or "cheaper alternatives that share the charger spec" are not similarity searches — they're intersections, differences, and joins over product relationships. No amount of chunk tuning produces a set operation.
Represent the catalog as entities and edges instead of text spans:
Product("Winter Jacket") ──has_variant──▶ SKU("navy-S")
SKU("navy-S") ──priced_at──▶ ¥89,000 · stock: 14
Product("Phone Case X") ──compatible_with──▶ Device("iPhone 15 Pro")
Product("Camera Bundle") ──contains──▶ Lens("50mm") + Body + Strap
Product("Laptop A") ──uses_charger──▶ ChargerSpec("65W USB-C")
Product("Laptop B") ──uses_charger──▶ ChargerSpec("65W USB-C")
SKU("navy-S") ──mentioned_in──▶ Review("runs small")
The failing queries become traversals and joins:
compatible_with edges to the device node, join to
priced_at/stock — a graph query plus a state
lookup, not a text search.uses_charger spec, traverse incoming edges to all
products sharing it, filter by price — set intersection over relations.contains, subtract the
excluded entity, return the remainder with individual prices.mentioned_in edges filtered to negative-sentiment reviews —
an aggregation no single chunk contains.Same principle as the engineering-data version of this problem: the graph produces the candidate set retrieval can't reach; the LLM then answers over assembled, current, cited context. The graph handles relations; a separate live lookup handles mutable state (price/stock) — conflating the two is how you get confident answers about yesterday's inventory.
The serving layer uses vLLM's structured-output machinery — xgrammar-backed
JSON-schema constraints via response_format — so every answer is
{recommendations[], citations[], caveats[]} where citations point
into retrieved context. Two rules that matter in commerce specifically:
sku_id against the candidate set before rendering. A hallucinated
product that doesn't exist is a return-shipping cost, not a typo.Commerce catalogs are multi-tenant by nature: marketplaces host thousands of sellers, each with private inventory, pricing rules, and sometimes confidential supplier terms. The graph inherits the boundary problem — and commerce raises the stakes, because a cross-tenant traversal doesn't just leak data, it can leak pricing strategy.
The working pattern is the same discipline as multi-tenant RAG generally:
tenant_id (or seller_id) is a mandatory predicate
on every node, edge, and traversal — enforced in the query layer, never
trusted from the client.The honest summary: GraphRAG earns its complexity in commerce when questions are relational — compatibility, bundles, comparisons, aggregates. For single-product descriptions, it's overhead. And the part everyone underestimates isn't the graph — it's the join discipline: relations from the graph, state from the live store, and never the twain confused.
The retrieval mechanics — entity extraction, graph expansion fused with BM25, tenant-scoped traversal — are implemented in graphrag-lab, a zero-dependency Python/SQLite reference you can run against any structured corpus. The e-commerce mapping is an application of the same mechanism: change the entity types and edge semantics, keep the retrieval discipline.