From Activity to Intent: Gener... Note

From Activity to Intent: Generating User Journeys with LLMs

Pinterest aims to understand users' long-term goals, called journeys, which are sequences of interactions related to a specific interest and intent. This goes beyond simply recommending the next item based on a single click. Identifying these journeys allows for more relevant recommendations and notifications, helping users complete projects. Initially, Pinterest used a multi-stage pipeline to infer journeys by clustering keywords and attaching attributes. This legacy system improved engagement metrics but suffered from fragmentation, generic buckets, and incidental noise from irrelevant clicks. To address these issues, Pinterest reframed journey inference as a generative task using a fine-tuned, 4-billion-parameter large language model. This LLM directly reads a user's chronological activity log and outputs a ranked list of journey names in the user's locale. The prompt engineering for this LLM is crucial, defining action importance, event grouping, and handling negative signals like dislikes. Frontier models were used as teachers to generate synthetic training data for fine-tuning smaller, production-ready student models. The 4B parameter model was chosen for its balance of output quality and serving efficiency. Serving these models at scale involves sophisticated optimizations like PagedAttention and continuous batching to handle hundreds of millions of users efficiently. The new generative system successfully consolidates fragmented journeys, provides specific names, and reintroduces lost intents. This approach offers a general recipe for personalization beyond just Pinterest, applicable to platforms with sequential user activity and structured intent targets.
CdXz5zHNQW_wEiKzVPwD3.png