DOI: 10.6084/m9.figshare.29929412.v2
title: <b>Reasoning Large Language Models (RLLMs) and Rumor </b>

description: Project StructureThe project is organized into three main directories, each corresponding to a major section of the paper's experiments:main data and code/ ├── rumor generation/ ├── rumor detection/ └── rumor debunking/How to Get StartedPrerequisitesTo successfully run the code and reproduce the results, you will need to:Obtain and configure your own API key for the large language models (LLMs) used in the experiments. Please replace the placeholder API key in the code with your own.For the rumor detection experiments, download the public datasets (Twitter15, Twitter16, FakeNewsNet) from their respective sources.Execution InstructionsThe code is written in Python. To run the experiments, navigate to the relevant directory and execute the desired Python scripts. The <code>pre-process</code> scripts in the <code>rumor detection</code> folder must be run first to prepare the public datasets.Detailed Directory Breakdown1、rumor generation/This directory contains all the code and data related to the rumor generation experiments.rumor generation-zero.py: Code for the zero-shot rumor generation experiment.rumor generation-few.py: Code for the few-shot rumor generation experiment.rumor generation-cot.py: Code for the chain-of-thought (CoT) rumor generation experiment.token_distribution.py: Script to analyze token distribution in the generated text.reason-extract-v3.py: Script to extract reasons for rumor generation and rejection.paint.py: Utility script for generating figures and plots.LDA.py: Code for performing LDA topic modeling on the generated data.labeled.py: A utility script for data processing.rumor_generation_all.json: The dataset containing all generated rumors for this experimental section.rumor_reasons_deepseek_v3_extracted.json: The extracted reasons for generated rumors.rumor_reasons_deepseek_v3_rejection_extracted.json: The extracted reasons for rejected rumor generation requests.2、rumor detection/This directory contains the code and data used for the rumor detection experiments.non-thinking-zero-twitter15.py: Code for the non-reasoning, zero-shot detection on the Twitter15 dataset.non-thinking-few-twitter15.py: Code for the non-reasoning, few-shot detection on the Twitter15 dataset.non-thinking-cot-twitter15.py: Code for the non-reasoning, CoT detection on the Twitter15 dataset.detection-zero-twitter15.py: Code for the RLLM, zero-shot detection on the Twitter15 dataset.detection-few-twitter15.py: Code for the RLLM, few-shot detection on the Twitter15 dataset.detection-cot-twitter15.py: Code for the RLLM, CoT detection on the Twitter15 dataset.traditional model.py: Code for the traditional models used as baselines.pre-process twitter1516.py: <b>Crucial:</b> Script for preprocessing the Twitter15 and Twitter16 datasets.pre-process fakenews.py: <b>Crucial:</b> Script for preprocessing the FakeNewsNet dataset.statistic-final.py: Script for generating tables and statistics for the results.select_few_shot_example_15.py: Script used to pre-select few-shot examples.pre_selected_few_shot_examples15.json: Pre-selected few-shot examples for the Twitter15 dataset.pre_selected_few_shot_examples16.json: Pre-selected few-shot examples for the Twitter16 dataset.pre_selected_few_shot_fakenewsnet.json: Pre-selected few-shot examples for the FakeNewsNet dataset.Twitter15_all_data.json: The dataset containing the experimental results for Twitter15.Twitter16_all_data.json: The dataset containing the experimental results for Twitter16.fakenew_all_data.json: The dataset containing the experimental results for FakeNewsNet.paint.py: Utility script for generating figures and plots.3、rumor debunkingThis directory contains all the code and data for the rumor debunking experiments.sentiment.py: Script for analyzing the sentiment of the debunking texts.read score.py: Script for calculating the readability score of the debunking texts.read-paint.py: Utility script for generating figures and plots related to readability.NLI-factcheck.py: Code for the NLI-based fact-checking experiment.merged_debunking_results.json: The primary dataset containing the debunking results for this experimental section.All_debunking_results_with_readability.json: The dataset containing the debunking results along with readability scores.All_debunking_results_advanced_sentiment.json: The dataset containing the debunking results along with sentiment analysis.Feel free to open an issue or contact the repository owner if you encounter any problems or have questions about the code or data.