How an LLM taught a recommender model to see more than interaction history

Alexey Vasilyev22 May 2026

Problem

Sequential recommenders such as SASRec and BERT4Rec learn only from interaction patterns and know nothing about what items are. A shopper who buys lactose-free yogurt and plant-based cheese probably avoids lactose, but the model has to rediscover that from statistics. With little data, rare items or weakly connected histories, the signal gets lost. An LLM can read item texts and infer preferences, but serving it to millions of users is slow, costly and hard to scale.

Example from the article: on ML-20M, the approach gave a speedup of more than 100 times over a strong LLM baseline together with a 5.6% quality gain.

Solution in brief

An LLM writes a text profile for each user once, offline. The profile is embedded and reduced to the size of the recommender's hidden state, and the recommender is trained to match it with an extra distillation loss. A short second stage without that loss fixes the knowledge in place. At serving time only the original small model runs.

Questions this case answers
  • How to transfer semantic knowledge from a large language model into a small low-latency ranking model when the large model is too slow and costly to serve
  • How to give a sequential recommender knowledge about item semantics without running an LLM at serving time?
  • How to improve a SASRec or BERT4Rec model in production without changing its architecture?
  • How to use LLM-written user profiles to help recommendations on sparse histories and rare items?

Tools and methods

  • Gemma-2-9B — writes a text profile of the user from item texts in the history
  • multilingual-e5-large — encodes the text profile into a vector
  • UMAP — reduces that vector to the dimension of the recommender's hidden state
  • SASRec / BERT4Rec — the recommenders that receive the distilled knowledge
  • Knowledge distillation (MSE loss) — pulls the aggregated user representation toward the profile vector
Continue reading — it's free

Google or a one-time email code. No password.