12
0

Avoid Recommending Out-of-Domain Items: Constrained Generative Recommendation with LLMs

Abstract

Large Language Models (LLMs) have shown promise for generative recommender systems due to their transformative capabilities in user interaction. However, ensuring they do not recommend out-of-domain (OOD) items remains a challenge. We study two distinct methods to address this issue: RecLM-ret, a retrieval-based method, and RecLM-cgen, a constrained generation method. Both methods integrate seamlessly with existing LLMs to ensure in-domain recommendations. Comprehensive experiments on three recommendation datasets demonstrate that RecLM-cgen consistently outperforms RecLM-ret and existing LLM-based recommender models in accuracy while eliminating OOD recommendations, making it the preferred method for adoption. Additionally, RecLM-cgen maintains strong generalist capabilities and is a lightweight plug-and-play module for easy integration into LLMs, offering valuable practical benefits for the community. Source code is available atthis https URL

View on arXiv
@article{liao2025_2505.03336,
  title={ Avoid Recommending Out-of-Domain Items: Constrained Generative Recommendation with LLMs },
  author={ Hao Liao and Wensheng Lu and Jianxun Lian and Mingqi Wu and Shuo Wang and Yong Zhang and Yitian Huang and Mingyang Zhou and Xing Xie },
  journal={arXiv preprint arXiv:2505.03336},
  year={ 2025 }
}
Comments on this paper