GLoSS: Generative Language Models with Semantic Search for Sequential Recommendation

Krishna Acharya, Aleksandr V. Petrov, Juba ZianiarXiv 2025 · DOI

Introduction

In the landscape of recommender systems, a persistent divide exists between ID-based models and generative language models. ID-based models, such as SASRec, are computationally efficient but remain "blind" to item content. Conversely, generative models like GPT4Rec leverage rich textual information but often struggle to map creative linguistic outputs back to a fixed product catalog.

The GLoSS (Generative Low-rank language model with Semantic Search) framework bridges this gap. By fine-tuning LLaMA-3 models to generate descriptive "queries" for a user's next purchase and subsequently retrieving items via dense vector search, GLoSS establishes a new state-of-the-art for sequential recommendation.

Problem Statement

Traditional sequential recommenders rely heavily on Item IDs, leading to the "cold-start" problem where new items cannot be recommended without retraining. Furthermore, these models ignore textual metadata like titles and descriptions. While recent generative approaches attempt to use LLMs to predict item titles, they often rely on brittle lexical matching (e.g., BM25). GLoSS addresses these limitations by replacing keyword matching with semantic search, allowing the system to understand synonymous concepts (e.g., "crimson running shoes" vs. "red sneakers").

Methodology

The GLoSS pipeline implements a "Generate-then-Retrieve" architecture designed for both performance and efficiency.

The GLoSS framework: Training via QLoRA SFT and Serving via Semantic Search.

The process involves four primary stages:

  1. Serialization: User interaction history is converted into natural language prompts.
  2. Efficient Fine-tuning: LLaMA-3 models (1B, 3B, and 8B) are fine-tuned using QLoRA (4-bit quantization with Low-Rank Adaptation), enabling training on consumer-grade hardware.
  3. Query Generation: The model generates multiple candidate strings representing the user's potential next interest.
  4. Semantic Retrieval: A dense encoder (e5-small-v2) converts generated text into vectors for similarity search against the item catalog.

Key Results and Insights

GLoSS was evaluated on three Amazon Product Review benchmarks: Beauty, Toys and Games, and Sports and Outdoors. The results demonstrate that GLoSS significantly outperforms both traditional ID-based models and existing LLM-based approaches.

Performance comparison of GLoSS against traditional sequential recommendation models.

Performance Gains

As shown in the table above, GLoSS-8B achieves dramatic improvements in Recall@5 compared to traditional baselines like SASRec and TIGER, with gains of up to 52.8% in the Toys category. It also outperforms other LLM-based models such as P5 and GPT4Rec by significant margins.

Core Insights

  • Semantic Search Superiority: Dense retrieval consistently outperforms lexical matching (BM25). Semantic search effectively handles the linguistic variance in LLM outputs.
  • Cold-Start Resilience: GLoSS excels for users with sparse histories. By leveraging the pre-trained world knowledge of LLaMA-3, the model can make accurate predictions without extensive interaction data.
  • Scaling Benefits: Performance scales positively with model size; the 8B parameter version consistently outperformed the 1B and 3B variants, indicating that enhanced reasoning capabilities directly improve recommendation quality.

Conclusion and Future Work

GLoSS demonstrates that state-of-the-art recommendation is achievable by combining generative LLMs with semantic retrieval. While the framework excels at retrieval (Recall), future work may focus on integrating a secondary LLM-based reranker to improve ranking metrics (NDCG). Additionally, addressing the inference latency inherent in LLM generation remains a key area for optimization in production environments.

Citation: Acharya, K., Petrov, A. V., & Ziani, J. (2025). GLoSS: Generative Language Models with Semantic Search for Sequential Recommendation. arXiv:2506.01910v2.

Summary updated

BibTeX
@misc{acharya2025gloss,
  author = {Krishna Acharya and Aleksandr V. Petrov and Juba Ziani},
  title = {{GLoSS: Generative Language Models with Semantic Search for Sequential Recommendation}},
  year = {2025},
  eprint = {2506.01910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.01910},
}
Figure