Problem
A delivery marketplace must keep shoppers (supply) and customer orders (demand) in balance. Too few shoppers means lost orders and late deliveries. Too many means idle shoppers and wasted incentives. At Instacart, each lever (onboarding shoppers, incentives for existing or churned shoppers, incentives for customers to order at certain times) was triggered separately, and the lack of coordination wasted spend. The team needed one system that picks the lever mix for a forecast gap within ROI limits.
Example from the article: the SAGE (Supply Allocation & Generation Engine) system, launched in 2020 and rebuilt as v2.
Solution in brief
A forecast turns the expected supply-demand mismatch into a number of shoppers or customers to add. An optimizer then spreads that target over all levers, using each lever's predicted incremental effect per spend level. In v2 each nonlinear efficiency curve is cut into points, points that break ROI limits are removed, and a mixed integer program picks exactly one point per curve. It runs per region over several weeks.
Questions this case answers
- How to allocate a limited budget across several interventions with different lead times and diminishing returns so that a forecast shortfall is covered at an acceptable return on spend
- How to solve a nonlinear budget-allocation problem when generic nonlinear solvers handle the arbitrary curve shapes poorly and latency matters
- How to choose a mix of supply and demand levers (shopper onboarding, shopper incentives, customer incentives) to close a forecast supply gap within ROI limits?
- How to put levers with different lead times and nonlinear returns into one optimization?
Tools and methods
- Supply and demand forecasts — turn the expected mismatch into a "supply gap".
- Uplift models — give per-lever marginal efficiency curves.
- Linear program (v1) — maximizes incremental deliveries over one week at constant efficiency.
- Mixed integer program (v2) — picks one curve point per lever under ROI and budget guardrails.
- Python-MIP — the MIP solver library used in production.
- Celery — runs region-level jobs in parallel.
Google or a one-time email code. No password.