Pinterest concatenates a search query and Pin text, then uses a fine-tuned open-source LLM as a cross-encoder to predict relevance on a five-point scale. An 8-billion-parameter Llama model improved performance by 12% over multilingual BERT and 20% over Pinterest’s SearchSage embedding model.
What We Learned from Using LLMs in Pinterest
Speakers
Pinterest Search Relevance machine learning engineers Mukuntha Narayanan and Han Wang share lessons from using LLMs to improve Pinterest Search.
Han Wang describes building Pin representations from titles, descriptions, LLM-generated image captions, board titles, and queries that led to strong engagement. Ablation studies showed that captions provided a solid baseline and adding more text features, including user-action features, improved relevance prediction.
Pinterest trains a smaller student model on five-scale relevance scores produced by an LLM teacher, expanding training data about 100 times with samples from daily search logs across domains, languages, and countries. The student uses a bi-encoder and additional features such as SearchSage embeddings, graph embeddings, and BM25 text-match statistics.
Pin embeddings are inferred offline across billions of Pins and refreshed when their inputs meaningfully change. Query embeddings run online in a few milliseconds, with an approximately 85% cache hit rate. The team reports relevance and search-fulfillment gains in international segments, and says the student’s embeddings also help represent content for related Pins and the home feed.
Mukuntha Narayanan recaps four lessons: LLMs predict relevance well, captions and user actions add useful content information, distillation supports efficient serving, and relevance tuning produces useful semantic representations. In the Q&A, he says Pinterest uses the same multilingual model across languages and that synthetic data helped extend improvements beyond markets with substantial human-labeled data.
Takeaways
- Use a cross-encoder teacher when query-to-item interactions matter for relevance labels.
- Test image captions and engagement-derived annotations as inputs, then measure each with ablations.
- Distill expensive teacher scores into a smaller model trained on fresh, representative traffic samples.
- Move item embedding inference offline and cache repeated query embeddings to control serving latency.
- A multilingual model and synthetic labels can help extend relevance improvements into markets with limited human-labeled data.
Mentioned in this talk
Search inside this talk
What was claimed 13
- works atMachine Learning Engineer, Search Relevance
“We're both machine learning engineers on the Search Relevance team at Pinterest.”
YouTube Verified2 sources· Talk, Web· archived
- works atMukuntha Narayanan works at
Pinterest
Machine Learning Engineer, Search Relevance“We're both machine learning engineers on the Search Relevance team at Pinterest.”
YouTube Verified2 sources· Talk, Web· archived
- feature
Pinterest: handles over six billion searches each month
handles over six billion searches each month“Every month, we handle over six billion searches”
YouTube Unverified3 sources· Talk
- uses
“Then we feed the embedding from the LLM into an MLP layer”
YouTube Unverified1 source· Talk
- uses
Pinterest uses cross-encoders
“This is called a cross-encoder structure”
YouTube Unverified1 source· Talk
- uses
“we concatenate the query and Pin text and pass them into an LLM”
YouTube Unverified1 source· Talk
- metriclarge language models: An 8-billion-parameter Llama model gives a 12% improvement over multilingual BERT and a 20% improvement over SearchSage on relevance prediction.
“the 8-billion-parameter Llama model gives a 12% improvement ... and a 20% improvement over the SearchSage embedding model”
YouTube Unverified1 source· Talk
- uses
Pinterest uses SearchSage
“As a baseline, we use SearchSage, Pinterest's in-house content and query embedding model.”
YouTube Unverified1 source· Talk
- uses
“the production-served relevance student model that we distilled from the teacher model”
YouTube Unverified1 source· Talk
- uses
“We also use a lot of pin-query text match statistics like BM25”
YouTube Unverified1 source· Talk
- uses
Pinterest uses bi-encoder
“it’s a bi-encoder, which essentially means we don’t have cross-interactions between the pin and query representations”
YouTube Unverified1 source· Talk
- uses
“Large language models can scale really well when we use offline inference and caching.”
YouTube Unverified1 source· Talk
- metric
Pinterest: Search-query embedding cache hit rate is around 85%.
“we get around an 85% cache hit rate”
YouTube Unverified1 source· Talk









