FLEEK : Factual Error Detection and Correction with Evidence Retrieved from External Knowledge (2023)

Abstract: Detecting factual errors of textual information, whether generated by large language models (LLM) or curated by humans, is crucial for making informed decisions. LLMs’ inability to attribute their claims to external knowledge and their tendency to hallucinate makes it difficult to rely on their responses. Humans, too, are prone to factual errors in their writing. Since manual detection and correction of factual er- rors is labor-intensive, developing an automatic approach can greatly reduce human effort. We present a prototype tool that automatically extracts factual claims from text, gathers evidence from external knowledge sources, evaluates the factuality of each claim, and suggests revisions for identified errors using the collected evidence. Initial empirical evaluation on fact error detection (77-85% F1) shows the potential of our tool.

## introduction while textual information offers a convenient and efficient means of communication, it is critical to acknowledge its potential for misuse or unintended consequences. false or misleading information spreads easily over online platforms @xcite . additionally, the emergence of powerful large language models (llms) such as gpt models 1 , vicuna @xcite , and alpaca @xcite have introduced a new avenue for knowledge-seeking inquiries. these models, however, have a tendency to hallucinate and provide creative and fluent responses that are not factually accurate @xcite . the limitation of llms to attribute their responses to external valid evidence makes it challenging to trust their responses. therefore, having a robust fact-checking mechanism is of paramount importance to ensure the integrity and accuracy of information. previous works @xcite @xcite and systems like factgpt foot_0 , typically formulates the fact verification as a classification task where the input consists of the evidence sentence(s) and the claim, and the output is a label indicating the veracity of the entire claim as supported, refuted, or irrelevant. as a concrete example, if the claim is "united states is in north america and has 51 states", then a sentence-level classification task would classify this claim as incorrect since there are 50 states in the united states. however, this claim actually contains one valid sub-claim: "united states is in north america" ✓, and one false sub-claim: "united states has 51 states ✗. providing a single label stating that this claim is not supported or a single score indicating its factual accuracy is not helpful. it would still require users to manually identify text spans corresponding to potential incorrect facts, generate search queries to gather evidence from the open web, and ultimately make a decision based on multiple pieces of evidence. in this work, we present fleek (factual error detection and correction with evidence retrieved from external knowledge), an intelligent and model-agnostic tool designed to support end users (e.g. human graders) in fact verification and correction. our tool features an intuitive and userfriendly interface, capable of automatically identifying potential verifiable facts from input text. it generated questions for each fact and queries both curated knowledge graphs and the open web to collect evidence. our tool then verifies the correctness of the facts using the gathered evidence, and suggests revisions to the original text. our verification process is naturally interpretable since the extracted facts, generated questions, and retrieved evidence all directly reflect which infor-mation units contribute to the verification process. for the example mentioned above, fleek would highlight verifiable facts with different colors indicating their factuality levels (see figure 1 to the best of our knowledge, fleek is the first verification and correction system that provides fact-level decisions, attributes them with evidence from online sources of information, and proposes factual revisions. ## methodology figure 2 shows the overall architecture of fleek. basically, fleek can perform two tasks: fact verification and fact revision. next, we describe the methodology used to enable the two tasks. taylor swift is 30 years old @xcite . ## the user interface of fleek the frontend of fleek is built using angular 3 and bootstrap ui 4 , which allows for creating dynamic, interactive, and visually appealing user interface. the backend of fleek is handled by django 5 , a python-based server-side framework that facilitates the integration with ml-based libraries. the entry point to the system is the two views, llm and playground, shown at figure 3 , which we describe next. llm view. in this view, the user can check the factual consistency of an llm (e.g. gpt-3.5) that the user provided (as an endpoint). to interact with fleek, first in the input panel (figure 3 , upper panel), the user can type their query in the question bar, e.g., 'how old is taylor swift?' (or click one of the sample queries) and hit the askllm button. fleek would send the query to the llm (gpt-3 in this example) and render its response in the response panel (figure 3 , the upper second panel in dark grey). the verification process will kick in once the user hit the start checking button. fleek verifies the claim(s) made by the llm by going through the process described in section 2.1. the verification results are shown in the verification panel (figure 3 , middle panel). with our design, fleek is able to highlight the sub-claims in the original text with different color codes to indicate their factual accuracy categories based on the collected evidence. additionally, the highlighted spans are clickable, which leads to a detailed dialog containing the evidence associated with the claims (illustrated in figure 1 and figure ?? ). evidence retrieved from web are accompanied with a source link as well. at the bottom, the user can request fleek (hit the revise button) to revise the original claims using the collected evidence. based on the evidence retrieved from the kg and web, we can have multiple revision alternatives. verification results for the example shown in figure 3 and 4 allow for only one possible revision. playground view. this view allows the user to verify any specific piece of text of their choosing. this feature empowers users to automatically fact-check tweets, trending news, arbitrary llm outputs, or even their own writing with just a few clicks. figure 4 illustrates the view. the user can input their desired text into the designated input panel (scratchpad) and hit the "start checking" button (figure 4 , upper panel). the verification and revision process is the same as in the llm view. ## evaluation previous benchmarks on fact verification @xcite provide a single decision for the entire claim based on the retrieved evidence. however, in this work, we introduce fine-grained fact verification with attribution to external knowledge. as this is the first study on this task, there exist no benchmarks for evaluating fleek's performance. next, we conduct preliminary experiments using manually created evaluation data. ## conclusion and future work we presented fleek, an innovative solution geared towards assisting users in verifying the accuracy and factuality of textual claims. we aim to keep improving the fleek so that it can be a handy tool for various stakeholders. as part of our future work, we intend to do more comprehensive evaluations of fleek, including testing it with various llms and over a comprehensive benchmark. limitation. first, our current system depends on the initial set of responses generated by llms to perform the tasks. nevertheless, we can prompt each component multiple times and employ methods such as majority voting to enhance the accuracy of each task. second, experiments presented are based on small-scale datasets. we plan to expand both datasets as part of our future endeavors. finally, both datasets are manually annotated by one annotator. we plan to hire more annotators and refine the annotation process so as to provide a more comprehensive evaluation of our method.