A Systematic Exploration of Knowledge Graph Alignment with Large Language Models in Retrieval Augmented Generation

Authors

  • Shiyu Tian Beijing University of Posts and Telecommunications
  • Shuyue Xing Beijing University of Posts and Telecommunications
  • Xingrui Li Beijing University of Posts and Telecommunications
  • Yangyang Luo Beijing University of Posts and Telecommunications
  • Caixia Yuan Beijing University of Posts and Telecommunications
  • Wei Chen Li Auto Inc.
  • Huixing Jiang Li Auto Inc.
  • Xiaojie Wang Beijing University of Posts and Telecommunications

DOI:

https://doi.org/10.1609/aaai.v39i24.34716

Abstract

Retrieval Augmented Generation (RAG) with Knowledge Graphs (KGs) is an effective way to enhance Large Language Models (LLMs). Due to the natural discrepancy between structured KGs and sequential LLMs, KGs must be linearized to text before being inputted into LLMs, leading to the problem of KG Alignment with LLMs (KGA). However, recent KG+RAG methods only consider KGA as a simple step without comprehensive and in-depth explorations, leaving three essential problems unclear: (1) What are the factors and their effects in KGA? (2) How do LLMs understand KGs? (3) How to improve KG+RAG by KGA? To fill this gap, we conduct systematic explorations on KGA, where we first define the problem of KGA and subdivide it into the graph transformation phase (graph-to-graph) and the linearization phase (graph-to-text). In the graph transformation phase, we study graph features at the node, edge, and full graph levels from low to high granularity. In the linearization phase, we study factors on formats, orders, and templates from structural to token levels. We conduct substantial experiments on 15 typical LLMs and three common datasets. Our main findings include: (1) The centrality of the KG affects the final generation; formats have the greatest impact on KGA; orders are model-dependent, without an optimal order adapting for all models; the templates with special token separators are better. (2) LLMs understand KGs by a unique mechanism, different from processing natural sentences, and separators play an important role. (3) We achieved 7.3% average performance improvements on four common LLMs on the KGQA task by combining the optimal factors to enhance KGA.

Downloads

Published

2025-04-11

How to Cite

Tian, S., Xing, S., Li, X., Luo, Y., Yuan, C., Chen, W., … Wang, X. (2025). A Systematic Exploration of Knowledge Graph Alignment with Large Language Models in Retrieval Augmented Generation. Proceedings of the AAAI Conference on Artificial Intelligence, 39(24), 25291–25299. https://doi.org/10.1609/aaai.v39i24.34716

Issue

Section

AAAI Technical Track on Natural Language Processing III