How Instacart Uses Machine Learning to Suggest Replacements for Out-of-Stock Products
Instacart's replacement system faced four interrelated challenges: predicting suitable substitutes without real-time inventory data, generating accurate recommendations for rarely purchased or newly introduced products, handling bias introduced by a uniform ranking model across all retailers, and matching the highly nuanced size, flavor, and brand preferences of individual customers.
Making the model retailer-aware significantly boosted precision and made store brands more likely to appear as top replacement suggestions; more shopper-selected replacements were available at fulfillment, and an A/B test confirmed statistically significant improvements in replacement_issues_per_delivery. The candidate generation pipeline now covers more than 95% of replacements actually picked by shoppers.
The original replacement schema used a single ranking across all retailers, which created a bias toward universally available brand-name products and ignored store-brand alternatives, causing customer complaints about being charged more for replacements than for original products.