InterrogateLLM: Zero-Resource Hallucination Detection in LLM-Generated Answers (2024)

Abstract: Despite the many advances of Large Language Models (LLMs) and their unprecedented rapid evolution, their impact and integration into every facet of our daily lives is limited due to various reasons. One critical factor hindering their widespread adoption is the occurrence of hallucinations, where LLMs invent answers that sound realistic, yet drift away from factual truth. In this paper, we present a novel method for detecting hallucinations in large language models, which tackles a critical issue in the adoption of these models in various real-world scenarios. Through extensive evaluations across multiple datasets and LLMs, including Llama-2, we study the hallucination levels of various recent LLMs and demonstrate the effectiveness of our method to automatically detect them. Notably, we observe up to 87% hallucinations for Llama-2 in a specific experiment, where our method achieves a Balanced Accuracy of 81%, all without relying on external knowledge 1.

heading: 1 Introduction
text: Human studies have shown that people tend to be inconsistent when they are not telling the truth (Brewer et al., 1999). As such, a common interrogation technique consists of repeated interviews that attempt to challenge the interviewer’s consistency in order to assess its credibility (Granhag and Strömwall, 2001). Truth tellers’ answers are well-grounded in their memory, hence, inconsistencies in the respondent’s answers are a strong indication of her not telling the truth (Brewer et al., 1999; Dianiska and Meissner, 2023). Inspired by these studies, we present a novel method for hallucination detection in LLMs. Our approach, which we call InterrogateLLM, employs a systematic evaluation of model-generated responses for potential hallucinations by repeating the process of reconstructing a query from its generated answer.
*Denotes equal contribution. 1Our code, datasets, and task prompts can be found here.
Repeated interviews are a very common and effective verification technique for human interrogations, however, it is not foolproof. In some cases, respondents manage to provide repeated false states that are consistent, while in other cases, truth-tellers may provide inconsistent responses due to memory errors (Bartlett, 1995). In a similar fashion, our method is not flawless; it represents an additional step towards addressing the yet unsolved problem of hallucination detection. Nevertheless, similar to the use of consistency tests in humans, commonly employed for their effectiveness, our method also demonstrates high efficacy.
In recent years, the emergence of LLMs such as GPT-3 (Brown et al., 2020), PaLM (Chowdhery et al., 2022), and LLama (Touvron et al., 2023a,b) has revolutionized natural language processing. These models enable machines to understand and generate human-like text with unprecedented fluency and coherence. Trained on vast amounts of text data, they have demonstrated remarkable capabilities in various applications, from automated content generation to virtual assistants, and beyond. However, their remarkable performance comes with a set of challenges and concerns that need to be addressed for their responsible and effective use. A major concern is the phenomenon of hallucination, whereby these language models generate misleading, potentially harmful, or erroneous text. Hallucination can be characterized by the presence of false information in the output generated by the language model that lacks a factual basis. There are significant challenges associated with the deployment of large language models in real-world applications, especially in those involving critical information or decision-making processes.
Detecting and minimizing hallucinations in LLMs is crucial for ensuring their trustworthiness and reliability, especially in contexts where these models play a pivotal role in communication and
9333
decision-making. Existing methods for evaluating model-generated text often rely on surface-level metrics such as fluency and coherence, which may not effectively capture the underlying issue of hallucinations. Therefore, there is a pressing need for a systematic and effective method to detect and mitigate hallucinations in the outputs of these models. Despite its significance, addressing this challenge remains an open issue (Ji et al., 2023).
Our method, InterrogateLLM, operates on the premise that language models exhibiting hallucinations produce inconsistent and incorrect responses to subsequent queries based on the hallucinated information. To identify hallucination in a generated answer, our approach involves prompting the model multiple times to reconstruct the input query using the generated answer. Subsequently, InterrogateLLM quantifies the inconsistency level between the original query and the reconstructed queries. By leveraging the observed inconsistencies, our approach effectively identifies potential instances of hallucination. When a large-language model generates a hallucination, it struggles to consistently reconstruct the original query, leading to variations in responses. This interrogation strategy serves as the cornerstone of our approach for detecting hallucinations in generated answers.
The contributions of our paper are outlined as follows: (1) introduction of the InterrogateLLM method designed for detecting hallucinations in textual answers generated by LLMs. (2) we propose an innovative evaluation approach specifically tailored to the task of hallucination detection, leveraging three datasets associated with our proposed text generation tasks. (3) we investigate the hallucination levels exhibited by recent LLMs, including Llama2, shedding light on their fidelity levels. (4) we present comprehensive performance reports on InterrogateLLM and its variants, conducting a thorough comparison with alternative methods through extensive evaluations.

heading: 2 Related Work
text: Hallucinations have been explored in various natural language generation tasks, including translation, summarization (Kryscinski et al., 2020; Maynez et al., 2020), dialogue generation (Shuster et al., 2021), and question-answering (Lin et al., 2022). This is well-documented in a recent comprehensive survey conducted by (Ji et al., 2023), which provides an insightful overview of hallucinations in
diverse natural language generation contexts.
In (Liu et al., 2022), the authors presented a token-level reference-free hallucination detection task along with an additional dataset designed for hallucination detection in free-form text. This dataset consists of textual passages with perturbations, and the objective is to determine whether the entire passage exhibits hallucinations. It is crucial to emphasize that our task differs from their setup, as we specifically address hallucination detection within few-shot prompts involving query-answer sequences.
To address inconsistencies in generated text, SelfCheckGPT, introduced by Manakul et al. (2023b), leverages multiple stochastic samples generated by LLMs using the same query. SelfCheckGPT evaluates the coherence between the response and the stochastic samples by querying the same LLM multiple times. Specifically, it incorporates an additional prompt that includes a stochastic sample and a sentence from the generated text and predicts whether the sentence is supported by the stochastic sample. The approach validates each sentence by conditioning the LLM on each stochastic sample. The methodology of SelfCheckGPT encompasses various approaches, including one based on BERTScore (Fu et al., 2023), and another employing a multiple-choice question answering and generation approach (MQAG) (Manakul et al., 2023a), as well as n-gram and LLM-Prompting. Our method is benchmarked against this baseline, using the last approach in our study.
In recent research, Azaria and Mitchell (2023) proposed a method employing a multilayer perceptron classifier that uses hidden representations from language models to predict sentence truthfulness. However, this approach necessitates labeled data for supervised training and access to the internal states of the language model, which may not always be readily available. In (Kadavath et al., 2022), the authors present a self-evaluation technique where models are trained to predict their knowledge of the answer to any given free-form question. This approach entails prompting the language model to internally assess the accuracy of its previous predictions, including estimating the likelihood that its generated response or answer is correct. It is worth noting that this method requires labeled data for model training, making it a supervised task, which differs from our settings.

heading: 3 Problem setup
text: We assume a source domain of textual queries and a target domain of textual answers. A fewshot prompt2 (Brown et al., 2020), a corresponding query Q and a LLM denoted by FLLM , are provided. The query is constructed on top of the prompt and fed into the LLM to generate an answer to the query. Our task is to detect whether the generated answer suffers from hallucinations.
The few-shot prompt is constructed as a sequence of query-answer pairs. The pairs are denoted by {(qi, ai)}ni=1, where qi represents a query and ai its corresponding answer. The prompt can be expressed as follows:
Pforward = q1, a1, . . . , qn, an (1)
The FLLM is queried with the concatenation of the query Q on top of the prompt Pforward, which retrieves a generated answer denoted by A∗, signifying the response to the query Q. In other words, the prompt Pforward and the query Q are fed into the LLM as follows:
A∗ = FLLM ([Pforward;Q]) (2) 2While our approach assumes a provided few-shot prompt, it stays adaptable to many zero-shot tasks where the creation of few-shot prompts is feasible.
Our task is to determine whether the generated answer A∗ exhibits hallucinatory content.

heading: 4 The InterrogateLLM method
text: In our approach, we introduce a backward process for reconstructing the original query Q from the generated answer A∗. We create a new prompt by reversing the given prompt Pforward. The reversed prompt rearranges the order of the queryanswer pairs to pairs of answer-query. The reversed prompt, denoted as Pbackward, can be expressed as follows:
Pbackward = a1, q1, . . . , an, qn (3)
The generated answer A∗ is then concatenated to the end of the reversed prompt Pbackward, and the entire sequence is passed either by the same LLM defined above, by a different LLM, or by an ensemble of LLMs. For ease of reference and clarity, we collectively refer to the LLMs involved in this step as BLLM . In other words, in this process, we map the generated answer to the source domain, by querying one or more LLMs, each trying to reconstruct the original query Q. By denoting the set of reconstructed queries as Q∗, this “backward” process can be expressed as:
Q∗ = BLLM ([Pbackward;A∗]) (4)
Algorithm 1: Hallucination Detection Input: Q, FLLM , BLLM , Membedding ,{(
q(i), a(i) )}n
i=1 , τ
Output: True if the generated answer is an hallucination, False otherwise
1 Step 1: Query Forward Pass Pforward = q1, a1, . . . , qn, an A∗ = FLLM ([Pforward;Q]) 2 Step 2: Query Reconstruction Pbackward = a1, q1, . . . , an, qn 3 Q∗ = {} 4 for i = 1 to K do 5 Substep 1: Reverse Pass Q∗ = Q∗ ∪BLLM ([Pbackward;A∗]) 6 Step 3: Text Embedding Qvec = Membedding(Q)
Q∗vec = {Membedding(q∗) : ∀q∗ ∈ Q∗} 7 Step 4: Verification
sim(Q,Q∗) = AVG ∀q∗vec∈Q∗vec ([C(Qvec, q ∗ vec)])
8 if sim(Q,Q∗) ≥ τ then 9 return False
10 else 11 return True
Note that the size of Q∗ depends on the number of LLMs used in BLLM .
The motivation for employing a backward process is to reconstruct the original query Q based on the generated answer A∗. If the initial LLM suffers from hallucinations during the generation of A∗, then A∗ may drift from the correct answer to Q. Consequently, a backward process operating on A∗ is prone to deviating from Q on the way back. In other words, in the case of hallucination in A∗, the set of reconstructed queries Q∗ is likely to diverge from the original query Q.
In InterrogateLLM, this backward process is repeated multiple times (K times for each model in BLLM , see Sec. 5.2 for more details), with variable temperature values, as explained below. Therefore,
|Q∗| = K ∗ |BLLM | To determine if A∗ suffers from hallucination, a language embedding model is utilized to assess the similarity between the set of reconstructed queries Q∗ and the original query Q. Both the generated queries and the original query are transformed into vectors within the same embedding space. For a given embedding model Membedding : text → RD, which generates D-dimensional vectors from the input text, the embedding vector for the original query Q is denoted as Qvec = Membedding(Q). Similarly, the embedding vectors for the generated queries are denoted by:
Q∗vec = {Membedding(q∗) : ∀q∗ ∈ Q∗}
Subsequently, the cosine similarity between the embedding vectors of the predicted queries Q∗vec and the original query Qvec is calculated as follows:
sim(Q,Q∗) = AVG ∀q∗vec∈Q∗vec ([C(Qvec, q ∗ vec)]) (5)
Here, C represents the cosine similarity function:
C(u, v) =
( u · v
∥u∥∥v∥
) (6)
for u, v ∈ RD, where D is the dimension of the vectors. In other words, the cosine similarity is calculated for each q∗vec in the set Q ∗ vec, and the results are then averaged to obtain the final similarity score.
Finally, InterrogateLLM predicts hallucinations if the similarity score exceeds a predetermined threshold τ . In essence, when the reconstructed queries exhibit a significant divergence from the original query, InterrogateLLM signifies that there is a potential hallucination in A∗. More details about the selection of τ can be found in Sec. 5.2. The InterrogateLLM method is illustrated in Fig. 1, and outlined in Alg. 1.

heading: 4.1 Variable temperatures
text: We introduce an exploratory extension into InterrogateLLM, exploring the impact of diverse temperature values on the accuracy of the detections. In standard LLMs, the temperature parameter influences the likelihood of selecting the next token during the answer generation process. A higher temperature (e.g., 1.0) makes the output more creative and diverse, while a lower temperature (e.g., 0.2) makes the output more focused and deterministic. Specifically, the temperature is applied through a softmax function that transforms a vector into a probability distribution. In text generation, the softmax function is applied to the model’s logit vector, which corresponds to the supported tokens in the vocabulary. The softmax operation can be written as follows:
Pi = ezi/T
∑N j=1 e zj/T (7)
Where Pi is the probability of selecting the i-th token in the vocabulary, z is the logit vector, T is the temperature parameter and N is the number of tokens in the vocabulary. When T is high (low), the exponential function ezi/T is less (more) sensitive to small differences in the logit values, making the probabilities more diverse (focused).
As complementary experimental explorations, we examine the influence of temperature values on InterrogateLLM during the backward process, which is iterated K times. By introducing dynamic temperature adjustments, our goal is to study the method’s accuracy when employed with a range of backward processes exhibiting diverse creativity levels. To this end, we set the temperature for each backward process as follows:
Ti = T0 + 1.0− T0
K · i (8)
where Ti represents the temperature for the i-th backward pass (0 ≤ i < K), and T0 is the model default temperature (see Sec. 5.2 for more details).
This temperature scheduling allows for facilitating a controlled ascent in temperatures across the multiple backward processes, promoting enhanced exploration in the space of reconstructed queries. The details and results of this additional study are reported in the experiments, Sec. 5.6.

heading: 5 Experiments
text: To assess the efficacy of InterrogateLLM in detecting hallucinations, and due to the absence of prior datasets for hallucination detection in few-shot prompt settings, we adapted three public datasets. For each dataset, we designed a text generation task along with a verification process to ensure the accuracy of the generated answers. The verification is implemented by employing simple heuristic functions that exploit additional information that is present in the datasets. During the evaluation of hallucination detection methods, the detection predictions are compared against the verification results. Importantly, the InterrogateLLM method operates independently of any external knowledge, making it versatile and applicable to a broad spectrum of tasks.

heading: 5.1 Datasets and Tasks
text: A comprehensive experimental evaluation was conducted using three different datasets to thoroughly
evaluate our hallucination detection method across various domains. All three datasets provide a multifaceted evaluation of our technique, revealing its versatility across various types of information and content and allowing us to test the robustness of our hallucination detection method across a wide range of datasets and domains.

heading: 5.1.1 The Movies Dataset
text: The Movies Dataset3 is a collection of movierelated data that is publicly available for analysis and research. The dataset contains a variety of details about movies that were released before July 2017. The dataset includes 26 million ratings and 750,000 tag applications for all 45,000 movies provided by 270,000 users.
A subset of 3000 samples with movie titles and release years associated with the movie cast was sampled from the Movies dataset. The task is to predict the cast of a movie based on the movie’s name and release year. The few-shot prompt contains a few examples mapping a movie’s name and release year to its cast. The prompt is in the following format: "Query: What actors played in the x movie y?" where x is the release year and y is the movie name. Cast members’ full names are expected in answers, and ground truth labels use Intersection Over Union (IOU) scores, considering any IOU score below 80% as a hallucination.

heading: 5.1.2 Books Dataset
text: The second dataset ("books dataset")4 is derived from Amazon and includes over 200,000 literary books. This public dataset provides an overview of diverse literary books available on the Amazon platform. Each record includes details like book title, authors, publishers, and publication year.
We sampled a subset of 3,000 samples, including titles, dates, authors, and publishers. The task is to predict the author and publication year based on the book title. The prompts are structured as "Who is the author of the book x, what year was it published?", where x is the book title. The ground truth is established by checking for a match between the elements (author name, release year) in the answer.
3The Movies Dataset 4Books Dataset

heading: 5.1.3 Global Country Information (GCI)
text: The “Global Country Information”5 (GCI) is a public dataset containing information on 181 countries. Detailed information about each country is provided, including its name, land area, capital or major city, GDP, and more. This dataset offers a comprehensive representation of global country information. In the GCI dataset, we concentrate on country and capital pairs. The task involves determining a country’s capital by asking, "What is the capital of x?"
Samples from the above three datasets can be found in the supplementary Sec. B. The prompts used in each dataset and the reversed prompts created by InterrogateLLM, can be found in the code6.

heading: 5.2 Implementation details
text: We set K = 5 and τ = 0.91 across all experiments. Maintaining a relatively small value for K facilitates rapid benchmarking of various models on datasets in our evaluations, that encompass tens of thousands of generated answers. The hyperparameter τ was determined through an analysis of ada002
5GCI Dataset 6GitHub project
embeddings on a third-party dataset. This involved embedding both similar and dissimilar sentence pairs within the QQP dataset (Chen et al., 2018) and selecting the optimal threshold that effectively distinguished between the two distributions. The initial temperature T0 was set to the default temperature of each of the evaluated LLMs, specifically 0.6 for GPT3 and both Llama-2 models. The embedding model used in InterrogateLLM leverages the latest OpenAI’s model, ada0027.
In our experiments, we used one A100 GPU. A single application of InterrogateLLM with the full method for k = 1, using an ensemble of three models, takes up to 2 seconds. Consequently, benchmarking InterrogateLLM across the three datasets takes up to ∼ 3.44 hours. Further insights into the hyperparameters and experimental environment will be detailed in the following subsections.

heading: 5.3 Baselines
text: We compare our method with the following baselines, evaluated on all datasets and FLLM models: SBERT-cosine:in this baseline, we employ a pretrained SBERT model (Reimers and Gurevych,
7https://platform.openai.com/docs/guides/embeddings/usecases
2019) to embed both the query and the generated answer. We then calculate the cosine similarity between them and predict "hallucination" if the similarity falls below a threshold SBERTτ . The threshold was determined by using the same process described in Sec.5.2, this time with SBERT embeddings. ADA-cosine: similar to SBERT-cosine but employs the recent openAI model ada002. The value of τ used here is consistent with the one in Sec.5.2. SelfCheckGPT with Prompt: utilizes the same FLLM in each task, SelfCheckGPT generates additional N stochastic LLM response samples, denoted as S1, S2, ..., Sn, using the same query. Then, it scores the consistency between the generated response and the stochastic samples, by querying an LLM to determine whether the i-th sentence in A∗ is supported by the corresponding sample Si. The final inconsistency score is computed by averaging the sentence scores. In the experiments, this scoring step is evaluated using GPT-3 for all tasks.

heading: 5.4 The hallucination rates
text: We evaluate InterrogateLLM on answers generated by three recent LLMs for each of the datasets and tasks described above. The LLMs we evaluate are: GPT-3 (Brown et al., 2020) and Llama-2 (Touvron et al., 2023b) (7b and 13b models). Interestingly, in Tab. 1 we report the hallucination rates in the generated answers of the three models across the different datasets. Notably, GPT-3 exhibits a lower hallucination rate across all datasets and tasks, compared to the Llama-2 models.

heading: 5.5 Hallucination detection results
text: Binary predictions (hallucinations or not) are compared to the ground truth test labels of each dataset.
For each dataset and task, we employ InterrogateLLM with four different LLM choices for the backward step: GPT-3, Llama-2 (7B), and Llama-2 (13B), either individually or as ensembles of all three models. In Tab. 2, we report the area under the curve (AUC) of the receiver operating characteristic and balanced accuracy (B-ACC) metrics.
As can be seen in the table, the different variants of our method improve upon all the baselines by a sizeable margin. Importantly, we note sizeable improvements also in comparison to SelfCheckGPT. This advantage attributed to InterrogateLLM stems from predicting the query back using the few-shot samples provided in the prompt, a factor entirely
overlooked by SelfCheckGPT. Additionally, we observed that in many instances of hallucinations, the stochastic samples generated by SelfCheckGPT also exhibited the same mistake. Therefore, the SelfCheckGPT algorithm erroneously predicted the hallucinated A∗ as factual truth. This emphasizes the importance of our unique backward validation strategy, which differs from the query that initially caused the hallucination. Within the variants of the InterrogateLLM method, we observe that the use of an ensemble in the backward process exhibits sizeable strides across the board, suggesting that model diversity can compensate for individual model weaknesses (see also Sec.7).

heading: 5.6 Ablation and hyper-parameter analysis
text: We conduct an ablation study to examine the impact of the multiple K backward processes performed in InterrogateLLM (Alg.1 line 4), the effectiveness of the variable temperature values (Eq.(8)), and the importance of the average function in Eq.5.
Variable K values The performance of InterrogateLLM with various values of K is evaluated on the Movies, Books, and GCI datasets, and the results are reported in Tab. 3, and Tab. 9, 10 from the supplementary, respectively. Specifically, in this study, we evaluate InterrogateLLM with K taking values in the range [1, ..., 5] (higher K values can be considered at the expense of more compute power). The tables reveal that utilizing K > 1 in the backward step is crucial in all three experiments. Notably, the best results are consistently obtained with higher K value, where K = 5 takes the lead in the majority of cases. Therefore, we hypothesize that increasing the value of K could potentially enhance the results, albeit at the expense of additional computational resources. In addition, we observe that the ensemble of all three models (GPT-3, Llama-2 (7B), and Llama-2 (13B)) yielded the highest performance across all K values. This suggests once again that combining recovery scores from multiple models enhances hallucination detection.
Fig. 2 depicts the enhancements arising from the different values of K, shown for each dataset separately, and reported with both AUC and B-ACC metrics. Each data point represents the average result across all three forward LLMs along with all their corresponding backward LLMs (i.e. the average of each column in tables 3,9 and 10). As can be seen, the data reveals a consistent trend wherein the
cumulative improvements exhibit a proportional relationship with the size of K.
Variable temperatures We extend our investigation to varying temperatures for the backward
process. For each index i ∈ range(K), the InterrogateLLM method utilizes a variable temperature Ti as defined in Eq.(8). This temperature adjustment aimed to augment the creativity and stochastic aspects of the backward model BLLM throughout the query reconstruction process, fostering the generation of a more diverse set of reconstructed queries. Tab. 4, and Tab. 6, 7 from the supplementary Sec.A.3, present the results of InterrogateLLM with K = 5, when using the same temperature through all the backward processes versus using variable temperatures, as proposed in InterrogateLLM. As can be seen, the variable temperature improves the results across most experiments in the Movies datasets, while yielding on-par performance in the Books and GCI datasets (see Tab.6, 7). We hypothesize that the introduction of variable temperature, generating reconstructions with diverse levels of creativity, can be particularly helpful in mitigating instances of mode "collapse", in which certain backward models consistently generate identical reconstructions. In such cases, the in-
corporation of variable temperature becomes more important. The proposed method utilizes a diverse range of reconstructions. When the vast majority of these diverse reconstructions closely align with the original query, it signifies robust backward processes, better reflecting a non-hallucinated answer and consequently leading to improved accuracy scores. More ablative experiments related to the choices made in Eq. 5 can be found in the sup. Sec.A.1.

heading: 6 Conclusion
text: In this paper, we investigate the pressing issue of hallucinations in large language models. We introduced InterrogateLLM, a novel method designed for detecting hallucinations in few-shot settings. Our work contributes to the ongoing dialogue on the responsible use of AI-powered language models, offering a method that contributes to the reliability of LLM in diverse real-world applications.
As a future work, we would like to extend the method to Retrieval Augmented Generation settings, where a query is provided with a retrieved context, and the task is to generate an answer based on the provided information in the context.

heading: 7 Limitations
text: Throughout our study, we encountered several noteworthy limitations: (1) Source and Target Domain with Many-to-One Mapping: Generated answers associated with multiple different queries pose challenges in verification with InterrogateLLM. The backward process can reconstruct a diverse set of query candidates, deviating from the original query. (2) Hallucinating Back and Forth: Instances were observed where a single backward process by the same LLM model, which hallucinated an answer, could reconstruct the same query. This severe hallucination indicates a symmetric mapping between a query and a hallucinated answer, implying hallucinations in both directions. We observed a mitigation of this issue when employing an ensemble of models. (3) Detecting Hallucinations in SemiTruth Answers: Identifying hallucinations in semitruth answers proves more challenging. In some cases, the model only hallucinated a small portion of the answer (e.g., generating an entire cast of a movie with one additional actor not part of the movie). InterrogateLLM was able to recover the original movie, failing to detect the low-severity hallucination within the answer.

heading: A More results
text: A.1 The Average-Max Analysis
For each query, we obtain a list of size K containing cosine similarity scores, representing the similarity between the generated query and the original query. To ascertain the closeness of the generated query to the original, we employ two strategies: the maximum (Max) and the average (Average) of the K cosine similarity scores. Notably, in the majority of cases, the average outperformed the maximum, indicating a more robust measure for query similarity. We attribute this observation to the sensitivity of the maximum strategy to noisy cosine similarity scores, which tend to be prevalent in certain instances. Our analysis suggests that the average is a more reliable indicator of query similarity, providing a stable and effective metric for the evaluation of our reconstruction approach. Full results with avg/max are presented in tables 5, 6, 7, 8, 9 and 10.
A.2 More results for variable K values
Tab. 8, 9 and 10. depicts the performance of InterrogateLLM on the books and GCI datasets, with variable K values. As can be seen, higher values of K result in enhanced accuracy.
A.3 More variable temperature results
Tab. 5, 6 and 7 depicts the performance of the InterrogateLLM method with and without variable temperature values.

heading: B More information about the datasets
text: B.1 Movies Dataset Query-Answer Examples
We provide query-answer examples from the Movies dataset, where each query seeks information about the cast of a specific movie:
• Query-1: "What actors played in the 1995 movie Jumanji?"
• Answer-1: "The main cast included Robin Williams, Jonathan Hyde, Kirsten Dunst, Bradley Pierce, Bonnie Hunt, Bebe Neuwirth, David Alan Grier, Patricia Clarkson, Adam Hann-Byrd, Laura Bell Bundy, James Handy, Gillian Barber, Brandon Obray, Cyrus Thiedeke, Gary Joseph Thorup, Leonard Zola,
Lloyd Berry, Malcolm Stewart, Annabel Kershaw, Darryl Henriques, Robyn Driscoll, Peter Bryant, Sarah Gilson, Florica Vlad, June Lion, Brenda Lockmuller."
• Query-2: "What actors played in the 2011 movie Kingdom Come?"
• Answer-2: "Selma Blair, Edward Burns, Bruce Campbell, Lizzy Caplan, Seymour Cassel, Don Cheadle, Joanne Cook, Rachael Leigh Cook, Tom Cook, Alan Cumming, Tom DiCillo, Drake Doremus."
• Query-3: "What actors played in the 2009 movie Inglourious Basterds?"
• Answer-3: "The actors are Brad Pitt, Diane Kruger, Eli Roth, Mélanie Laurent, Christoph Waltz, Michael Fassbender, Daniel Brühl, Til Schweiger, Gedeon Burkhard, Jacky Ido, B.J. Novak, Omar Doom."
B.2 Books Dataset Query-Answer Examples Query-Answer examples from the Books dataset, where queries inquire about the author and publication year of specific books:
• Query-1: "Who is the author of the book Classical Mythology, and what year was it published?"
• Answer-1: "The author is Mark P. O. Morford, and it was published in 2002."
• Query-2: "Who is the author of the book Decision in Normandy, and what year was it published?"
• Answer-2: "The author is Carlo D’Este, and it was published in 1991."
• Query-3: "Who is the author of the book Clara Callan, what year was it published?"
• Answer-3: "The author is Richard Bruce Wright, and it was published in 2001 by HarperFlamingo Canada."
B.3 GCI Dataset Query-Answer Examples Query-Answer examples from the GCI dataset, where each query asks about the capital of a specific country:
• Query-1: "What is the capital of France?"

heading: Future Work
text: As a future work, we would like to extend the method to Retrieval Augmented Generation settings, where a query is provided with a retrieved context, and the task is to generate an answer based on the provided information in the context