Knowledge Graph Prompting for Multi-Document Question Answering

Yu Wang, Nedim Lipka, Ryan A. Rossi, Alexa F. Siu, Ruiyi Zhang, Tyler Derr

Abstract

Large Language Models (LLMs) often struggle with Multi-Document Question Answering (MD-QA), which requires synthesizing information across multiple sources and navigating complex document structures. This paper introduces Knowledge Graph Prompting (KGP), a novel framework that transforms document collections into a structured knowledge graph. By employing a fine-tuned LLM agent to traverse this graph, KGP retrieves logically connected evidence, significantly enhancing the reasoning capabilities of LLMs in complex QA tasks.

Introduction

While the "pre-train, prompt, predict" paradigm has revolutionized open-domain question answering, it remains insufficient for MD-QA. Answering these prompts typically requires "multi-hop" reasoning—identifying a clue in one document that leads to another. Furthermore, real-world documents contain non-linear structures like tables and specific page layouts that traditional dense retrieval methods, which treat text as flat passages, fail to capture. KGP addresses this by treating retrieval as an intelligent navigation task over a structured graph.

Methodology

KGP reframes retrieval as a graph traversal problem executed in two primary phases:

  1. Knowledge Graph (KG) Construction: Documents are decomposed into nodes representing text passages, tables, and pages. Edges are established based on lexical similarity (TF-IDF), semantic similarity (KNN), and shared entities (TAGME).
  2. LLM-Based Graph Traversal: A fine-tuned LLM (e.g., T5) acts as a traversal agent. Given a question and the current node, the agent predicts the "ideal" next piece of evidence. It then evaluates neighboring nodes and selects the one that best matches its prediction, maintaining logical coherence step-by-step.
Overview of the Knowledge Graph construction process, including node types and edge relations.

Experimental Setup

The framework was evaluated on several multi-hop and structural reasoning benchmarks, including HotpotQA, IIRC, 2WikiMQA, MuSiQue, and PDF-Triage (PDF-T). These datasets test the model's ability to perform arithmetic, bridge information across documents, and understand document-specific structures like tables.

Key Results and Insights

KGP-T5 demonstrated superior performance across all MD-QA benchmarks. Notably, on HotpotQA, it achieved a 66.77% F1 score, outperforming strong baselines like MDR (65.16%).

Performance metrics (Acc, EM, F1) for KGP-T5 compared to baselines on the 2WikiMQA and MuSiQue datasets.

Structural Awareness

A standout result was observed on the PDF-Triage dataset, where KGP-T5 achieved a 67.00% Exact Match (EM) score. In contrast, all traditional retrieval baselines scored 0.00%, highlighting that traditional retrievers cannot comprehend document structure without explicit node representation for tables and pages.

Agent Efficiency

The study revealed that smaller, fine-tuned models (0.7B T5) can outperform larger general-purpose models (7B LLaMA) when specialized for graph traversal tasks. This suggests that task-specific instruction tuning is more critical for routing than raw parameter count.

Conclusion

Knowledge Graph Prompting offers a robust solution for multi-document reasoning by integrating logical and structural relationships into the retrieval process. While graph density presents latency challenges, the success of generative traversal suggests that structured, agentic retrieval is a vital direction for the evolution of Retrieval-Augmented Generation (RAG), particularly for complex enterprise documents.

Summary updated

BibTeX
@inproceedings{wang2024knowledge,
  author = {Yu Wang and Nedim Lipka and Ryan A. Rossi and Alexa F. Siu and Ruiyi Zhang and Tyler Derr},
  title = {{Knowledge Graph Prompting for Multi-Document Question Answering}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i17.29889},
}
Figure