flâneur — a map of the web's best reading

Training an LLM-RecSys Hybrid for Steerable Recs with Semantic IDs

eugeneyan.com · 4,816 words · saved by 1 readers

I got nerdsniped when I first heard about Semantic IDs. The idea is simple: Instead of using random hash IDs for videos or songs or products, we can use semantically meaningful tokens that an LLM can natively understand. I wondered, could we train an LLM-recommender hybrid on the rich behavioral data that makes today’s recommender systems so effective? To my surprise, we can! The result is a language model that can converse in both English and item IDs, not with retrieval or other tools, but as a single, “bilingual” model where items (i.e., semantic IDs) are part of its vocabulary. Like a recommender model, it can recommend items given historical interactions. But the big surprise—and capability unlock—was when I found that I could simply chat with the model to steer its recommendations, and it could reason about its choices, offer explanations, and creatively name product bundles. Here’s a demo video. And here’s the code to prep the data, train the model, and chat with it. (Note: This

Training an LLM-RecSys Hybrid for Steerable Recs with Semantic IDs eugeneyan Start Here Writing Speaking Prototyping About Training an LLM-RecSys Hybrid for Steerable Recs with Semantic IDs [ llm recsys learning 🛠 🩷 ] · 23 min read I got nerdsniped when I first heard about Semantic IDs. The idea is simple: Instead of using random hash IDs for videos or songs or products, we can use semantically meaningful tokens that an LLM can natively understand. I wondered, could we train an LLM-recommender hybrid on the rich behavioral data that makes today’s recommender systems so effective? To my surpr

Explore this link on the map →

related reading