Engineering / Retail
AI in Retail: Applications, Use Cases, and Business Impact Across the Value Chain
AI in retail is the application of machine learning to the decisions that move margin: how much to order, what to charge, what to show a shopper, and when to mark down. Because retail operates on gross margins often between one and three percent, a forecast that is a few points more accurate or a markdown that lands a week later converts directly into profit rather than into a vanity metric.
Why Retail Is Unusually Suited to Machine Learning
Three properties make retail an easier ML problem than most industries, and they explain why the use cases below are mature rather than speculative. Retail generates high-frequency transactional data — every SKU at every store, every day — so models train on volume instead of anecdotes. The decisions are repeated thousands of times, so a small per-decision improvement compounds. And the outcome is measurable in currency within weeks, which means an offline evaluation can be settled before anyone argues about it.
The economics are equally unusual. McKinsey analysis of the European retail sector estimates that end-to-end AI transformation could unlock roughly €240 billion to €320 billion of economic value across the continent over five years, with grocery — where margins are structurally lowest — seeing AI-driven EBITDA improvement of four to six percentage points. In digital commerce, retailers applying AI to supply chain management have reported inventory cost reductions of 10 to 20 percent and stockout reductions of up to 30 percent. These are not productivity side quests; they are the profit engine of the business.
Demand Forecasting: The Foundation Everything Else Rests On
Demand forecasting is the oldest and least controversial application, and it is still where most retail ML programs should start. The task is to predict units sold per SKU per location per time bucket, conditioned on history, price, promotions, seasonality, weather, and calendar effects.
The methodological progression matters because teams repeatedly skip the first two rungs:
- Statistical baselines: Seasonal naive, exponential smoothing, and ETS. Robust, fast, and interpretable — the bar every neural model must clear. Hyndman and Athanasopoulos's Forecasting: Principles and Practice remains the standard reference for why baseline-first is not conservatism but discipline.
- Gradient boosting: XGBoost or LightGBM over hand-engineered features — lags, day-of-week, promo flags, price deltas. In most real retail datasets this beats deep learning until the data volume and feature pipeline justify more.
- Deep forecasting: Sequence models such as N-BEATS, which won the M4 competition track and models series with stacked basis expansion blocks without exogenous features, and transformer variants that ingest covariates directly.
The engineering side is harder than the modeling side. Forecasts must be hierarchical — SKU-store rolls up to SKU-region to category — and unconstrained models disagree with their own aggregates. Intermittent SKUs (spare parts, seasonal items) break models trained on continuous sellers. Promotion lift must be separated from baseline demand or every forecast quietly assumes the promotion runs forever.
Evaluate before you deploy. A rolling-origin backtest that compares every candidate against a seasonal naive baseline answers the only question that matters: does this model beat what you already do, out-of-sample, on the SKUs that carry the revenue?
from itertools import islice
from statistics import mean
def rolling_origin(test_prices, horizon=4, window=28):
"""Yield (train_window, test_window) splits for retail weekly series."""
for split in range(window, len(test_prices) - horizon + 1):
train = test_prices[:split]
test = test_prices[split : split + horizon]
yield train, test
def seasonal_naive(train, horizon):
"""Repeat the last full season: the baseline every model must beat."""
season = train[-4:]
return [season[i % len(season)] for i in range(horizon)]
def mape(actual, predicted):
return mean(
abs(a - p) / a for a, p in zip(actual, predicted) if a != 0
)
scores = {"seasonal_naive": [], "nbeats": []}
for train, test in rolling_origin(weekly_sales):
baseline = seasonal_naive(train, len(test))
forecast = nbeats_model.predict(train, len(test))
scores["seasonal_naive"].append(mape(test, baseline))
scores["nbeats"].append(mape(test, forecast))
# Ship only if the model beats the baseline out-of-sample.
for name, values in scores.items():
print(name, round(mean(values) * 100, 2), "% MAPE")A forecast with no inventory action attached to it is a report. The value shows up only when replenishment, safety stock, and purchase orders consume the number automatically — which is why forecasting projects fail as modeling exercises and succeed as supply chain changes.
Pricing, Markdowns, and the Legal Boundary
Retail pricing AI comes in three flavors with very different risk profiles. Dynamic pricing adjusts prices against demand and elasticity in real time — standard in travel and hospitality, common in marketplaces. Markdown optimization solves the end-of-season problem: when to take the first discount, how deep, and on which SKUs, subject to a clearance window and a sell-through target. Promo optimization estimates lift and cannibalization so that a discount buys incremental units rather than subsidizing purchases that would have happened anyway.
Markdown optimization is where the measurable value sits for apparel and general merchandise, because the alternative is a buyer marking down by calendar rather than by signal. The decision framing is a constrained optimization over remaining inventory, expected future demand at each price point, and a terminal salvage value — effectively a multi-period newsvendor problem with learned demand curves.
The boundary to respect is competition. The FTC put it plainly in March 2024: price fixing by algorithm is still price fixing. Using a pricing model fed on your own data is ordinary analytics. Agreeing with competitors to use a shared pricing algorithm — or feeding competitor data into one under an arrangement — is a Sherman Act question regardless of how the recommendation is produced. Keep pricing inputs proprietary, document the independence of your data, and treat any "market benchmarking" service that aggregates rival prices with counsel involved.
Personalization and Recommendation Systems
Recommendation is the use case shoppers actually see. The architecture has converged on a two-part pattern: a deep network that jointly models wide, sparse cross-feature interactions and dense embeddings — the wide-and-deep design Google introduced for Play Store recommendations — followed by retrieval and ranking stages. Retrieval narrows millions of candidate items to a few hundred using vector similarity or learned two-tower encoders; ranking reorders those candidates with a heavier model that sees full user and item context.
The failure modes are predictable. Offline metrics (NDCG, recall at K) move while online revenue does not, usually because the training data is poisoned by prior ranking — items shown often accumulate clicks, which justifies showing them more. Cold start defeats new SKUs and new users alike. And pure personalization narrows exposure until the catalog effectively shrinks to what a user already liked, which hurts discovery and margin.
The discipline that fixes this is an online test for every ranking change, held-out coverage for long-tail items, and a business metric — revenue per session or units per order — as the arbiter rather than the model's own score. Exploration budgets, where a small share of traffic is served deliberately to gather unbiased data, keep the loop honest.
Generative AI sits on top of this layer rather than replacing it: product copy in the shopper's language, synthesized reviews summarized with attribution, and conversational discovery that narrows a catalog by conversation instead of filters. The underlying ranking remains a retrieval system; generation changes the interface, not the inventory math.
Supply Chain and Inventory
Forecasting only pays when it changes inventory decisions. The supply chain layer consumes demand predictions and turns them into purchase orders, transfer recommendations, and safety stock. McKinsey's e-commerce analysis reports that retailers AI-optimizing supply chain and omnichannel intelligence reduced inventory costs by 10 to 20 percent and stockouts by up to 30 percent, with one leading omnichannel retailer cutting stockouts by more than 25 percent while also lowering working capital.
Four problems dominate:
- Safety stock placement: Deciding where in the network to hold buffer — store, regional DC, or central — as a function of demand variance and lead time rather than a blanket rule per category.
- Allocation: Distributing constrained inventory across stores and channels so that scarce units go where their marginal value is highest.
- Replenishment cadence: Learning when the cost of an extra order is outweighed by the carrying cost of stock, per SKU velocity class.
- Lead time estimation: Modeling supplier delay as a distribution, not a constant, so safety stock reacts to supplier behavior as well as customer behavior.
The measurement trap here is siloed optimization: a forecast team celebrated for lower MAPE while the operations team absorbs more expedite fees. Track the joint outcome — sell-through, stockout rate, and inventory turns — or the incentives drift apart within a quarter.
Store Operations and Merchandising
The store is where retail AI has been least mature and is now moving fastest. Three areas carry the current investment. Labor scheduling uses footfall and demand forecasts to staff to the hour, which is simultaneously a customer-experience and a cost decision. Shelf and assortment intelligence compares planogram intent with what is actually on the shelf — via associates' devices or in-store vision — because out-of-shelf is invisible to the forecast until it is too late. And merchandising copilots take the weekly routine off category managers: the Monday dashboard archaeology of explaining why a category moved.
The quantified case for the last one is unusually concrete. McKinsey reports that retail merchants could reclaim up to 40 percent of their time by offloading repetitive tasks to agentic AI, and that its merchandising solution suite lifted retailer sales by as much as 5 percent and margins by up to 3 percent. The pattern behind those numbers is consistent: the value attaches to a decision cadence that already existed, not to a novel capability.
Agentic systems also raise the bar on review. An agent that can reorder stock or change a price needs approval gates, spend limits, and a full audit trail of what it proposed, what a human changed, and what executed. Autonomy should be granted per action class, not per system.
Customer Service and Conversational Commerce
Order status, returns, sizing, and availability questions are high-volume, low-variance, and expensive to staff — the classic deflection case. Done well, a retail assistant resolves the routine tier, escalates with full context, and writes structured outcomes back into the CRM so the next interaction starts informed. McKinsey's e-commerce analysis notes leading retailers reporting conversion rates of 50 percent and greater through on-site AI assistants compared with the regular channel, which reframes the assistant as a selling surface rather than a cost center.
Done poorly, it is a deflection contest: containment rate reported as success while customers who needed an agent wait longer. Measure resolution without escalation and post-contact return rates, not containment alone. Ground every answer in live order and inventory data — a confidently wrong delivery date costs more than the call you saved.
Where to Start: A Prioritization Table
Most retail AI programs fail from portfolio sprawl — twelve pilots, none attached to a P&L line. The sequence below orders the common use cases by the ratio of measured impact to implementation difficulty, given a retailer with transaction history but no mature feature store.
| Use case | Primary metric | Data needed | Impact vs effort |
|---|---|---|---|
| Demand forecasting | MAPE vs seasonal naive | 2+ years of SKU-store sales | High impact, low effort |
| Markdown optimization | Sell-through at terminal date | Sales plus price history | High impact, medium effort |
| Safety stock and allocation | Stockout rate, inventory turns | Forecasts plus lead times | High impact, medium effort |
| Recommendation ranking | Revenue per session | Impression-level logs | High impact, high effort |
| Service deflection | Resolved without escalation | Ticket history, order data | Medium impact, medium effort |
| Agentic merchandising | Margin per category week | Governed tool access | High impact, high effort |
Verdict: start with forecasting and markdown — both have clean baselines, fast offline evaluation, and a direct line to margin. Ranking and agentic merchandising carry bigger prizes but require impression-level logging and governed action rights that take a quarter to build. Prove the measurement loop on the easy case before it has to carry the hard one.
Risks and Failure Patterns
- Collusive pricing exposure: Shared algorithms and competitor-sourced inputs convert ordinary pricing optimization into an antitrust problem. Own your data and document it.
- Exclusionary personalization: Ranking optimized purely for conversion can suppress higher-priced or new-item exposure in ways that look like discrimination in lending, housing, or employment contexts. Keep fairness review in the loop where relevant.
- Feedback loops: Models trained only on what was shown learn what was shown, not what would have sold. Exploration budgets and held-out traffic are the correction.
- Data quality debt: Duplicate SKUs, mismatched store hierarchies, and returns recorded as negative sales destroy models quietly. Catalog hygiene is a prerequisite, not a follow-up.
- Pilot sprawl: Twelve disconnected experiments with no baseline. Choose one domain, instrument it, and let the P&L decide whether the next one is funded.
Conclusion
The retailers capturing value from AI are not the ones with the most models. They are the ones who anchored a model to a decision that already had a number attached — forecast accuracy, sell-through, stockout rate, margin per category — and then let that number, not the demo, govern whether the system stayed in production.
Start where evaluation is cheap and the feedback loop is short. Forecasting and markdown optimization answer within weeks. Everything else is a larger bet that should be underwritten by the credibility of the first one.
Key Takeaways
- Retail margins of one to three percent turn small accuracy gains into real profit, which is why forecasting and markdown optimization are the highest-certainty entry points.
- Every forecasting model must beat a seasonal naive baseline in rolling-origin backtest before deployment; deep models rarely earn their complexity without that proof.
- Documented impact: AI-driven supply chain work has cut inventory costs 10–20% and stockouts up to 30%, and merchandising copilots reclaimed up to 40% of merchant time.
- Pricing models fed on your own data are analytics; shared algorithms or competitor-derived inputs raise Sherman Act exposure — the FTC stated algorithmic price fixing is still price fixing in 2024.
- Pick one domain, attach it to a P&L metric, and prove the measurement loop before expanding the portfolio.
FAQ
What is AI used for in retail?
Retailers use AI for demand forecasting, dynamic and markdown pricing, product recommendation, inventory and replenishment optimization, store labor scheduling, shelf availability monitoring, and customer service automation. The common thread is decisions that repeat thousands of times with a measurable currency outcome.
Where does AI in retail deliver the most measurable value?
In supply chain and merchandising. Published results cluster around inventory cost reductions of 10–20%, stockout reductions up to 30%, and merchandising gains of up to 5% in sales and 3% in margin. Customer-facing personalization can be larger but requires impression-level logging and online experimentation to prove.
Is dynamic pricing legal?
Setting prices from your own demand data and costs is legal and ordinary. The FTC has stated that price fixing by algorithm is still price fixing: agreeing with competitors to use a shared pricing algorithm, or feeding it competitor data under an arrangement, can violate antitrust law regardless of whether prices deviate from the recommendation.
Do retailers need a data science team to start?
No — they need clean transaction history and a baseline. A forecasting pilot against a seasonal naive model with a rolling backtest can run on ordinary data warehouse exports. What is required is an owner for the downstream action (replenishment, markdown calendar), because an unreferenced forecast produces no value.
How long until retail AI shows results?
Forecasting and markdown use cases typically show measurable movement within one season, since evaluation is offline and the feedback loop is short. Recommendation and agentic merchandising need online experimentation and governed action rights, which usually means a quarter of platform work before the first trustworthy read.
References
- Federal Trade Commission. "Price fixing by algorithm is still price fixing." Business Blog, March 1, 2024. ftc.gov/business-guidance/blog
- Hyndman, R.J., & Athanasopoulos, G. "Forecasting: Principles and Practice, 3rd edition." OTexts. otexts.com/fpp3
- Oreshkin, B., et al. "N-BEATS: Neural Basis Expansion Analysis for Interpretable Time Series Forecasting." arXiv, 2019. arxiv.org/abs/1910.05289
- He, R., et al. "Wide & Deep Learning for Recommender Systems." arXiv, 2016. arxiv.org/abs/1606.07792
- McKinsey & Company. "LLM to ROI: How to scale gen AI in retail." August 5, 2024. mckinsey.com/industries/retail/our-insights
- McKinsey & Company. "Europe's new e-commerce agenda: How AI is resetting growth and competition." June 10, 2026. mckinsey.com/insights