A multi-agent-based fact verification method and system, a storage medium and an electronic device
By constructing a sub-claim extraction, retrieval, and decision-making intelligent agent to decompose and verify complex claims, the problem of insufficient understanding and logical verification in existing technologies is solved, achieving efficient and reliable fact checking.
Patent Information
- Application Number
- CN202511289628.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Existing technologies are insufficient in understanding complex claims, lack external knowledge to assist in verification, and lack logical verification, resulting in low reliability of fact-checking results.
The sub-claim extraction agent decomposes complex claims into multiple sub-claims, retrieves and verifies evidence and generates answers through the retrieval agent, uses the decision agent for logical evaluation, and outputs the final fact-checking conclusion.
It enhances the semantic understanding and logical verification capabilities of statements, improves the accuracy and interpretability of fact-checking, and reduces the risk of misjudgment.
Smart Images

Figure CN120780918B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of network data security technology, and in particular to a fact verification method and system based on multi-agent, a storage medium and an electronic device. BACKGROUND
[0002] With the explosive growth of social media and digital information, the proliferation of false information has become a global challenge. False information, misleading content, and malicious rumors spread rapidly in a short time, posing a serious threat to social stability, public health, and commercial trust. In the face of this challenge, fact-checking has emerged. It refers to the process of verifying the authenticity of statements through a series of methods and technical means. Existing technologies are divided into traditional manual fact-checking methods and automated fact-checking methods. Although the traditional manual fact-checking method is accurate, it is inefficient and difficult to meet the real-time verification needs of massive information. Therefore, researching automated fact-checking methods has important practical significance for curbing the spread of false information and maintaining a clean information ecosystem. According to its technical evolution, automated fact-checking methods can be divided into three categories: 1. Rule-based fact-checking method: relying on predefined rules and keyword matching, suitable for simple fact verification, but lacking flexibility, difficult to handle complex semantics; 2. Machine learning-based fact-checking method: using classification models and natural language processing techniques to improve accuracy through feature engineering, but strongly dependent on labeled data, with limited generalization ability; 3. Large language model-based fact-checking method: large language models are trained on large-scale data, have rich knowledge reserves, and can identify and verify multi-domain fact information, gradually becoming the mainstream research direction, but relying on a single model for fact reasoning may lead to bias or lack of interpretability.
[0003] Although existing technologies have improved the accuracy of fact-checking to some extent, there are still the following key problems:
[0004] 1) Insufficient understanding of complex statements: when dealing with statements that require multi-hop logical reasoning, it is easy to be confused by the complexity of information, leading to biased final verification conclusions.
[0005] 2) Lack of external knowledge to assist in verifying facts: lack of ability to search for external factual evidence, which has a multi-faceted negative impact on the fact verification task.
[0006] 3) Lack of logical verification of fact-checking results: most fact-checking methods directly output fact-checking conclusions, but lack verification of whether the logical reasoning chain is correct, reducing the reliability of the results. SUMMARY
[0007] The present application aims at solving the problems of the prior art, and provides a fact verification method, system, storage medium and electronic device based on multiple agents; the fact verification method is aimed at the problem of insufficient understanding of complex statements in the prior art, and the present application constructs a sub-statement extraction agent to decompose a complex original statement into multiple indivisible sub-statements; the present application constructs a retrieval agent to search for evidence for the sub-statements from a fact verification knowledge base or the Internet to solve the problem of lack of external knowledge to assist in verifying facts in the prior art; the present application constructs a decision-making agent to evaluate whether all evidence e i and answers a i in the sub-statement sequence logically support the original statement, and outputs a final fact verification conclusion. The system is used to implement the fact verification method; the storage medium is used to store a computer program for implementing the fact verification method; and the electronic device is a hardware matching device of the storage medium.
[0008] The present application is implemented by the following technical solutions: a fact verification method based on multiple agents, comprising the following specific steps:
[0009] 1) A sub-statement extraction agent based on Qwen2.5-72B as a basic model decomposes a complex original statement into multiple sub-statements, serializes all sub-statements, and generates a logical expression L(a1, a2, …, a i , …, a n ) that can deduce the authenticity of the original statement according to the fact verification conclusion of all sub-statements; wherein the sub-statement is defined as C i , and contains a description c i , an initial empty evidence e i , and an initial empty answer a i ;
[0010] 2) A retrieval agent based on Qwen2.5-72B as a basic model searches for verification evidence e i for each sub-statement C i , and generates an answer a i , which combines the answers a i of the sub-statements to generate an initial original statement verification result A according to the logical expression L(a1, a2, …, a n , …, a i );
[0011] 3) A Qwen2.5-72B trained by a human preference learning algorithm is used as a decision-making agent to evaluate whether all evidence e i and answers a i in the sub-statement sequence logically support the original statement, and outputs a final fact verification conclusion.
[0012] Further to better achieve the multi-agent based fact-checking method of the present application, the following setting mode is particularly adopted: the step 1) comprises the following specific steps:
[0013] 1.1) Input understanding and statement decomposition: through the few-sample prompt word mode, the sub-statement extraction agent parses the entity, relationship and logical structure of the original statement, and decomposes the original statement into multiple sub-statements; that is, through the few-sample prompt method, the sub-statement extraction agent better understands the semantics and structure of the original statement, and accurately extracts key information such as entities (subject-predicate-object), relationships and logical structures. Based on the extracted key information, the sub-statement extraction agent decomposes the original statement C into multiple sub-statements C i . Each sub-statement C i corresponds to a specific verification task. The few-sample prompt words used in this step are as follows:
[0014] You are a fact-checking assistant who needs to disassemble the original statement into indivisible atomic sub-statements. Each atomic sub-statement must meet the following conditions: 1. Only contains a single fact or relationship; 2. Preserves the entity and logical semantics of the original statement; 3. The combination of sub-statements can completely restore the original statement.
[0015] Example: Input statement: "**is a Chinese internet company and provides cloud computing services." Output sub-statements: 1. **is a Chinese internet company. 2. **provides cloud computing services."
[0016] For example, for the original statement: "Zhegan contains aristolochic acid lactam, which is not a class 1 carcinogen", it can be decomposed into the following sub-statements: C1: "Zhegan contains aristolochic acid lactam"; C2: "Aristolochic acid lactam is not a class 1 carcinogen".
[0017] 1.2) Sub-statement serialization: through the prompt word mode, the sub-statement extraction agent serializes all sub-statements to obtain the sub-statement series S={C1,C2,…,C i ,…,C n}, this step makes the sub-statement extraction agent generate the sub-statement sequence S={C1,C2,…,C i ,…,C n} through the following prompt words:
[0018] "Please organize the decomposed sub-statements into an ordered sub-statement sequence S={C1,C2,…,C i ,…,C n}, each sub-statement contains description c i , evidence e i and answer a iThe problem is the specific content of the sub-declaration, the evidence is used to store the evidence for verifying the facticity of the sub-declaration, and the answer is used to store the fact verification conclusion (true / false) of the sub-declaration. In addition to the description, the rest of the variable values are temporarily empty.
[0019] Through this step, the sub-declaration sequence S can be represented as:
[0020] S=[{"description":c1,"evidence":e1,"answer":a1},{"description":c2,"evidence":e2,"answer":a2},{"description":c3,"evidence":e3,"answer":a3}]
[0021] Each sub-declaration C i contains a description c i , an initial value empty evidence e i , and an initial value empty answer a i ;
[0022] 1.3) Logical expression generation: sub-declaration extraction agent definition by few-sample prompt, and output logical expression L(a1, a2, …, a i ,…a n ), realize according to the fact verification conclusion of sub-declaration to deduce the authenticity of the original declaration. That is, in order to combine the fact verification conclusions of sub-declarations into the final fact verification conclusion of the original declaration, the sub-declaration extraction agent needs to generate a logical expression L(a1, a2, …, a i ,…a n ). The expression defines how to deduce the authenticity of the original declaration from the fact verification conclusions of the sub-declarations. This step uses the few-sample prompt method, and the prompt is as follows:
[0023] "Please define how to deduce the authenticity of the original declaration from the fact verification conclusions of the sub-declarations according to the logical structure between the sub-declarations and the original declaration, for example, if the fact verification conclusion of sub-declaration 1 is true and the fact verification conclusion of sub-declaration 2 is true, then the original declaration is true, output logical expression L(a1, a2)=a1∧a2." Through the above steps, the sub-declaration extraction agent decomposes the complex declaration C into easy-to-handle sub-declarations C i , organizes them into an ordered sub-declaration sequence S={C1,C2,…,C i ,…,C n}, and generates a logical expression L(a1, a2, …, a i ,…a n ) to deduce the authenticity of the original declaration. Provide a clear structure and logical framework for subsequent retrieval and decision-making agents.
[0024] Further to better achieve the fact-checking method based on multi-agent, the following setting mode is particularly adopted: the step 2) comprises the following steps:
[0025] 2.1) Evidence retrieval: the retrieval agent verifies the facticity of the sub-claim by retrieving the evidence e from the Internet based on the fact-checking knowledge base or using a retrieval tool i ; that is, the retrieval agent receives the sub-claim sequence S = {C1, C2, …, C i , …, C n} decomposed by the sub-claim extraction agent, and for each sub-claim C i , the retrieval agent needs to retrieve the evidence e i verifying the facticity of c i . To obtain external retrieval knowledge, the retrieval agent uses two evidence retrieval methods, i.e., retrieval based on the fact-checking knowledge base and retrieval from the Internet using a retrieval tool.
[0026] 2.2) Sub-claim answer generation: the retrieval agent compares the evidence e i with the sub-claim description to determine the authenticity of the sub-claim and give an answer a i ; that is, after retrieving the relevant evidence, the retrieval agent compares the evidence with the sub-claim description to determine the authenticity of the sub-claim and give an answer in the following way:
[0027] “Please determine the authenticity of the sub-claim c i and give an answer (true / false) according to the evidence e i , and please store the corresponding answer in a i .”
[0028] For example, for the sub-claim description c1: “Aristolochia fangchi contains aristolochic acid”, the evidence e1 is: “Aristolochia fangchi indeed contains aristolochic acid, which is a metabolic product of aristolochic acid, and exists widely and independently in nature...”. The answer a1 generated by the retrieval agent is true. For the sub-claim description c2: “Aristolochic acid is not a class 1 carcinogen”, the evidence e2 is: “Aristolochic acid is not a carcinogen, and the ingredient listed as a class 1 carcinogen by the International Cancer Research Agency is aristolochic acid...”, and the answer a2 generated by the retrieval agent is true.
[0029] 2.3) Initial original claim fact verification conclusion generation: the retrieval agent generates the logical expression L(a1, a2, …, a i , …a n ) according to the answers a iThe combination generates the initial original claim verification result A. That is, this step uses the prompting words to make the retrieval agent combine the answers of the sub-claims into the initial original claim verification result A according to the logical expression L(a1, a2, …, a i ,…a n ) generated by the agent according to the sub-claims.
[0030] “Please combine the answers a i of the sub-claims into the initial original claim verification result A according to the logical expression L(a1, a2, …, a i ,…a n ) generated by the agent according to the sub-claims.”
[0031] For example, the logical expression is L(a1, a2) = a1 ^ a2, which means that if the fact verification conclusion of the sub-claim 1 is true and the fact verification conclusion of the sub-claim 2 is true, then the original claim is true.
[0032] The retrieval agent combines the answers of the sub-claims into the initial original claim verification result A (true) = a1 (true) ^ a2 (true).
[0033] Through the above steps, the retrieval agent provides detailed verification evidence and answers for each sub-claim, and provides the initial original claim verification result A.
[0034] Further, in order to better implement the fact verification method based on multiple agents, the following settings are adopted: in the step 2.1), the retrieval agent retrieves the evidence e i that verifies the fact of the sub-claim based on the fact verification knowledge base or using a retrieval tool to retrieve from the Internet.
[0035] 2.1.1) Establish a fact verification knowledge base: collect more than 20,000 pieces of fact data verified by professional personnel from the China Internet Joint Rumor Dispelling Platform and authoritative news websites, and integrate them into a fact verification knowledge base after cleaning up non-standard characters through regular expressions;
[0036] 2.1.2) Build a knowledge base index: in order to support the implementation of subsequent retrieval technologies, this step first builds a FAISS semantic index and an Elasticsearch inverted index for each piece of data in the fact verification knowledge base to form a double index; among them, the FAISS semantic index is specially configured with HNSW parameters (M = 32, efConstruction = 200) to support the implementation of approximate nearest neighbor search; the Elasticsearch inverted index is configured with the BM25 retrieval algorithm (k1 = 1.2, b = 0.75) to achieve the purpose of keyword retrieval;
[0037] 2.1.3) Calculate the retrieval relevance score: For each piece of fact-checking knowledge base data processed in step 2.1.2), calculate the retrieval relevance score, and return only the retrieval results with the highest retrieval relevance score above the threshold of 0.8; that is, for each piece of data in the fact-checking knowledge base, calculate two types of scores in parallel: specifically, for the input sub-claim description c i First, perform parallel computation: a. Semantic retrieval uses cosine similarity to calculate the relationship between each piece of data in the fact-checking knowledge base and the sub-claim description; c. i Semantic similarity score between: s sem =cos(SBERT(c i ),v i ), where SBERT transforms the sub-declaration description ci into a semantic vector, v i a. The fact data in the knowledge base is represented by vectors; b. Keyword retrieval uses the BM25 retrieval algorithm to obtain the score s of the match between the fact data and the query keywords. lex Next, for each piece of data in the fact-checking knowledge base, a retrieval relevance score is calculated. This is done using the following formula:
[0038] Score = β•s sem +(1-β)•s lex Where β is the weight controlling the semantic similarity (cosine similarity) and keyword matching score (BM25 score), with a value of 0.7; s sem For each piece of data and sub-claim description in the fact-checking knowledge base i The semantic similarity score between them; after calculating the above search relevance scores, the search result with the highest search relevance score above the threshold of 0.8 is returned as evidence to verify the factual nature of the sub-statement. i If not, output "Fact Check Knowledge Base Retrieval Failed";
[0039] 2.1.4) If the fact-checking knowledge base retrieval fails, the search intelligence will output "Fact-checking knowledge base retrieval failed" and call a search engine (such as the Bing search plugin) to retrieve the most relevant first search result from the Internet as evidence to verify the factual nature of the sub-statement. i Ultimately, the retrieval intelligence will store the retrieved evidence in each sub-declaration C. i e i middle.
[0040] For example, for the sub-claim description c1: "oxymatrine is contained in the roots of the plant", the evidence e1 can be: "oxymatrine is indeed contained in the roots of the plant, is a metabolic product of aristolochic acid, and is widely independent in nature...". For the sub-claim description c2: "oxymatrine is not a class 1 carcinogen", the evidence e2 can be: "oxymatrine is not a carcinogen, and the component listed by the International Cancer Research Agency as a class 1 carcinogen is aristolochic acid...".
[0041] Further, in order to better achieve the fact checking method based on multi-agent, the following setting mode is particularly adopted: when calculating the relevance score, the following formula is used: Score = β • s sem + (1-β) • s lex ; wherein β is the weight of the semantic similarity (cosine similarity) and the keyword matching score (BM25 score), and the value is 0.7; s sem is the semantic similarity score between each piece of data in the fact checking knowledge base and the sub-claim description c i ; s lex is the matching score of the fact data and the query keywords.
[0042] Further, in order to better achieve the fact checking method based on multi-agent, the following setting mode is particularly adopted: the step 3) comprises the following specific steps:
[0043] 3.1) Human preference learning algorithm optimizes Qwen2.5-72B: a human preference data set is constructed as training data, and then the human preference learning algorithm is used to optimize Qwen2.5-72B to obtain a decision-making agent; that is, in order to perform more accurate logical evaluation, the human preference learning algorithm DPO is used to train Qwen2.5-72B, specifically including constructing a human preference data set for training and training Qwen2.5-72B using a human preference learning algorithm.
[0044] 3.1.1) Construct a human preference data set for training, which contains positive and negative samples. Through the human preference learning algorithm, Qwen2.5-72B will learn how to generate positive samples of human preference and reject negative samples. In this step, Qwen2.5-72B is first used to evaluate whether all evidence e i and answer a i in the sub-claim sequence logically support the original claim under the condition of not being optimized in any way. This process uses more than 1000 input data, and the original claims of these input data come from the HOVER data set and obtain the content complete sub-claim sequence S = {C1, C2,..., C i ,..., Cn} as input to construct the human preference dataset. The prompt words are as follows:
[0045] "Given the following sub-claims, describe the evidence and answer:
[0046] Sub-claim 1: Aristolochic acid is contained in Aristolochia → Evidence: Aristolochic acid is indeed contained in Aristolochia, is a metabolite of aristolochic acid, and exists independently in nature → Answer: True
[0047] Sub-claim 2: Aristolochic acid is not a class 1 carcinogen → Evidence: Aristolochic acid is not carcinogenic, and the component listed by the International Cancer Research Agency as a class 1 carcinogen is aristolochic acid → Answer: True
[0048] Please judge: Do these evidences and answers logically support the original claim "Aristolochic acid is contained in Aristolochia, and this chemical substance is not a class 1 carcinogen"?
[0049] First, output the logical evaluation conclusion: Y = support / not support, and second, output your thinking process. Through the above steps, more than 1000 logical evaluation conclusions and thinking processes are output, and 800 clear and correct logical evaluation process samples are selected and labeled by fact-checking experts as human preference data. Then, using the 800 data as input, Qwen2.5-72B is intentionally inserted with incorrect logical thinking process and changed logical evaluation conclusion as negative samples by using prompt words, thus forming 800 groups of human preference data pairs as experimental data, and the training set and validation set are divided in the ratio of 8:2.
[0050] 3.1.2) Then use the human preference learning algorithm to train Qwen2.5-72B, and the loss function is as follows:
[0051] ; where, x is the input, y w is the positive sample, y l is the negative sample, π θ represents the current strategy, π ref is the reference strategy, i.e. the original strategy, and γ is the temperature coefficient (set to 0.3), represents the expected calculation on the sample ( , x y w , y l ) in the data distribution denotes the sigmoid function, which maps the input to the interval [0, 1], and the purpose of this loss function is to optimize the model parameters θ by minimizing the difference between the model prediction probability and the reference model prediction probability.
[0052] 3.2) Logical evaluation: The decision-making agent performs logical evaluation by prompting words to evaluate all evidence e in the sub-claim sequence i and answer a i whether the original claim is logically supported; that is, the Qwen2.5-72B optimized by the human preference learning algorithm in step 3.1) as the final decision-making agent performs logical evaluation to evaluate all evidence e in the sub-claim sequence i and answer a i whether the original claim is logically supported, this step makes the decision-making agent perform the logical evaluation task by prompting words, and outputs the logical evaluation conclusion Y and the decision-making agent's thinking process; the prompt words are the same as those used to construct the human preference data set in step 3.1).
[0053] 3.3) Fact-checking conclusion output: If the original claim is logically supported, the original claim is indeed A, then the sub-claim evidence and conclusion are summarized as the fact-checking conclusion of the original claim and output by the decision-making agent; if the original claim is not logically supported, output the logical evaluation failure and the decision-making agent's thinking process. That is, this step depends on whether the logical evaluation conclusion Y supports or does not support to decide whether to accept the fact-checking result A of the original claim, if Y is support, then all evidence e i and answer a i in the sub-claim sequence indeed logically supports the original claim, and the original claim is indeed A, then the sub-claim evidence and conclusion are summarized as the fact-checking conclusion of the original claim and output, if not, output the logical evaluation failure and the decision-making agent's thinking process, the prompt is as follows:
[0054] "Please decide whether to accept the fact-checking result A of the original claim according to whether the logical evaluation conclusion Y supports or does not support, if Y is support, then all evidence e i and answer a i in the sub-claim sequence indeed logically supports the original claim, and the original claim is indeed A, then the sub-claim evidence and conclusion (i.e. S={C1, C2, …, C i , …, C n}) e i and a i are summarized as the fact-checking conclusion of the original claim and output, if not, output the logical evaluation failure and your thinking process".
[0055] Through the above process, the decision-making agent verifies all evidence e iWith answer a i Whether it logically supports the original statement and provides the final fact-checking conclusion.
[0056] To further improve the multi-agent-based fact-checking method described in this invention, the following setup is specifically adopted: In step 3.1), constructing a human preference dataset as training data specifically involves: using logically coherent and correct evaluation ideas and conclusion samples generated by Qwen2.5-72B as positive samples; using Qwen2.5-72B to intentionally insert erroneous logic into the positive samples to generate erroneous evaluation ideas and conclusion samples as negative samples; the positive and negative samples together constitute the training data.
[0057] When optimizing Qwen2.5-72B using a human preference learning algorithm, the loss function is:
[0058] ;in, x For input, y w As a positive sample, y l For negative samples, π θ Indicates the current strategy, π ref The reference strategy, i.e. the original strategy, is used, and γ is the temperature coefficient (set to 0.3). Indicates the distribution of data The samples in x , y w , y l Perform the expected value calculation; This represents the sigmoid function, which maps the input to the interval [0, 1]. The purpose of this loss function is to optimize the model parameters θ by minimizing the difference between the model's predicted probability and the reference model's predicted probability.
[0059] A multi-agent fact-checking system, used to implement the aforementioned multi-agent fact-checking method, includes:
[0060] The sub-declaration extraction agent, based on the Qwen2.5-72B model, decomposes the complex original declaration into multiple sub-declarations, serializes all sub-declarations, and generates a logical expression L(a1,a2,…,a...) that can deduce the truth of the original declaration based on the factual verification conclusions of all sub-declarations. i ,…a n ); where the sub-declaration is defined as C i , containing description c i Evidence that the initial value is empty (e) i And the answer a with an initial value of empty i ;
[0061] Retrieval agent, taking Qwen2.5-72B as a basic model, extracts sub-declarations C for each sub-declaration i Retrieval verification evidence e i And generate answer a i , according to the logical expression L(a1, a2, …, a i , …a n ) The answers a i of the sub-declaration are combined to generate the initial original declaration verification result A;
[0062] Decision agent, Qwen2.5-72B is obtained by training through human preference learning algorithm, evaluate all evidence e i In the sub-declaration sequence and the answer a i Whether logically support the original declaration, output the final fact checking conclusion.
[0063] A computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the fact checking method based on multiple agents.
[0064] An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the fact checking method based on multiple agents.
[0065] Compared with the prior art, the present application has the following advantages and beneficial effects:
[0066] The sub-declaration extraction agent adopted in the present application is based on the Qwen2.5-72B large model, which can split complex declarations into atomic sub-declarations through few-shot prompting, alleviating the problem of insufficient semantic understanding when traditional methods directly process complex declarations. Compared with the prior art, the present application not only improves the accuracy and semantic integrity of sub-declaration extraction, but also generates logical expressions, significantly improving the efficiency and explainability of declaration extraction.
[0067] The retrieval agent of the present application adopts a double retrieval mechanism of FAISS semantic index and Elasticsearch inverted index, realizing efficient and accurate evidence matching. Compared with a single retrieval method, the present application uses a hybrid retrieval algorithm and an Internet retrieval bottom-up mechanism to ensure the priority use of authoritative knowledge bases and expand the coverage of evidence.
[0068] The decision agent optimized by the human preference learning algorithm of the present application can strictly evaluate the logical consistency of the sub-declaration verification result. Compared with the traditional method of directly outputting the fact checking conclusion, the present application greatly reduces the risk of misjudgment. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 The method framework of the present application is shown in the following. DETAILED DESCRIPTION
[0070] The present application will be further described below in connection with embodiments, but the embodiments of the present application are not limited thereto.
[0071] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0072] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise explicitly and specifically limited.
[0073] Glossary:
[0074] Fact-checking: refers to verifying the authenticity of statements through systematic methods. It usually involves authoritative data sources comparison, logical reasoning and expert evaluation to reduce the spread of false information.
[0075] Agent: refers to an independent functional module based on large models, each agent has specific task processing capability, and realizes specialized processing through structured input and output.
[0076] Qwen2.5-72B: is a large-scale language model developed by Alibaba, with a parameter quantity of 72 billion, supporting multi-language understanding and generation tasks.
[0077] Few-shot prompt: few-shot learning refers to providing only a small number of typical examples, and the model can understand new classification logic through these "example samples", avoiding the pain points of traditional machine learning methods that require re-labeling a large amount of data.
[0078] Retrieval-Augmented: Retrieval-Augmented techniques combine real-time retrieval results from external knowledge bases with the internal knowledge of large models.
[0079] FAISS (Facebook AI Similarity Search): FAISS is a vector similarity search library open-sourced by Meta, optimized for fast retrieval of high-dimensional vectors.
[0080] Elasticsearch: Elasticsearch is a distributed search engine based on Lucene, responsible for handling keyword-oriented exact retrieval requirements in this solution.
[0081] BM25 Retrieval Algorithm: BM25 is one of the most classic ranking algorithms in the information retrieval field, which scores by calculating the statistical relevance of query terms and documents.
[0082] HNSW (Hierarchical Navigable Small World): HNSW is an efficient approximate nearest neighbor search algorithm based on hierarchical navigable small world graphs, and is one of the core indexing algorithms of the FAISS library.
[0083] Human Preference Learning Algorithm: DPO (Direct Preference Optimization) is an optimization algorithm that adjusts model parameters by directly optimizing the model's performance on pairwise preference data, making the model output more consistent with human preferences and expectations. DPO algorithm can directly encourage the model to generate more preferred responses and punish the generation of non-preferred responses without explicitly training a reward model. This makes DPO a direct and stable optimization method.
[0084] HOVER Dataset: HOVER (Human-Verified Fact Verification) is a benchmark dataset for fact verification, containing complex statements and their sub-statements, supporting evidence, and human verification labels. This dataset is commonly used to train and evaluate the multi-hop reasoning capabilities of AI models.
[0085] Example 1:
[0086] The present application designs a fact verification method based on multi-agent, which aims at the problem of insufficient understanding ability of the prior art for complex statements. The present application constructs a sub-statement extraction agent to decompose the complex original statement into a plurality of indivisible sub-statements. In view of the problem that the prior art lacks external knowledge to assist in verifying facts, the present application constructs a retrieval agent to search for evidence for the sub-statements from a fact verification knowledge base or the Internet. In view of the problem that the prior art directly outputs a fact verification result lacking logical verification, the present application constructs a decision-making agent to evaluate all evidence e i and the answer a i whether they logically support the original statement, and outputs the final fact verification conclusion.
[0087] whether they logically support the original statement, and outputs the final fact verification conclusion. Figure 1 As shown in the accompanying drawings, the method comprises the following specific steps:
[0088] 1) The sub-statement extraction agent based on the Qwen2.5-72B model decomposes the complex original statement into a plurality of sub-statements, serializes all the sub-statements, and generates a logical expression L(a1, a2, …, a i , …, a n ) capable of deducing the truth of the original statement according to the fact verification conclusion of all the sub-statements; wherein the sub-statement is defined as C i , which contains the description c i , the initial value empty evidence e i , and the initial value empty answer a i .
[0089] 2) The retrieval agent based on the Qwen2.5-72B model searches for the verification evidence e i for each sub-statement C i , and generates the answer a i , which combines the answers a i of the sub-statements to generate the initial original statement verification result A according to the logical expression L(a1, a2, …, a n , …, a i ).
[0090] 3) The Qwen2.5-72B trained by the human preference learning algorithm is used as the decision-making agent to evaluate whether all the evidence e i and the answer a i logically support the original statement, and outputs the final fact verification conclusion.
[0091] Embodiment 2:
[0092] This embodiment is further optimized on the basis of the above-mentioned embodiments, and the same parts as the foregoing technical solutions will not be described here again, such as Figure 1As shown, further to better achieve the fact verification method based on multi-agent described in the application, in particular, the following setting mode is adopted: the step 1) comprises the following specific steps:
[0093] 1.1) input understanding and statement decomposition: through the few-sample prompt word mode, the sub-statement extraction agent parses the entity, relationship and logical structure of the original statement, and decomposes the original statement into multiple sub-statements; that is, through the few-sample prompt method, the sub-statement extraction agent better understands the semantics and structure of the original statement, and accurately extracts key information such as entity (subject-predicate-object), relationship and logical structure. Based on the extracted key information, the sub-statement extraction agent decomposes the original statement C into multiple sub-statements C i . Each sub-statement C i corresponds to a specific verification task.
[0094] 1.2) sub-statement serialization: through the prompt word mode, the sub-statement extraction agent serializes all sub-statements to obtain a sub-statement series S={C1,C2,…,C i ,…,C n}: each sub-statement C i contains a description c i , an initial value empty evidence e i and an initial value empty answer a i ;
[0095] 1.3) logic expression generation: through the few-sample prompt word mode, the sub-statement extraction agent defines and outputs a logic expression L(a1,a2,…,a i ,…a n ), which realizes the derivation of the authenticity of the original statement according to the fact verification conclusion of the sub-statement. That is, in order to subsequently combine the fact verification conclusions of the sub-statements into the final fact verification conclusion of the original statement, the sub-statement extraction agent needs to generate a logic expression L(a1,a2,…,a i ,…a n ). The expression defines how to derive the authenticity of the original statement according to the fact verification conclusion of the sub-statement.
[0096] Through the above steps, the sub-statement extraction agent decomposes the complex statement C into easy-to-handle sub-statements C i , organizes them into an ordered sub-statement sequence S={C1,C2,…,C i ,…,C n}, and generates a logic expression L(a1,a2,…,a i ,…a n ) for deriving the authenticity of the original statement. It provides a clear structure and logical framework for subsequent retrieval and decision-making agents.
[0097] Example 3:
[0098] This embodiment is a further optimization based on any of the above embodiments. The parts that are the same as those in the foregoing technical solutions will not be repeated here. Figure 1 As shown, to better implement the multi-agent-based fact-checking method of the present invention, the following configuration is specifically adopted: Step 2) includes the following steps:
[0099] 2.1) Evidence Retrieval: The retrieval agent verifies factual evidence for the sub-claim by searching the internet using a fact-checking knowledge base or by employing retrieval tools. i That is, the retrieval agent receives the sub-declarations and extracts the sub-declaration sequence S={C1,C2,…,C...} from the agent. i ,…,C n}, for each sub-declaration C i The retrieval agent needs to retrieve and verify c. i Factual evidence e i To acquire external retrieval knowledge, the retrieval agent used two evidence retrieval methods: retrieval based on a fact-checking knowledge base and retrieval from the Internet using retrieval tools.
[0100] 2.2) Sub-declaration answer generation: The retrieval agent is prompted to compare evidence e using prompt words. i Determine the truth value of a sub-declaration and provide the answer. i That is, after retrieving relevant evidence, this step uses prompt words to enable the retrieval agent to judge the authenticity of the sub-claim by comparing the evidence with the sub-claim description and to provide an answer.
[0101] 2.3) Initial Original Statement Fact Verification Conclusion Generation: Using prompts, the retrieval agent extracts the logical expression L(a1,a2,…,a…) generated by the agent based on the sub-statements. i ,…a n ), and the answer a of the sub-declaration i The initial original statement verification result A is generated by combining the results. That is, this step uses prompt words to enable the retrieval agent to extract the logical expression L(a1,a2,…,a…) generated by the agent based on the sub-statements. i ,…a n ), combining the answers of the sub-declarations into the initial original declaration verification result A.
[0102] Through the above steps, the retrieval agent provides detailed verification evidence and answers for each sub-claim, and provides the initial original claim verification result A.
[0103] Example 4:
[0104] The embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the foregoing technical solutions will not be described here again, such as Figure 1 As shown in the figure, further to better implement the fact verification method based on multi-agent, the following setting mode is particularly adopted: in step 2.1), the evidence e i for verifying the factuality of the sub-declaration is searched from the Internet based on the retrieval of the fact verification knowledge base or using a retrieval tool
[0105] 2.1.1) Establish a fact verification knowledge base: more than 20,000 pieces of fact data verified by professional personnel are collected from the China Internet Joint Rumor Dispelling Platform and authoritative news websites, and after cleaning non-standard characters by regular expression, they are integrated into a fact verification knowledge base;
[0106] 2.1.2) Build a knowledge base index: to support the implementation of subsequent retrieval technology, this step first builds a FAISS semantic index and an Elasticsearch inverted index for each piece of data in the fact verification knowledge base to form a double index; among them, the FAISS semantic index is specially configured with HNSW parameters (M=32, efConstruction=200) for this index to support the implementation of approximate nearest neighbor search; the Elasticsearch inverted index is configured with a BM25 retrieval algorithm (k1=1.2, b=0.75) for this index to achieve the purpose of keyword retrieval;
[0107] 2.1.3) Calculate the retrieval relevance score: the retrieval relevance score of each piece of fact verification knowledge base data processed in step 2.1.2) is calculated, and only the retrieval result with a retrieval relevance score higher than a threshold value of 0.8 and the highest score is returned as the evidence e i for verifying the factuality of the sub-declaration;
[0108] 2.1.4) If the retrieval based on the fact verification knowledge base fails, the retrieval agent will output that the retrieval of the fact verification knowledge base fails, and call a search engine (such as a Bing retrieval plug-in) to search from the Internet and return the first search result most relevant as the evidence e i for verifying the factuality of the sub-declaration. Finally, the retrieval agent will store the retrieved evidence in e i of each sub-declaration C i .
[0109] Embodiment 5:
[0110] The embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the foregoing technical solutions will not be described here again, such as Figure 1As shown, further to better achieve the fact checking method based on multi-agent, the following setting mode is particularly adopted: the step 3) comprises the following specific steps:
[0111] 3.1) Human preference learning algorithm optimizes Qwen2.5-72B: build a human preference data set as training data, and then use the human preference learning algorithm to optimize Qwen2.5-72B to obtain a decision-making agent;
[0112] 3.2) Logical evaluation: make the decision-making agent perform logical evaluation through prompt words, and evaluate all evidence e in the sub-claim sequence i and the answer a i whether the original claim is logically supported;
[0113] 3.3) Fact checking conclusion output: if the original claim is logically supported and the authenticity of the original claim is A, then the sub-claim evidence and conclusion are summarized as the fact checking conclusion of the original claim and output through the decision-making agent;
[0114] Through the above process, the decision-making agent checks all evidence e in the sub-claim sequence i and the answer a i whether the original claim is logically supported, and gives the final fact checking conclusion.
[0115] Embodiment 6:
[0116] This embodiment is further optimized on the basis of any of the above embodiments, and the same parts as the foregoing technical solutions will not be repeated here, such as Figure 1 As shown, further to better achieve the fact checking method based on multi-agent, the following setting mode is particularly adopted: in the step 3.1), the human preference data set is built as training data, and the specific method is as follows: the logically coherent correct evaluation idea and conclusion sample generated by Qwen2.5-72B is used as a positive sample; the error logic is intentionally inserted into the positive sample by using Qwen2.5-72B to generate an error evaluation idea and conclusion sample as a negative sample; and the positive sample and the negative sample jointly constitute the training data.
[0117] When the human preference learning algorithm optimizes Qwen2.5-72B, the loss function is:
[0118] ; wherein, x is the input, y w is the positive sample, y l is the negative sample, and θ represents the current strategy, and refThe reference strategy is the original strategy, and γ is the temperature coefficient (set to 0.3), represents the expectation calculation on the samples in the data distribution . x , y w , y l . represents the sigmoid function, which is used to map the input to the interval [0, 1], and the purpose of this loss function is to optimize the model parameters θ by minimizing the difference between the model prediction probability and the reference model prediction probability.
[0119] Example 7:
[0120] The sub-declaration extraction agent takes Qwen2.5-72B as the base model, and the core task is to decompose a complex original declaration into multiple indivisible sub-declarations, and generate a logical expression L that verifies the truth of the original declaration based on the facts of the sub-declarations. The following is a specific implementation of the sub-declaration extraction agent:
[0121] 1.1) Input understanding and declaration decomposition: This step makes the sub-declaration extraction agent better understand the semantics and structure of the original declaration through the method of few-sample prompts, and accurately extracts key information such as entities (subject-predicate-object), relationships, and logical structures. Based on the extracted key information, the sub-declaration extraction agent decomposes the original declaration C into multiple sub-declarations C i . Each sub-declaration C i corresponds to a specific verification task. The few-sample prompt words used in this step are as follows:
[0122] You are a fact-checking assistant who needs to disassemble the original declaration into indivisible atomic sub-declarations. Each atomic sub-declaration must meet the following conditions: 1. Only contains a single fact or relationship; 2. Retains the entity and logical semantics of the original declaration; 3. The combination of sub-declarations can completely restore the original declaration.
[0123] Example: Input declaration: "**is a Chinese Internet company and provides cloud computing services." Output sub-declarations: 1. **is a Chinese Internet company. 2. **provides cloud computing services."
[0124] For example, for the original declaration: "Zheergen contains aristolochic acid lactam, which is not a class 1 carcinogen", it can be decomposed into the following sub-declarations: C1: "Zheergen contains aristolochic acid lactam"; C2: "Aristolochic acid lactam is not a class 1 carcinogen".
[0125] 1.2) Sub-claim serialization: This step makes the sub-claim extraction agent generate a sub-claim sequence S={C1,C2,…,C i ,…,C n} by the following prompt:
[0126] "Please organize the decomposed sub-claims into an ordered sub-claim sequence S={C1,C2,…,C i ,…,C n}, each sub-claim contains description c i , evidence e i and answer a i . The question is the specific content of the sub-claim, the evidence is used to store the evidence for verifying the factuality of the sub-claim, and the answer is used to store the fact verification conclusion (true / false) of the sub-claim. In addition to the description, the rest of the variable values are temporarily empty."
[0127] Through this step, the sub-claim sequence S can be represented as:
[0128] S=[{"description":c1,"evidence":e1,"answer":a1},{"description":c2,"evidence":e2,"answer":a2},{"description":c3,"evidence":e3,"answer":a3}]
[0129] Each sub-claim C i contains a description c i , an empty initial value of evidence e i and an empty initial value of answer a i ;
[0130] 1.3) Logical expression generation: In order to combine the fact verification conclusions of sub-claims into the final fact verification conclusion of the original claim later, the sub-claim extraction agent needs to generate a logical expression L(a1,a2,…a i ,…a n ). This expression defines how to derive the truth of the original claim from the fact verification conclusions of sub-claims. This step uses the few-shot prompting method, and the prompt is as follows:
[0131] "Please define how to derive the truth of the original claim from the fact verification conclusions of sub-claims according to the logical structure between sub-claims and the original claim, for example, if the fact verification conclusion of sub-claim 1 is true and the fact verification conclusion of sub-claim 2 is true, then the original claim is true, output the logical expression L(a1,a2)=a1∧a2."
[0132] Through the above steps, the sub-claim extraction agent decomposes the complex claim C into easy-to-handle sub-claims C i , and organizes them into an ordered sub-claim sequence S={C1,C2,…,C i..., C n} and generates a logical expression L(a1, a2,..., a i ..., a n ) that deduces the authenticity of the original statement. A clear structure and logical framework is provided for subsequent retrieval and decision-making agents.
[0133] Embodiment 8:
[0134] The retrieval agent is based on Qwen2.5-72B, and the core task is to retrieve evidence for sub-statement fact verification, and generate corresponding sub-statement fact verification answers according to the retrieval results. These answers will be combined into the initial original statement fact verification conclusion according to the logical expression L generated by the sub-statement extraction agent. The following is the specific implementation of the retrieval agent:
[0135] 2.1) Evidence retrieval: the retrieval agent receives the sub-statement sequence S = {C1, C2,..., C i ..., C n} decomposed by the sub-statement extraction agent, and for each sub-statement C i , the retrieval agent needs to retrieve evidence e i that verifies the authenticity of c i . To obtain external retrieval knowledge, the retrieval agent uses two evidence retrieval methods based on the fact checking knowledge base and retrieval tools from the Internet. The following implementation steps are included:
[0136] 2.1.1) Establish a fact checking knowledge base: collect more than 20,000 pieces of fact data verified by professional personnel from the China Internet Joint Rumor Refutation Platform and authoritative news websites, and integrate them into a fact checking knowledge base after cleaning non-standard characters with regular expressions;
[0137] 2.1.2) Build knowledge base index: to support the implementation of subsequent retrieval techniques, this step first builds a FAISS semantic index and an Elasticsearch inverted index for each piece of data in the fact checking knowledge base, forming a dual index. The FAISS semantic index is configured with HNSW parameters (M = 32, efConstruction = 200) to support the implementation of approximate nearest neighbor search. The Elasticsearch inverted index is configured with the BM25 retrieval algorithm (k1 = 1.2, b = 0.75) to achieve the purpose of keyword retrieval;
[0138] 2.1.3) Calculate retrieval relevance score: that is, for each piece of data in the fact checking knowledge base, two types of scores are calculated in parallel: specifically, for the input sub-statement description c iFirst, parallel computing: a. Semantic retrieval uses cosine similarity to calculate the semantic similarity score between each data in the fact-checking knowledge base and the sub-claim description c i sem = cos (SBERT (c i ), v i ), where SBERT converts the sub-claim description c i into a semantic vector, v i is the vector representation of the fact data in the knowledge base; b. Keyword retrieval uses the BM25 retrieval algorithm to obtain the score s lex of the matching between the fact data and the query keywords. Then, for each data in the fact-checking knowledge base, the retrieval relevance score is calculated. This is done using the following formula:
[0139] Score = β • s sem + (1 - β) • s lex ; where β is the weight controlling the semantic similarity (cosine similarity) and the keyword matching score (BM25 score), which is 0.7; s sem is the semantic similarity score between each data in the fact-checking knowledge base and the sub-claim description c i ; After the above retrieval relevance score calculation, the retrieval result with a retrieval relevance score higher than the threshold value 0.8 and the highest score is returned as the evidence e i verifying the factuality of the sub-claim, if not, output the retrieval fact-checking knowledge base failure;
[0140] 2.1.4) If the retrieval based on the fact-checking knowledge base fails, the retrieval agent will output the retrieval fact-checking knowledge base failure, and call the Bing retrieval plug-in to retrieve and return the most relevant first search result from the Internet as the evidence e i verifying the factuality of the sub-claim. Finally, the retrieval agent will store the retrieved evidence in e i of each sub-claim c i .
[0141] For example, for the sub-claim description c1: "Zhe'e root contains aristolochic acid", the evidence e1 may be: "Zhe'e root does contain aristolochic acid, which is a metabolite of aristolochic acid, and is widely independent in nature...". For the sub-claim description c2: "Aristolochic acid is not a class 1 carcinogen", the evidence e2 may be: "Aristolochic acid is not a carcinogen, and the International Cancer Research Agency lists aristolochic acid as a class 1 carcinogen...".
[0142] 2.2) Sub-claim answer generation: After retrieving the relevant evidence, this step uses the prompt word method to make the retrieval agent judge the authenticity of the sub-claim by comparing the evidence with the sub-claim description and give the answer, the prompt word is as follows:
[0143] Please refer to evidence e i conditional declaration c i Please verify the authenticity of the information and provide an answer (true / false). Store your answer in a. i "Among them."
[0144] For example, regarding sub-claim description c1: "Houttuynia cordata contains aristolochic acid," evidence e1 is: "Houttuynia cordata does indeed contain aristolochic acid, which is a metabolite of aristolochic acid and exists widely and independently in nature..." The answer a1 generated by the search agent is true. Regarding sub-claim description c2: "Aristolochic acid is not a Group 1 carcinogen," evidence e2 is: "Aristolochic acid is not carcinogenic; the component classified as a Group 1 carcinogen by the International Agency for Research on Cancer is aristolochic acid..." The answer a2 generated by the search agent is true.
[0145] 2.3) Initial Original Statement Fact Verification Conclusion Generation: This step uses prompt words to enable the retrieval agent to extract the logical expression L(a1,a2,…,a) generated by the agent based on the sub-statements. i ,…a n Combine the answers from the sub-declarations to form the initial original declaration verification result A. The prompt words are as follows:
[0146] "Please extract the logical expression L(a1,a2,…,a...) generated by the agent based on the sub-declaration." i ,…a n ), and the answer a of the sub-declaration i Combined, the initial original declaration verification result A is obtained.
[0147] For example, the logical expression is L(a1,a2)=a1Λa2, which means that if the fact verification conclusion of sub-claim 1 is true and the fact verification conclusion of sub-claim 2 is true, then the original claim is true.
[0148] The retrieval agent combines the answers of the sub-statements into the initial original statement verification result A(true) = a1(true)Λa2(true).
[0149] Through the above steps, the retrieval agent provides detailed verification evidence and answers for each sub-claim, and provides the initial original claim verification result A.
[0150] Example 9:
[0151] The decision-making agent is based on the Qwen2.5-72B model and optimized using a human preference learning algorithm. Its core function is to evaluate all evidence in the sub-claim sequence. i With answer a iwhether the original claim is logically supported, and to decide the final fact-checking conclusion. The following is a specific implementation of the decision-making agent:
[0152] 3.1) Human preference learning algorithm optimizes Qwen2.5-72B: In order to make more accurate logical evaluation, this step uses the human preference learning algorithm DPO to train Qwen2.5-72B, which specifically includes two steps of constructing a human preference data set for training and using a human preference learning algorithm to train Qwen2.5-72B.
[0153] 3.1.1) Construct a human preference data set for training, which contains positive and negative samples. Through the human preference learning algorithm, Qwen2.5-72B will learn how to generate positive human preference samples and reject negative samples. This step first uses the prompt word method to make Qwen2.5-72B evaluate all the evidence e i and the answer a i whether the original claim is logically supported, this process uses more than 1000 input data, the original claim of which comes from the HOVER data set, and the content complete sub-claim sequence S={C1, C2, …, C i , …, C n} obtained through the steps of embodiment 7 and embodiment 8 is used as the input to construct the human preference data set. The prompt word example is as follows:
[0154] “Given the following sub-claim description of evidence and answer:
[0155] Sub-claim 1: Aristolochic acid is contained in fold root → Evidence: Aristolochic acid is indeed contained in fold root, which is a metabolite of aristolochic acid, and exists independently in nature → Answer: True
[0156] Sub-claim 2: Aristolochic acid is not a class 1 carcinogen → Evidence: Aristolochic acid is not a carcinogen, and the component listed by the International Cancer Research Agency as a class 1 carcinogen is aristolochic acid → Answer: True
[0157] Please judge: Do these evidences and answers logically support the original claim “Aristolochic acid is contained in fold root, which is a chemical substance that is not a class 1 carcinogen”?
[0158] First, the output logic evaluates the conclusion: Y = support / not support, and second, the output of your thinking process. Through the above steps, more than 1000 logical evaluation conclusions and thinking processes are output. Fact-checking experts select and label 800 clear logical evaluation processes and correct conclusion samples as human preference data. Then, using the prompt word method, Qwen2.5-72B intentionally inserts incorrect logical thinking processes and changes logical evaluation conclusions as negative samples, thus forming 800 groups of human preference data pairs as experimental data, and the training set and validation set are divided in the ratio of 8:2.
[0159] 3.1.2) Then use the human preference learning algorithm to train Qwen2.5-72B, and the loss function is as follows:
[0160] ; wherein, x is the input, y w is the positive sample, y l is the negative sample, p θ represents the current strategy, p ref is the reference strategy, i.e. the original strategy, and g is the temperature coefficient (set to 0.3), represents the expected calculation on the sample in the data distribution x , y w , y l ). represents the sigmoid function, which is used to map the input to the interval [0, 1]. The purpose of this loss function is to optimize the model parameters by minimizing the difference between the model prediction probability and the reference model prediction probability.
[0161] 3.2) Logical evaluation: Qwen2.5-72B optimized by the human preference learning algorithm in step 3.1) as the final decision-making agent performs logical evaluation on all evidence e i and answer a i in the sub-declaration sequence to determine whether it logically supports the original declaration. This step makes the decision-making agent perform the logical evaluation task and outputs the logical evaluation conclusion Y and the decision-making agent's thinking process by using the prompt word. The prompt word is the same as the one used in step 3.1) to construct the human preference data set.
[0162] 3.3) Fact-checking conclusion output: This step determines whether to accept the fact-checking result A of the original declaration based on whether the logical evaluation conclusion Y is support or not support. If Y is support, it proves that all evidence e i and answer a iIf the original statement is indeed logically supported, and the original statement is indeed true as A, then the evidence and conclusion of the sub-declaration are summarized as the fact verification conclusion output of the original statement, and if not, the logical evaluation failure and the thinking process of the decision-making agent are output, as follows:
[0163] "Please decide whether to accept the fact verification result A of the original statement according to the logical evaluation conclusion Y, if Y is support, then prove that all evidence e i and answer a i in the sub-declaration sequence logically support the original statement, if not, output logical evaluation failure and your thinking process". i n If the original statement is indeed logically supported, and the original statement is indeed true as A, then the evidence and conclusion of the sub-declaration are summarized as the fact verification conclusion output of the original statement, and if not, the logical evaluation failure and the thinking process of the decision-making agent are output, as follows: i i If the original statement is indeed logically supported, and the original statement is indeed true as A, then the evidence and conclusion of the sub-declaration are summarized as the fact verification conclusion output of the original statement, and if not, the logical evaluation failure and the thinking process of the decision-making agent are output, as follows:
[0164] Through the above process, the decision-making agent verifies whether all evidence e i and answer a i in the sub-declaration sequence logically support the original statement, and gives the final fact verification conclusion.
[0165] Embodiment 10:
[0166] A fact verification system based on multiple agents, for implementing the fact verification method based on multiple agents, comprising:
[0167] A sub-declaration extraction agent, taking Qwen2.5-72B as a basic model, decomposes a complex original statement into multiple sub-declarations, serializes all sub-declaration sequences, and generates a logical expression L(a1,a2,…,a i ,…a n ) that can derive the truth of the original statement according to the fact verification conclusion of all sub-declarations; wherein the sub-declaration is defined as C i , including description c i , initial value empty evidence e i and initial value empty answer a i ;
[0168] A retrieval agent, taking Qwen2.5-72B as a basic model, retrieves verification evidence e i and generates answer a i for each sub-declaration Cᵢ, and combines the answers a i of the sub-declaration to generate the initial original statement verification result A according to the logical expression L(a1,a2,…,a n ,…a i );
[0169] The decision agent is trained by a human preference learning algorithm Qwen2.5-72B to evaluate all evidence e in the subsequence of claims i With the answer a i Whether logically support the original claim, output the final fact-checking conclusion.
[0170] Embodiment 11:
[0171] A computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement the fact-checking method based on multiple agents.
[0172] Embodiment 12:
[0173] An electronic device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the fact-checking method based on multiple agents when executing the computer program.
[0174] The above is only a preferred embodiment of the present application, not any form of limitation on the present application, any simple modification, equivalent change of the above embodiment according to the technical essence of the present application, falls within the protection scope of the present application.
Claims
1. A fact-checking method based on multi-agent systems, characterized in that: The specific steps include the following: 1) Using a sub-declaration extraction agent based on the Qwen2.5-72B model, the complex original declaration is decomposed into multiple sub-declarations. All sub-declarations are serialized, and a logical expression L(a1,a2,…,a) is generated that can deduce the truth of the original declaration based on the factual verification conclusions of all sub-declarations. i ,…a n The specific steps include the following: 1.1) Using a few-sample prompt word method, the sub-declaration extraction agent parses the entities, relations and logical structure of the original declaration, and decomposes the original declaration into multiple sub-declarations; 1.2) Using prompt words, the sub-declaration extraction agent serializes all sub-declarations, resulting in a sub-declaration series S={C1,C2,…,C…}. i ,…,C n }; where each sub-declaration C i Includes description c i Evidence that the initial value is empty (e) i And the answer a with an initial value of empty i ; 1.3) Extract agent definitions from sub-declarations using few-sample prompts and output the logical expression L(a1,a2,…,a…). i ,…a n This allows for the deduction of the truthfulness of the original statement based on the factual verification conclusions of the sub-statements; 2) The retrieval agent, based on Qwen2.5-72B as the model, performs each sub-declaration C i Search and verify evidence e i And generate answer a i According to the logical expression L(a1,a2,…,a…), i ,…a n The answer to the sub-declaration a i The process of generating the initial original declaration verification result A involves the following steps: 2.1) The retrieval agent retrieves evidence from the Internet to verify the factual validity of the sub-claim by using a fact-checking knowledge base or by employing retrieval tools. i It includes the following steps: 2.1.1) Collected more than 20,000 pieces of factual data verified by professionals, cleaned non-standard characters using regular expressions, and integrated them into a fact-checking knowledge base; 2.1.2) Build a FAISS semantic index and an Elasticsearch inverted index for each piece of data in the fact-checking knowledge base; 2.1.3) For each piece of fact-checking knowledge base data processed in step 2.1.2), calculate the relevance score and return only the search results with the highest relevance score above the threshold of 0.8 as evidence to verify the factual validity of the sub-statement. i ; 2.1.4) If the fact-checking knowledge base retrieval fails, the retrieval intelligence will output "Fact-checking knowledge base retrieval failed," and will call the search engine to retrieve the most relevant first search result from the Internet as evidence to verify the factual validity of the sub-statement. i ; 2.2) Using prompts to guide the retrieval agent to compare evidence e i Determine the truth value of a sub-declaration and provide the answer. i ; 2.3) Using prompt words, the retrieval agent extracts the logical expression L(a1,a2,…,a) generated by the agent based on the sub-declaration. i ,…a n ), and the answer a of the sub-declaration i Combine to generate the initial original declaration verification result A; 3) Using Qwen2.5-72B, trained with a human preference learning algorithm, as the decision-making agent, all evidence e in the sub-claim sequence is evaluated. i With answer a i Determine whether the original statement is logically supported and output the final fact-checking conclusion.
2. The fact-checking method based on multiple agents according to claim 1, characterized in that: The relevance score is calculated using the following formula: Score = β•s sem +(1-β)•s lex Where β is the weight controlling the semantic similarity and keyword matching score, with a value of 0.7; s sem For each piece of data and sub-claim description in the fact-checking knowledge base i The semantic similarity score between them; s lex The score is the score for matching factual data with query keywords.
3. The fact-checking method based on multiple agents according to claim 1, characterized in that: Step 3) includes the following specific steps: 3.1) Construct a human preference dataset as training data, and then use the human preference learning algorithm to optimize Qwen2.5-72B to obtain the decision-making agent; 3.2) Using prompts, the decision-making agent performs logical evaluation, assessing all evidence e in the sub-statement sequence. i With answer a i Does it logically support the original statement? 3.3) If the original statement is logically supported and its truthfulness is indeed A, then the evidence and conclusion of the sub-statement are summarized into the fact-checking conclusion of the original statement and output through the decision-making agent; if the original statement is not logically supported, then the logical evaluation failure and the decision-making agent's thought process are output.
4. The fact-checking method based on multiple agents according to claim 3, characterized in that: In step 3.1), constructing the human preference dataset as training data specifically involves: using logically coherent and correct evaluation ideas and conclusions generated by Qwen2.5-72B as positive samples; intentionally inserting erroneous logic into the positive samples using Qwen2.5-72B to generate incorrect evaluation ideas and conclusions as negative samples; the positive and negative samples together constitute the training data; when optimizing Qwen2.5-72B using the human preference learning algorithm, the loss function is: ; in, x For input, y w As a positive sample, y l For negative samples, π θ Indicates the current strategy, π ref The reference strategy, i.e., the original strategy, is used, where γ is the temperature coefficient. Indicates the distribution of data The samples in x , y w , y l Perform the expected value calculation; σ This represents the sigmoid function, which maps inputs to the interval [0, 1].
5. A fact-checking system based on multi-agent systems, characterized in that: To implement the multi-agent fact-checking method as described in any one of claims 1 to 4, comprising: The sub-claim extraction agent, based on the Qwen2.5-72B model, decomposes the complex original claim into multiple sub-claims, serializes all sub-claims, and generates a logical expression L(a1,a2,…,a...) that can deduce the truth of the original claim based on the factual verification conclusions of all sub-claims. i ,…a n ); where the sub-declaration is defined as C i , containing description c i Evidence that the initial value is empty (e) i And the answer a with an initial value of empty i ; The retrieval agent, using Qwen2.5-72B as the base model, is defined for each sub-declaration C. i Search and verify evidence e i And generate answer a i According to the logical expression L(a1,a2,…,a…), i ,…a n The answer to the sub-declaration a i Combine to generate the initial original declaration verification result A; The decision-making agent, trained using the human preference learning algorithm Qwen2.5-72B, evaluates all evidence e in the sub-claim sequence. i With answer a i Determine whether the original statement is logically supported and output the final fact-checking conclusion.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements a multi-agent-based fact-checking method as described in any one of claims 1 to 4.
7. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein when the processor executes the computer program, it implements a multi-agent-based fact-checking method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Inverse argument generation model, model training and reasoning method and evaluation standard based on large model
CN117407589A
Two-stage few-sample automatic fact checking method, electronic equipment and storage medium
CN119691152A