Technology

Product Ranking Algorithms Explained: Rule-Based vs. ML-Based vs. Hybrid

By Dara Mensah 9 min read
Three ranking algorithm approaches shown as visual decision trees

When we explain how Cartlyzer ranks products, the conversation usually starts with a simple question: is it rules or machine learning? The answer is that it depends on the context, the catalog size, the traffic volume, and what the merchandising team can actually observe and trust. There is no universally correct approach, but there are clear conditions where each method outperforms the others.

Here is how the three approaches actually work, what breaks them, and how to choose between them.

Rule-Based Ranking: When Manual Control Is the Right Choice

Rule-based ranking is exactly what it sounds like. You define explicit conditions: products with inventory above a threshold rank first; products in the current promotion window get a rank boost; new arrivals published in the last 14 days get a position offset. The ranking engine evaluates these rules in a defined priority order and produces a ranked list.

Rule-based systems have a significant advantage that gets underappreciated: they are interpretable. When a merchandising manager asks "why is this product ranked third?", you can show them the rule chain that produced that result. When a category director wants to guarantee that a hero product leads a collection for a campaign week, rules can enforce that guarantee without ambiguity.

They break down in two conditions. First, when rule count grows faster than the team can maintain it. A DTC brand with 12 active collections, multiple seasonal campaigns, and promotion-aware ranking logic can end up with hundreds of overlapping rules, each written by a different person at a different time. Debugging a ranking anomaly in that environment takes hours. Second, rules are blind to in-session behavioral signals. A rule can say "bestsellers first," but it cannot say "surface this product first for this visitor who has been hovering in the $60-$80 price range for 40 seconds." Rules are static. They don't read the room.

ML-Based Ranking: What the Model Can See That Rules Cannot

A machine learning ranking model is trained on historical conversion data and, in real-time systems, updated by live session signals. The model learns feature correlations that humans would not think to encode as rules: the combination of traffic source, device type, time of day, and first filter interaction is predictive of which product category will convert for this session type. The model can surface that correlation without anyone having written it down explicitly.

For DTC brands with sufficient transaction volume (roughly 200+ add-to-cart events per collection per week is a reasonable starting threshold), a model trained on conversion outcomes can meaningfully outperform manual rule-based ranking on revenue per visitor metrics. The model finds patterns in the signal that rules miss.

The failure modes are different and harder to debug. Cold start is the most common. A new product has no conversion history, so the model assigns it low probability and buries it. If the product is actually relevant to many visitors, it never gets traffic because it never ranks, and it never ranks because it hasn't gotten traffic. You get a self-reinforcing suppression loop on new inventory.

The other failure mode is covariate shift. A model trained on summer traffic performs well in summer. When fall arrives and visitor intent profiles shift (different search terms, different price tolerance, different product categories performing), the model is working with a stale feature distribution and its ranking predictions degrade. A model with no human override capability and no guardrails on retraining cadence will drift without anyone noticing, because the degradation is gradual and spread across many small decisions.

Hybrid Ranking: How We Structure It at Cartlyzer

Hybrid ranking uses a model for the core ranking logic while preserving rule-based overrides for the scenarios that need deterministic control. This is the approach that makes sense for most DTC brands operating at scale because it handles the failure modes of both pure approaches.

In our implementation, the structure works like this:

Model layer: A gradient boosted ranking model ingests session signals (filter interactions, hover dwell, scroll velocity, traffic source, device type, time-of-day, and prior purchase history for identified visitors) and produces a conversion probability score for each product given this visitor's current session context. Products are ranked by this score, subject to inventory availability.

Rule override layer: A merchandiser-controlled rule set can pin products, exclude out-of-stock items regardless of predicted score, apply campaign boosts for hero products during promotion windows, and suppress newly launched products from ranking in positions 1-2 until they have at least 50 impressions (this prevents the cold-start suppression problem by ensuring new inventory gets a fair exposure window before the model takes over).

Exploration budget: A small percentage (typically 5-8% of ranking slots) is reserved for exploration: surfacing products that the model would not naturally rank highly, to generate training signal on underexposed inventory. Without this, the model's rankings become self-confirming over time. The exploration positions are allocated to products with high inventory levels but low impression counts, ensuring that underexposed inventory gets tested rather than permanently deprioritized.

The practical output: a collection grid that adapts to each visitor's live session behavior, respects campaign and promotion logic set by the merchandising team, and doesn't permanently bury new products before they've been given a chance to generate signal.

Choosing the Right Approach for Your Catalog Size and Traffic Volume

The right ranking approach is not about sophistication for its own sake. It is about what your catalog and traffic volume can actually support.

For brands under roughly $1.5M in annual GMV with collections under 100 products, manual rule-based ranking is usually the right starting point. The catalog is small enough that a merchandiser can maintain meaningful control, and the transaction volume is not sufficient to train a reliable ranking model. Deploying an underpowered ML system on thin data generates noise, not signal. Good manual merchandising beats a poorly trained model in this range.

For brands in the $1.5M to $8M GMV range with higher traffic velocity, the hybrid approach becomes worthwhile. This is where we see the clearest return on ranking model investment, because there is enough behavioral data to train on but the catalog is still manageable enough for a merchandising team to maintain meaningful override rules.

For larger catalogs, the catalog breadth problem becomes dominant. A brand with 2,000 SKUs across 40 collections has a discovery problem that rules cannot solve and that a single ranking model handles imperfectly without product embedding models to reason about attribute similarity. At that scale, you are looking at a full recommendation architecture, not just a collection ranker.

The Interpretability Problem No One Talks About Enough

We want to make one direct argument here that often gets glossed over in technical discussions of ranking systems: interpretability has real business value, and giving it up entirely for model performance is often a mistake at the DTC scale.

A merchandising director needs to be able to explain to a founder or board why a specific product is performing. If the ranking model produces a result and no one on the team can explain why a product is in position one versus position four, that opacity creates operational risk. When sales are down, you can't diagnose whether the problem is the catalog, the ranking, the traffic quality, or the external market.

We're not saying rule-based systems are better than ML systems overall. We're saying that trading all interpretability for marginal ranking accuracy gains is a poor tradeoff for most DTC teams. The hybrid approach, where a model handles the continuous adaptation and rules handle the editorial logic, is often a better fit for how merchandising teams actually work, not just for how well the ranking performs in an offline evaluation.

The goal is a system that a merchandising manager can reason about, override when the business needs it, and trust enough to leave running. That trust depends on interpretability, and interpretability is worth preserving even as the underlying ranking logic gets more sophisticated.