TL;DR
This paper introduces KAPING, a novel framework that augments Large Language Models (LLMs) with factual knowledge from Knowledge Graphs (KGs) for zero-shot question answering. By retrieving relevant KG facts and injecting them into the LLM's prompt, KAPING significantly improves accuracy and reduces factual errors (hallucinations) without requiring any model retraining.
What Problem Does This Paper Address?
Large Language Models (LLMs) have shown impressive capabilities in zero-shot question answering, relying on their internalized knowledge. However, this knowledge can be incomplete, incorrect, or outdated, leading to factual inaccuracies (hallucinations). Fine-tuning LLMs to update this knowledge is computationally expensive. Furthermore, it's unclear how LLMs retrieve and utilize their internal knowledge for answering questions. This paper addresses the challenge of improving the factual accuracy and reliability of LLM-based question answering in a zero-shot setting, specifically for Knowledge Graph Question Answering (KGQA), without incurring the cost of retraining.
Methods
The core of the KAPING framework involves two main steps:
- Knowledge Retrieval: For a given question, KAPING first identifies entities within the question. It then queries a Knowledge Graph (KG) to retrieve factual triples (subject, relation, object) associated with these entities. To filter out irrelevant facts, a novel retrieval mechanism is proposed that uses semantic similarity between the question and the verbalized triples. Only the top-K most relevant triples are selected.
- Knowledge Injection (Prompting): The retrieved, relevant KG facts are then verbalized into textual strings and prepended to the original question as part of the prompt. This augmented prompt is fed to the LLM, which generates the answer. This approach is entirely zero-shot, meaning no model training or fine-tuning is required.
Datasets
The authors evaluate KAPING on two Knowledge Graph Question Answering (KGQA) datasets:
- WebQuestionsSP (WebQSP): This dataset is based on the Freebase KG and has been refined for cleaner annotations.
- Mintaka: This dataset is designed for complex KGQA tasks and uses the Wikidata KG.
Key Insights and Ideas
- KG Facts are Crucial for Accuracy: The paper strongly suggests that LLMs' internal knowledge is insufficient for accurate factual question answering, especially in complex domains like KGQA. Augmenting with external, structured knowledge is key.
- Relevance Matters: Simply injecting all retrieved facts is not optimal. The proposed semantic similarity-based retrieval mechanism to filter for relevant facts is crucial for improving performance and avoiding misleading the LLM.
- Zero-Shot is Achievable and Effective: KAPING demonstrates that significant performance gains can be achieved in a completely zero-shot setting, making it highly practical for real-world applications where labeled data is scarce or expensive.
- Smaller Models Benefit More: The performance improvements from KAPING are more pronounced for smaller LLMs, which have less capacity to store vast amounts of factual knowledge internally. This suggests KAPING can help bridge the performance gap between smaller and larger models.
Key Results
KAPING significantly outperforms zero-shot baselines on KGQA tasks, achieving up to a 48% improvement in average accuracy across various LLMs. The paper shows that KAPING is more effective than simply using the retrieved facts directly to answer questions. Qualitative examples demonstrate KAPING's ability to generate factually correct answers, avoiding hallucinations seen in the "No Knowledge" baseline. The efficiency analysis also shows that while KAPING adds some overhead, it is significantly faster and more feasible than document augmentation methods.
Limitations and Future Work
The authors acknowledge several limitations:
- Retriever Efficacy: The performance of KAPING is heavily dependent on the quality of the knowledge retriever. If the retriever fails to find relevant facts or retrieves incorrect ones, the LLM's performance suffers.
- Multi-hop Reasoning: While the current system focuses on 1-hop retrieval, many KGQA questions require multi-hop reasoning, which is more challenging for the retriever.
- Evaluation Metrics: Current evaluation metrics (like EM and F1) are not ideal for generative LLMs that might produce sentence-level answers instead of just entities. Developing better metrics is suggested.
- Entity Linking: In real-world scenarios, entities in questions are not always pre-labeled. The performance of entity linking techniques can impact KAPING's overall effectiveness.
Future work could focus on improving multi-hop retrieval, developing more robust evaluation metrics for generative QA, and enhancing entity linking capabilities.
Summary updated