Artificial Intelligence (AI) October 18, 2026 0

AI in Retail: Recommendations, Demand Forecasting and Pricing

By Admin 5 min read

Retail runs on a few big questions: what will customers want, how much stock should we hold, and what price is right? AI helps answer them with data. Large e-commerce companies have built sophisticated systems, but the ideas also apply to smaller shops, often in simpler forms.

Product recommendations

"Customers who bought this also bought..." is the classic example. Recommendation systems increase sales by helping shoppers discover items they are likely to want.

Common methods:

  • Collaborative filtering: finds customers with similar buying histories and recommends what they bought.
  • Content-based filtering: recommends items similar in attributes, such as category, brand or description.
  • Hybrid models: combine both and add context like season, location or device.
  • Session-based recommendations: use what a visitor clicked in this visit, which helps for new customers.

Challenges include the cold-start problem (new customers or products with no history), filter bubbles that show only similar items, and privacy concerns about tracking.

Demand forecasting

Forecasting predicts how many units of each product will sell in the coming days or weeks. Better forecasts mean fewer stock-outs and less money tied up in unsold goods.

Models use:

  • Past sales by day, week and season
  • Prices and promotions
  • Holidays and local festivals (Dashain and Tihar change demand patterns strongly in Nepal)
  • Weather, events and trends
  • Product lifecycle and substitutes

Techniques range from simple moving averages and seasonal models to gradient boosting and neural networks. A good approach starts simple and adds complexity only when it improves accuracy on held-back data.

Inventory optimisation

With forecasts, a shop can set reorder points and safety stock. The aim is to hold enough to meet demand without waste. AI can also suggest how to allocate stock between branches, detect slow-moving items and flag unusual losses that may indicate theft or errors.

Dynamic and personalised pricing

Some retailers adjust prices based on demand, competition, stock levels and time. Airlines and online marketplaces do this heavily. Used carelessly it can feel unfair, so many businesses limit it to clearance sales, promotions and bundle offers. Be transparent and check local consumer rules.

Customer service and marketing

Chatbots answer common questions, and models predict which customers may stop buying (churn) so teams can reach out. Segmentation groups customers by behaviour for targeted offers. Content generation helps write product descriptions and campaign drafts.

In-store technology

Computer vision can count shelf stock, detect empty shelves, analyse foot traffic and support self-checkout. These systems need cameras and careful privacy practices, including clear notices to customers.

A simple forecasting example

This Python code compares two basic forecasts on weekly sales: a naive "same as last week" forecast and a moving average. Even simple baselines help you judge whether a complex model is worth it.

import pandas as pd

sales = pd.Series([120, 135, 128, 150, 160, 155, 170, 165, 180, 175],
                  name="units")

naive = sales.shift(1)                           # last week's sales
moving_avg = sales.rolling(3).mean().shift(1)    # average of previous 3 weeks

def mae(actual, forecast):
    return (actual - forecast).abs().dropna().mean()

print("Naive MAE:", round(mae(sales, naive), 2))
print("Moving average MAE:", round(mae(sales, moving_avg), 2))

MAE (mean absolute error) shows the average miss in units. Always compare new methods with such baselines.

What data do you need?

Start with clean sales records: date, product, quantity, price and stock level. Add promotion dates, store or branch, and customer IDs if you use a loyalty programme (with consent). Poor data entry, duplicate product codes and missing days are common problems that reduce the value of any model.

What small shops can do first

  1. Digitise sales and stock with a point-of-sale or billing system. In ERP and billing software I build, the biggest early win is usually accurate, searchable records.
  2. Look at simple reports: best sellers, slow movers, sales by day and month.
  3. Set minimum stock alerts for fast-selling items.
  4. Plan for festivals using last year's sales.
  5. Try basic recommendations such as "frequently bought together" using purchase counts.
  6. Test one change at a time and measure the effect.

Risks and ethics

  • Privacy: be transparent about collecting customer data and secure it.
  • Fairness in pricing: avoid discriminatory or exploitative practices.
  • Over-trusting forecasts: unusual events can break patterns.
  • Manipulation: recommendations should help customers, not trick them.
  • Dependence on one vendor: keep access to your own data.

Frequently Asked Questions

Do I need AI to forecast demand?

Not necessarily. Many shops get good results from seasonal averages and judgement. AI helps when there are many products, locations and influencing factors.

How much data is needed?

At least a year of history helps capture seasons, but even a few months can support simple forecasts and reorder alerts.

Are recommendation systems expensive?

You can start with basic rules or built-in features of e-commerce platforms. Custom systems make sense at larger scale.

Is dynamic pricing legal?

Rules vary by country and sector. Check local consumer protection laws and be transparent.

Conclusion

AI helps retailers recommend products, forecast demand, manage stock and test prices. Success depends on good data and clear goals. Small shops can capture much of the benefit by starting with clean records and simple analysis.