Pinterest needed to provide relevant search results for users querying in 20 different languages. Running powerful language models live for every search would be prohibitively expensive. The solution involved using a large model to generate training data, which allowed the training of a smaller, faster model capable of handling the same workload.
This approach balanced relevance quality with operational cost, enabling search functionality across diverse linguistic markets without the computational burden of live large-model inference. The system addresses the core challenge of matching user intent with content, ensuring that results like "small balcony garden ideas" connect users with appropriately scaled content. By moving from engagement-based predictions to explicit relevance scoring, Pinterest created a multi-tiered classification system.
Human annotators labeled query-Pin pairs using a scale from L1 (highly irrelevant) to L5 (highly relevant). This structured labeling provided a robust baseline for model training, allowing the AI to learn nuanced distinctions between partial matches and irrelevant content. The multiclass classification task ensures that search results are not just popular, but genuinely useful to the user's specific query intent.
Training costs were significantly reduced through this data generation strategy. The smaller model maintains relevance quality while operating at a fraction of the computational cost of the larger language model. This efficiency makes it feasible to deploy sophisticated search capabilities across 20 languages simultaneously, expanding Pinterest's global reach without proportional infrastructure expenses.
Source: ByteByteGo · Summarized by HeadlinesBriefing