Machine Learning Engineer • Mid-Level
Machine Learning Engineer • Mid-Level
High QualityInterview Summary
The Shopify AI-enabled pair programming round focused on designing and implementing an Ad Frequency Capping System. The system needed to independently enforce impression limits for every (user_id, campaign_id) pair over a configurable time window.
The core problem was essentially a per-user, per-campaign sliding-window counter. The interface was organized around two operations: checking whether an ad can currently be served and recording an impression event after the ad is shown.
Interview Details
AI Pair Programming — Ad Frequency Capping
Design a system that prevents a user from seeing the same advertising campaign too many times within a specified time window. Each frequency-cap configuration contains:
user_id— the usercampaign_id— the advertising campaigncap— maximum number of allowed impressionswindow_seconds— length of the rolling time window
Frequency limits should be maintained independently across different users and campaigns. For example, reaching the cap for (user_1, campaign_A) should not affect (user_1, campaign_B) or (user_2, campaign_A).
API 1 — Check Whether an Ad Can Be Served
The first API determines whether a particular
Unlock Full Details
Create a free account to unlock this interview experience report.