E-commerce and retail

Recommendation systems for ecommerce

In commerce the recommender has to know the difference between a complement and a substitute, respect stock and margin, and let merchandisers change their mind on a Friday afternoon. What that means, and how NeuronSearchLab handles it.

What is a recommendation system for ecommerce?

A recommendation system for ecommerce ranks products for a shopper across the surfaces of a store: homepage rails, category pages, product detail pages, the basket and checkout, search results, and lifecycle email. It learns from browsing, search, basket and purchase behaviour and from product attributes, and it has to rank within hard commercial constraints - stock, price, margin, delivery, promotion - that have nothing to do with predicted relevance.

The characteristic commerce problem is that relevance and usefulness diverge. The most similar item to the tent a shopper just bought is another tent, which is the least useful thing to recommend. Complement and substitute relationships are the core modelling problem, and they change by surface: substitutes belong on a product page before purchase, complements belong in the basket after it.

The second is that commerce catalogues are large, long-tailed and volatile. Stock turns over, prices change, seasons shift, and an item that ranks well but cannot be shipped is worse than no recommendation at all.

Where NeuronSearchLab fits for a retailer

NeuronSearchLab is an API-first recommendation platform for building, evaluating and operating personalised recommendations. For a retailer, each placement is a context with its own pipeline, rules and model version - so the product page, the basket and the homepage can use different strategies behind one integration.

Commercial constraints live in the rules engine: filter out-of-stock, cap one brand's share of a rail, boost a margin tier, bury clearance, pin a campaign, dedupe near-identical variants, guarantee a supplier placement. They apply at request time, so a merchandiser changing a rule does not wait for a retrain, a deploy or a release - and they can preview the effect on a segment before publishing it.

Model selection is the other half. Collaborative, content-based, sequential, graph and generative architectures are trained on your own behaviour and compared like for like, and a candidate only serves after shadow and canary stages against agreed metrics - with automatic rollback if live performance drops. On a catalogue that turns over seasonally, the model that won in March is a hypothesis by September.

A single recommendation model gives you one fixed way of ranking. NeuronSearchLab trains and compares several architectures on your own data, keeps the winner behind one unchanging API, and gives you evaluation, experimentation, explainability and editorial control over whatever is serving. The general case is set out on recommendation engines.

What makes this hard

The constraints that separate this industry from every other one using the same underlying models.

Complements against substitutes

Similarity is the wrong objective after a purchase and the right one before it. The same item pair should rank differently on a product page and in the basket, which means surface context has to be a first-class input rather than a filter applied afterwards.

Stock, price and delivery

A recommendation for something out of stock, undeliverable to this postcode, or priced outside the shopper's observed band is worse than a blank slot. These are request-time filters, and they change by the minute.

Margin and commercial priorities

Not every sale is worth the same. Boosting margin, clearing seasonal stock and honouring supplier agreements are legitimate objectives that a pure relevance model has no way to express.

A long tail nobody sees

Most commerce catalogues have a head that sells itself. A recommender that maximises immediate conversion learns to show the head, and the tail becomes dead capital. Catalogue coverage is a commercial metric here.

Session intent changes fast

A shopper who searched 'waterproof' two minutes ago is a different person from the one who arrived from an email. Short-term intent has to move the ranking without overwriting long-term taste.

Merchandisers need control without engineering

Campaigns move, buyers make decisions, a supplier calls. If changing a rail requires a release, the recommender becomes the thing the merchandising team works around.

Where recommendations appear

The placements teams in this industry actually build, and what each one is for.

Product detail page

Substitutes and alternatives before purchase: 'similar items', 'customers also viewed', 'compare with'. Driven by content and co-view behaviour.

Basket and checkout

Complements after commitment: accessories, consumables, the thing people reliably buy alongside. The highest-intent slot in the store.

Homepage and category rails

Personalised entry points, each its own context, blending long-term taste with the current season and campaign.

Personalised search and category ranking

The same signals behind search ordering, so a shopper's history influences results rather than being discarded at the search box.

Post-purchase and lifecycle email

Replenishment timing, complements to a completed order, and win-back, ranked from the same profile as the site.

Out-of-stock and 404 recovery

The cheapest win in commerce recommendations, and the one most often left unbuilt.

Signals worth modelling

What to send, and why. Most disappointing recommenders in this industry are disappointing because of what never reached them.

Purchase, weighted properly

Rare, expensive and the actual outcome. Treating a purchase as one more interaction alongside a hundred views throws away the only unambiguous signal you have.

Basket co-occurrence

What is bought together, distinguished from what is viewed together. The two produce different item graphs and confusing them is how substitutes end up in the basket rail.

Search queries

The clearest statement of intent a shopper ever makes, and one many recommendation integrations never send.

Dwell and repeat views

Four minutes on one product page says more than four category clicks. Depth separates consideration from browsing.

Returns and cancellations

A negative signal most integrations omit. A recommender that does not know about returns will keep recommending what was sent back.

Product attributes and imagery

Content embeddings over descriptions and images place a new SKU before it has any sales history - which matters on a catalogue that turns over every season.

How to know it is working

Offline ranking metrics narrow the field; an online test against these decides. The benchmark methodology sets out how the offline side is measured.

Revenue per session

The primary outcome, measured per variant in an online test rather than attributed by last click to the widget.

Attach rate and average order value

What the basket and product-page placements exist to move, reported per placement rather than pooled.

Conversion rate on recommended items

The check on a model that is winning by recommending what shoppers would have bought anyway.

Catalogue coverage and tail share

What proportion of the catalogue gets meaningful exposure, and how much of the revenue comes from outside the head. Direct measures of whether stock is working.

Return rate on recommended purchases

A recommender can raise conversion and lower profit. Returns are where that shows up, and they are rarely in the dashboard.

Frequently asked questions

What is the best recommendation system for an ecommerce site?

It depends on the catalogue. Sparse, long-tailed catalogues with rich product text favour content-based and hybrid approaches; dense catalogues with heavy repeat purchasing favour collaborative and sequential models. The NSL Recommender Leaderboard measures complete systems on several e-commerce datasets - fashion, beauty, general retail - and the ranking changes between them, which is the case for evaluating on your own data rather than adopting a default.

How do ecommerce recommenders avoid recommending out-of-stock products?

By applying stock as a filter while the slate is built rather than after it. Post-filtering returns short rails with gaps; filtering during retrieval returns a full rail of items that can actually be bought. In NeuronSearchLab this is a request-time rule, so a stock change takes effect on the next request.

Can merchandisers control what the recommender shows?

Yes. Boost, bury, pin, filter, cap, dedupe, reorder and group are configured per placement and applied at request time, with no retrain and no deploy. Changes can be previewed for an individual shopper or a segment before publishing, and reversed afterwards.

How do you recommend complements rather than more of the same?

Model the two relationships separately and choose by surface. Co-purchase data produces a complement graph; co-view and content similarity produce a substitute graph. A product page before purchase wants substitutes; a basket after commitment wants complements. Treating them as one 'related items' model is the most common cause of a basket rail recommending the item already in the basket.

How do you recommend a brand-new product with no sales?

From the product itself. Embeddings over descriptions, attributes and imagery place a new SKU next to comparable existing items on the day it is listed, so it can be shown to the shoppers most likely to buy it before it has any behavioural history.

Related reading

See it on your own catalogue

Send a catalogue and an event stream and get ranked results back the same day. The free tier includes 1,000 recommendation requests a month and needs no card.