[Paper Review] Multi-hop Question Answering over Knowledge Graphs using Large Language Models
This paper proposes a novel in-context learning framework for multi-hop question answering over knowledge graphs using large language models (LLMs), leveraging both information retrieval (IR) and semantic parsing (SP) approaches. By iteratively extracting and refining relevant entities and relations, the IR-LLM method achieves state-of-the-art performance on complex datasets like ComplexWebQSP (52.59% Hits@1), outperforming supervised baselines and existing LLM-based methods.
Knowledge graphs (KGs) are large datasets with specific structures representing large knowledge bases (KB) where each node represents a key entity and relations amongst them are typed edges. Natural language queries formed to extract information from a KB entail starting from specific nodes and reasoning over multiple edges of the corresponding KG to arrive at the correct set of answer nodes. Traditional approaches of question answering on KG are based on (a) semantic parsing (SP), where a logical form (e.g., S-expression, SPARQL query, etc.) is generated using node and edge embeddings and then reasoning over these representations or tuning language models to generate the final answer directly, or (b) information-retrieval based that works by extracting entities and relations sequentially. In this work, we evaluate the capability of (LLMs) to answer questions over KG that involve multiple hops. We show that depending upon the size and nature of the KG we need different approaches to extract and feed the relevant information to an LLM since every LLM comes with a fixed context window. We evaluate our approach on six KGs with and without the availability of example-specific sub-graphs and show that both the IR and SP-based methods can be adopted by LLMs resulting in an extremely competitive performance.
Motivation & Objective
- To evaluate the effectiveness of large language models (LLMs) in answering complex, multi-hop questions over knowledge graphs (KGs).
- To address the challenge of limited context window in LLMs by designing efficient retrieval and reasoning pipelines for KGs.
- To compare the performance of IR-based and SP-based prompting strategies when applied to LLMs for multi-hop QA.
- To demonstrate that in-context learning with few-shot examples can surpass supervised fine-tuning on certain KG benchmarks.
- To investigate how sub-graph extraction and entity/relationship grounding affect LLM reasoning in multi-hop QA tasks.
Proposed method
- Proposes an iterative, LLM-driven pipeline that extracts relevant nodes and edges from knowledge graphs based on question semantics.
- Employs in-context learning with few-shot examples to guide the LLM in generating accurate reasoning paths over KGs.
- For IR-LLM, passes a linearized representation of sub-graphs (verbalized triples) and entity/relationship lists to the LLM.
- For SP-LLM, provides a verbalized schema of the KG ontology (classes, relations, attributes) to enable SPARQL query generation.
- Uses dynamic few-shot prompting to adapt to varying complexity across datasets like WebQSP, Meta-QA, and ComplexWebQSP.
- Implements a decision mechanism in the pipeline to determine whether to continue the reasoning chain based on LLM-generated intermediate results.

Experimental results
Research questions
- RQ1Can in-context learning with LLMs effectively handle multi-hop question answering over large knowledge graphs?
- RQ2How does the performance of IR-based LLM prompting compare to SP-based prompting in multi-hop QA scenarios?
- RQ3To what extent do few-shot examples improve LLM generalization in multi-hop QA without fine-tuning?
- RQ4Does the structure and size of the knowledge graph influence the optimal prompting strategy for LLMs?
- RQ5Can LLM-based in-context learning surpass supervised fine-tuning approaches on complex, open-domain multi-hop QA benchmarks?
Key findings
- The IR-LLM approach achieves a new state-of-the-art performance of 52.59% Hits@1 on the ComplexWebQSP dataset, surpassing the previous SOTA of 51.2% from supervised methods.
- On the WebQSP dataset, IR-LLM improves performance by 8% over existing methods, demonstrating strong generalization without fine-tuning.
- On Meta-QA-3hop, the IR-LLM approach achieves an 11% improvement over prior baselines, highlighting its effectiveness in complex reasoning paths.
- For LC-QuAD v1.0, the SP-LLM method achieves the highest Hits@1 among comparable LLM-based approaches, outperforming prior work by a significant margin.
- On KQAPro, the SP-LLM approach achieves 72.9% Hits@1 and 76.96% exact match accuracy, outperforming previous ChatGPT-based attempts but lagging behind fine-tuned models on F1 and EM metrics.
- The performance gap between known and unknown entity scenarios is minimal (72.90 vs. 71.98% Hits@1 on KQAPro), indicating that few-shot examples are sufficient for effective SPARQL generation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.