Knowledge Graph-Enhanced Large Language Models via Path Selection

Knowledge Graph-Enhanced Large Language Models via Path Selection

19 Jun 2024 | Haochen Liu, Song Wang, Yaochen Zhu, Yushun Dong, Jundong Li
This paper proposes KELP, a knowledge graph-enhanced large language model (LLM) framework that improves factual accuracy by flexibly capturing potentially impactful knowledge. Traditional methods rely on LLMs to select relevant knowledge paths, which are limited in flexibility and may miss indirect semantic relationships. KELP addresses these issues by using latent semantic matching to generate scores for knowledge paths and trained encoding to identify indirect relationships. The framework consists of three stages: knowledge path extraction, sample encoding, and fine-grained path selection. Knowledge paths are extracted based on entities in the input text, and a path-text encoder is trained to measure the similarity between input texts and knowledge paths. Two coverage rules are introduced to refine the selection of knowledge paths with high flexibility. The method is validated on real-world datasets, demonstrating its effectiveness in improving LLM outputs. KELP outperforms existing baselines in both strongly and weakly semantic knowledge tasks, showing its ability to handle diverse reasoning patterns. The framework is also extended to handle large knowledge graphs through a relation-only ranking strategy. The results show that KELP achieves high accuracy with limited data, demonstrating its potential to match or exceed LLM capabilities in various scenarios. The method is robust and efficient, making it suitable for practical applications where data is scarce.This paper proposes KELP, a knowledge graph-enhanced large language model (LLM) framework that improves factual accuracy by flexibly capturing potentially impactful knowledge. Traditional methods rely on LLMs to select relevant knowledge paths, which are limited in flexibility and may miss indirect semantic relationships. KELP addresses these issues by using latent semantic matching to generate scores for knowledge paths and trained encoding to identify indirect relationships. The framework consists of three stages: knowledge path extraction, sample encoding, and fine-grained path selection. Knowledge paths are extracted based on entities in the input text, and a path-text encoder is trained to measure the similarity between input texts and knowledge paths. Two coverage rules are introduced to refine the selection of knowledge paths with high flexibility. The method is validated on real-world datasets, demonstrating its effectiveness in improving LLM outputs. KELP outperforms existing baselines in both strongly and weakly semantic knowledge tasks, showing its ability to handle diverse reasoning patterns. The framework is also extended to handle large knowledge graphs through a relation-only ranking strategy. The results show that KELP achieves high accuracy with limited data, demonstrating its potential to match or exceed LLM capabilities in various scenarios. The method is robust and efficient, making it suitable for practical applications where data is scarce.
Reach us at info@study.space