LLM-Based Multi-Hop Question Answering with Knowledge Graph Integration in Evolving Environments

Ruirui Chen, Weifeng Jiang, Chengwei Qin, Ishaan Singh Rawal, Cheston Tan, Dongkyu Choi, Bo Xiong, Bo Ai

Abstract

Large Language Models (LLMs) are often limited by "stale knowledge" once their training phase concludes. While various knowledge editing techniques have been proposed, they frequently struggle with multi-hop reasoning as the volume of updates increases. This paper introduces GMeLLo (Graph Memory-based Editing for LLMs), a framework that integrates LLMs with dynamic Knowledge Graphs (KGs). By translating natural language updates into structured triples and questions into formal SPARQL queries, GMeLLo maintains high performance in complex reasoning tasks even with thousands of simultaneous fact updates, significantly outperforming existing memory-based and parameter-modification methods.

Introduction

LLMs represent a static snapshot of information at the time of their training. To maintain their utility in a rapidly changing world, researchers use "knowledge editing" to inject new facts. However, a significant challenge remains: multi-hop question answering. These queries require linking multiple facts together (e.g., "What is the capital of the country where the current British Prime Minister’s spouse was born?").

Current approaches typically fall into two categories:

  1. Parameter Modification: Directly editing model weights, which risks "catastrophic forgetting" or unintended side effects in unrelated knowledge areas.
  2. Memory-Based Retrieval: Storing facts as flat text. This approach fails to scale; as the "memory" grows, LLMs struggle to retrieve relevant facts and maintain the logical chain required for multi-hop reasoning.

Methodology

GMeLLo addresses these issues by utilizing a Knowledge Graph (KG) as an external, structured memory. The framework leverages the linguistic flexibility of LLMs for translation and the logical rigor of KGs for reasoning.

The GMeLLo framework architecture illustrating the pipeline from fact extraction to formal querying and final answer generation.

The process consists of four key stages:

  • Fact Extraction: Incoming natural language facts are translated by an LLM into (Subject, Relation, Object) triples to update a Wikidata-based KG.
  • Relation Chain Extraction: For a multi-hop question, the LLM identifies the necessary sequence of relations (e.g., Person -> Spouse -> Birthplace -> Country -> Capital).
  • Formal Querying (KBQA): The extracted relation chain is converted into a SPARQL query and executed against the KG to retrieve a precise, symbolic answer.
  • Hybrid Response: The system combines the KG's output with standard Retrieval-Augmented Generation (RAG). If discrepancies arise, the KG's structured output is prioritized to ensure logical consistency.

Evaluation and Results

The framework was evaluated using the MQuAKE benchmark, specifically the MQuAKE-CF (counterfactual edits) and MQuAKE-T (temporal real-world changes) datasets. Scalability was tested with batch sizes ($k$) up to 3,000 simultaneous edits to observe performance degradation in "crowded" information environments.

Performance comparison of GMeLLo against baselines across different edit scales (k) on MQuAKE-CF and MQuAKE-T datasets.

GMeLLo demonstrated superior scalability and accuracy. On MQuAKE-CF with 3,000 edits, GMeLLo maintained 49.0% accuracy using GPT-J-6B, whereas the previous state-of-the-art memory-based method, MeLLo, dropped to 9.8%. On MQuAKE-T, GMeLLo achieved 81.5% accuracy, significantly higher than the 30.7% achieved by MeLLo. These results were consistent across different base models, including GPT-J and Vicuna-7B.

Discussion and Conclusion

The success of GMeLLo highlights several key insights:

  • Structure vs. Volume: Structured graph search is far more efficient and accurate than text-based retrieval for large-scale knowledge updates. Performance remains stable even as the number of edits increases.
  • LLMs as Translators: LLMs excel at mapping natural language to formal structures (like SPARQL) rather than acting as reliable, up-to-date databases themselves.
  • Mitigating Hallucinations: Using a KG as a "source of truth" provides a critical check against the probabilistic guessing often seen in LLMs during complex reasoning.

Future work includes improving relation mapping to handle out-of-vocabulary relations more robustly and integrating Chain-of-Thought prompting to refine the extraction of complex relation chains. Additionally, extending the KG to support temporal reasoning would allow the system to handle historical queries more effectively.

Summary updated

BibTeX
@inproceedings{chen2024llm,
  author = {Ruirui Chen and Weifeng Jiang and Chengwei Qin and Ishaan Singh Rawal and Cheston Tan and Dongkyu Choi and Bo Xiong and Bo Ai},
  title = {{LLM-Based Multi-Hop Question Answering with Knowledge Graph Integration in Evolving Environments}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.844},
}
Figure