[Paper Review] The Earth is Flat? Unveiling Factual Errors in Large Language Models
This paper introduces FactChecker, an automated framework that uncovers factual errors in large language models (LLMs) by constructing a knowledge graph, generating diverse question types (Yes-No, Multiple-Choice, WH), and assessing LLM responses with tailored matching strategies. It reveals up to 45% of questions trigger factual errors in leading LLMs and demonstrates that these test cases can improve factual accuracy, such as increasing LLaMA-2-13b-chat’s accuracy from 35.3% to 68.5% via in-context learning and fine-tuning.
Large Language Models (LLMs) like ChatGPT are foundational in various applications due to their extensive knowledge from pre-training and fine-tuning. Despite this, they are prone to generating factual and commonsense errors, raising concerns in critical areas like healthcare, journalism, and education to mislead users. Current methods for evaluating LLMs' veracity are limited by test data leakage or the need for extensive human labor, hindering efficient and accurate error detection. To tackle this problem, we introduce a novel, automatic testing framework, FactChecker, aimed at uncovering factual inaccuracies in LLMs. This framework involves three main steps: First, it constructs a factual knowledge graph by retrieving fact triplets from a large-scale knowledge database. Then, leveraging the knowledge graph, FactChecker employs a rule-based approach to generates three types of questions (Yes-No, Multiple-Choice, and WH questions) that involve single-hop and multi-hop relations, along with correct answers. Lastly, it assesses the LLMs' responses for accuracy using tailored matching strategies for each question type. Our extensive tests on six prominent LLMs, including text-davinci-002, text-davinci-003, ChatGPT~(gpt-3.5-turbo, gpt-4), Vicuna, and LLaMA-2, reveal that FactChecker can trigger factual errors in up to 45\% of questions in these models. Moreover, we demonstrate that FactChecker's test cases can improve LLMs' factual accuracy through in-context learning and fine-tuning (e.g., llama-2-13b-chat's accuracy increase from 35.3\% to 68.5\%). We are making all code, data, and results available for future research endeavors.
Motivation & Objective
- To address the critical challenge of factual hallucinations in large language models (LLMs), which undermine reliability in high-stakes domains like healthcare, journalism, and education.
- To overcome limitations of existing evaluation methods, including high human annotation costs, data contamination from training data leakage, and narrow coverage of question types and topics.
- To develop an automated, scalable, and contamination-resistant framework for systematically testing factual accuracy across diverse knowledge domains and LLM architectures.
- To generate diverse, multi-hop, and topic-diverse test cases that expose factual errors not detectable through manual benchmarks alone.
- To demonstrate that detected errors can be leveraged to improve LLM factual accuracy through in-context learning and fine-tuning.
Proposed method
- Construct a factual knowledge graph by retrieving triplet-based facts from a large-scale knowledge base, enabling comprehensive coverage of entities and relations.
- Use the knowledge graph to automatically generate three types of questions—Yes-No, Multiple-Choice, and WH questions—featuring both single-hop and multi-hop reasoning paths.
- Apply rule-based generation strategies to ensure semantic diversity and factual correctness of the generated questions and their corresponding answers.
- Implement type-specific matching strategies (e.g., exact match, partial match, semantic similarity) to evaluate LLM responses with precision for each question type.
- Employ a black-box testing approach to assess LLMs without requiring model weights or internal access, ensuring broad applicability across proprietary and open-source models.
- Leverage the detected error cases for in-context learning and fine-tuning to improve factual accuracy in target LLMs.
Experimental results
Research questions
- RQ1To what extent can an automated framework detect factual errors in large language models across diverse knowledge domains and question types?
- RQ2How does the performance of FactChecker compare to existing benchmarks in terms of error detection rate and resistance to data contamination?
- RQ3Can the test cases generated by FactChecker be effectively used to improve the factual accuracy of LLMs through in-context learning or fine-tuning?
- RQ4What is the impact of multi-hop reasoning and topic diversity on the detection of factual hallucinations in LLMs?
- RQ5How does the framework’s automated, rule-based generation approach scale across multiple LLMs and knowledge bases?
Key findings
- FactChecker successfully triggers factual errors in up to 45% of test questions across six leading LLMs, including GPT-3.5-turbo, GPT-4, and LLaMA-2.
- The framework detects factual errors in models like text-davinci-003 and Vicuna, demonstrating that even advanced models are prone to hallucinations beyond simple knowledge gaps.
- The accuracy of LLaMA-2-13b-chat improves from 35.3% to 68.5% when fine-tuned using test cases generated by FactChecker, indicating strong potential for error-driven model improvement.
- FactChecker’s automated, knowledge graph–based generation avoids data contamination risks common in manually curated benchmarks, ensuring more reliable evaluation.
- The framework supports diverse question types (Yes-No, Multiple-Choice, WH) and enables multi-hop reasoning, significantly broadening the scope of factual error detection compared to prior work.
- All code, datasets, and experimental results are publicly released to support reproducibility and further research in LLM evaluation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.