Can Knowledge Graphs Make Large Language Models More Trustworthy? An Empirical Study over Open-ended Question Answering

## Abstract

Abstract Recent works integrating Knowledge Graphs (KGs) have led to promising improvements in enhancing reasoning accuracy of Large Language Models (LLMs).
However, current benchmarks mainly focus on closed tasks, leaving a gap in the assessment of more complex, real-world scenarios. This gap has also obscured the evaluation of KGs’ potential to mitigate the problem of hallucination in LLMs.
To fill the gap, we introduce OKGQA, a new benchmark specifically designed to assess LLMs enhanced with KGs under open-ended, real-world question answering scenarios.
OKGQA is designed to closely reflect the complexities of practical applications using questions from different types, and incorporates specific metrics to measure both the reduction in hallucinations and the enhancement in reasoning capabilities.
To consider the scenario in which KGs may have varying levels of mistakes, we further propose another experiment setting OKGQA-P to assess model performance when the semantics and structure of KGs are deliberately perturbed and contaminated.
OKGQA aims to (1) explore whether KGs can make LLMs more trustworthy in an open-ended setting, and (2) conduct a comparative analysis to shed light on methods and future directions for leveraging KGs to reduce LLMs’ hallucination.
We believe that this study can facilitate a more complete performance comparison and encourage continuous improvement in integrating KGs with LLMs. The code of this paper is released at https://anonymous.4open.science/r/OKGQA-CBB0 .

## 1 Introduction

Contemporary LLMs are prone to producing hallucinations due to gaps in their knowledge (Gekhman et al., ; Lee et al., ), primarily when the training data contain misinformation, biases, or inaccuracies. These flaws can arise when we simply maximize the log-likelihood, leading to responses that may seem plausible, but are often irrelevant or incorrect (Weng, ). This issue is especially concerning in scenarios where accuracy and reliability are essential, such as healthcare (He et al., ) and science (Taylor et al., ).

To address this critical limitation, researchers employ diverse strategies to augment the LLMs by integrating external knowledge graphs (KGs) (Pan et al., ; Luo et al., ; Hu et al., ; Sun et al., ; van Breugel et al., ).
KGs offer structured, explicit, and up-to-date factual knowledge, including domain-specific knowledge, providing a faithful knowledge source for reasoning (Zheng et al., ; Agrawal et al., ). Moreover, each piece of information in KGs can be traced back to its source, providing context and provenance. This traceability not only aids in verifying the reliability of the information but also provides clear pathways of reasoning, making the interpretation process transparent. Due to their reliability and interpretability, KGs are considered a promising method to improve the reliability of LLM reasoning.

However, current benchmarks for testing the capabilities of these LLM+KG models are predominantly closed-ended, restricting responses to a limited set of entities/relations (Talmor et al., ; Mihaylov et al., ; Jin et al., ) or a set of logical forms (Yih et al., ; Talmor & Berant, ; Puerto et al., ) derived from specific facts of KG.
Hence, they can only test a very limited subset of the LLM’s tendency to hallucinate, leaving a gap in the assessment of complex, real-world scenarios.
Particularly, standard metrics such as FActScore (Min et al., ) and SAFE (Wei et al., ) for evaluating the hallucination rate of LLMs require open-ended settings, i.e., questions are phrased as a statement which requires a longer answer.

Motivation: Recognizing the research gap, our study aims to contribute to the existing knowledge from two perspectives: 1) explore whether KGs can make LLMs more trustworthy in an open-ended setting, and 2) conduct a comparative analysis to shed light on methods and directions for leveraging KGs to reduce LLMs’ hallucination.

To achieve this, we develop a new benchmark, Open-ended Knowledge-Graphs Question Answering (OKGQA), specifically
designed to assess LLMs enhanced with KGs under open-ended, real-world question answering scenarios. OKGQA is designed to closely reflect the complexities of practical applications using questions of different types, and incorporates
specific metrics to measure both the reduction in hallucinations and enhancements
in reasoning capabilities.
Specifically, OKGQA covers 850 queries from ten categories, representing different levels of real-world QA types. All queries are synthesized by LLMs with pre-defined templates mentioned in Table 1, and we use Wikipedia as references for all the entities mentioned in the query. All the questions are designed to be open-ended and cannot be simply answered by generating logical forms or retrieving specific facts from the knowledge graph. To consider the scenarios in which KGs may have varying levels of mistakes (i.e., attributes may be mislabeled, relations may not exist, etc.), we propose another experiment setup OKGQA-P (discussed in Section 3.2) to assess model performance under conditions where KGs’ semantics and structure are deliberately perturbed and contaminated. We assess the hallucination ratio and the quality of the response (detailed metrics can be found in Section 3.3) of the tested models.

Based on our experiments, we find that (1) retrieving KG information can indeed mitigate factual errors in LLMs’ responses, especially for queries requiring additional reasoning; (2) directly performing reasoning in the LLM itself (e.g., internal reasoning strategies like Chain-of-thoughts (Kim et al., ) and self-consistency (Wang et al., )) may cause bias and hallucination; (3) Subgraphs generally achieve the best performance across different query types, especially for simpler types of queries; (4) Integrating KGs can effectively reduce hallucinations in LLMs, even when KGs are contaminated to a certain degree.
Overall, our main contributions include:

- •
We present OKGQA, a benchmark tailored for evaluating LLMs enhanced with KGs under open-ended, real-world question-answering scenarios. The benchmark extends the assessment of closed-ended question answering to an open-ended setting, which can further support the assessment of hallucination of LLMs.
- •
To consider the scenarios in which KGs may have varying levels of mistakes, we propose another experiment setup OKGQA-P to assess model performance under conditions in which the semantics and structure of KGs are deliberately perturbed and contaminated.
- •
We conduct a series of experiments on OKGQA and OKGQA-P, analyzing the effectiveness of various retrieval methods and LLMs of different magnitudes, providing insights for future research and development. Our results underscore the importance of integrating LLMs with KGs to help reduce hallucinations, even in circumstances where KGs are contaminated.

## 2 Related Work

Due to the stochastic decoding process of Large language models (LLMs), i.e., sampling the next token in the sequence, LLMs exhibit probabilistic behavior, potentially yielding varied outputs of the same input across different instances (Agrawal et al., ). In addition, they also face challenges in accurately interpreting phrases or terms when the context is vague and resides in a knowledge gap region of the model, leading to outputs that may sound plausible but are often irrelevant or incorrect. This “hallucinations" undermines the reliability of LLMs (Huang et al., ).
One emerging research trend is enhancing LLMs through integrating external knowledge graphs (Agrawal et al., ).
KGs offer structured, explicit, and up-to-date factual knowledge, including domain-specific knowledge, providing a faithful knowledge source for reasoning (Zheng et al., ; Agrawal et al., ). Moreover, each piece of information in KGs can be traced back to its source, providing context and provenance. This traceability not only aids in verifying the reliability of the information but also provides clear pathways of reasoning, making the interpretation process transparent. Due to their reliability and interpretability, KGs are considered a promising method to improve the reliability of LLM reasoning.

Researchers employ diverse strategies to augment the LLMs by integrating external KGs. For example,
KAPING (Baek et al., ) matches entities in questions to retrieve related triples from knowledge graphs for zero-shot question answering. Wu et al. () finds that converting these triples into textualized statements can further enhance LLM performance. StructGPT (Jiang et al., ) propose to convert user query into structured formats (e.g., SPARQL) for information extraction from KGs. Following the succuess of internal reasoning-enhancement methods like Chain-of-thoughts (CoT) (Wei et al., ), Reflexion (Shinn et al., ), and Tree-of-thoughts (ToT), He et al. () propose “rethinking with retrieval" to use decomposed reasoning steps from CoT prompting to retrieve external knowledge, leading to more accurate and faithful explanations. IR-CoT (Trivedi et al., ) interleaves the generation of CoT with knowledge retrieval from corresponding KGs, iteratively guiding both retrieval and reasoning for multi-step questions. MindMap (Wen et al., ) introduce a plug-and-play approach to evoke graph-of-thoughts reasoning in LLMs. Similarly, Reasoning on Graphs (RoG) (Luo et al., ) use KGs to create faithful reasoning paths based on various relations, enabling interpretable and accurate reasoning in LLMs.

However, current benchmarks for testing the capabilities of these LLM+KG models are predominantly closed-ended, restricting responses to a limited set of entities/relations or a set of logical forms derived from specific facts of KG. Hence, they can only test a very limited subset of the LLM’s tendency to hallucinate, leaving a gap in the assessment of complex, real-world scenarios.
Particularly, standard metrics such as FActScore (Min et al., ) and SAFE (Wei et al., ) for evaluating the hallucination rate of LLMs require open-ended settings, i.e., questions are phrased as a statement which requires a longer answer. Compared with previous works, our proposed OKGQA is tailored for evaluating LLMs enhanced with KGs under open-ended, real-world question-answering scenarios. The benchmark extends the assessment of closed-ended question answering to an open-ended setting, which can further support the assessment of hallucination of LLMs.

## 3 OKGQA: A Open-ended Knowledge Graph Question-Answering Benchmark

OKGQA is a benchmark designed to assess LLMs enhanced with KGs under open-ended, real-world questions answering scenarios. OKGQA is designed to closely reflect the complexities of practical applications using questions of different types and incorporates specific metrics to measure both the reduction in hallucinations and enhancement in reasoning capabilities. In this section, we discuss the construction of the dataset, and the construction of OKGQA-P which is a variant of OKGQA where the KGs’ semantics and structure are deliberately perturbed and contaminated.

Motivation of Open-ended QA instead of Close-ended QA: Current benchmarks for testing the capabilities of LLM+KGs models are predominantly close-ended(^1^11[https://en.wikipedia.org/wiki/Open-ended_question#Examples](https://en.wikipedia.org/wiki/Open-ended_question#Examples)), which demand a short answer such as ‘yes’ and ‘no’. This restricts the responses to a limited set of entities/relations (Talmor et al., ; Mihaylov et al., ; Jin et al., ) or a set of logical forms (Yih et al., ; Talmor & Berant, ; Puerto et al., ) derived from specific KG facts.
Hence, they can only test a very limited subset of the LLM’s tendency to hallucinate, leaving a gap in the assessment of more complex, real-world scenarios.
Particularly, standard metrics (like FActScore (Min et al., ) and SAFE (Wei et al., )) for evaluating the hallucination rate of LLMs require open-ended settings, i.e., questions are phrased as a statement which requires a longer answer.

Open-ended QA Task Definition: The tasks we design require to first understand the scope of the question, then optionally retrieve relevant information from multiple parts of the knowledge graph, then finally synthesize a coherent and informative response. The ideal output should be a paragraph that fully addresses the question with accurate and factual responses. We verify the response based on the metrics specified in Section 5 to reflect the models’ capabilities and faithfulness.

Figure: (a) Dataset statistics and query types
Refer to caption: x1.png

### 3.1 Dataset Construction

Queries. We utilize a template-based methodology to systematically generate a diverse range of queries using LLMs, including categories such as descriptive, explanatory, predictive, comparative, and critical queries. Details regarding the specific templates and example queries can be found in Table 1, while the corresponding prompts are provided in the Appendix A.1.
To ensure that the generated queries accurately represent real-world scenarios and complexities, we integrate the corresponding Wikipedia pages of each entity as contextual information for the LLMs’ generation. Furthermore, we follow a human-in-the-loop process to enhance the instructions for generating (the details are given in Appendix A.4). Intuitively, starting with an initial instruction, we generate a large number of query candidates, then use an LLM as automatic evaluator to evaluate the quality of the query, denoted as a set of scores from different metrics $s_{\text{auto}}$ ranging from 1 to 10, with higher scores indicating better performance. Then, these queries are manually evaluated and assign a set of human-label score $s_{\text{human}}$ correspond to $s_{\text{auto}}$, normalized as the same range as $s_{\text{auto}}$. We then optimize the input instructions by iteratively generate instructions to minimize the gap between $s_{\text{human}}$ and $s_{\text{auto}}$. These queries are categorized by difficulty and the naturalness of their phrasing. The statistics of the queries can be found in Figure 1.

**Table 1: Query types and examples in OKGQA. Brown is used to highlight the placeholders (e.g., [person], [event]) in description, while Teal refers to the specific entities to replace the placeholders. The distribution of the sub-query types can be referred to in Figure 1(b).**
| Type | Sub-Type | Description / Template | Example |
| --- | --- | --- | --- |
| Descriptive | Character Description | Describe a [person]’s significant contributions<br>during their career. | Please describe Albert Einstein’s contributions to the<br>field of physics. |
| Event Description | Provide a detailed description of the background<br>and course of an [event]. | Please provide a detailed description of the background<br>and course of the French Revolution. |  |
| Explanatory | Cause Explanation | Why did [person] take [action] at [time]? | Why did Nixon choose to resign from the presidency<br>in 1974? |
| Relationship Explanation | Explain the relationship between [entity A] and<br>[entity B] and its significance. | Explain the relationship between Alexander the Great<br>and Aristotle and its significance. |  |
| Predictive | Trend Prediction | Based on the historical behavior of [entity], what<br>do you think it might do in the future? | Based on Tesla’s historical behavior, in which fields do<br>you think it might innovate in the future? |
| Outcome Prediction | Based on the current situation, how do you predict<br>[event] will develop? | Based on the current international situation, how do you<br>predict climate change policies will develop? |  |
| Comparative | Contrast Analysis | Compare and contrast the similarities and differences<br>between [entity A] and [entity B] in [aspect]. | Compare and contrast the leadership styles of Steve Jobs<br>and Bill Gates. |
| Historical Comparison | Compare the impact of [historical event A] and<br>[historical event B]. | Compare the impact of World War I and World War II<br>on the global order. |  |
| Critical | Evaluation and Reflection | How do you evaluate the impact of [person/event]<br>on [field]? Please explain your viewpoint. | How do you evaluate Martin Luther King’s impact on<br>the civil rights movement? Please explain your viewpoint. |
| Application and Practice | How do you think [theory/method] can be applied<br>to [practical issue]? | How do you think machine learning technology can be<br>applied to medical diagnostics? |  |

KG Sub-graphs.
To reduce the size of KGs, following previous works (Luo et al., ; Yih et al., ; Talmor & Berant, ), we construct subgraphs of DBpedia (all the queries in OKGQA can be reasoned based on DBPedia(^2^22[https://www.dbpedia.org/resources/knowledge-graphs/](https://www.dbpedia.org/resources/knowledge-graphs/))) by extracting all triples contained within the k-hop neighbors from the question entities in the query. For our experiments, we set k=2. To further reduce the size of the 2-hop subgraphs, we leverage personalized page-rank (PPR) (Bahmani et al., ) to prune the nodes/edges that are not relevant to the query (the details of the PPR algorithm are discussed in Appendix A.5). We compare the statistics of subgraphs before and after PPR pruning in Figure 1(a).

### 3.2 OKGQA-P: Benchmark with Noise & Perturbations in KGs

To further mimic the real situations where KGs may not be of high quality (i.e., attributes of nodes/edges may be mislabeled, relations may not exist, etc.), we propose another experiment setting OKGQA-P in this section to assess the model performance under conditions where KGs’ semantics and structure are deliberately perturbed and contaminated. Considering that KGs are typically annotated by humans and are generally accurate and meaningful, we introduce perturbations to edges in the KG to degrade the quality of the KGs, diminishing human comprehensibility. To quantify the degree of perturbation, we evaluate both the semantic and structual similarity between the original and the modified KG as defined below.

Notation. Let $\mathcal{F}_{\theta}$ be a KG-augmented model, and KG as $\mathcal{G}=(\mathcal{V},\mathcal{E},\mathcal{T})$, where $\mathcal{V}$ is the set of entities (nodes), $\mathcal{E}$ is the set of relation types (edges), and $\mathcal{T}=\{(v_{1},e,v_{2})|v_{1},v_{2}\in\mathcal{V},e\in\mathcal{E}\}$ is the set of triplets composed from existing entities and relations. Let $\mathcal{G}^{\prime}=(\mathcal{V},\mathcal{E^{\prime}},\mathcal{T^{\prime}})$ be the KG obtained after perturbing $\mathcal{G}$, where $\mathcal{E}^{\prime}\neq\mathcal{E}$ and $\mathcal{T}^{\prime}\neq\mathcal{T}$. Let $f(\mathcal{G},\mathcal{G}^{\prime})$ be a function that measures the similarity between $\mathcal{G}$ and $\mathcal{G}^{\prime}$. Let $g(\mathcal{G})$ be the downstream performance when evaluating $\mathcal{F}_{\theta}$ on data samples $X$ and $\mathcal{G}$.

High-level Procedure. First, we test $\mathcal{F}_{\theta}$ on data samples $X$ and $\mathcal{G}$ to get the original performance $g(\mathcal{G})$. Second, we perturb $\mathcal{G}$ to obtain $\mathcal{G}^{\prime}$. Third, we evaluate $\mathcal{F}_{\theta}$ on data samples $X$ and $\mathcal{G}^{\prime}$ to get the perturbed performance $g(\mathcal{G}^{\prime})$. Finally, we measure $g(\mathcal{G})-g(\mathcal{G}^{\prime})$ and $f(\mathcal{G},\mathcal{G}^{\prime})$ to assess how robust $\mathcal{F}_{\theta}$ is, i.e., to assess the model performance under conditions where KGs’ semantics and structure are deliberately perturbed.

To quantify how much the perturbed KG has deviated from the original KG, i.e., $f(\mathcal{G},\mathcal{G}^{\prime})$, we leverage metrics from Raman et al. () for capturing semantics (ATS) and structural (SC2D, SD2) similarity between KGs. Intuitively, ATS leverages an pre-trained LM for link prediction to measure the probability of each edge from $\mathcal{G}^{\prime}$ existing in $\mathcal{G}$, while SC2D and SD2 measures the structural similarity between two KGs based on local clustering coefficient and degree distribution. For each of the three metrics, higher value indicates higher similarity. The detailed description can be found in Appendix A.7. The results after perturbation can be found in Figure 4.

For the perturbation methods, we consider four perturbation heuristics based on (Raman et al., ) as follows: Relation Swapping (RS) randomly chooses two edges from $\mathcal{T}$ and swaps their relations. Relation Replacement (RR) randomly chooses an edge $v_{1},e,v_{2})\in\mathcal{T}$, then replaces $e_{1}$ with another relation $e_{2}=\text{argmin}_{r\in\mathcal{R}}S_{\mathcal{G}}(v_{1},e,v_{2})$, where $S_{\mathcal{G}}(v_{1},e,v_{2})$ uses ATS to measure the semantics similarity between two edges. Edge Rewiring (ER) randomly chooses an edge $(v_{1},e,v_{2})\in\mathcal{T}$, then replaces $v_{2}$ with another entity $v_{3}\in\mathcal{E}\backslash\mathcal{N}_{1}(v_{1})$, where $\mathcal{N}_{1}(v_{1})$ represents the 1-hop neighborhood of $v_{1}$. Edge Deletion (ED) randomly chooses an edge $(v_{1},e,v_{2})\in\mathcal{T}$ and deletes it. We control the perturbation level based on the percentage of KG edges being perturbed.

### 3.3 Evaluation Metrics

To quantify the hallucinations of LLMs, we leverage two public metrics, FActScore (Min et al., ) (factual precision in atomicity score) and SAFE (Wei et al., ) (search-augmented factuality evaluator). FActScore is designed to measure factual precision in text by decomposing a long form generation into multiple atomic facts and validates each separately against a reliable knowledge base, such as Wikipedia. We measure the proportion of facts that are supported by the knowledge source out of the total atomic facts. SAFE, on the other hand, adopts a more dynamic approach to fact-checking. It employs a language model as an investigative agent, which iteratively uses Google Search queries and reasons about whether the search results support or do not support the fact.

In addition to the hallucination metrics, we have also included four metrics, following previous works (Edge et al., ; Wang et al., ) to quantify the desirable qualities for generating sensible responses. Given the complexities inherent in our open-ended QA setting, collecting and annotating ground-truth answers pose significant challenges. Therefore, we leverage LLMs as automatic reference-free evaluators to assess these metrics based on G-Eval (Liu et al., ), a framework of using LLMs with chain-of-thought (CoT) and a form-filling paradigm. To enhance G-Eval’s robustness and stability, we provide the relevant Wikipedia pages as context in the prompt when calculating the metrics. The metrics are defined as follows: Context Relevance: measures how well the generated response aligns with the provided context. Comprehensiveness: evaluates the extent to which the generated answer covers all aspects and details of the question. Correctness: measures how clearly and specifically the generated answer responds to the question. Empowerment: evaluates how well the generated answer helps the reader understand the topic and make informed decisions. The detailed prompt for each metric can be found in Appendix A.1.

Models. We incorporate a range of widely used LLMs of different scales, including GPT-4o(^3^33https://openai.com/index/hello-gpt-4o/), GPT-4o-mini(^4^44https://openai.com/index/gpt-4o-mini-advancing-cost-efficient-intelligence/), Llama-3.1-8B-instruct (Dubey et al., ), Mistral-7B-instruct-v0.3 (Jiang et al., ), and Gemma-2-9B-it (Team et al., ). We use the embedding model (text-embedding-3-small) from OpenAI for the G-retrieval process, considering cost and performance.

## 4 Exploring KG-augmented framework for reducing hallucination

Figure: Figure 2: Overview of KG-augmented framework for reducing hallucinations.
Refer to caption: x2.png

Overview. To explore whether KG-augmented approaches can mitigate LLMs’ hallucination, we investigated a range of methods and discovered that they can be encapsulated within a unified framework as shown in Figure 2. Our framework follows the paradigm of retrieval augmented generation (RAG) (Edge et al., ; Baek et al., ), which retrieves essential information from the KGs, and then uses the retrieved knowledge to enhance the LLM’s generation. It has two components, i.e., Graph-guided retrieval (G-retrieval) and Graph-guided generation (G-generator), with a variety of algorithmic choices that combine to create diverse algorithms with different benefits for reducing hallucinations. We analyze our proposed strategies within each component in Section 5, aiming to shed light on the best practices for leveraging KGs for reducing hallucinations in LLMs.

Here we formalize the problem of context-relevant KG retrieval for open-ended question answering. Given a user query $q$, a generative pretrained language models (PLMs) first encodes the input tokens, and then models a conditional distribution $p(a|q)$ to generate an output response $a=[a_{1},\ldots,a_{T}]$.
To explore whether KGs can help reduce hallucinations of PLMs, we introduce the *retrieved knowledge* from the KG, denoted $\mathcal{Z}\in\mathcal{G}$, which can take various forms (e.g., triplets, paths, subgraphs, as shown in Figure 2). This retrieved knowledge contains information relevant to the user query, and can either benefit the PLM at its knowledge boundaries (Baek et al., ) or explicitly guide its reasoning process (Luo et al., ; Sun et al., ). We explore which forms of knowledge should be extracted from KGs to best enhance the PLM.
The distribution of the retrieved knowledge $\mathcal{Z}$ is modeled as $p(\mathcal{Z}|q,\mathcal{G})$, leading to a new likelihood for generating responses, expressed as $p(a|q)$.

$$ $\displaystyle p(a|q)$ $\displaystyle=\sum_{\mathcal{Z}\subseteq\mathcal{G}}p_{\phi}(a|q,\mathcal{Z})p _{\theta}(\mathcal{Z}|q,\mathcal{G})$ (1) $\displaystyle\approx p_{\phi}(a|q,\mathcal{Z}^{*})p_{\theta}(\mathcal{Z}^{*}|q ,\mathcal{G}),$ $$

where $p_{\theta}(\mathcal{Z}^{*}|q,\mathcal{G})$ represents the distribution of retrieving relevant knowledge elements from the KGs, and $p_{\phi}(a|q,\mathcal{Z}^{*})$ represents the distribution of leveraging the retrieved knowledge elements to generate the final responses, parameterized by $\phi$ and $\theta$, where $\mathcal{Z}^{*}$ is the optimal retrieved knowledge. Due to the potential exponential growth in the number of possible retrieved knowledge with graph size, efficient approximation methods are required. Consequently, the first line of Eq. 1 is approximated using the most probable retrieved knowledge $\mathcal{Z}^{*}$.

### 4.1 Graph-guided retrieval (G-retrieval)

The graph-guided retrieval phase focuses on extracting the most relevant elements (e.g., triplets, paths or subgraphs) from KGs to help answer the user query. Initially, the query is transformed into an embedding vector $\mathbf{q}\in\mathbb{R}^{d}$ using a language model encoder $f_{\text{LM}}(\cdot)$. For each node $v\in\mathcal{V}$ and edge $e\in\mathcal{E}$, their respective embeddings $\mathbf{e}_{v}$ and $\mathbf{e}_{e}$ are computed using the same language model to map all the information into the same vector space, and their relevance to the query is quantified using cosine similarity as: $s_{v}=\frac{\mathbf{q}\cdot\mathbf{e}_{v}}{\|\mathbf{q}\|\|\mathbf{e}_{v}\|}$ and $s_{e}=\frac{\mathbf{q}\cdot\mathbf{e}_{e}}{\|\mathbf{q}\|\|\mathbf{e}_{e}\|}$. Next, we identify the most relevant nodes and edges for the query based on the corresponding similarity, to yield a set of ‘top-$k$ nodes/edges’.

The goal of G-retrieval is to retrieve the knowledge that encompasses as many relevant nodes and edges as possible, while keeping the size manageable. To this end, we leverage a ‘prize’ and ‘cost’ trade-off strategy to guide the retrieval process, as follows: (1) Prize assignment: based on the computed similarity scores, we assign prizes to nodes and edges to quantify their relevance to the query. Specifically, we assign the top-$k$ nodes/edges with descending prizes values from $k$ to 1, while nodes and edges outside the top-$k$ receive a prize of 0. Formally: $p_{v}=\max(0,k-\text{rank}(v)+1)$ and $p_{e}=\max(0,k-\text{rank}(e)+1)$. (2) Cost allocation: to manage the retrieved knowledge size, we assign penalties as cost $C_{e}$ (by default assign to 1) during the expansion of the retrieved paths or subgraphs. These prizes and costs will be used in the retrieval process, by aiming to maximize the prizes while minimizing costs.

Triplet-retrieval: the triplet retrieval approach retrieves a fixed number $k$ of triplets with the highest total prize assigned to their respective head entity, relation, and tail entities.

Path-retrieval: based on the defined prize assignment and cost allocation, the path-retrieval approach starts from a fix number of $k$ of high-prize nodes to construct sequences $\mathcal{P}=\{v_{1},e_{1},v_{2},\dots,e_{n-1},v_{n}\}$ by aiming to greedily maximize their scores: $S(\mathcal{P})=\sum_{i=1}^{n}p_{v_{i}}+\sum_{i=1}^{n-1}p_{e_{i}}-\sum_{i=1}^{n
-1}c_{e}$.
We use a priority queue to iteratively extend paths by selecting the highest-scoring extensions while avoiding cycles and adhering to maximum path length and quantity constraints. Finally, the top-scoring paths are sorted and returned. The details of path-retrieval can be found in Appendix A.6.

Sub-graph retrieval: the sub-graph retrieval approach also leverages the prize assignment and cost allocation; we follow He et al. () to optimize the process using Prize-Collecting Steiner Tree (PCST) algorithm. The PCST problem seeks to build a connected subgraph $\mathcal{S}$ that maximizes the total prizes of included nodes and edges while minimizing the total cost of the edges. The score of the subgraph is defined as $S(\mathcal{S})=\sum_{n\in V_{\mathcal{S}}}p_{v_{i}}+\sum_{e\in E_{\mathcal{S}}
}p_{e_{i}}-\sum_{e\in E_{\mathcal{S}}}c_{e}$. Unlike in path-retrieval, we only yield one subgraph that maximizes the total score.

### 4.2 Graph-guided generation (G-generator)

After retrieving $\mathcal{Z}^{*}$, the graph-guided generation phase focuses on learning to leverage this knowledge to generate the corresponding output to answer the user query. The generation is modeled as a sequential decision-making process as follows, where at each time step $t$, the next token $a_{t}$ is generated by G-Generator, conditioned on the query $q$, the retrieved knowledge $\mathcal{Z}^{*}$, and all previously generated tokens $a_{0:t-1}$.

$$ $p(a|q,\mathcal{Z}^{*})=\prod_{t=1}^{T}p_{\theta}\left(a_{t}|q,\mathcal{Z}^{*}, a_{0:t-1}\right)$ (2) $$

The model learns the parameters $\theta$ to maximize the likelihood of generating the correct output sequence by computing the probability distribution over possible next tokens at each time step. This ensures that the generated output not only considers the previously generated tokens but also the retrieved knowledge. The generation continues until a termination condition is met, such as generating an end-of-sequence token or reaching the maximum sequence length $T$.

## 5 Experiments

### 5.1 RQ1: Main Results - Can KGs Reduce Hallucination in LLMs?

To explore whether KGs can help reduce hallucination in LLMs, we benchmark the LLMs in different settings. We use zero-shot and few-shot prompting as baselines without injecting external knowledge. In addition, compared to adding external knowledge from KGs, we also consider leveraging LLMs’ internal knowledge to do Chain-of-thought (Kim et al., ), or self-consistency (Wang et al., ) prompting as baselines. As for LLMs augmented with KGs, we consider three KG retrieval forms: triplets, paths, and subgraphs (as shown in Figure 2) for comparison, to study the impact of G-retrieval for reducing LLMs’ hallucinations. The results can be found in Table 2 and Figure 3. We obtain some intriguing findings:

**Table 2: Comparison results of various forms of information extracted from the KGs.**
| Models | G-Eval | Hallucination |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Context Relevance | Comprehensiveness | Correctness | Empowerment | SAFE | FActScore |  |
| Baseline: Without External Knowledge (Zero-shot prompting) |  |  |  |  |  |  |
| GPT-4o | $68.12\%\pm 0.88\%$ | $65.41\%\pm 0.79\%$ | $60.41\%\pm 0.38\%$ | $62.41\%\pm 0.84\%$ | $82.47\%\pm 0.62\%$ | $55.34\%\pm 0.93\%$ |
| GPT-4o-mini | $63.21\%\pm 0.49\%$ | $60.11\%\pm 0.47\%$ | $55.43\%\pm 0.63\%$ | $58.72\%\pm 0.62\%$ | $80.14\%\pm 0.89\%$ | $50.23\%\pm 1.01\%$ |
| llama-3.1-8b-instruct | $57.12\%\pm 0.91\%$ | $54.74\%\pm 1.20\%$ | $49.01\%\pm 0.61\%$ | $52.21\%\pm 0.71\%$ | $79.33\%\pm 0.91\%$ | $45.14\%\pm 0.32\%$ |
| mistral-7B-Instruct-v0.3 | $55.71\%\pm 1.21\%$ | $52.00\%\pm 1.31\%$ | $47.03\%\pm 0.94\%$ | $50.13\%\pm 1.04\%$ | $78.27\%\pm 0.83\%$ | $44.37\%\pm 1.23\%$ |
| gemma-2-9b-it | $53.63\%\pm 1.33\%$ | $50.00\%\pm 1.33\%$ | $45.72\%\pm 0.71\%$ | $48.15\%\pm 0.93\%$ | $77.11\%\pm 0.78\%$ | $40.94\%\pm 0.83\%$ |
| Baseline: Without External Knowledge (4-shot prompting) |  |  |  |  |  |  |
| GPT-4o | $70.61\%\pm 0.62\%$ | $67.43\%\pm 0.81\%$ | $62.33\%\pm 0.37\%$ | $64.51\%\pm 0.12\%$ | $83.39\%\pm 0.53\%$ | $57.45\%\pm 0.78\%$ |
| GPT-4o-mini | $65.53\%\pm 0.94\%$ | $62.33\%\pm 1.03\%$ | $57.23\%\pm 0.68\%$ | $60.47\%\pm 0.83\%$ | $81.62\%\pm 0.69\%$ | $52.34\%\pm 0.76\%$ |
| llama-3.1-8b-instruct | $59.43\%\pm 0.32\%$ | $56.31\%\pm 0.78\%$ | $51.27\%\pm 0.32\%$ | $54.33\%\pm 0.41\%$ | $80.27\%\pm 0.78\%$ | $47.24\%\pm 1.03\%$ |
| mistral-7B-Instruct-v0.3 | $57.34\%\pm 1.04\%$ | $54.13\%\pm 1.31\%$ | $49.27\%\pm 0.84\%$ | $52.46\%\pm 0.94\%$ | $79.12\%\pm 0.87\%$ | $45.13\%\pm 1.42\%$ |
| gemma-2-9b-it | $55.24\%\pm 1.49\%$ | $52.27\%\pm 1.21\%$ | $47.14\%\pm 0.36\%$ | $50.36\%\pm 0.51\%$ | $78.00\%\pm 0.77\%$ | $44.32\%\pm 1.58\%$ |
| Var-1: With CoT Prompting |  |  |  |  |  |  |
| GPT-4o - CoT | $72.76\%\pm 0.92\%$ | $69.56\%\pm 0.74\%$ | $64.48\%\pm 0.63\%$ | $66.69\%\pm 0.69\%$ | $80.07\%\pm 0.83\%$ | $54.30\%\pm 0.87\%$ |
| GPT-4o - CoT+SC | $75.81\%\pm 0.65\%$ | $71.62\%\pm 0.74\%$ | $66.55\%\pm 0.75\%$ | $68.74\%\pm 0.15\%$ | $79.03\%\pm 0.48\%$ | $53.23\%\pm 0.78\%$ |
| llama-3.1-8b-instruct - CoT | $61.54\%\pm 0.95\%$ | $58.35\%\pm 1.05\%$ | $53.31\%\pm 0.71\%$ | $56.42\%\pm 0.83\%$ | $77.07\%\pm 0.85\%$ | $46.15\%\pm 0.54\%$ |
| llama-3.1-8b-instruct - CoT+SC | $63.69\%\pm 0.32\%$ | $60.44\%\pm 0.59\%$ | $55.46\%\pm 0.52\%$ | $58.53\%\pm 1.11\%$ | $76.00\%\pm 0.63\%$ | $45.05\%\pm 0.97\%$ |
| mistral-7B-Instruct-v0.3 - CoT | $59.58\%\pm 0.43\%$ | $56.23\%\pm 2.31\%$ | $51.28\%\pm 1.31\%$ | $54.33\%\pm 0.72\%$ | $75.04\%\pm 0.95\%$ | $43.03\%\pm 1.03\%$ |
| mistral-7B-Instruct-v0.3 - CoT+SC | $61.35\%\pm 0.93\%$ | $58.33\%\pm 1.02\%$ | $53.42\%\pm 0.79\%$ | $56.47\%\pm 0.85\%$ | $74.30\%\pm 0.21\%$ | $42.00\%\pm 0.29\%$ |
| gemma-2-9b-it - CoT | $57.34\%\pm 1.05\%$ | $54.12\%\pm 0.32\%$ | $49.27\%\pm 0.85\%$ | $52.12\%\pm 0.95\%$ | $72.07\%\pm 1.05\%$ | $40.13\%\pm 0.49\%$ |
| gemma-2-9b-it - CoT+SC | $59.42\%\pm 0.27\%$ | $56.27\%\pm 0.84\%$ | $51.34\%\pm 1.42\%$ | $54.34\%\pm 1.31\%$ | $71.09\%\pm 0.43\%$ | $39.85\%\pm 1.03\%$ |
| Var-2: With Triplets Extracted from KGs Provided |  |  |  |  |  |  |
| GPT-4o | $74.62\%\pm 0.65\%$ | $70.44\%\pm 0.79\%$ | $65.37\%\pm 0.72\%$ | $67.12\%\pm 0.71\%$ | $89.20\%\pm 1.42\%$ | $72.53\%\pm 0.83\%$ |
| GPT-4o-mini | $69.50\%\pm 0.81\%$ | $65.03\%\pm 0.92\%$ | $60.21\%\pm 0.65\%$ | $63.43\%\pm 1.01\%$ | $87.52\%\pm 0.34\%$ | $67.73\%\pm 0.95\%$ |
| llama-3.1-8b-instruct | $63.45\%\pm 1.13\%$ | $59.33\%\pm 1.05\%$ | $54.23\%\pm 0.75\%$ | $57.33\%\pm 0.12\%$ | $85.37\%\pm 0.72\%$ | $62.37\%\pm 0.82\%$ |
| mistral-7B-Instruct-v0.3 | $61.34\%\pm 0.31\%$ | $57.21\%\pm 0.89\%$ | $52.29\%\pm 0.32\%$ | $55.12\%\pm 0.43\%$ | $84.21\%\pm 0.84\%$ | $60.28\%\pm 1.05\%$ |
| gemma-2-9b-it | $59.25\%\pm 1.06\%$ | $55.29\%\pm 0.44\%$ | $50.15\%\pm 0.85\%$ | $53.73\%\pm 0.95\%$ | $83.18\%\pm 0.43\%$ | $58.13\%\pm 0.91\%$ |
| GPT-4o - CoT+SC | $76.71\%\pm 0.53\%$ | $72.34\%\pm 0.21\%$ | $67.33\%\pm 1.31\%$ | $69.64\%\pm 0.33\%$ | $88.11\%\pm 0.57\%$ | $71.45\%\pm 0.53\%$ |
| Var-3: With Paths Extracted from KGs Provided |  |  |  |  |  |  |
| GPT-4o | $78.71\%\pm 0.53\%$ | $74.53\%\pm 0.31\%$ | $69.42\%\pm 0.23\%$ | $71.63\%\pm 0.61\%$ | $90.20\%\pm 0.59\%$ | $75.61\%\pm 0.51\%$ |
| GPT-4o-mini | $73.64\%\pm 0.93\%$ | $69.41\%\pm 0.22\%$ | $64.35\%\pm 0.72\%$ | $67.52\%\pm 0.82\%$ | $88.22\%\pm 0.34\%$ | $70.53\%\pm 0.24\%$ |
| llama-3.1-8b-instruct | $67.51\%\pm 0.46\%$ | $63.62\%\pm 1.39\%$ | $58.41\%\pm 0.93\%$ | $61.57\%\pm 0.94\%$ | $86.33\%\pm 0.94\%$ | $65.42\%\pm 0.95\%$ |
| mistral-7B-Instruct-v0.3 | $65.48\%\pm 0.94\%$ | $61.37\%\pm 1.01\%$ | $56.34\%\pm 0.23\%$ | $59.45\%\pm 0.43\%$ | $85.26\%\pm 0.85\%$ | $63.31\%\pm 1.33\%$ |
| gemma-2-9b-it | $63.35\%\pm 1.37\%$ | $59.23\%\pm 0.91\%$ | $54.31\%\pm 0.91\%$ | $57.41\%\pm 0.27\%$ | $84.13\%\pm 0.21\%$ | $61.23\%\pm 1.04\%$ |
| GPT-4o - CoT+SC | $80.87\%\pm 0.42\%$ | $76.60\%\pm 0.65\%$ | $71.54\%\pm 0.53\%$ | $73.79\%\pm 1.21\%$ | $89.11\%\pm 0.63\%$ | $74.53\%\pm 0.24\%$ |
| Var-4: With Subgraphs Extracted from KGs Provided |  |  |  |  |  |  |
| GPT-4o | $80.81\%\pm 0.43\%$ | $76.63\%\pm 0.65\%$ | $71.57\%\pm 0.51\%$ | $73.70\%\pm 0.62\%$ | $90.83\%\pm 0.63\%$ | $75.33\%\pm 0.29\%$ |
| GPT-4o-mini | $75.70\%\pm 0.44\%$ | $71.51\%\pm 0.83\%$ | $66.43\%\pm 0.76\%$ | $69.60\%\pm 0.65\%$ | $88.71\%\pm 0.72\%$ | $70.12\%\pm 0.87\%$ |
| llama-3.1-8b-instruct | $69.61\%\pm 0.84\%$ | $65.45\%\pm 0.93\%$ | $60.41\%\pm 0.65\%$ | $63.42\%\pm 0.45\%$ | $86.12\%\pm 0.35\%$ | $65.44\%\pm 0.87\%$ |
| mistral-7B-Instruct-v0.3 | $67.55\%\pm 0.87\%$ | $63.35\%\pm 0.43\%$ | $58.37\%\pm 0.71\%$ | $61.45\%\pm 0.32\%$ | $85.21\%\pm 0.81\%$ | $63.12\%\pm 0.94\%$ |
| gemma-2-9b-it | $65.45\%\pm 0.95\%$ | $61.23\%\pm 1.0\%$ | $56.31\%\pm 0.35\%$ | $59.40\%\pm 0.85\%$ | $84.51\%\pm 0.99\%$ | $63.74\%\pm 0.49\%$ |
| GPT-4o - CoT+SC | $82.90\%\pm 0.57\%$ | $78.72\%\pm 0.61\%$ | $73.64\%\pm 0.43\%$ | $75.80\%\pm 0.75\%$ | $89.12\%\pm 0.94\%$ | $75.42\%\pm 1.31\%$ |

Retrieving KG information can indeed mitigate factual errors in the responses.
Methods integrating knowledge extracted from KGs show clear improvements in factual accuracy and comprehension scores compared to the baselines. For example, under Var-2 (triplet retrieval), GPT-4o achieves a FActScore of 72.55% $\pm$ 0.85%, which is a significant increase over the baseline score of 55.35% $\pm$0.95%. Moreover, these methods can be combined with strategies like CoT+SC, enhancing response quality with minimal increase in hallucination ratio. The radar chart in Figure 3 further emphasizes that in most query types, integrating knowledge retrieved from KGs mitigates the hallucination issue compared to baselines, particularly in query types such as “Evaluation and Reflection," “Outcome Prediction," and “Cause Explanation," which require more reasoning and analysis rather than merely listing information. The findings also apply to open-source models like mistral-7B-Instruct-v0.3 and Llama-3.1-8B-instruct, illustrating the consistency of reliability of integrating KGs in LLM reasoning.

Figure: Figure 3: Comparison results of different forms of information over different queries.
Refer to caption: extracted/5917084/figures/radar_chart_combined.png

Directly performing reasoning in the LLM itself does not mitigate hallucinations.
We benchmark the hallucination ratio of LLMs using internal reasoning strategies like Chain-of-thought and Self-consistency, as shown in Var-1 in Table 2. It shows that these methods can indeed improve response quality (i.e., correctness, comprehensiveness and empowerment) compared to baselines, but do not consistently improve factuality, and sometimes even diminish factuality. This showcases that relying solely on internal reasoning does not mitigate hallucination, emphasizing the importance of external knowledge to counter the hallucination issue.

Subgraph retrieval generally achieves best performance across different query types, especially for simpler queries.
We demonstrate the performance of different retrieval methods across different query types in Figure 3, showing that subgraphs generally achieve best performance. Especially for simpler queries (“Character Description" and “Event Description" which generally don’t require intensive reasoning), subgraph retrieval methods achieves better performance compared to paths and triplets. Even for queries like “Relationship Explanation" and “Cause Explanation" which require step-wise reasoning, subgraph methods still demonstrate promising performance.
This suggests that while different forms of retrieved knowledge each offer unique benefits suitable for specific types of queries, subgraphs provide consistently good performance broadly.

### 5.2 RQ2: How Are KG-Aware Methods Affected by Noise / Perturbations in KGs?

We benchmark different KG-augmented LLMs on our OKGQA-P setting, where we deliberately perturb and contaminate the semantics and structure of KGs to simulate the real-world situation where KGs may not have high quality. Specifically, we consider different perturbation methods discussed in Section 3.2 and control the perturbation level based on the percentage of KG edges being perturbed. We first illustrate how much the perturbed KG has been deviated from the original KG with the increase of perturbation level, shown in Figure 4.

Figure: (a) Edge Deletion
Refer to caption: extracted/5917084/figures/ED_perturb_metrics.png

It shows that the perturbation methods like edge deletion, rewiring and swapping have relatively weak influence on ATS (which intuitively measures semantic similarity), even as the perturbation level increases. For the edge deletion methods, only if the perturbation level reaches 1.0, the ATS goes to 0, otherwise, the ATS is very high. Relation replacement has a relatively strong impact on ATS, i.e., on the semantics of the perturbed KGs. For SC2D and SD2 (which intuitively measure structural similarity), the four methods show similar levels of decrease in most cases.

Figure: (a) Edge Deletion
Refer to caption: extracted/5917084/figures/ED_perturb_hallucination.png

Figure 5 illustrates the hallucination ratio using different methods on the perturbed KGs. We observe that (1) FS-SG consistently outperforms FS-T and FS-P even at higher perturbation levels, demonstrating its robustness by maintaining higher scores as perturbations increase. (2) FS-T and FS-P exhibit similar trends, each showing a significant performance drop as perturbation levels increase. Particularly, performance of FS-T and FS-P deteriorate when the perturbation level reaches 50%, i.e., becoming worse than the baseline using CoT. (3) On the setting using Relation Replacement which severely harms the semantics of the KGs, FS-T and FS-P decline more sharply than FS-SG. However, it still outperforms the baseline when the perturbation level is smaller than 40%.

In conclusion, our study demonstrates that leveraging external knowledge from KGs can effectively reduce hallucinations in LLMs, even when KGs are contaminated to a certain degree. In real-world applications, KGs such as Wikidata and unlikely to experience severe perturbations due to their continuous updates and community-driven quality control, making our findings applicable in most real-world scenarios.

## 6 Conclusion

In this paper, we present OKGQA, a benchmark tailored for evaluating LLMs enhanced with KGs under open-ended, real-world question answering scenarios. The benchmark extends the assessment from close-ended question answering to the open-ended setting, to support the assessment of hallucination in LLMs. To further mimic real-world scenarios where KGs may not have high quality, we propose another experiment setup OKGQA-P to assess model performance under conditions where KG’s semantics and structure are deliberately perturbed and contaminated. We conduct a series of experiments on OKGQA and OKGQA-P, analyzing the effectiveness of various retrieval methods and LLMs of different magnitudes, providing insights for further research and development. Our results underscore the significance of integrating KGs with LLMs to help reduce hallucination of LLMs, even in circumstances where the KGs are contaminated.

## Appendix A Appendix

### A.1 Prompt List

In this section, we present all the prompts required for the main experiments. To enhance clarity, we provide only one example in the prompt labeled as Example 1; the other few-shot examples utilized are labeled as Other In-Context Few-shots within the prompt.

#### A.1.1 Knowledge-Augmented Language Model Prompting

System Instruction:
“You are a helpful assistant designed to answer the users’ open-ended questions. Your task is to provide accurate, concise, and useful information to foster understanding and solve problems. Whether the questions relate to complex scientific concepts, historical events, practical advice, or everyday life, your goal is to assist by offering thoughtful and informative responses."

Example 1:

Question: How do you think blockchain technology can be applied to secure online voting systems? Please provide specific suggestions?

Below are the facts that might be relevant to answer the question:
(’Bitcoin’, ’wikiPageWikiLink’, ’Bill_Gates’), (’Bitcoin’, ’wikiPageWikiLink’, ’Non-fungible_token’), (’Decentralized_application’, ’wikiPageWikiLink’, ’Cardano_(blockchain_platform)’), (’Non-fungible_token’, ’wikiPageWikiLink’, ’Decentralized_application’), (’Hyperledger’, ’wikiPageWikiLink’, ’Blockchain’), (’Blockchain’, ’implementations’, ’Bitcoin’), (’Blockchain’, ’currencyName’, ’Litecoin’), (’Thing’, ’type’, ’Privacy_and_blockchain’), (’Thing’, ’type’, ’Saraju_Mohanty’), (’Thing’, ’type’, ’Blockchain’), (’Thing’, ’type’, ’Satoshi_Nakamoto’), (’Thing’, ’type’, ’Pseudonym’), (’Thing’, ’type’, ’Metaverse’), (’Thing’, ’type’, ’PricewaterhouseCoopers’)

Answer:
Blockchain technology can significantly enhance the security of online voting systems through its decentralized, transparent, and immutable nature. By distributing data across multiple nodes, blockchain eliminates single points of failure, reducing the risk of hacking or vote tampering. The system allows for verifiable, yet anonymous, vote recording through cryptographic methods, ensuring voter privacy while preventing fraud such as double voting. Additionally, once recorded, votes cannot be altered, safeguarding election integrity. Smart contracts can further automate the voting process, enabling instant and accurate tallying, while the system’s resilience to cyberattacks like DDoS ensures uninterrupted functionality.

Other In-Context Few-shots

Question: {Question}

Below are the facts that might be relevant to answer the question: {Retrieved-knowledge}

Answer:

#### A.1.2 OKGQA Query Generation Prompting

System Instruction:
Generate open-ended questions about different types: character description, event description, cause explanation, relationship explanation, trend prediction, outcome prediction, contrast analysis, historical comparison, evaluation and reflection, and application and practice.

Some templates are provided below:
character description: describe a [person]’s significant contributions during their career. Example: Please describe Albert Einstein’s contributions to the field of physics.
event description: Provide a detailed description of the background and course of an [event]. Example: Please provide a detailed description of the background and course of the French Revolution.
cause explanation: Why did [person] take [action] at [time]? Example: Why did Nixon choose to resign from the presidency in 1974?
relationship explanation: Explain the relationship between [entity A] and [entity B] and its significance. Example: Explain the relationship between Alexander the Great and Aristotle and its significance.
trend prediction: Based on the historical behavior of [entity], what do you think it might do in the future? Example: Based on Tesla’s historical behavior, in which fields do you think it might innovate in the future?
outcome prediction: Based on the current situation, how do you predict [event] will develop? Example: Based on the current international situation, how do you predict climate change policies will develop?
contrast analysis: Compare and contrast the similarities and differences between [entity A] and [entity B] in [aspect]. Example: Compare and contrast the leadership styles of Steve Jobs and Bill Gates.
historical comparison: Compare the impact of [historical event A] and [historical event B]. Example: Compare the impact of World War I and World War II on the global order
evaluation and reflection: How do you evaluate the impact of [person/event] on [field]? Please explain your viewpoint. Example: How do you evaluate Martin Luther King’s impact on the civil rights movement? Please explain your viewpoint.
application and practice: How do you think [theory/method] can be applied to [practical issue]? Please provide specific suggestions. Example: How do you think machine learning technology can be applied to medical diagnostics? Please provide specific suggestions.
Generate the questions, the type of the questions, the placeholders, the naturalness of your generated questions (choose from high, medium, and unnatural), the difficulty of the generated questions (choose from hard, medium and easy) and dbpedia_entities (link the placeholders to dbpedia entities) in JSON format.

Other In-Context Few-shots

Generation:

### A.2 Prompts for Instruction Tuner

Act as an "Instruction Tuner" for the LLM, you will be given the inputs: (1) the {Current Instruction} used to guide the LLMs’s evaluation, including specific examples with ground truth labels; (2) {Current Errors} that emerged with this instruction was applied to the dataset.

The current errors are presented in the following format: (1) INPUT: {input text} (2) PREDICTED OUTPUT: {predicted label}, (3) EXPECTED OUTPUT: {ground truth label}. Carefully analyze these errors and craft a revised concise instruction for the LLM to fit the expected outputs. Include 2-3 examples at the end of your response to demonstrate how the new instruction would be applied.

### A.3 Metrics Prompt for G-eval

System Instruction: “You are a helpful assistant designed to evaluate the quality of the response to a query. Your task is to rate the response on one metric defined as below:"

Empowerment Criteria:
Evaluate whether the ‘Actual Output’ can help the reader understand the topic and make informed decisions regarding the ‘Input’. A response with high empowerment provides accurate information and explanations that enhance the reader’s understanding. When evaluating empowerment, consider the relevance of the information provided in the ‘Actual Output’ to the ’Input’ and the ’Retrieval Context’.

Comprehensiveness Criteria: Evalute the extent to which the ’Actual Output’ covers all aspects and details of the question ’Input’. A comprehensive answer should thoroughly address every part of the question, leaving no important points unaddressed. When evaluating comprehensiveness, consider the relevance of the information provided in the ’Actual Output’ to the ’Input’ and the ’Retrieval Context’.

Correctness Criteria: Measure how clearly and specifically the ’Actual output’ responds to the question ’input’. A highly direct response stays focused on the question, providing clear and unambiguous information. When evaluating correctness, consider the relevance of the information provided in the ’Actual Output’ to the ’Input’ and the ’Retrieval Context’.

Context Relevance Criteria: Evaluate the extent to which the ’Actual output’ incorporates relevant information from the ’Retrieval Context’. This includes assessing whether the output adheres to the thematic, factual, and situational specifics presented in the ’Retrieval Context’. Relevant responses not only address the direct query but also align closely with the contextual elements provided, ensuring a seamless and coherent transition between the ’Retrieval Context’ and the ’Actual Output’. The most contextually relevant responses demonstrate an understanding and appropriate reflection of the given circumstances, historical facts, or conceptual background, thereby contributing to the overall accuracy and utility of the information provided.

### A.4 Query Construction

In this section, we discuss the details of the query construction of OKGQA. It follows a template-based method with LLMs to generate a diverse range of queries. To ensure that the generated queries accurately represent real-world scenarios and complexities, we integrate the corresponding Wikipedia pages of each entity as contextual information for the LLMs’ generation. Furthermore, we follow a human-in-the-loop process to optimize the instruction used for generation, as shown in Figure 6. Intuitively, starting with an initial instruction, we generate a large number of query candidates, then use an LLM as automatic evaluator to evaluate the quality of the query, denoted as a set of scores from different metrics $s_{\text{auto}}$ ranging from 1 to 10, with higher scores indicating better performance. Then, these queries are manually evaluated and assign a set of human-label score $s_{\text{human}}$ correspond to $s_{\text{auto}}$, normalized as the same range as $s_{\text{auto}}$.We then optimize the input instructions by iteratively generate instructions to minimize the gap between $s_{\text{human}}$ and $s_{\text{auto}}$. This process is quite mimic the way of reinforcement learning with human feedback (RLHF) (Ouyang et al., ) and inherits the benefit that labeling the reward or penalty of the LLMs’ output is much easier than labeling the output directly.

Figure: Figure 6: Process of human-in-the-loop of query construction.
Refer to caption: x3.png

Specifically, we consider five angles to measure the quality of the generated queries: (1) Naturalness: assessing how fluid and human-like the query sounds; (2) Relevance: measuring whether the query pertains directly to the entity and the context provided; (3) Specificity: determining the level of detail and granularity included in the query, ensuring it is not too broad or vague; (4) Novelty: evaluating the uniqueness of the query, ensuring it is not just a repetitive or common question; (5) Actionability: gauging whether the query prompts clear, definite answers or actions that are feasible within the given context. Each of these angles contributes to a holistic evaluation of the query’s effectiveness and relevance in real-world applications.

### A.5 Personalized PageRank (PPR)

In this section, we discuss the details of the PPR algorithm used in Section 1 to prune the graph from DBPedia and concentrate on nodes most pertinent to the central nodes of interest. The PPR is calculated using the iterative formula:

$$ $\mathbf{p}=\alpha\mathbf{A}^{\top}\mathbf{p}+(1-\alpha)\mathbf{s},$ (3) $$

where $\mathbf{p}\in\mathbb{R}^{n}$ is the PPR vector representing the relevance scores of $n$ nodes in the graph. $\alpha$ is the damping factor controlling the probability of continuing the random walk versus restarting from the personalization vector. $\mathbf{A}^{\top}$ is the transpose of the column-normalized adjacency matrix $\mathbf{A}$ of the graph, representing transition probabilities between nodes. $\mathbf{s}\in\mathbb{R}^{n}$ is the personalization vector, where we assign a value of 1 to the central nodes and 0 to all other nodes to emphasize their importance. To ensure convergence and computational efficiency, we set a tolerance parameter $\text{tol}=1\times 10^{-6}$ and a maximum iteration limit $\text{max_iter}=100$. After computing the PPR vector $\mathbf{p}$, we apply a threshold of $1\times 10^{-5}$ to prune the graph. Nodes with PPR scores below this threshold are considered insignificant with respect to the central nodes and are thus removed. This process effectively filters out less relevant nodes, resulting in a pruned graph that highlights the most significant relationships and structures pertinent to our analysis.

### A.6 Prize-Cost-based Path Retrieval

The path-retrieval method is designed to construct and evaluate paths in a graph based on predefined prize assignments and cost allocations. The objective is to form sequences of nodes and edges, represented as $\mathcal{P}=\{v_{1},e_{1},v_{2},\dots,e_{n-1},v_{n}\}$, that maximize the overall score and minimize the costs.
To efficiently manage the exploration of potential paths, we utilizes a priority queue, a data structure that allows paths to be organized based on their scores, ensuring that the highest-scoring paths are processed first.
The method starts by picking a number of starting nodes with high prizes. We then expand these starting points by exploring neighboring nodes. For each neighbor, the method calculates a new score. This score is the sum of the neighbor’s prize and the edge’s prize minus the edge’s cost. If this neighbor hasn’t been visited before, which helps avoid looping, the algorithm adds this neighbor to the path. This new path is then added to the priority queue. This expansion keeps going until the path reaches a maximum length or can’t be extended further. The algorithm keeps track of paths already explored to avoid repetition and ensure paths don’t loop back on themselves. When no more paths can be added or the priority queue is empty, the algorithm sorts the paths by their scores from highest to lowest.

### A.7 KG Similarity Metrics

To measure how much the perturbed KGs are deviated from the original KG used in Section 3. We re-present the according metrics from (Raman et al., ) below:

Aggregated Triple Score (ATS)
ATS measures semantic similarity between two KGs. Let $s_{\mathcal{G}}$ be an edge (triple) scoring function, such that $s_{\mathcal{G}}(e_{1},r,e_{2})$ measures how likely edge $(e_{1},r,e_{2})$ is to exist in $\mathcal{G}$. Also, assume $s_{\mathcal{G}}$ has been pre-trained on $\mathcal{G}$ for link prediction. Then, ATS is defined as $f_{\text{ATS}}(\mathcal{G},\mathcal{G}^{{}^{\prime}})=\frac{1}{|\mathcal{T}^{{
}^{\prime}}|}\sum_{(e_{1},r,e_{2})\in\mathcal{T}^{{}^{\prime}}}s_{\mathcal{G}}
(e_{1},r,e_{2})\in[0,1]$, which denotes the mean $s_{\mathcal{G}}$ score across all edges in $\mathcal{G^{\prime}}$. Intuitively, if a high percentage of edges in $\mathcal{G^{\prime}}$ are also likely to exist in $\mathcal{G}$ (i.e., high ATS), then we say that $\mathcal{G^{\prime}}$ and $\mathcal{G}$ have high semantic similarity. $s_{\mathcal{G}}$ is task-specific, as KGs from different tasks may differ greatly in semantics. We use the $s_{\mathcal{G}}$ from (Li et al., ); While ATS captures semantic KG differences, it is not sensitive to KG connectivity structure. Note that $f_{\text{ATS}}(\mathcal{G},\mathcal{G})$ may not equal 1, since $s_{\mathcal{G}}$ may not perfectly generalize to KGs beyond those it was trained on.

Similarity in Clustering Coefficient Distribution (SC2D)
SC2D measures structural similarity between two KGs and is derived from the local clustering coefficient (Saramäki et al., ; Onnela et al., ; Fagiolo, ). For a given entity in $\mathcal{G}$ (treated here as undirected), the local clustering coefficient is the fraction of possible triangles through the entity that exist (i.e., how tightly the entity’s neighbors cluster around it). For entity $e_{i}\in\mathcal{E}$, the local clustering coefficient is defined as $c_{i}=2\text{Tri}(e_{i})/(\text{deg}(e_{i})(\text{deg}(e_{i})-1))$, where $\text{Tri}(e_{i})$ is the number of triangles through $e_{i}$, and $\text{deg}(e_{i})$ is the degree of $e_{i}$. For each relation $r\in\mathcal{R}$, let $\mathcal{G}^{r}$ be the subgraph of $\mathcal{G}$ consisting of all edges in $\mathcal{T}$ with $r$ . That is, $\mathcal{G}^{r}=(\mathcal{E},r,\mathcal{T}^{{}^{\prime}})$, where $\mathcal{T}^{{}^{\prime}}=\{(e,r,e^{\prime})\hskip 2.84526pt|\hskip 2.84526pte
,e^{\prime}\in\mathcal{E}\}$. Let $\mathbf{c}^{r}$ denote the $|\mathcal{E}|$-dimensional clustering coefficient vector for $\mathcal{G}^{r}$, where the $i$th element of $\mathbf{c}^{r}$ is $c_{i}$. Then, the mean clustering coefficient vectors for $\mathcal{G}$ and $\mathcal{G}^{\prime}$ are $\mathbf{c}_{o}=\frac{1}{|\mathcal{R}|}\sum_{r\in\mathcal{R}}\mathbf{c}^{r}$ and $\mathbf{c}_{p}=\frac{1}{|\mathcal{R}^{\prime}|}\sum_{r\in\mathcal{R}^{\prime}}
\mathbf{c}^{r}$, respectively. SC2D is defined as $f_{\text{SC2D}}(\mathcal{G},\mathcal{G}^{{}^{\prime}})=1-\frac{\lVert\mathbf{c
}_{o}-\mathbf{c}_{p}\rVert_{2}}{\lVert\mathbf{c}_{o}-\mathbf{c}_{p}\rVert_{2}+
1}\in[0,1]$, with higher value indicating higher similarity.

Similarity in Degree Distribution (SD2)
SD2 also measures structural similarity between two KGs, while addressing SC2D’s ineffectiveness when the KGs’ entities have tiny local clustering coefficients (e.g., the item KG used by recommender systems is roughly bipartite). In such cases, SC2D is always close to one regardless of perturbation method, thus rendering SC2D useless. Let $\mathbf{d}^{r}$ denote the $|\mathcal{E}|$-dimensional degree vector for $\mathcal{G}^{r}$, where the $i$th element of $\mathbf{d}^{r}$ is $\text{deg}(e_{i})$. Then, the mean degree vectors for $\mathcal{G}$ and $\mathcal{G}^{\prime}$ are $\mathbf{d}_{o}=\frac{1}{|\mathcal{R}|}\sum_{r\in\mathcal{R}}\mathbf{d}^{r}$ and $\mathbf{d}_{p}=\frac{1}{|\mathcal{R}^{\prime}|}\sum_{r\in\mathcal{R}^{\prime}}
\mathbf{d}^{r}$, respectively. SD2 is defined as $f_{\text{SD2}}(\mathcal{G},\mathcal{G}^{{}^{\prime}})=1-\frac{\lVert\mathbf{d}
_{o}-\mathbf{d}_{p}\rVert_{2}}{\lVert\mathbf{d}_{o}-\mathbf{d}_{p}\rVert_{2}+1
}\in[0,1]$, with higher value indicating higher similarity.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 5
presentation: 2
questions: 1. How representative are the synthesized queries of actual real-world questions? What methods were employed to ensure that their complexity and distribution are realistic?

2. How many evaluators participated in the manual assessment of query naturalness, and what criteria were used for this human evaluation to ensure a standardized evaluation?

3. What is the correlation between the LLM's automatic evaluations and human judgments of query quality? How were discrepancies between the automatic scores (s_auto) and manual scores (s_human) addressed during the evaluation process?

4. Were different values of 'k' for hops around question entities considered to test the robustness of model responses in relation to variations in graph size and structure?

5. Can the authors provide a more detailed breakdown of performance across the different query types, specifically how various perturbation methods affected certain query types?

6. In section 4.2, it is unclear how the retrieved structured knowledge is integrated into the PLM. In particular, what are the differences in final sequence length across different forms of information (this can be essential for managing the LLM inference costs)?

7. Please explain why, in certain query categories (such as "evaluation and reflection"), the knowledge-augmented methods result in degraded performance compared to the baseline.
soundness: 3
strengths: 1. The introduction of OKGQA as a novel benchmark can address a current research gap in assessing LLMs in open-ended, real-world scenarios.
2. The perturbed benchmark, OKGQA-P, allows for the evaluation of LLM robustness in response to inaccuracies or noises in KGs.  
3. The comprehensive and well-organized experimental results across different forms of information and different types of queries show the effectiveness of the proposed methods and can provide valuable insights for future researchers.
summary: This paper introduces OKGQA, a benchmark designed to assess the trustworthiness of LLMs augmented with KGs in open-ended QA scenarios. It also includes a perturbed version (OKGQA-P) with various KG perturbations to test the resilience of LLMs against 
inaccuracies in KG knowledge. The proposed methodology expands RAG and integrates two main processes: G-retrieval and G-generator, for utilizing KG knowledge in different forms (like triplets, paths, or subgraphs).  The study tests these models across 850 queries spanning 10 categories, utilizing metrics like FActScore and SAFE to gauge the reduction of hallucinations in model outputs.
weaknesses: 1. The proposed methodology of G-retrieval and G-generator is similar to the existing line of work on RAG and KG-augmented generation [1]. However, there is a lack of comparison to demonstrate how these proposed methods fundamentally differ from previous methods applied to closed-end QA.
2. The queries are generated using predefined templates with LLMs, which raises concerns about their ability to authentically represent the distribution and complexity of real-world questions.
3. The proposed OKGQA-P supports only four types of perturbation heuristics, which require further explanation on how they sufficiently cover the inaccuracies in knowledge graphs for real-world applications.
4. Lack of evaluation on how improvements in reducing hallucination relate to the retrieved KG knowledge.


[1] Pan, Shirui, Linhao Luo, Yufei Wang, Chen Chen, Jiapu Wang, and Xindong Wu. "Unifying large language models and knowledge graphs: A roadmap." IEEE Transactions on Knowledge and Data Engineering (2024).

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: In section 3.2, the paper mentions that ''…we introduce perturbations to edges in the KG to degrade the quality of the KGs, diminishing human comprehensibility.'', why human comprehensibility is diminished?
soundness: 2
strengths: 1. The effectiveness of different retrieval methods in conjunction with LLMs is analyzed in experiments that provide insights into the combination of KGs and LLMs.
summary: The key innovation is the introduction of benchmarks, OKGQA, for evaluating LLMs augmented with KGs in real-world QA scenarios. The second experiment, designated OKGQA-P, is intended to assess the efficacy of the model in the context of a scenario wherein the semantics and structure of the knowledge graph are disrupted and compromised.
weaknesses: 1. The unique contributions of the OKGQA benchmark are insufficiently defined, and the distinctions between OKGQA and existing benchmarks are not clearly articulated.
2. While the paper references several closed-ended elements from related literature, it lacks a thorough discussion of limitations and practical implications.
3. The question of whether KGs can reduce hallucinations in LLMs is widely recognized as affirmative, given the effectiveness of RAG techniques in mitigating hallucination issues.  However, what is pertinent to this paper is an exploration of whether KGs can further reduce hallucinations in scenarios with open-endedness.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: nan
soundness: 3
strengths: This paper addresses a significant research question of whether knowledge graphs (KGs) can make large language models (LLMs) more reliable in open-ended question answering. This paper  designed a new benchmark, OKGQA, specifically for assessing LLMs enhanced with KGs in open-ended, real-world question answering scenarios.
By proposing the OKGQA-P experimental setup, this paper considers scenarios where KGs may have varying levels of errors, further simulating real-world situations where KGs' quality can be inconsistent
This paper conducted a series of experiments on OKGQA and OKGQA-P, analyzing the effectiveness of various retrieval methods and LLMs of different scales.
summary: This paper focuses on testing whether the knowledge graph make large language models more trustworthy，which is an important in KG and LLM area. This paper does a empirical study over open-ended question answering task to evaluate above issues.
 The strength of this paper are as follows: 
This paper addresses a significant research question of whether knowledge graphs (KGs) can make large language models (LLMs) more reliable in open-ended question answering. This paper  designed a new benchmark, OKGQA, specifically for assessing LLMs enhanced with KGs in open-ended, real-world question answering scenarios.
By proposing the OKGQA-P experimental setup, this paper considers scenarios where KGs may have varying levels of errors, further simulating real-world situations where KGs' quality can be inconsistent
This paper conducted a series of experiments on OKGQA and OKGQA-P, analyzing the effectiveness of various retrieval methods and LLMs of different scales.
The weakness of this paper are as follows:
While OKGQA-P considers errors in KGs, further exploration of the generalizability of these findings to a broader range of real-world applications may be necessary.
Although the authors present experimental results, a more in-depth analysis and discussion on why certain methods outperform others and the potential limitations of these methods could be provided.
weaknesses: While OKGQA-P considers errors in KGs, further exploration of the generalizability of these findings to a broader range of real-world applications may be necessary.
Although the authors present experimental results, a more in-depth analysis and discussion on why certain methods outperform others and the potential limitations of these methods could be provided.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. The authors may want to provide more details of the metrics used in Lines 292 to 295.

2. The results in Figures 4 and 5 are interesting. Does that mean that even incorporating a  severely perturbed KG (e.g., perturbation level=1.0 in Figures 5 (a), (b), and (c)), FS-SG can still help LLMs in reducing hallucination?
soundness: 3
strengths: 1. The authors elaborate on the necessity of evaluating LLMs under open-ended QA scenarios in detail.

2. The OKGQA-P setting to assess KG-augmented LLMs when KGs are contaminated is intuitive and reasonable.

3. The perturbation results in Figures 4 and 5 are very interesting.
summary: This paper proposes OKGQA to evaluate LLMs enhanced with KGs under open-ended, real-world question-answering scenarios. The authors also implement the OKGQA-P experimental setting to assess model performance when KGs are perturbed by real-world contamination. A series of experiments conducted on both OKGQA and OKGQA-P demonstrate that integrating KGs with LLMs can effectively mitigate hallucinations in LLMs, even when KGs are contaminated.
weaknesses: 1. The observation (2) in line 76 that CoT and SC may cause bias and hallucination is confusing. The results (Llama3.1 8B) in Table 1 show that the integration of CoT and SC helps improve quality and factuality.

2. The authors may want to provide more statistical details including the involved people's educational background, and the final score distribution agreement between the people and LLMs in "The human-in-the-loop process in Line 186".

3. The authors may need to do more kinds of perturbation methods including node deletion to mimic scenarios when a query cannot be retrieved from a KG.

4. The authors may want to discuss and summarize more RAG methods for open-ended QA settings including [A, B, C].

[A] Coarse-to-Fine Highlighting: Reducing Knowledge Hallucination in Large Language Models. ICML2024.

[B] SuRe: Improving Open-domain Question Answering of LLMs via Summarized Retrieval, ICLR 2024.

[C] RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective Augmentation, ICLR 2024.