Case Study
The Recommendation Engine That Recommended Nothing
A ranking model with a 0.91 offline AUC served an empty carousel to four out of ten real visitors. What cold start actually costs, and the three-layer fallback that fixed it.
The model was finished on a Tuesday. AUC of 0.91 on the holdout set, recall@20 well clear of the popularity baseline, a clean training notebook. I was genuinely pleased with it.
On Thursday I put it behind the storefront of a small clothing brand I'd built and was running, and watched the first hundred sessions come through. Roughly four in ten of them saw an empty "Recommended for you" strip. Not bad recommendations. No recommendations.
Nothing was broken. The model was doing exactly what I had trained it to do.
#The gap between the dataset and the door
When you build a training set from historical interaction logs, you are implicitly filtering to people who interacted. Every row in that table is a user who did something you could record. You train on them, you validate on them, and you conclude the model works.
Then you deploy it to a storefront where a large share of traffic is a person who arrived from an Instagram ad ninety seconds ago, has clicked one product, and has no history at all. The model has nothing to condition on. It returns an empty candidate list, the carousel renders zero cards, and the component quietly collapses.
The offline evaluation could never have caught this, because the users it failed on were never in the offline data. I had measured the model's accuracy on the easy population and called it the model's accuracy.
I now think this is the most common self-inflicted wound in applied recommendation work. It is not that cold start is hard. Everyone knows cold start is hard. It is that your evaluation is structurally blind to it, so you do not find out until production tells you.
#Measuring the thing I had been ignoring
Before fixing anything I wanted a number. I added one counter in the serving path: for each request, how many candidates came back before ranking. Then I bucketed sessions by how much history the user had.
| Session type | Share of traffic | Candidates returned | Carousel filled |
|---|---|---|---|
| Returning, 5+ past events | 22% | 180+ | Always |
| Returning, 1-4 past events | 34% | 11-40 | Usually |
| First visit, 1 page view | 38% | 0 | Never |
| First visit, 0 page views | 6% | 0 | Never |
Forty-four percent of traffic was getting nothing, and that forty-four percent contained most of the paid-acquisition visitors. The expensive ones.
That table changed the conversation entirely. "Improve the model" became "serve something useful to the 44%", which is a far more tractable engineering problem than squeezing another point of AUC out of the 22%.
#Three layers instead of one model
The fix was not a better model. It was accepting that one model cannot serve every population, and building a chain that degrades gracefully.
Layer one, the personalised ranker. Unchanged. If the user has enough history to produce candidates, it runs. Best experience, serves the 22% beautifully.
Layer two. In-session signals. The moment someone views a product, I have a product. From that single item I can retrieve neighbours using content embeddings built from the catalogue itself: title, category, colour, fabric, price band. No user history required. This is a pure item-to-item problem and it is embarrassingly effective. Most of the "1-4 past events" group and all of the "1 page view" group now get something relevant.
Layer three. Contextual popularity. For the visitor with zero signal, popularity is not a cop-out, it is the correct answer. But raw global popularity is lazy. I segmented it by the only two things I knew about a cold visitor: where they came from and what time it was. Traffic from an Instagram story about a specific drop should see that drop, not the site's all-time bestseller.
def candidates(session):
if session.user_history_len >= MIN_HISTORY:
cands = personalised_ranker(session.user_id)
if len(cands) >= MIN_CANDIDATES:
return cands, "personalised"
if session.last_viewed_item:
cands = item_neighbours(session.last_viewed_item, k=60)
if cands:
return cands, "in_session"
return trending_for(session.entry_context), "contextual"
Note the string coming back alongside the candidates. That tag turned out to matter more than the fix itself.
#What the source tag bought me
Once every impression carried the layer that produced it, I could measure each layer separately. Click-through on the personalised layer was highest, as expected. But the in-session layer was close behind. Close enough to raise an uncomfortable question about whether the personalised model was earning its complexity for the mid-history group.
It also made a whole class of bugs visible. A week later I noticed the contextual layer's share creeping up during a specific hour each night. The feature job that refreshed user histories was holding a lock, requests were timing out, and the chain was silently falling through to layer three. Without the tag, that would have shown up as "conversion is a bit soft lately" and I would have blamed the creative.
A fallback you cannot observe is not a fallback. It is a place where failures go to hide.
#Cold start is a product decision wearing a modelling costume
The thing I got wrong initially was treating this as a modelling gap to be closed. It isn't. There is no amount of model sophistication that conjures a preference signal out of a user who has given you none. What you are actually deciding is: when we know nothing about someone, what do we want to show them?
That is a question about the business, not the loss function. For a clothing brand with a small catalogue and a strong visual identity, the answer was "the thing we are currently excited about, filtered to their entry context." For a marketplace with a million SKUs it would be something else. For a bank it might be nothing at all, because showing a confident recommendation to someone you don't understand is worse than showing a neutral default.
#The second-order effect: the catalogue went quiet
There was a follow-on problem I did not anticipate, and it took a few weeks to surface.
Once the fallback chain was in place, the contextual layer was serving a large slice of traffic. The contextual layer shows trending items. Trending items get more impressions. More impressions produce more interactions. More interactions make them more trending.
Within about three weeks, roughly a dozen products were absorbing the overwhelming majority of cold-start impressions, and a long tail of perfectly good items was getting almost none. The catalogue had quietly collapsed into a shortlist.
This is the feedback loop every recommender has, and the fallback layer makes it worse because it is the least personalised and the most visible. Nothing about it shows up as an error. Click-through actually looked fine. The top twelve items were genuinely popular, so recommending them performed acceptably. What was degrading was discovery, and discovery has no obvious metric until you go looking for it.
Two things helped.
Impression-count capping. No item may exceed a share of total cold-start impressions in a rolling window. Once it hits the cap, it is held out and the next candidate takes the slot. Blunt, and effective within days.
A deliberate exploration slot. One position in the carousel, not the first, is reserved for an item chosen with some randomness, weighted toward things with few impressions. It costs a small amount of immediate click-through and it is the only reason anything new ever gets a chance to prove itself.
The exploration slot also quietly fixed my data problem. The reason the ranker was weak on the catalogue tail was that the tail had no interaction data, and it had no interaction data because the ranker never showed it. Forcing a trickle of impressions through unseen items generates exactly the training data the model was missing.
A recommender trained only on what it chose to show is a recommender slowly confirming its own first guess.
I now treat the exploration slot as non-negotiable rather than as an optimisation. It is the mechanism by which the system keeps learning instead of settling.
#What I would do from the start next time
- Bucket your evaluation by history depth before you train anything. If 40% of your traffic is cold, your headline metric should be a weighted average across buckets, not a single number dominated by power users.
- Instrument the candidate count, not just the final metric. Zero candidates is a silent failure mode that every aggregate will smooth over.
- Build the fallback chain first. The contextual layer took an afternoon and recovered most of the lost surface area. The personalised ranker took three weeks and served a fifth of the traffic.
- Tag every impression with its source layer. It costs one string and it is the difference between debugging and guessing.
The personalised model is still the best thing in the stack. It is just no longer the only thing standing between a visitor and an empty box.