Self-Checker: Plug-and-Play Modules for Fact-Checking with Large Language Models (2024)

Abstract: Fact-checking is an essential task in NLP that is commonly utilized to validate the factual accuracy of a piece of text. Previous approaches mainly involve the resource-intensive process of fine-tuning pre-trained language models on specific datasets. In addition, there is a notable gap in datasets that focus on fact-checking texts generated by large language models (LLMs). In this paper, we introduce Self-Checker, a plug-and-play framework that harnesses LLMs for efficient and rapid fact-checking in a few-shot manner. We also present the BingCheck dataset, specifically designed for fact-checking texts generated by LLMs. Empirical results demonstrate the potential of Self-Checker in the use of LLMs for fact-checking. Compared to state-of-the-art fine-tuned models, there is still significant room for improvement, indicating that adopting LLMs could be a promising direction for future fact-checking research.

## introduction fact-checking is an essential task in natural language processing, focusing on evaluating the accuracy of text. the advent of large language models (llms), such as chatgpt, gpt-4 (openai, 2023), and gpt-3 @xcite , has intensified the importance of this task. as llms gain widespread use, the risk of generating false information and hallucinating facts becomes a prominent concern. despite the extensive implicit knowledge in llms and their superior ability to generate realistic responses, ensuring the accuracy and truthfulness of their outputs remains a significant challenge. researchers have developed methods for factchecking and subtasks, including claim detection and fact verification @xcite . traditional † this work was done during an internship at microsoft research. figure 1 : self-checker assesses the veracity of llm generated text by (1) extracting simple claims for verification from the input text, (2) generating search queries for retrieval, (3) selecting evidence sentences, and (4) predicting the final conclusion. existing fact-verification datasets @xcite @xcite mainly center on verifying claims from wikipedia, which do not capture the complexity of lengthy and informative texts generated by llms. the lack of a suitable fact-checking dataset tailored for llm generation poses a chal-lenge in designing and evaluating frameworks in the evolving landscape of llms. in this paper, we introduce self-checker (depicted in figure 1 ), a framework comprising plug-and-play llm modules for automated fact-checking. the primary objective of self-checker is to assess the veracity of complex texts (e.g., the response generated by chatgpt). to achieve this goal, self-checker first extracts several simple claims for verification from the input and then predicts search queries for these claims to retrieve documents from a knowledge source (e.g., wikipedia in this example). after obtaining relevant documents, self-checker selects evidence sentences for each claim from the documents and finally returns a veracity prediction (e.g., whether the original claim is supported by evidence). we also construct bingcheck dataset, which focuses on verifying the factual accuracy of texts generated by llms. we collect interactions between a simulated user and an llm and hire human annotators to determine the factualness of llm's responses. this paper makes the following contributions: (i) we introduce self-checker to utilize llms for automatic fact-checking. (ii) we construct bingcheck dataset, which facilitates future research on fact-checking in a more realistic setting. (iii) we evaluate the effectiveness of self-checker on the bingcheck dataset and two fact verification datasets. our experiments show that self-checker is capable of generating reasonable results and exhibits considerable potential in the field of fact-checking. while self-checker's performance remains below that of state-of-the-art (sota) models for fact verification, our approach does not require any fine-tuning and can be applied to any off-the-shelf llm. ## self-checker framework self-checker is a framework for fact-checking that is training-free and contains a set of plug-andplay modules-claim processor, query generator, evidence seeker, and verdict counselor. the illustration of self-checker is depicted in figure 2 . a comparison of self-checker against other related frameworks is provided in policy agent this module determines the subsequent action of the system from a set of predefined actions. these actions include: (1) calling the claim processor to process the complex input, (2) requesting search queries from the query generator, (3) retrieving relevant passages from a knowledge source based on the generated search queries, (4) utilizing the evidence seeker to extract evidence sentences for a claim from the retrieved passages, (5) requesting the verdict counselor to provide a verdict prediction based on the gathered evidence, and (6) sending the final conclusion to the users. the policy agent follows the task instruction and learns from in-context examples to select the most appropriate action based on the current state and observations of the framework. the task description includes a comprehensive list of all available modules, along with brief descriptions of their respective functions. in-context examples provide complete processes of fact-checking for sample input text. this decision-making process ensures the efficient execution of the fact-checking process. ## the bingcheck dataset recent work @xcite shows that while existing generative search engines powered by llms can provide fluent and appear informative responses, they often suffer from hallucination. to alleviate the problem of hallucinations in llm generation and facilitate fact-checking research in a more realistic setting, we develop the bingcheck dataset by human annotation with the assistance of the self-checker framework. we aim to annotate texts generated by an llm that are naturally occurring and fine-grained. we collect responses from llm to user queries related to various topics, which are relatively long and informative. we process complex response into multiple simple claims that are worth-checking and the provide fact-checking information for both response level and claim level. ## related work the framework for automated fact-checking involves claim detection and factual verification @xcite . claim detection identifies statements needing verification, while factual verification includes evidence retrieval and assessment of claim validity. claim detection has been approached as a binary classification task, determining if a sentence represents a claim @xcite , or as a ranking task, ordering sentences based on their check-worthiness @xcite . fact verification requires models to assess the veracity of a given claim by examining evidence information. fever dataset @xcite is one of the most popular datasets in this area, and fueled the development of fact verification models @xcite @xcite . the fact verification in fever dataset consists of document retrieval, sentence selection, and verdict prediction. the vitamin c dataset @xcite ) is proposed for a contrastive fact verification paradigm which requires models to be sensiverify-an-edit is experimented with three different knowledge sources @xcite . we compare with the highest accuracy obtained by using the google search engine as a knowledge source. factual error correction is a task closely related to fact-checking. after assessing the factualness of claims within the input text, a subsequent step is addressing any inaccuracies to improve factual integrity. recent studies have explored methods for refining the factualness of text outputs by leveraging retrieved evidence @xcite @xcite . in addition to approaches specialized in correcting factual errors, some recent frameworks first assess the factualness of its initial generation and then amend any detected inaccuracies to enhance the overall veracity of the generation @xcite @xcite . ## conclusion and future work we present self-checker, a framework for automated fact-checking with plug-and-play modules implemented through prompting llms. additionally, we introduce the bingcheck dataset, which serves as a valuable resource for future research in fact-checking of llm-generated responses. experimental results demonstrate the significant potential of self-checker in the fact-checking task. in future work, a key direction to explore is to enhance the efficiency of self-checker. one potential avenue is the incorporation of additional working memory to accelerate the verification process by using past information. furthermore, investigating more efficient strategies for utilizing llms in each subtask of fact-checking holds promise for optimizing performance.