Knowledge Graph Retrieval-Augmented Generation for LLM-based Recommendation
Shijie Wang, Wenqi Fan, Yue Feng, Shanru Lin, Xinyu Ma, Shuaiqiang Wang, Dawei Yin
TL;DR
The paper tackles hallucinations and knowledge gaps in LLM-based recommender systems by introducing K-RagRec, a knowledge-graph retrieval-augmented framework. It constructs semantic-hop sub-graphs from an external KG, employs a popularity-based retrieval policy, and encodes retrieved sub-graphs with GNNs before integrating them as soft prompts to frozen LLMs. Key innovations include Hop-Field semantic indexing, Top-N sub-graph re-ranking, and a lightweight training regime that updates only graph components and a projector. Experiments on MovieLens and Amazon Book across multiple backbones demonstrate substantial gains in accuracy and recall, with favorable efficiency and notable zero-shot generalization, validating the practicality of structure-aware KG-RAG for real-world recommendations.
Abstract
Recommender systems have become increasingly vital in our daily lives, helping to alleviate the problem of information overload across various user-oriented online services. The emergence of Large Language Models (LLMs) has yielded remarkable achievements, demonstrating their potential for the development of next-generation recommender systems. Despite these advancements, LLM-based recommender systems face inherent limitations stemming from their LLM backbones, particularly issues of hallucinations and the lack of up-to-date and domain-specific knowledge. Recently, Retrieval-Augmented Generation (RAG) has garnered significant attention for addressing these limitations by leveraging external knowledge sources to enhance the understanding and generation of LLMs. However, vanilla RAG methods often introduce noise and neglect structural relationships in knowledge, limiting their effectiveness in LLM-based recommendations. To address these limitations, we propose to retrieve high-quality and up-to-date structure information from the knowledge graph (KG) to augment recommendations. Specifically, our approach develops a retrieval-augmented framework, termed K-RagRec, that facilitates the recommendation generation process by incorporating structure information from the external KG. Extensive experiments have been conducted to demonstrate the effectiveness of our proposed method.
