Workflow · Production

Establishing a Large-Scale Learned Retrieval System at Pinterest

The problem

Pinterest's homefeed retrieval relied on heuristic approaches based on Pin-Board graphs and user-followed interests rather than learning from actual user engagement, limiting adaptability as the platform scaled to hundreds of millions of users.

Workflow diagram · grounded in source
1
User engagement event logging
trigger
“learned purely from logged user engagement events and serves in production”
2
Two-tower model training
ai_action
“one tower learns the query embedding and one tower learns the item embedding. The online serving will be cheap with nearest neighbor search with query embedding and item embeddings”
3
Offline item embedding indexing
integration
“millions of item embeddings are computed and pushed to our in-house Manas serving system for online serving”
4
Auto retraining and validation
feedback_loop
“We established an auto retraining workflow to retrain the models periodically and validate the model performance before deploying them to the model and indexing services”
5
Model version synchronization
validation
“we attach a piece of model version metadata to each ANN search service host, which contains a mapping from model name to the latest model version”
6
Online personalized retrieval
output
“user embedding is computed during request time so it can leverage the most up-to-date features to do personalized retrieval”
Reported outcome

The learned retrieval system achieved top user coverage and top three save rates among homefeed candidate generators, enabling deprecation of two legacy generators with site-wide engagement improvements.

Reported metrics
User coverage rank among homefeed generatorstop user coverage
Save rate rank among homefeed generatorstop three save rates
Site engagementhuge overall site engagement wins
Legacy candidate generators deprecatedtwo
Reported stack
ManasANN
Source
https://medium.com/pinterest-engineering/establishing-a-large-scale-learned-retrieval-system-at-pinterest-eb0eaf7b92c5
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The learned retrieval system achieved top user coverage and top three save rates among homefeed candidate generators, enabling deprecation of two legacy generators with site-wide engagement improvements.

What tools did this team use?

Manas, ANN.

What results were reported?

User coverage rank among homefeed generators: top user coverage; Save rate rank among homefeed generators: top three save rates; Site engagement: huge overall site engagement wins; Legacy candidate generators deprecated: two (source-reported, not independently verified).

How is this workflow AI workflow structured?

User engagement event logging → Two-tower model training → Offline item embedding indexing → Auto retraining and validation → Model version synchronization → Online personalized retrieval.