Enhancing graph multi-hop reasoning for question answering with LLMs: An approach based on adaptive path generation
摘要
Existing KG-based LLM reasoning methods often neglect the importance of KG’s structural information for reasoning, facing challenges when dealing with complex structures and large amounts of irrelevant information, particularly in knowledge graph question answering (KGQA). To address this issue, this paper proposes a KGQA model named Reasoning via Dynamic Planning on Graph (RDPG). It is based on an Adaptive Path Generation (APG) method put forward by us. RDPG aims to strengthen LLMs’ reasoning capabilities by integrating knowledge reasoning paths in KGs. The APG leverages LLMs’ interactive learning capabilities to dynamically adjust the depth and number of generated relation paths, constructing optimal path structures suitable for the current reasoning task. The generated reasoning paths meet the semantic requirements of the questions while avoiding unnecessary noise. Specifically, RDPG first dynamically generates candidate relation paths as reasoning plans based on the input question and LLMs’ real-time feedback, ensuring that the reasoning paths contain highly relevant information from the KG. Then, the model further alleviates the LLMs’ hallucination problem caused by irrelevant noise or missing information through path correction and expansion, providing a faithful reasoning foundation for LLMs. Finally, LLMs combine their built-in knowledge with retrieved external knowledge from KG, enhancing the reasoning process through Chain-of-Thought to meet complex reasoning demands. Experimental results demonstrate our method surpasses state-of-the-art approaches on two benchmark datasets. Additionally, further experiments validate the plug-and-play feature and effectiveness of our APG method in multi-hop KGQA tasks, indicating it applicable to different LLMs and KGs with strong adaptability and extensibility.