There is a tendency in the machine learning conversation around e-commerce to treat rule-based merchandising as the legacy approach that gets replaced once you have a good model. This framing is wrong, and acting on it causes real problems. Rule-based merchandising and ML-driven ranking are not the same kind of tool applied to the same problem - they are different tools suited to different jobs, and good merchandising systems need both working together.
The question is not "rules or models?" It is "where does each one add more value than the other, and how do you orchestrate between them?"
What Rules Do Well
Merchandising rules encode business intent. They are how brand strategy, inventory management, and commercial partnerships get expressed in the surfacing layer. A rule that says "promote these six products during the spring campaign" is not a prediction about what shoppers want - it is a statement about what the business wants to accomplish. A rule that says "exclude out-of-stock items from homepage features" is not a model inference - it is an inventory management constraint. A rule that says "surface the new collection at 120% of its model-predicted weight for the first three weeks after launch" is a go-to-market decision, not a personalization decision.
These are things models genuinely cannot do, because models optimize for predicted shopper behavior - add-to-cart probability, session conversion likelihood - not for business intent. A model that is performing well will surface products that are likely to sell based on behavioral patterns. It will not know that you have a brand partnership obligation, a promotional commitment to a vendor, an inventory imbalance you need to address, or a new product line you are trying to establish as a category within your brand.
Rules are also deterministic and auditable. When a compliance or brand safety question arises about what was surfaced on a specific date, rule-based decisions can be traced exactly. "We had a promotion running for this product from date X to date Y, configured by this team member" is an answer you can give. "The model surfaced it because of a combination of factors in the latent space" is much harder to defend to a stakeholder who wants to understand a surfacing decision.
What Models Do Well
Models do what rules cannot do at scale: rank the full catalog for each individual session based on behavioral signals without requiring manual configuration per product. A catalog with 20,000 SKUs has combinatorially more potential rankings than any rule set can explicitly address. A model can score each product against each session's signals and produce a ranking that reflects the session's demonstrated preferences - not in a coarse categorical way ("this shopper likes home goods") but in a granular way ("this shopper has been engaging with items in the $150 to $250 range, minimalist aesthetic, natural materials, and the model predicts these twelve specific products are strong candidates for this session").
Models improve with data. A rule does not change its output unless a human changes the rule. A model trained on a growing dataset will gradually improve its ranking quality as it sees more sessions and more conversion events, provided the feedback loop from interactions is correctly implemented. This matters for businesses where behavioral patterns shift seasonally or as the customer base evolves.
Models also discover non-obvious affinities. A rule set can capture the patterns a merchandiser consciously knows about - "customers who buy outdoor furniture often also buy cushions and umbrellas." A model will also capture patterns that are real but not obvious - that customers who browse in certain ways during the first session are more likely to purchase from a specific category three sessions later, or that a specific combination of viewed items predicts a preference for a product that is not in the same category. These cross-catalog signal patterns are invisible to rule-based approaches.
Where Each Breaks Down
Rules break down when catalog complexity exceeds the cognitive capacity of the people writing the rules. A rule set that was manageable at 500 SKUs becomes unmaintainable at 5,000 and breaks completely at 40,000. Rules also break down at the edges: a rule designed for the average case will be wrong for minority cases, and a catalog serves a diverse audience where minority cases are numerous.
Models break down when they are asked to optimize for something that is not reflected in their training signal. If the model is trained to maximize add-to-cart rate and you want to clear aging inventory, the model will surface its best add-to-cart candidates - which are rarely the items you need to move. If you launch a new product line and want to establish it, the model will underweight those products until they have accumulated enough interaction data to compete on equal terms with established products. Pure model-driven surfacing is commercially neutral in ways that are sometimes commercially wrong.
Models also break down for new catalog items. A product that launched yesterday has no behavioral data. The model cannot rank it confidently, so it defaults to a prior - usually neutral - which means new items get systematically disadvantaged. This is the new product cold start problem, and it requires a rule or a manual override to address it while the behavioral data accumulates.
The Layered Architecture
The practical resolution is a layered system where rules and models interact at different stages of the surfacing pipeline. A common architecture has three layers.
The first layer is eligibility: rule-based constraints on what can appear in what surface. Out-of-stock items excluded from homepage. Items below a quality threshold excluded from featured surfaces. Items with specific vendor or brand flags pinned or suppressed based on commercial agreements. These are hard constraints that the model cannot override.
The second layer is model ranking: within the eligible set, the model produces a ranked candidate list based on the current session's behavioral signals. This is the layer where personalization happens - where the session context shapes which products are pulled to the top of the distribution.
The third layer is business boosts: adjustments applied to the model ranking based on current business intent. Promotional items receive a ranking boost. New arrivals receive a decay-adjusted boost for their first 21 days. Campaign-featured products receive a floor guarantee (they appear in at least X of the Y featured slots during the campaign period). These boosts are applied to the model ranking rather than replacing it - they adjust the ordering rather than overriding the personalization entirely.
The result is a surface that is personalized to each session, constrained by inventory and compliance rules, and shaped by business intent - but none of these three things need to be in full conflict with each other. The merchandising team manages the rules and boosts. The model handles the rest. Knowing which layer to use for which type of decision is the operational skill that makes this architecture work in practice.