Berlin Tech Meetup: The Future of Relational Foundation Models, Systems, and Real-World Applications

Register now:
Learn12 min read

AI in Retail and E-Commerce: From Recommendations to Demand Forecasting

Amazon drives 35% of its revenue through recommendations. Most retailers still run batch collaborative filtering on single-table data. The gap between leaders and laggards is widening, and graph-based AI is the reason.

TL;DR

  • 1Amazon drives 35% of its revenue through AI recommendations. Most retailers still run collaborative filtering on a single user-item matrix, missing cross-category and graph-level signals.
  • 2Graph-based recommendations generate 2-3x higher revenue per impression because they discover cross-category connections that expand the customer's consideration set beyond what they were already browsing.
  • 3Demand forecasting improves 20-30% when network effects are modeled: substitution, complementary purchases, geographic spillover, and supplier-driven constraints.
  • 4DoorDash deployed graph-based recommendations and saw a 1.8% engagement lift across 30 million users. In thin-margin delivery, that translates to millions in annual revenue.
  • 5A foundation model serves recommendations, demand forecasting, CLV prediction, and churn prevention from a single platform. One model, one data connection, four use cases in minutes.

In 2023, Amazon generated $574 billion in net revenue. The company has publicly stated that 35% of its revenue is driven by its recommendation engine. That is roughly $200 billion influenced by AI-powered personalization.

Most retailers know this. Most have invested in recommendation systems. Yet the gap between Amazon's personalization quality and the rest of the industry remains enormous. The reason is not compute budget or team size. It is data architecture. Amazon's models reason over the full product-customer-transaction-review-category graph. Most retailers still run collaborative filtering on a single user-item interaction matrix.

product_catalog — sample retail data

product_idnamecategorybrandpriceavg_rating
P-3001Standing Desk ProFurnitureErgoMax$5494.7
P-3002Blue-Light MonitorElectronicsViewClear$3894.5
P-3003Ergonomic KeyboardElectronicsTypeWell$1294.8
P-3004Premium Office ChairFurnitureErgoMax$7994.6
P-3005Desk Lamp LEDLightingBrightWork$794.3

Five products spanning three categories. A collaborative filtering model sees them as unrelated. The product-customer-transaction graph reveals they cluster around a 'home office upgrade' behavior pattern.

recommendation_comparison — collaborative filtering vs graph

MetricCollaborative FilteringGraph-Based (KumoRFM)Improvement
Click-through rate2.1%3.8%+81%
Revenue per impression$0.42$1.14+171%
Cross-category discovery8% of recs34% of recs+325%
Cold-start product coverage12%78%+550%
Average basket size lift+14%New signal

Graph-based recommendations drive 2-3x higher revenue per impression because they discover cross-category connections that expand the customer's consideration set.

The recommendation gap

Collaborative filtering was the state of the art in 2010. It works by finding users with similar purchase histories and recommending items that similar users bought. It is effective, well-understood, and cheap to run. It is also fundamentally limited.

A collaborative filtering model sees two dimensions: users and items. It does not know that a product belongs to the "organic" category, that the brand has a 4.8 satisfaction rating, that the user returned their last three purchases from a different brand, or that users who bought this item frequently also subscribe to a specific type of meal kit. All of that information exists in the retailer's database. It just sits in different tables.

Graph-based recommendation models operate on the full relational structure. Users, items, transactions, categories, brands, reviews, returns, sessions, wishlists, cart additions, and more. Each entity is a node. Each foreign-key relationship is an edge. The model learns which paths through this graph predict future purchases.

DoorDash deployed this approach for restaurant recommendations and saw a 1.8% engagement lift across 30 million users. In the delivery business, where margins are thin and order frequency is the primary growth lever, 1.8% across 30 million users translates to millions in annual revenue.

Cross-category discovery

The most valuable recommendations are the ones customers do not expect. Collaborative filtering excels at recommending more of what you already buy: you bought running shoes, here are more running shoes. Graph-based models discover cross-category connections.

A customer who bought a standing desk, a blue-light-blocking monitor, and an ergonomic keyboard might be an excellent candidate for a premium office chair. The products span three categories. No single-table model connects them. But in the product-category-brand graph, these items cluster around a "home office upgrade" behavior pattern that the model learns from thousands of similar customers.

McKinsey reports that cross-category recommendations generate 2-3x higher revenue per impression than within-category recommendations, because they expand the customer's consideration set rather than competing with items the customer was already going to buy.

Demand forecasting: from isolated products to networks

Traditional demand forecasting treats each product as an independent time series. Historical sales, seasonality, promotions, and sometimes external signals like weather or events. The models are mature (ARIMA, Prophet, gradient-boosted trees) and work reasonably well for stable products with long histories.

They fail in three scenarios that account for the majority of forecast errors: new products with no history, products with strong substitution or complementary effects, and disruptions that propagate through the supply network.

Substitution and complementary effects

When a popular brand of pasta goes out of stock, demand for competing brands spikes. Here is what that looks like in the data:

daily_sales — substitution event

dateproductstoreunits_soldin_stock
Mar 1Barilla Penne 16ozStore #41284Yes
Mar 2Barilla Penne 16ozStore #41291Yes
Mar 3Barilla Penne 16ozStore #4120No (stockout)
Mar 3DeCecco Penne 16ozStore #41267Yes
Mar 3Store Brand Penne 16ozStore #41242Yes
Mar 4DeCecco Penne 16ozStore #41258Yes
Mar 4Store Brand Penne 16ozStore #41238Yes

Barilla sells 84-91 units daily, then stocks out on Mar 3. DeCecco jumps from its baseline of 25 to 67 units. Store brand jumps from 18 to 42. An independent forecast model predicted 25 and 18 for Mar 3, missing the substitution spike by 168% and 133%.

forecast_accuracy — independent vs network-aware

productindependent_forecastnetwork_forecastactualerror_reduction
DeCecco Penne25 units61 units67 units89% reduction
Store Brand Penne18 units39 units42 units88% reduction
Barilla Spaghetti (nearby)40 units52 units55 units83% reduction

Network-aware models detect the substitution chain: Barilla stockout -> DeCecco and store brand surge -> nearby Barilla formats also see spillover demand.

Walmart has reported that incorporating cross-product network effects into demand forecasting reduced forecast error by 20-30% for products with strong substitution patterns. For a retailer managing 100,000 SKUs, a 20% reduction in forecast error translates to millions in reduced stockouts and overstock costs.

New product forecasting

Cold-start is the Achilles heel of traditional forecasting. A new product has no sales history. The standard approach is to map it to a similar existing product and use that product's history as a proxy. This works poorly because "similar" is hard to define and because it ignores the network context.

A graph-based model forecasts new products by leveraging their position in the product graph: category, brand, price tier, attributes, and the purchasing patterns of customers who browse or wishlist the product. The RelBench benchmark includes an Amazon product dataset with this exact cold-start challenge, and graph models outperform flat baselines by a significant margin.

Traditional retail AI

  • Collaborative filtering on user-item matrix
  • Each product forecasted independently
  • Cold-start products use manual proxies
  • Features manually engineered from single tables
  • Cross-category signals missed entirely

Graph-based retail AI

  • Recommendations from full relational graph
  • Demand forecasting with cross-product network effects
  • Cold-start solved through graph neighborhood
  • Patterns learned automatically from table structure
  • Cross-category discovery drives 2-3x higher revenue per impression

PQL Query

PREDICT next_purchase_product_id
FOR EACH customers.customer_id
WHERE customers.segment = 'Active'

One query generates personalized product recommendations for every active customer. The model traverses the full product-customer-transaction-category-brand graph to find cross-category signals.

Output

customer_idrecommended_productconfidencereasoning
C-8001P-3004 (Office Chair)0.843-hop: standing desk + keyboard buyers → chair
C-8002P-3005 (Desk Lamp)0.712-hop: ergonomic bundle pattern
C-8003P-3001 (Standing Desk)0.894-hop: similar customer upgrade path
C-8004P-3002 (Monitor)0.763-hop: electronics brand affinity transfer

Customer lifetime value and retention

Customer lifetime value (CLV) prediction determines marketing spend, loyalty program design, and customer service prioritization. Most CLV models use RFM features (recency, frequency, monetary value) from the transaction table. These features are useful but miss the relational signals that differentiate high-value customers.

A customer with $500 in purchases looks identical to another customer with $500 in purchases in a flat model. In the graph, one customer bought high-margin products, referred three friends (who are also active buyers), and engages with loyalty rewards weekly. The other bought only discounted items, has never referred anyone, and only shops during clearance events. Their lifetime values are dramatically different, but the difference is only visible in the relational structure.

For churn prediction specifically, graph-based models detect early warning signals that flat models miss: the customer's purchase frequency is declining while similar customers maintain theirs. The customer is spending more in categories that are available at competitors. The customer's engagement pattern matches customers who churned 60-90 days later.

Intervening with the right offer at the right time retains 15-25% of at-risk customers. For a retailer with 10 million active customers and 15% annual churn, retaining an additional 20% of at-risk customers preserves 300,000 customer relationships per year.

The foundation model opportunity

Building separate ML models for recommendations, demand forecasting, CLV prediction, and churn prevention requires four separate data pipelines, four separate feature engineering efforts, and four separate model maintenance budgets. For a mid-size retailer, this means $2M-5M annually in ML team costs and 12-24 months before all four models reach production.

A relational foundation model serves all four use cases from a single platform. KumoRFM connects to the retailer's data warehouse, understands the product-customer-transaction-category schema, and answers any prediction question without task-specific engineering. "Which customers will churn in the next 30 days?" "What is the expected demand for this SKU next week?" "Which products should we recommend to this user?" "What is this customer's projected lifetime value?"

One model. One data connection. Four use cases. Time to first prediction: minutes, not months.

The retailers that adopt this approach will not just have better models. They will have the ability to ask questions about their data that were previously too expensive to answer. And in retail, where margins are 3-5% and every percentage point of conversion matters, the ability to predict faster and more accurately is the difference between growing and losing market share.

Frequently asked questions

How does AI improve product recommendations in retail?

Traditional collaborative filtering recommends products based on what similar users purchased. Graph-based AI goes further by analyzing the full product-customer-transaction-category-brand graph. It discovers that customers who buy organic baby food also buy non-toxic cleaning products, not because the products are similar, but because the customers share lifestyle attributes revealed through their broader purchase graph. This captures cross-category signals that single-table models miss.

What percentage of e-commerce revenue comes from AI recommendations?

Amazon attributes 35% of its revenue to recommendation algorithms. Netflix estimates its recommendation system is worth $1 billion per year in reduced churn. For mid-market retailers, personalized recommendations typically drive a 10-30% increase in revenue per session compared to unpersonalized experiences. The gap between leaders and laggards in recommendation quality translates directly to market share.

How does graph-based AI improve demand forecasting?

Traditional demand forecasting predicts each product independently using historical sales and external signals (seasonality, promotions, weather). Graph-based forecasting adds network effects: demand for a product is influenced by the products it is frequently co-purchased with, the availability of substitutes, supplier disruptions that affect related products, and promotional activity on competing items. These cross-product signals improve forecast accuracy by 15-30% for products with strong network dependencies.

What is the difference between collaborative filtering and graph-based recommendations?

Collaborative filtering operates on a single user-item interaction matrix. It finds users with similar purchase histories and recommends items those similar users bought. Graph-based recommendations operate on the full relational graph: users, items, categories, brands, sessions, reviews, returns, and more. They can capture 3-4 hop patterns like 'customers who returned product A often bought product B instead, and product B has higher satisfaction scores in your demographic.' This multi-hop reasoning produces more relevant and surprising recommendations.

How can AI reduce customer churn in retail?

Graph-based churn models identify at-risk customers by analyzing relational patterns: declining purchase frequency, shift in spending toward competitors (detected through card transaction networks), decreasing engagement with loyalty program benefits, and similarity to the transaction patterns of customers who already churned. By intervening with targeted offers before the customer leaves, retailers can retain 15-25% of at-risk customers, representing millions in preserved annual revenue for mid-size retailers.

See it in action

KumoRFM delivers predictions on relational data in seconds. No feature engineering, no ML pipelines. Try it free.