A method for reducing hallucinations of large language models

By employing a multi-candidate structured reasoning generation and global diagnostic optimization method, this approach addresses the issue of insufficient reliance on external knowledge bases in mathematical reasoning and logical derivation within large language models. This enhances the reliability and interpretability of answers, making it suitable for fields with high accuracy requirements, such as finance, healthcare, and law.

CN121480738BActive Publication Date: 2026-03-17MINNAN INST OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies for reducing the illusion of large language models suffer from insufficient quality and coverage of external knowledge bases, especially in mathematical reasoning and logical derivation, where their effectiveness is limited. Furthermore, existing methods cannot effectively aggregate answers to open-ended questions.

Method used

The method employs multi-candidate structured reasoning generation, triple-reset reliability assessment, candidate optimization, global diagnosis, and iterative optimization. By generating multiple structured candidate answers, each candidate includes reasoning steps and confidence levels, it performs opposition checks, implication checks, and comprehensive confidence calculations. Combined with global reasoning chain diagnosis and correction strategies, it ensures the reliability and interpretability of the answers.

Benefits of technology

It significantly improves the interpretability and auditability of large language models, can identify weak links in reasoning and trace the root cause, and achieves efficient answer correction in closed scenarios, avoiding the limitations of local patching. It is particularly suitable for scenarios such as mathematical reasoning where external information cannot be retrieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480738B_ABST
    Figure CN121480738B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of large language models, and particularly relates to a method for reducing hallucinations of a large language model, which comprises: multi-candidate structured reasoning generation; triple confidence evaluation: obtaining three kinds of confidence, and calculating a comprehensive confidence based on the three kinds of confidence; candidate selection and optimization: performing weak point diagnosis analysis, outputting a diagnosis result, selecting a correction strategy based on the diagnosis result, executing a step correction, and performing suffix reconstruction or rewriting on a reasoning chain after the step correction; and convergence determination: when a convergence condition is met, determining convergence and outputting a current answer. The application decomposes an answer generation process into multiple inspectable reasoning steps through structured reasoning, each step being accompanied by confidence, which significantly improves the explainability and auditability of the system; a multi-dimensional confidence evaluation mechanism is introduced, combined with threefold verification of opposite checking, implication checking and step confidence, to comprehensively measure the reliability of the answer from different angles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of large language model technology, and in particular relates to a method for reducing the illusion of large language models. Background Technology

[0002] Large language models have demonstrated powerful capabilities in tasks such as question answering, reasoning, and content generation. However, they also suffer from the "illusion" problem, where the model generates seemingly reasonable content that is actually inconsistent with the facts or logically flawed. The illusion problem severely limits the application of large language models in fields with high accuracy requirements, such as finance, healthcare, law, and scientific computing.

[0003] Current methods for reducing hallucinations mainly include: Retrieval Enhanced Generation (RAG) which introduces an external knowledge base as the basis for the answer, Thought Chain (COT) which guides the model to demonstrate the reasoning process, and Self-Consistency which uses multiple samplings to obtain the majority vote as the answer result.

[0004] However, these methods have the following limitations: RAG methods rely on the quality and coverage of external knowledge bases, and are not very effective for problems such as mathematical reasoning and logical deduction where relevant knowledge cannot be retrieved; while thought chain hints improve interpretability, they cannot guarantee the reliability of each reasoning step; self-consistent decoding only focuses on the consistency of the final answer and ignores the correctness of the reasoning process. When most answers are wrong (such as complex mathematical problems), the voting mechanism may reinforce incorrect answers; in addition, it is difficult to effectively aggregate open-ended questions. Summary of the Invention

[0005] The purpose of this invention is to provide a method to reduce the illusion of large language models, aiming to solve the problem that existing technologies rely on the quality and coverage of external knowledge bases, and have limited effectiveness for problems such as mathematical reasoning and logical deduction where relevant knowledge cannot be retrieved.

[0006] This invention is implemented as follows: a method for reducing the illusion of large language models, the method comprising:

[0007] Multi-candidate structured reasoning generation: Receives an input question and drives a large language model to generate N structured candidates. Each structured candidate contains a final answer and a chain of reasoning steps. Each step in the chain of reasoning steps carries a self-assessed confidence level.

[0008] Triple-recommendation reliability assessment: Perform opposition checks on each structured candidate to obtain opposition confidence. Perform an implication check to obtain the implication confidence level. Calculate the minimum step confidence in the inference chain. The overall confidence level is calculated by aggregating the three confidence levels. ;

[0009] Candidate selection: Select the candidate with the best overall confidence level from N candidates. The highest-ranking structured candidate is taken as the current optimal state;

[0010] Global Diagnosis and Iterative Optimization: In the inner loop, identify the reasoning step with the lowest confidence in the current optimal state, perform weakness diagnosis analysis through the global reasoning chain, output the diagnosis results, the content of the diagnosis analysis includes the root cause, upstream dependencies and the overall reasoning direction, select the correction strategy based on the diagnosis results, execute the step correction, and perform suffix reconstruction or rewriting on the reasoning chain after the correction step.

[0011] Convergence criterion: When the overall confidence level Minimum step confidence and implied confidence If all values ​​exceed their respective preset thresholds, convergence is determined and the current answer is output; otherwise, iteration continues or the next round of outer candidate generation begins.

[0012] Preferably, the opposition checking step includes driving a large language model to generate opposition conclusions for the current answer. Assess the credibility of opposing conclusions. ,in, A higher value indicates a higher level of credibility for the opposing conclusion. The reasoning steps are then calibrated based on the credibility of the opposing conclusion. ,in, Let be the self-assessment confidence level for the i-th step.

[0013] Preferably, the entailment check step includes: inputting the inference step chain and the final answer into a large language model, determining whether the inference step chain logically entails the final answer, and outputting the entailment confidence score. The criteria for determining the confidence level are as follows: This indicates that the reasoning chain strongly supports the answer; This indicates that the evidence is supporting but insufficient; This indicates a contradiction between the reasoning chain and the answer.

[0014] Preferably, the aggregate calculation formula for the comprehensive confidence level is: ;

[0015] in, The minimum confidence level across all steps. This is the lower limit protection value for the opposing confidence level.

[0016] Preferably, the step of performing vulnerability diagnosis analysis through a global inference chain and outputting diagnosis results includes:

[0017] Upstream dependency: Determine if the weakness was caused by an anomaly in a previous step;

[0018] Missing information: Determining whether an intermediate step in the reasoning chain has been skipped;

[0019] Logical break: Determine if there are any jumps or implicit assumptions in the derivation between steps;

[0020] Directional deviation: Determine whether the overall reasoning direction is correct and whether it is necessary to change the angle;

[0021] Answer consistency: Determine whether the final answer matches the reasoning steps;

[0022] Output diagnostic results, including the root cause of the problem, the index of the steps that led to the problem, the overall reasoning chain of the problem, corrective instructions, and suggested actions.

[0023] Preferably, the suggested actions include three types:

[0024] refine_single: Only the weakest step needs to be corrected;

[0025] rebuild_from: Rebuild subsequent steps starting from cause_step_idx, where cause_step_idx is the root cause step index output by the global diagnostics;

[0026] rethink_all: There is a problem with the overall reasoning direction. Exiting the inner loop triggers the outer loop to regenerate candidates.

[0027] Preferably, in the step of selecting a correction strategy based on the diagnostic results and performing step correction, the target step index that needs to be corrected is determined according to the diagnostic results. If the root cause step is corrected, then the weakest step is corrected; otherwise, the weakest step is corrected. Based on the correction instructions, the large language model is driven to modify the target step; the corrected premise statement is output. and the updated self-rated confidence level Replace the original steps with the revised steps.

[0028] Preferably, the step of suffix reconstruction of the inference chain after the correction step includes: determining the reconstruction starting point based on the global diagnostic results. If the diagnosis recommendation is Then use Otherwise, use the actual corrected step index; divide the inference step chain into a prefix and a suffix, where the prefix contains steps from the first step to the reconstruction starting point, and the suffix contains all steps after the reconstruction starting point. Keep the prefix unchanged and drive the large language model to regenerate the suffix; if the reconstructed suffix is ​​empty, retain the original suffix.

[0029] Preferably, in the convergence determination step, the convergence determination condition is:

[0030]

[0031] in, This is the global confidence threshold. This is the single-step confidence threshold. To determine the confidence threshold, all three conditions must be met simultaneously for convergence to be considered.

[0032] Preferably, the steps of answer consistency checking include: extracting numerical answers from the last few steps of the reasoning step chain using pattern matching; if the extracted numerical answers are inconsistent with the final answer, or if the final answer is non-numerical text exceeding a preset length, then replacing the final answer with the extracted numerical answers.

[0033] This invention provides a method to reduce the illusion of large language models. It decomposes the answer generation process into multiple verifiable reasoning steps through structured reasoning, each with a confidence level, significantly improving the interpretability and auditability of the system. A multi-dimensional confidence assessment mechanism is introduced, combining opposition checking, implication checking, and step confidence level triple verification to comprehensively measure the reliability of the answer from different perspectives. Furthermore, global reasoning chain diagnosis is implemented, which not only identifies weak links in the reasoning but also traces their root causes and upstream dependencies, avoiding the limitations of piecemeal fixes. Based on this, the system can intelligently select the optimal correction strategy based on the diagnostic results—including single-step correction, local reconstruction, or global re-inference—thereby improving correction efficiency while ensuring the quality of the final answer. In addition, the generation of candidate reasoning paths and confidence checks support concurrent execution, greatly improving overall processing efficiency. Crucially, the entire reasoning, verification, and correction process is entirely based on the model's own capabilities, without relying on external knowledge bases, making it particularly suitable for closed scenarios such as mathematical reasoning where external information cannot be retrieved. Attached Figure Description

[0034] Figure 1 A flowchart illustrating a method for reducing large language model illusions, provided as an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0036] like Figure 1 The diagram shows a flowchart of a method for reducing large language model illusion provided by an embodiment of the present invention. The method includes:

[0037] S100, Multi-candidate Structured Reasoning Generation: Receives an input question and drives a large language model to generate N structured candidates. Each structured candidate contains a final answer and a chain of reasoning steps, with each step in the chain carrying a self-assessed confidence level.

[0038] In this step, the input question Q is received, and the large language model is concurrently driven to generate N structured candidates. Each candidate... Includes: Final Answer Direct answers to questions, and chains of reasoning steps. The reasoning process that leads to the answer.

[0039] Each reasoning step Includes premise statements and self-rated confidence level Specifically, the self-rated confidence score represents the model's confidence in the correctness of that step, and its criterion is as follows: Indicates a high degree of certainty; This indicates insufficient information or that there is doubt. This indicates a possible error.

[0040] Multiple candidates are generated simultaneously using a concurrency mechanism to improve efficiency. Let the concurrency of the candidate pool be... Thread pool executors are used to manage concurrent tasks.

[0041] S200, Triple Reliability Assessment: Perform an opposition check on each structured candidate to obtain opposition confidence. Perform an implication check to obtain the implication confidence level. Calculate the minimum step confidence in the inference chain. The overall confidence level is calculated by aggregating the three confidence levels. .

[0042] In this step, for each candidate Perform a triple-reset reliability assessment; the opposition check and the implication check can be performed concurrently.

[0043] Opposites checking: Driving large language models for answer-related tasks Generate meaningful opposing conclusions And assess the credibility of opposing conclusions. The core idea of ​​opposition checking is that if a credible opposing conclusion can be easily constructed, then the original answer may be an illusion.

[0044] For numerical answers (such as math problems), the opposing conclusion should be in the form of "the correct answer is not that value," unless a specific calculation error can be pointed out. It should be within the range of 0.3-0.5.

[0045] Calibrate the inference steps based on opposing confidence levels:

[0046] ;

[0047] Implication check: linking the reasoning steps in the chain and the final answer Input a large language model, determine whether the inference chain logically implies the answer, and output the implied confidence score. Entailment checks ensure that the answer is logically derived from the reasoning process, rather than being generated out of thin air.

[0048] Step confidence aggregation: Calculate the minimum confidence level in the calibrated inference step chain.

[0049] ;

[0050] Overall confidence level calculation: ;

[0051] in This is the lower limit protection value (default 0.3) to prevent a single abnormal check from causing the overall confidence level to be reset to zero.

[0052] S300, Candidate Selection: Select the candidate with the highest overall confidence level from N candidates. The highest-ranking structured candidate is taken as the current optimal state.

[0053] In this step, the state with the highest overall confidence is selected from the N candidates as the current optimal state: .

[0054] S400, Global Diagnosis and Iterative Optimization: In the inner loop, identify the reasoning step with the lowest confidence in the current optimal state, perform weakness diagnosis analysis through the global reasoning chain, output the diagnosis results, the content of the diagnosis analysis includes the root cause, upstream dependencies and the overall reasoning direction, select the correction strategy based on the diagnosis results, execute the step correction, and perform suffix reconstruction or rewriting on the reasoning chain after the correction step.

[0055] In this step, the inner loop is entered to iteratively optimize the current optimal state. Each iteration includes the following sub-steps:

[0056] Weakness identification: Identify the step with the lowest confidence in the current inference chain. ;

[0057] Global reasoning chain diagnosis: Input the question, final answer, complete reasoning step chain (with index) and weakest step into the large language model for diagnostic analysis from a global perspective.

[0058] Diagnostic dimensions include:

[0059] Upstream dependency: Was this weakness caused by an error or inaccuracy in a previous step?

[0060] Missing information: Did the reasoning chain skip key intermediate steps?

[0061] Logical break: Are there any jumps or implicit assumptions in the derivation between steps?

[0062] Directional deviation: Is the overall reasoning direction correct? Should we change our perspective?

[0063] Answer consistency: Does the final answer truly match the reasoning steps?

[0064] Diagnostic output includes:

[0065] Root cause analysis of the problem (possibly upstream);

[0066] : The index of the step that actually caused the problem, -1 represents the current step itself;

[0067] Problems with the overall reasoning chain (if any);

[0068] Targeted correction instructions;

[0069] : Suggested action, with values ​​of refine_single, rebuild_from, or rethink_all;

[0070] Intelligent correction strategy selection: Select a correction strategy based on the diagnostic results.

[0071] refine_single: only corrects the current weak step, suitable for situations where the weakness itself is problematic;

[0072] rebuild_from: from Start rebuilding subsequent steps. cause_step_idx is the root cause step index output by the global diagnostics, which is applicable when the weakness is caused by an upstream error.

[0073] rethink_all: The overall reasoning direction is flawed; break out of the inner loop and allow the outer loop to regenerate candidates.

[0074] Step correction: Identify the target step for correction (root cause step or weak step), modify the step based on the correction instructions to drive the large language model, and output the corrected premise statement and the updated self-assessment confidence.

[0075] Suffix reconstruction: If the correction step is not the last step, determine the starting point for reconstruction based on the diagnostic suggestions, divide the inference chain into prefix and suffix, keep the prefix unchanged, and regenerate the suffix to make the entire inference chain self-consistent.

[0076] Reassessment: Perform concurrent opposition and implication checks on the revised inference chain and update the overall confidence level.

[0077] Answer rewriting (optional): If the overall confidence level after correction is still below the threshold, the final answer will be rewritten to a form better supported by the inference chain, without changing the inference chain. Rewriting is skipped for purely numerical answers.

[0078] S500, Convergence Criterion: When the overall confidence level... Minimum step confidence and implied confidence If all values ​​exceed their respective preset thresholds, convergence is determined and the current answer is output; otherwise, iteration continues or the next round of outer candidate generation begins.

[0079] In this step, the convergence condition is checked: ;

[0080] If the condition is met, output the current answer; otherwise, continue the inner iteration or proceed to the next round of outer candidate generation.

[0081] In one specific embodiment of the present invention, the mathematical representation of the structured candidate is as follows: Let the input problem be Q, and the candidate set be... Each candidate It can be represented as a pair: ;

[0082] in, For the final answer, For the chain of reasoning steps, This represents the number of steps. Each step... The premise statements are given with confidence:

[0083] ;

[0084] The self-assessment confidence level represents the model's confidence in the correctness of the inference at step i.

[0085] In this embodiment of the invention, the theoretical basis for the triple-reset reliability assessment is as follows:

[0086] Duality principle of duality checking: Let the truth value of answer A be... opposing conclusions The credibility is Based on the principle of logical duality, the upper bound confidence level of the original answer is:

[0087] ;

[0088] This formula demonstrates that if the opposing conclusion has high credibility, the upper bound of the original answer's credibility will necessarily decrease; the two are complementary. The calibrated step confidence level is:

[0089] ;

[0090] This calibration mechanism ensures that the step confidence does not exceed the upper bound given by the opposing constraint.

[0091] The principle of logical consistency in implication checks: Let the chain of reasoning steps be S, and the final answer be A. The implication relation can be formalized as:

[0092] ;

[0093] Implied confidence level The semantic interpretation is: This indicates that the reasoning chain strongly implies the answer; This indicates insufficient or irrelevant evidence; This indicates a contradiction between the reasoning chain and the answer.

[0094] The principle of weakest link in overall confidence: This invention adopts the "barrel effect" minimum value aggregation strategy, where the overall confidence is determined by the weakest link.

[0095] ;

[0096] in: : Confidence of the weakest step in the chain of steps; : Implies consistency confidence; : Upper bound of the opposing constraint Lower limit protection value

[0097] The theoretical basis for this aggregation strategy is that the reliability of the reasoning chain is determined by its weakest link, and low confidence in any dimension will limit the credibility of the final conclusion.

[0098] In this embodiment of the invention, the formal representation of the global inference chain diagnosis is as follows:

[0099] Directed graph representation of the reasoning chain: Modeling the chain of reasoning steps as a directed acyclic graph. , where: vertex set , For the problem node, For the i-th inference node, Answer node; edge set , indicating inference dependency

[0100] Error propagation model: Let the probability of an error in step i be... The error starts from step :

[0101] ;

[0102] in For steps The dependency weights on step i. This model explains why it is necessary to identify upstream root causes: if the weakness is caused by an upstream error, simply correcting the current step cannot eliminate the root problem.

[0103] Five-dimensional analysis function for global diagnosis: Defining the diagnostic function ,in: ;

[0104] In this embodiment of the invention, the convergence analysis of the iterative optimization is as follows:

[0105] Monotonicity Guarantee: Let the optimal comprehensive confidence level after the t-th iteration be... The iterative optimization process guarantees: ;

[0106] That is, the historical best state is monotonically non-decreasing. This monotonicity is guaranteed by the following mechanisms: 1. The candidate pool is updated only when the new candidate is better than the historical best. 2. Inner layer corrections are only accepted when the confidence level increases after the correction.

[0107] Sufficiency of convergence conditions: The convergence criterion is that the three thresholds are jointly satisfied:

[0108] ;

[0109] The sufficiency of this condition lies in: To ensure overall credibility, To ensure the reliability of each step of reasoning, Ensuring logical consistency is essential; all three are indispensable.

[0110] Termination guarantee for maximum iteration count: Let the maximum number of iterations in the outer layer be... The maximum number of iterations in the inner layer is Then the upper bound of the total number of iterations is:

[0111] ;

[0112] Where N is the number of candidates, and K is the average number of checks per correction. This upper bound guarantees that the algorithm will eventually terminate.

[0113] In this embodiment of the invention, the pattern matching rules for answer consistency checking are as follows:

[0114] Define the answer extraction function The numerical answer is extracted from the last few steps of the reasoning chain. Matching patterns include: Equation patterns: Termination Mode: Last Digit Pattern:

[0115] The consistency check rule is: if Then perform the replacement. .

[0116] In this embodiment of the invention, the lower limit protection mechanism for confidence calibration is as follows:

[0117] Let the confidence level of the opposition be... Unprotected complementary value .when When the value is abnormally high (e.g., due to model misjudgment), it may lead to And thus .

[0118] Introducing a lower limit protection value (Default 0.3), the calibrated complementary value is: ;

[0119] This mechanism ensures that an anomaly in a single opposition check will not cause the overall confidence level to be completely zero, thus improving the robustness of the system. The value of is based on the following: empirically, for complex reasoning problems, even if there are opposing arguments, the original answer still has at least 30% basic credibility.

[0120] Example 1: Overall Method Flow:

[0121] Step 1: Generation of multi-candidate structured reasoning:

[0122] Set the number of candidates N=8, and the concurrency of the candidate pool. The large language model is invoked concurrently with the input question to generate 8 independent structured candidates. Each invocation uses the following system prompt:

[0123] You are a meticulous, fact-based assistant.

[0124] Output only compliant JSON: {"final_answer":"...", "steps":[{"premise":"...", "mu":0.xx}, ...]};

[0125] Requirements: Steps must be verifiable and specific statements; each step should be given... When highly certain When information is missing or in doubt When errors occur ; Text outside the specified format must not be fabricated.

[0126] Step Two: Counter-examination:

[0127] Perform an opposition check on the final answer for each candidate, using the following system prompt:

[0128] You are a rigorous fact-checker.

[0129] Given an answer, generate a meaningful opposing conclusion and assess its credibility. .

[0130]

Important Rules

[0131] - If the answer is a number (such as 386), the opposing conclusion should be "the correct answer is not 386" or "the answer should be some other number";

[0132] - Avoid generating irrelevant statements such as "386 is not 386" or "386 is not a fact";

[0133] - mu_neg indicates the credibility of the opposing conclusion: 0.0 = completely unreliable, 1.0 = highly reliable;

[0134] - For numerical answers to math problems, unless you can point out a specific calculation error, mu_neg should be between 0.3 and 0.5.

[0135] Output only JSON: {"counter_answer":"...", "mu_neg":0.xx};

[0136] Step 3: Confidence calibration:

[0137] The reasoning steps are calibrated based on the opposition confidence level. Let the opposition confidence level be... The calibration confidence level for each step is:

[0138] ;

[0139] This calibration mechanism ensures that when the confidence level of opposing conclusions is high, the upper limit of confidence for all steps is automatically lowered.

[0140] Step 4: Implied Check:

[0141] Input the calibrated inference chain and the final answer into the entailment determiner, using the following system hints:

[0142] You are the decision maker.

[0143] Given steps and final_answer, output:

[0144] {"mu_entail":0.xx};

[0145] Rating: Strongly support Insufficient evidence ;contradiction Only output JSON.

[0146] Step 5: Aggregate overall confidence scores:

[0147] Calculate the overall confidence level:

[0148] ;

[0149] The lower limit protection value of 0.3 is to prevent a single abnormality in the opposing inspection from causing the overall confidence level to be too low.

[0150] Step Six: Candidate Selection and Iterative Optimization:

[0151] The candidate with the highest overall confidence level is selected for the inner optimization loop. Loop parameter settings: maximum number of outer iterations. Maximum number of inner iterations .

[0152] Step 7: Global Inference Chain Diagnosis:

[0153] After identifying the inference step with the lowest confidence, the global diagnostic tool is invoked. Unlike traditional methods that analyze only a single weak step, this method uses the complete inference chain as context input, employing the following system prompts:

[0154] You are a global diagnostic expert for the inference chain.

[0155] You need to analyze the entire reasoning chain to find the root cause of the low confidence level.

[0156]

Analysis Dimensions

[0157] 1. Upstream dependency: Was this weakness caused by an error / inaccuracy in a previous step?

[0158] 2. Missing Information: Did the reasoning chain skip any key intermediate steps?

[0159] 3. Logical breaks: Are there any jumps or implicit assumptions in the derivation between steps?

[0160] 4. Directional Deviation: Is the overall reasoning direction correct? Should we change the perspective?

[0161] 5. Answer Consistency: Does the final answer truly match the reasoning steps?

[0162] [Output Format] Output only JSON:

[0163] {"root_cause": "Root cause analysis of the problem (possibly upstream)",

[0164] "cause_step_idx": -1, / / The index of the step that actually caused the problem; -1 indicates the current step itself.

[0165] "global_issue": "Issues related to the overall reasoning chain (if any)".

[0166] "instruction": "Targeted correction instruction",

[0167] "suggested_action": "refine_single|rebuild_from|rethink_all"};

[0168] Step 8: Execution of the intelligent correction strategy:

[0169] Execute the corresponding strategy based on the global diagnostic results:

[0170] like The overall reasoning is flawed; break out of the inner loop and proceed to the next round of outer candidate generation.

[0171] like :Correction The steps at that point are then used to reconstruct the subsequent reasoning chain from that point;

[0172] like Only correct the weakest step at present.

[0173] Step Nine: Step Correction:

[0174] The step corrector is invoked based on the correction instruction:

[0175] You are the reasoning corrector.

[0176] Modify only the given premise of minimum mu, and output:

[0177] {"revised_premise":"...", "mu":0.xx, "delta_note":"A one-sentence explanation of the changes"}

[0178] External information must not be introduced; when highly certain. When information is missing or in doubt When errors occur .

[0179] Step 10: Suffix Reconstruction

[0180] Based on the diagnostic results, determine the starting point for reconstruction, and then use the suffix rebuilder to regenerate the subsequent inference chain:

[0181] You are a reasoning suffix rebuilder.

[0182] Keep prefix_steps unchanged, rebuild suffix to make it consistent with final_answer.

[0183] Output: {"new_suffix":[{"premise":"...", "mu":0.xx}, ...]};

[0184] One to three steps are recommended.

[0185] Step 11: Answer Rewriting (Condition Triggered):

[0186] If corrected This will trigger answer rewriting:

[0187] You are the answer rewriter.

[0188] Without changing steps, rewrite final_answer as the "most accurate and verifiable statement" supported / implied by steps.

[0189] Output only: {"final_answer":"..."};

[0190] For purely numerical answers (such as integers and fractions), skip rewriting to maintain simplicity and stability.

[0191] Step 12: Convergence Determination and Output:

[0192] Set threshold: , , .

[0193] Output the final answer when the convergence condition is met; otherwise, continue iterating until the maximum number of iterations is reached, and output the historical best answer.

[0194] Example 2: AIME2025 Mathematical Reasoning Problem Experiment:

[0195] Using 30 problems from AIME 2025 (American Invitational Mathematics Competition 2025) as the test set, the performance of our method was compared with the baseline method using the large language model DeepSeek-V3.2. AIME is a high-level mathematics competition in North America, with challenging problems, and the answers are all integers between 0 and 999.

[0196] Test parameter configuration: Number of candidates N=8, maximum number of outer iterations Maximum number of inner iterations Threshold: , , Sampling temperature: 0.3.

[0197] Comparison methods: Direct: Directly generates answers without any enhancement; CoT: Thought chain hints guide the model to demonstrate the reasoning process; VOTE-8: 8-sample majority voting; VOTE-16: 16-sample majority voting; Our method: Structured reasoning + global diagnosis + iterative correction.

[0198] The experimental results are as follows:

[0199] Table 1: AIME 2025 Accuracy Comparison

[0200]

[0201] Table 2: Detailed Comparison of Each Method

[0202]

[0203] Example 3: Key Case Analysis

[0204] Case 1: Question 8 - This method is uniquely correct

[0205] The problem involves parabolas The point of intersection with the original parabola after rotating 60° counterclockwise around the origin.

[0206] Results for each method: Direct: 23 (error), CoT: 13 (error), VOTE-8: 6 (error), VOTE-16: 12 (error), This method: 62 (correct);

[0207] This method determines the process analysis:

[0208] Candidate answer generation: The system generated multiple candidate answers (including 62, 0, 17, 276, 19, 11, etc.), among which the derivation steps of answer 62 showed high internal consistency. and step minimum confidence .

[0209] Pool selection: The system selected answer 62 from the candidate pool because of its high overall confidence level. .

[0210] Global diagnosis and correction: Two rounds of meta-correction and internal iteration were subsequently performed. The diagnosis revealed that the confidence level of the step concerning the rotation transformation formula in the inference chain was low. By supplementing the specific form of the rotation matrix and substituting it for verification, the confidence level of this step was improved.

[0211] Answer Confirmation: After the answer rewriting step, the system ultimately maintains the answer as 62, with a final confidence level of [insert confidence level here]. , .

[0212] Key reasoning steps: Rotation transformation formula: The y-coordinate of the intersection point in the fourth quadrant is obtained: It conforms to the question format. Given a=3, b=57, c=2, calculate: a+b+c=3+57+2=62;

[0213] This case illustrates that even when all baseline methods (including 16 sampled votes) give incorrect answers, this method can still find the correct answer through structured reasoning and confidence assessment.

[0214] This case illustrates that multiple sampling and voting are not always effective; sometimes, they can even lead to incorrect results by sampling more incorrect answers. This method, through confidence assessment rather than simple voting, can more robustly select the correct answer.

[0215] Example 4: Parameter Configuration Instructions:

[0216] The main parameters involved in this method, their default values, and adjustment suggestions are shown in the table below:

[0217] Table 3: Parameter Overview Table

[0218]

[0219] Example 5: Detailed Explanation of the Global Diagnostic Mechanism:

[0220] Global diagnosis is the core innovation of this invention, and its key differences from traditional methods are as follows:

[0221] Table 4: Comparison of Diagnostic Mechanisms

[0222]

[0223] Five analytical dimensions of global diagnosis:

[0224] 1. Upstream Dependency Analysis: Check if a weak step depends on a previous incorrect or inaccurate step. If so, the correction should begin at the upstream root cause, rather than just fixing the surface weakness.

[0225] 2. Information Gap Analysis: Check if the reasoning chain skips key intermediate steps, causing logical jumps. If so, the missing intermediate derivations should be supplemented.

[0226] 3. Logical break analysis: Examine the derivation between steps for any implicit assumptions or unstated logical jumps. If so, the implicit assumptions should be explicitly stated or supplemented with supporting arguments.

[0227] 4. Directional Deviation Analysis: Check whether the overall reasoning direction is correct. If the direction is fundamentally wrong, local corrections will be ineffective, and a global re-reasoning should be recommended.

[0228] 5. Answer Consistency Analysis: Check whether the final answer truly matches the conclusion of the reasoning steps. If they do not match, it may be due to an error in answer extraction or an incomplete reasoning chain.

[0229] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for reducing hallucinations of a large language model, characterized in that, The method comprises: Multi-candidate structured reasoning generation: receiving an input question, driving a large language model to generate N structured candidates, each structured candidate containing a final answer and a reasoning step chain, each step in the reasoning step chain carrying a premise statement and a self-evaluation confidence; Triple confidence assessment: performing a contradiction check on each structured candidate to obtain a contradiction confidence , performing an entailment check to obtain an entailment confidence , calculating a minimum step confidence in the chain of inference steps , aggregating the three confidences to compute a comprehensive confidence ; top candidate: select the top candidate from N candidates highest structured candidate as the current optimal state; Global diagnosis and iterative optimization: in the inner loop, identify the reasoning step with the lowest confidence in the current optimal state, perform weak point diagnosis analysis through the global reasoning chain, output the diagnosis result, the content of the diagnosis analysis includes the root cause, the upstream dependency relationship and the overall reasoning direction, select the correction strategy based on the diagnosis result, execute the step correction, and perform suffix reconstruction or answer rewriting on the reasoning chain after the corrected step; Convergence criterion: when the integrated confidence , the minimum step confidence and the implication confidence all exceed their respective preset thresholds, convergence is determined and the current answer is output; otherwise, iteration continues or the next round of outer candidate generation is entered. The step of the opposite check comprises driving the large language model to generate an opposite conclusion for the current answer ; evaluating the credibility of the opposite conclusion , wherein The higher the higher indicates that the opposite conclusion is more credible, and the credibility of the opposite conclusion is calibrated based on the reasoning step: , wherein is the self-evaluation confidence of the i-th step; The step of the entailment check comprises: inputting the reasoning step chain and the final answer into a large language model, judging whether the reasoning step chain logically entails the final answer, and outputting an entailment confidence ; wherein the determination standard of the entailment confidence is: indicates that the reasoning chain strongly supports the answer; indicates that the evidence supports but is insufficient; indicates that the reasoning chain is in contradiction with the answer; The aggregation calculation formula of the comprehensive confidence is: wherein, is the minimum value of the confidence for all steps, is the lower bound protection value for the confidence. The step of performing weak point diagnosis analysis through the global reasoning chain and outputting the diagnosis result comprises: Upstream dependency: judge whether the weak point is caused by an abnormal previous step; Information missing: judge whether the reasoning chain skips an intermediate step; Logical break: judge whether the derivation between steps exists jump or implicit assumption; Direction deviation: judge whether the overall reasoning direction is correct, and determine whether the angle needs to be changed; Answer consistency: judge whether the final answer matches the reasoning steps; Output the diagnosis result, including the problem root cause, the step index causing the problem, the overall reasoning chain problem, the correction instruction and the recommended action.

2. The method of reducing hallucinations of large language models of claim 1, wherein, The recommended action includes three types: refine_single: only correct the current weakest step; rebuild_from: rebuild the subsequent steps from cause_step_idx, cause_step_idx is the root cause step index output by global diagnosis; rethink_all: the overall reasoning direction is problematic, exit the inner loop to trigger the outer loop to generate candidates again.

3. The method for reducing hallucinations of large language models according to claim 2, wherein, Based on the diagnosis result, a correction strategy is selected, in the step of performing step correction, the target step index to be corrected is determined according to the diagnosis result, if , the root cause step is corrected, otherwise the current weakest step is corrected; based on the correction instruction, the large language model is driven to modify the target step; the corrected premise statement is output The updated self-evaluation confidence ; the original step is replaced with the corrected step.

4. The method for reducing hallucinations of large language models of claim 2, wherein, The step of suffix reconstruction on the inference chain after the correction step includes: determining a reconstruction starting point according to the global diagnosis result , if the diagnosis suggestion is , using , otherwise using the actual corrected step index; splitting the inference step chain into a prefix and a suffix, wherein the prefix contains steps from the first step to the reconstruction starting point, and the suffix is all steps after the reconstruction starting point, keeping the prefix unchanged, and driving the large language model to regenerate the suffix; if the reconstructed suffix is empty, the original suffix is retained.

5. The method of reducing hallucinations of large language models of claim 1, wherein, In the step of convergence judgment, the condition of convergence judgment is: wherein, is a global confidence threshold, is a single-step confidence threshold, is an entailment confidence threshold, all three conditions are met, i.e., the convergence is determined.

6. The method for reducing hallucinations of large language models according to claim 5, wherein, The steps of answer consistency check include: using pattern matching to extract numerical answers from the last several steps of the reasoning step chain; if the extracted numerical answer is inconsistent with the final answer, or the final answer is non-numeric text exceeding the preset length, replace the final answer with the extracted numerical answer.

Citation Information

Patent Citations

  • Large language model illusion suppression method and system based on formalized proof

    CN120542564A

  • Online question and answer illusion detection method based on knowledge graph and multi-stage fusion

    CN121235125A