Basket Analysis
“What will this customer add to their cart?”
Book a demo and get a free trial of the full platform: data science agent, fine-tune capabilities, and forward-deployed engineer support.
By submitting, you accept the Terms and Privacy Policy.

Loved by data scientists, ML engineers & CXOs at

A real-world example
What will this customer add to their cart?
The average e-commerce basket contains 3.2 items, but product affinity analysis suggests optimal baskets should contain 4.5-5.0 items (Baymard Institute). Increasing average basket size by just one item adds $15-25 per order, translating to $150-250M annually for a retailer processing 10M orders per year. Traditional association rules ('customers who bought X also bought Y') are static, ignoring the customer's current session context, inventory availability, margin contribution, and real-time browsing signals. They also suffer from popularity bias, recommending the same high-volume items to everyone.
How KumoRFM solves this
Relational intelligence built for retail and e-commerce data
Kumo builds a relational graph connecting the current cart contents, customer purchase history, browsing session, product attributes, inventory levels, and margin data. The model predicts in real time that a customer with pasta and marinara sauce in their cart will add garlic bread (72% probability) and parmesan cheese (65% probability), and that recommending these items at checkout will generate $8.40 in incremental margin. The graph captures that this specific customer prefers organic products, so it ranks the organic garlic bread above the conventional option.
From data to predictions
See the full pipeline in action
Connect your tables, write a PQL query, and get predictions with built-in explainability — all in minutes, not months.
Your data
The relational tables Kumo learns from
CURRENT_CART
| session_id | customer_id | product_id | product_name | price |
|---|---|---|---|---|
| SS-7701 | CU-3012 | P-2001 | De Cecco Spaghetti | $3.49 |
| SS-7701 | CU-3012 | P-2002 | Rao's Marinara Sauce | $8.99 |
| SS-7701 | CU-3012 | P-2003 | Organic Ground Beef 1lb | $7.99 |
PURCHASE_HISTORY
| customer_id | product_id | category | frequency | last_purchased |
|---|---|---|---|---|
| CU-3012 | P-2010 | Organic Garlic Bread | Monthly | 2025-08-20 |
| CU-3012 | P-2011 | Parmigiano Reggiano | Monthly | 2025-08-20 |
| CU-3012 | P-2015 | Organic Mixed Greens | Weekly | 2025-09-10 |
PRODUCT_AFFINITIES
| product_a | product_b | co_purchase_rate | lift | category_pair |
|---|---|---|---|---|
| P-2001 | P-2010 | 42% | 3.8 | Pasta + Bread |
| P-2002 | P-2011 | 38% | 4.2 | Sauce + Cheese |
| P-2001 | P-2015 | 22% | 1.5 | Pasta + Salad |
INVENTORY_STATUS
| product_id | name | in_stock | margin_pct | on_promotion |
|---|---|---|---|---|
| P-2010 | Organic Garlic Bread | True | 42% | False |
| P-2011 | Parmigiano Reggiano | True | 35% | True |
| P-2015 | Organic Mixed Greens | True | 48% | False |
Write your PQL query
Describe what to predict in 2–3 lines — Kumo handles the rest
PREDICT BOOL(ORDERS.PRODUCT_ID, 0, 0, days) FOR EACH CURRENT_CART.SESSION_ID, PRODUCTS.PRODUCT_ID RANK TOP 3
Prediction output
Every entity gets a score, updated continuously
| SESSION_ID | RECOMMENDED_PRODUCT | ADD_PROB | MARGIN_UPLIFT | RANK |
|---|---|---|---|---|
| SS-7701 | Organic Garlic Bread | 0.72 | $2.18 | 1 |
| SS-7701 | Parmigiano Reggiano | 0.65 | $2.94 | 2 |
| SS-7701 | Organic Mixed Greens | 0.51 | $2.88 | 3 |
Understand why
Every prediction includes feature attributions — no black boxes
Session SS-7701 (Cart: pasta, sauce, ground beef)
Predicted: Organic Garlic Bread: 72% add probability
Top contributing features
Historical co-purchase with pasta
Monthly buyer
30% attribution
Cart context (Italian meal pattern)
3 Italian items
25% attribution
Category affinity lift
3.8x baseline
20% attribution
Customer organic preference
85% organic
14% attribution
Replenishment timing
26 days since last
11% attribution
Feature attributions are computed automatically for every prediction. No separate tooling required. Learn more about Kumo explainability
PQL Documentation
Learn the Predictive Query Language — SQL-like syntax for defining any prediction task in 2–3 lines.
Python SDK
Integrate Kumo predictions into your pipelines. Train, evaluate, and deploy models programmatically.
Explainability Docs
Understand feature attributions, model evaluation metrics, and how to build trust with stakeholders.
Bottom line: Increase average basket size by 1.2 items and basket value by $18 per order, generating $150-250M in incremental annual revenue for a 10M-order retailer.
Related use cases
Explore more retail & e-commerce use cases
Topics covered
One Platform. One Model. Predict Instantly.
KumoRFM
Relational Foundation Model
Turn structured relational data into predictions in seconds. KumoRFM delivers zero-shot predictions that rival months of traditional data science. No training, feature engineering, or infrastructure required. Just connect your data and start predicting.
For critical use cases, fine-tune KumoRFM on your data using the Kumo platform and Data Science Agent for 30%+ higher accuracy than traditional models.
Book a demo and get a free trial of the full platform: data science agent, fine-tune capabilities, and forward-deployed engineer support.




