Question-Aware Knowledge Graph Prompting for Enhancing Large Language Models
Haochen Liu, Song Wang, Chen Chen, Jundong Li
TL;DR
This work tackles the challenge of knowledge-intensive MCQA by integrating external knowledge graphs into large language models without fine-tuning. The proposed framework, QAP, combines a Question-Aware Neighborhood Aggregation (QNA) module that injects question context into KG graph reasoning with a Global Attention-Derived Prompting (GTP) module that leverages cross-option relations to enrich soft prompts. It optimizes an end-to-end objective with a cross-entropy loss while freezing the LLM, and demonstrates state-of-the-art performance on OBQA, Riddle, and MedQA using ConceptNet and UMLS as knowledge sources. The approach enables query-adaptive reasoning and robust handling of missing KG knowledge across answer options, offering a scalable path to integrating structured knowledge with LLMs in diverse domains.
Abstract
Large Language Models (LLMs) often struggle with tasks requiring external knowledge, such as knowledge-intensive Multiple Choice Question Answering (MCQA). Integrating Knowledge Graphs (KGs) can enhance reasoning; however, existing methods typically demand costly fine-tuning or retrieve noisy KG information. Recent approaches leverage Graph Neural Networks (GNNs) to generate KG-based input embedding prefixes as soft prompts for LLMs but fail to account for question relevance, resulting in noisy prompts. Moreover, in MCQA tasks, the absence of relevant KG knowledge for certain answer options remains a significant challenge. To address these issues, we propose Question-Aware Knowledge Graph Prompting (QAP), which incorporates question embeddings into GNN aggregation to dynamically assess KG relevance. QAP employs global attention to capture inter-option relationships, enriching soft prompts with inferred knowledge. Experimental results demonstrate that QAP outperforms state-of-the-art methods across multiple datasets, highlighting its effectiveness.
