Multi-path reasoning method and device, electronic equipment, medium and program product
By generating inference paths in parallel evaluation of financial business through a multi-path inference method, the problems of single path dependence and waste of computing resources are solved, and efficient and reliable financial decision support is achieved.
Patent Information
- Application Number
- CN202511120806.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-04
AI Technical Summary
Existing technologies for multi-step logical reasoning methods based on large language models in financial business suffer from problems such as uncorrectability due to single path dependence, huge consumption of computational resources, and path redundancy, making them difficult to implement in practice, especially in high-dimensional financial analysis.
A multi-path reasoning method is adopted to generate multiple first reasoning paths. Second reasoning paths are obtained through pruning and filtering. Parallel reasoning is performed, checkpoints are set for evaluation and filtering, and finally, the reasoning chain logic is verified to obtain the reasoning result.
It improves the diversity and path quality in the initial stage of reasoning, enhances computational efficiency, ensures the logical support and credibility of reasoning results, and reduces the resource overhead of ineffective computation.
Smart Images

Figure CN120893582A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the application of large models in the financial technology scene, relates to the field of artificial intelligence technology and the field of financial technology, and more particularly to a multi-path reasoning method, device, equipment, medium and program product. BACKGROUND
[0002] In recent years, financial institutions have gradually explored automatic reasoning and decision-making systems based on large language models (LLM) to cope with the increasing complexity, real-time and risk control requirements in financial business. In tasks such as credit risk assessment, portfolio optimization, compliance audit, etc., LLM needs to combine multi-source data for multi-step logical reasoning, and has strong explainability and traceability.
[0003] On this basis, the existing technology proposes a chain-of-thought (CoT) reasoning mechanism to improve logical rigor and problem-solving transparency by guiding the model to generate intermediate reasoning steps. However, this method relies on single-path reasoning, and once an error occurs in the middle, it cannot be corrected, and the serialized output of multi-step reasoning increases time and computing overhead, and the results are also susceptible to the influence of single path and lack of stability. To make up for the above shortcomings, the tree-of-thought (ToT) method introduces a multi-path branch exploration and backtracking mechanism, which generates multiple candidate paths at each step and selects them through evaluation to enhance the comprehensiveness and robustness of reasoning, and has made positive progress in financial tasks such as quantitative investment strategy generation. However, the ToT method still has problems such as huge consumption of computing resources, path redundancy, and complex system implementation, especially in high-dimensional financial analysis, the exponential growth of resource demand seriously restricts the feasibility of practical application. SUMMARY
[0004] In view of the above problems, the present disclosure provides a multi-path reasoning method, device, equipment, medium and program product.
[0005] According to a first aspect of the present disclosure, a multi-path reasoning method is provided, the method comprising: obtaining a problem to be solved, inputting the problem to be solved into a large model, and generating a plurality of first reasoning paths; pruning and screening the plurality of first reasoning paths to obtain second reasoning paths, and performing parallel reasoning based on the second reasoning paths using the large model; setting a first checkpoint at a predetermined reasoning stage, evaluating and screening the second reasoning paths using the first checkpoint to obtain third reasoning paths; and in response to at least one third reasoning path reasoning to a predetermined terminal point, performing reasoning chain logic verification on at least one third reasoning path to obtain a reasoning result.
[0006] According to an embodiment of the present disclosure, the setting a first checkpoint at a preset reasoning stage, evaluating and screening the second reasoning path by using the first checkpoint, and obtaining a third reasoning path comprises: in response to a process of parallel reasoning reaching a preset reasoning depth or a time consumption threshold, suspending reasoning and setting a first checkpoint; performing consistency evaluation on an intermediate reasoning result of the second reasoning path at the first checkpoint; screening the second reasoning path based on the consistency evaluation result to obtain a third reasoning path.
[0007] According to an embodiment of the present disclosure, the method further comprises: setting an Nth checkpoint, evaluating and screening the Mth reasoning path by using the Nth checkpoint, and obtaining an M+1th reasoning path, wherein N is a positive integer greater than 1, and M=N+1; and in response to at least one M+1th reasoning path reasoning to a predetermined terminal point, performing reasoning chain logic verification on the at least one M+1th reasoning path to obtain a reasoning result.
[0008] According to an embodiment of the present disclosure, the method further comprises: recording state information of the Mth reasoning path at the Nth checkpoint to obtain rollback backup information; in response to a target path in the M+1th reasoning path failing in the reasoning process: rolling back the target path to the Nth checkpoint and loading the rollback backup information; obtaining an alternative path at the Nth checkpoint, replacing the target path with the alternative path to restart the reasoning process.
[0009] According to an embodiment of the present disclosure, the performing reasoning chain logic verification on at least one third reasoning path in response to at least one third reasoning path reasoning to a predetermined terminal point to obtain a reasoning result comprises: performing forward verification on reasoning steps in the at least one third reasoning path, the forward verification being used to judge logical consistency between the reasoning steps and / or derivability of the reasoning result; and / or performing reverse verification on the reasoning steps in the at least one third reasoning path, the reverse verification being used to verify whether the reasoning result satisfies problem constraints or whether the reasoning result is consistent with the problem to be solved.
[0010] According to an embodiment of the present disclosure, the consistency evaluation on the intermediate reasoning result of the second reasoning path at the first checkpoint comprises at least one of the following: comparing differences in target intermediate conclusions of each path in the second reasoning path; judging whether reasoning processes of each path in the second reasoning path conform to preset prior knowledge; and performing rationality scoring on a current reasoning process of each path in the second reasoning path based on a scoring model.
[0011] According to an embodiment of the present disclosure, the obtaining the problem to be solved, inputting the problem to be solved into the large model, and generating a plurality of first reasoning paths include at least one of the following: inputting a target prompt to the large language model based on the problem to be solved to generate a plurality of first reasoning paths; and setting a high heat sampling parameter when the large language model reasons to generate a plurality of first reasoning paths.
[0012] According to an embodiment of the present disclosure, the pruning and screening the plurality of first reasoning paths to obtain a second reasoning path includes: assigning a relevance score to each of the plurality of first reasoning paths; and pruning and screening the plurality of first reasoning paths based on the relevance scores and a preset pruning rate threshold to obtain a second reasoning path.
[0013] A second aspect of the present disclosure provides a multi-path reasoning device, the device comprising: a data acquisition module configured to: obtain a problem to be solved, input the problem to be solved into a large model, and generate a plurality of first reasoning paths; a pruning module configured to: prune and screen the plurality of first reasoning paths to obtain a second reasoning path, and perform parallel reasoning based on the second reasoning path using the large model; a reasoning checking module configured to: set a first checkpoint at a preset reasoning stage, evaluate and screen the second reasoning path using the first checkpoint, and obtain a third reasoning path; and a verification module configured to: in response to at least one third reasoning path reasoning to a predetermined terminal point, perform reasoning chain logic verification on at least one third reasoning path to obtain a reasoning result.
[0014] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] A fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions are executed by a processor to implement the steps of the above method.
[0016] A fifth aspect of the present disclosure further provides a computer program product comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the above method.
[0017] According to the embodiments of the present disclosure, by generating a plurality of first inference paths and performing pruning screening, the diversity and path quality in the initial stage of inference are effectively improved; at the same time, the parallel inference mechanism is adopted to improve the overall computing efficiency while ensuring the inference depth; the checkpoint is set in the middle of the inference and the path consistency is evaluated, which can timely eliminate the paths deviating from the target, further saving the subsequent resource overhead; finally, logical verification is performed on the final inference path to ensure that the inference result has sufficient logical support and credibility. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:
[0019] Figure 1 An application scenario diagram of a multi-path inference method, apparatus, device, medium and program product according to embodiments of the present disclosure is schematically shown;
[0020] Figure 2 A flowchart of a multi-path inference method according to embodiments of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a method of evaluating and screening a second inference path using a first checkpoint according to some exemplary embodiments of the present disclosure is schematically shown;
[0022] Figure 4 A schematic diagram of a method of performing logical verification of an inference chain according to some exemplary embodiments of the present disclosure is schematically shown;
[0023] Figure 5 A structural block diagram of a multi-path inference apparatus according to embodiments of the present disclosure is schematically shown; and
[0024] Figure 6 A block diagram of an electronic device suitable for implementing a multi-path inference method according to embodiments of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it will be apparent to one of ordinary skill in the art that one or more embodiments can be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques have been omitted to avoid unnecessarily obscuring the concept of the present disclosure.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the terms "comprises", "comprising", "includes", "including" and the like are specifically intended to be open-ended and to mean that other features, steps, operations, and / or components can be added.
[0027] All terms used herein including technical and scientific terms have the meanings commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein are to be interpreted as having a meaning that is consistent with the understanding of that term by those having ordinary skill in the art and are to be interpreted not in an idealized or overly formal sense unless otherwise specifically defined herein.
[0028] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted that the meaning of the expression is the same as "at least one of the group consisting of A, B, and C" or "A or B or C or any combination thereof" unless otherwise specifically defined.
[0029] First, the technical terms described herein are explained and described as follows.
[0030] Large language model refers to a deep neural network model pre-trained based on large-scale data, which has natural language understanding, generation and multi-step reasoning ability. It can complete complex question answering, summarization, translation, reasoning and other tasks by learning the semantics, structure and context relationship in language, and is the reasoning subject relied on by the present application.
[0031] Pruning refers to the process of filtering out paths that do not have the value of continuing reasoning according to the relevance, rationality, score or other evaluation criteria of the paths in the multi-path reasoning process, in order to reduce the subsequent computational overhead. Pruning can occur after the first path generation, at the mid-checkpoint or at any reasoning stage, with the purpose of concentrating resources on processing more promising paths to improve the overall efficiency and stability of the system.
[0032] Pruning rate refers to the proportion or intensity of discarded candidate paths in the pruning operation. The pruning rate is used to set how many candidates are retained at each pruning. Reasonable setting of the pruning rate can balance the exploration breadth and computational cost.
[0033] Backtracking point (checkpoint) refers to an intermediate state recording node set in the reasoning process, which is used to save the reasoning state information (including context, history steps, score, etc.) of each path at the current time, so as to facilitate the rollback to this point to re-try other paths when a reasoning failure or inconsistency occurs in a certain path. The backtracking point also serves as a trigger position for consistency evaluation, enabling dynamic management and adjustment of paths.
[0034] In recent years, financial institutions have begun to explore automated reasoning and decision-making systems based on large language models (LLMs) to address the high complexity, timeliness, and risk in financial business. For example, in credit risk assessment, LLMs need to make multi-step judgments based on a customer's financial data, credit history, and external economic indicators. In portfolio optimization, LLMs need to make comprehensive inferences on macroeconomic trends, industry changes, and historical returns. In compliance and audit scenarios, LLMs also need to have an interpretable and traceable decision-making process.
[0035] To improve the reasoning ability of LLMs in complex tasks, the existing technology proposes a thought chain (CoT) reasoning mechanism. This method requires the model to output a series of intermediate reasoning steps before generating the answer, guiding it to gradually approach the correct answer according to the human thought path. For example, in the financial anti-fraud scenario, the model can first judge the transaction abnormality, then analyze the behavior pattern, and finally determine whether it is a fraudulent behavior. The thought chain method enhances the transparency of the reasoning process and improves the model's ability to handle complex problems, widely used in mathematical reasoning, logical question answering, and financial text analysis.
[0036] Although the thought chain method enhances the logic and interpretability of the model, it has obvious defects. First, this method relies on a single path for reasoning, and once an intermediate step is wrong, the subsequent reasoning will inevitably deviate from the correct direction, causing "errors cannot be corrected." Second, since all reasoning steps need to be serialized, the reasoning time is significantly increased, and the computational overhead is large. Third, due to the lack of cross-validation mechanism between paths, the model output has a certain uncertainty and instability, especially in financial decision-making tasks, which may cause serious consequences.
[0037] To alleviate the above problems, the existing technology further proposes a ToT reasoning mechanism. Unlike the thought chain, the thought tree constructs multiple branch paths during reasoning and allows the model to generate multiple candidate reasoning directions at each step, expanding the problem-solving space through multi-path exploration, and backtracking and replacing error paths when necessary, thereby improving the robustness and correctness of the overall reasoning. For example, in the process of generating quantitative investment strategies, the model can start from multiple market assumptions and generate different logical chains, and finally select the optimal strategy through path evaluation.
[0038] However, the thought tree method still has some defects. First, its branch structure causes the computational resource overhead to increase exponentially with the complexity of the problem, especially in high-dimensional financial scenarios (such as risk analysis based on hundreds of dimensions of factors), the computational burden is extremely heavy; second, if there is no effective heuristic strategy to guide, the model may generate a large number of invalid or redundant reasoning paths, causing waste of resources; third, in order to realize backtracking and multi-path evaluation, the thought tree method usually needs an external controller or scheduling module to cooperate to realize, which increases the system implementation complexity and reduces the landing feasibility in the actual financial system.
[0039] Based on this, the embodiments of the present disclosure provide a multi-path reasoning method, which comprises: obtaining a problem to be solved, inputting the problem to be solved into a large model to generate a plurality of first reasoning paths; pruning and screening the plurality of first reasoning paths to obtain second reasoning paths, and using the large model to perform parallel reasoning based on the second reasoning paths; setting a first checkpoint at a preset reasoning stage, using the first checkpoint to evaluate and screen the second reasoning paths to obtain third reasoning paths; and in response to at least one third reasoning path reasoning to a predetermined terminal point, performing reasoning chain logic verification on at least one third reasoning path to obtain a reasoning result. According to the embodiments of the present disclosure, by generating a plurality of first reasoning paths and pruning and screening, the diversity and path quality of the initial stage of reasoning are effectively improved; at the same time, the parallel reasoning mechanism is adopted to ensure the reasoning depth while improving the overall computing efficiency; the checkpoint is set in the middle of the reasoning and the path consistency is evaluated, which can timely eliminate the paths deviating from the target, further saving the subsequent resource overhead; finally, by performing logic verification on the final reasoning path, it is ensured that the reasoning result has sufficient logical support and credibility.
[0040] It should be noted that the multi-path reasoning method, device, equipment, medium and program product determined by the present disclosure are related to the application of large models in the field of financial technology, and can be used in the field of artificial intelligence technology and the field of financial technology, and can also be used in various fields other than the field of artificial intelligence technology and the field of financial technology. The application field of the multi-path reasoning method, device, equipment, medium and program product provided by the embodiments of the present disclosure is not limited.
[0041] In the technical solutions of the present disclosure, the user information (including but not limited to user personal information, user image information, user equipment information such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0042] In the scenario of making automated decisions by using personal information, the method, device and system provided by the embodiments of the present disclosure provide corresponding operation entrances for users to select to agree or reject the automated decision result; if the user selects to reject, the expert decision process is entered. The expression "automated decision" here refers to the activity of making decisions by automatically analyzing and evaluating the behavior habits, interests and hobbies, or economic, health and credit conditions of individuals through computer programs. The expression "expert decision" here refers to the activity of making decisions by personnel who are engaged in a certain field of work, have special experience, knowledge and skills, and reach a certain professional level.
[0043] Figure 1 An application scenario diagram of the multi-path reasoning method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0044] As shown in Figure 1 The application scenario 100 according to the embodiments can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0045] The user can use the first terminal device 101, the second terminal device 102 and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102 and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0046] In the embodiments of the present disclosure, the first terminal device 101 can be taken as an example of the first device, and the second terminal device 102 and / or the third terminal device 103 can be taken as an example of at least one second device. The first device and the second device can communicate with each other through a client internal mechanism to implement the data distribution and rendering logic in the multi-path reasoning method.
[0047] In some embodiments, the first device and the at least one second device can be different display modules, windows or screens on the same computing terminal (such as a host computer), or can be multiple physical devices working cooperatively through a network, such as different client instances deployed on a desktop computer, a tablet terminal or a mobile device.
[0048] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to a smart mobile terminal, a tablet computer, a laptop computer, a desktop computer, and the like.
[0049] The server 105 can be a server providing various services, for example, a background management server supporting a website browsed by a user using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only as an example). The background management server can perform analysis and the like on received user requests and the like, and feed back the processing result (for example, a webpage, information, or data generated or obtained according to a user request) to the terminal device.
[0050] It should be noted that the multi-path reasoning method provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the multi-path reasoning apparatus provided by the embodiments of the present disclosure can generally be arranged in the server 105. The multi-path reasoning method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Accordingly, the multi-path reasoning apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0051] It should be understood that the number of terminal devices, networks, and servers in the system 100 is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks, and servers. Figure 1
[0052] The following will be based on the scenario described in the system 100, and the multi-path reasoning method of the embodiments of the present disclosure will be described in detail. Figure 1 Figures 2 to 4 The multi-path reasoning method of the embodiments of the present disclosure is schematically shown in a flowchart.
[0053] Figure 2 The multi-path reasoning method of the embodiments of the present disclosure is schematically shown in a flowchart.
[0054] As shown in FIG. 2, the multi-path reasoning method 200 of the embodiments includes operations S210-S240. Figure 2 At operation S210, a problem to be solved is obtained, and the problem to be solved is input into a large model to generate a plurality of first reasoning paths.
[0055]
[0056] In this process, attention needs to be paid to how to guide the model to generate multiple candidate first-step ideas as the first reasoning path to solve the problem. Without any prior answers, the initial input of the problem to be solved will prompt the large model to generate multiple possible ideas based on the description, context or related data of the problem. In order to ensure diversity and comprehensiveness, different strategies can be used to explore multiple potential solution paths.
[0057] Illustratively, the large model can be guided to generate multiple candidate first-step ideas through problem description guided prompts. For example, given the problem to be solved is "how to improve the conversion rate of online stores?", the input prompt can be set as: "According to user behavior data and market trends, give the first-step idea to improve the conversion rate of online stores, and provide at least three different possible solutions." This prompt explicitly requires the model not only to consider user behavior data, but also to combine market trends, while providing multiple solutions.
[0058] Illustratively, a more open prompt strategy can be adopted to encourage the model to generate multiple reasoning paths from multiple fields or scenarios. For example, when solving the problem of "how to optimize the manufacturing process", the following prompt can be used: "For the bottleneck problem in the manufacturing process, give at least five different preliminary solutions, covering equipment, personnel, management, etc."
[0059] Illustratively, the large model can use a certain probability distribution to generate candidate ideas, rather than simply choosing the optimal answer or the most common path. For example, when facing the problem of "how to reduce delays in the supply chain", the high-temperature sampling technique can be used to generate multiple diverse ideas. The prompt is: "Considering factors such as transportation, warehousing and demand forecasting, give at least four solutions to reduce supply chain delays, and provide different priority strategies."
[0060] Illustratively, temperature sampling can be used to adjust the diversity of generated answers. Temperature sampling is a technique that controls the selection probability during the generation process to adjust the certainty of the answer. When the temperature value is high, the reasoning path generated by the model is more diverse and has greater uncertainty; when the temperature value is low, the generated answer tends to be optimal and concentrated. When solving the problem of "how to improve team collaboration efficiency", different candidate paths are generated through temperature sampling.
[0061] In order to facilitate subsequent reasoning and processing, in terms of output format, each candidate idea can be clearly numbered or separated. This not only helps to clearly trace back to each idea in subsequent steps and track the evolution process of different paths, but also facilitates further reasoning, pruning and verification. For example, a unique identifier such as "candidate 1", "candidate 2", etc. can be assigned to each candidate idea.
[0062] In operation S220, the plurality of first reasoning paths are pruned and screened to obtain second reasoning paths, and parallel reasoning is performed based on the second reasoning paths by using the large model.
[0063] By way of example, the pruning process can adopt a strategy combining "hard pruning" and "soft pruning". Hard pruning is directed to paths that obviously violate constraints or are logically self-contradictory, and directly eliminates them to avoid unnecessary calculation; soft pruning assigns different priorities or resource quotas to the retained paths, rather than immediately discarding them, in order to balance diversity and exploration depth. In order to suppress redundancy, the system can cluster paths based on semantic embeddings, merge highly similar paths, or only retain the one that is more representative; at the same time, a selection criterion of "maximum coverage" is introduced, and a path set that can complementarily cover different sub-goals and different solving assumptions is preferentially retained. The second reasoning paths obtained in this way are both controlled in quantity and diversified in thinking.
[0064] In order to improve the screening quality, the screening process can introduce lightweight consistency checking of multiple sources of evidence. For example, in the scene where external tools are not available, a natural language recognition model can be used for logical consistency determination; in the scene where external verifiers are available, a fast approximate verifier (such as dimension checking, unit conversion, boundary condition detection, interface / function signature static checking, etc.) can be called to filter the feasibility of the plurality of first reasoning paths. For tasks involving quantitative constraints, a cost heuristic function can also be introduced to roughly estimate the "expected number of remaining steps", "possible number of tool calls", and "potential number of failure retries", which are used as inputs for resource allocation weights, so as to achieve more fine-grained computing power scheduling in the parallel stage.
[0065] In an embodiment of the present disclosure, before parallel reasoning, a conditional prompt can be generated for each second reasoning path, and the first step idea of the path is explicitly spliced into the main prompt as a "plan prefix" to guide the large model to expand in a predetermined direction, thereby reducing the risk of different paths collapsing into homogeneous answers in the generation stage. When parallel reasoning is performed, the unique identifier and pedigree information of each path can be maintained, the first step idea, pruning weight, and screening reason of the path are recorded to ensure that the subsequent stage can be accurately traced back. For paths that are falsified or significantly degraded in the parallel process, the system immediately stops their generation and transfers the released quota to paths that still have potential.
[0066] In some embodiments, in order to improve throughput, a plurality of second reasoning paths can be packaged into batches for parallel reasoning, and the model weight and context cache are reused; under the condition that the reasoning engine supports, tensor parallel or pipeline parallel and other means can also be used to serve multiple paths with a single forward propagation, thereby reducing the marginal cost of unit paths.
[0067] In resource-constrained or time-critical scenarios, adaptive scheduling can be introduced, considering each second inference path as an arm, and using upper confidence bounds or Thompson sampling to allocate a generation budget in real-time during inference. When a path shows high quality (e.g., higher self-consistency score, fewer conflict hints, better subgoal coverage) on early signs, the system adds its quota; when a path consistently shows low confidence or repeatedly invalidates, the system reduces or stops its decoding steps, implementing an "early-stopping" soft pruning.
[0068] In some embodiments, pruning and parallel strategies can be domain-adaptively tuned for different task types. For example, in mathematical and verifiable tasks, the screening stage can rely more on formal consistency and verifiable intermediate quantities, such as unit dimensions, equation balance, and boundary conditions; for example, in code synthesis and debugging tasks, paths that can pass static analysis, correct call interfaces, or pass simplified unit tests are preferred; for example, in information retrieval and factoid question answering, the diversity of evidence pointing and the reliability of sources are emphasized, and paths with clearer reference chains and broader evidence coverage are preferred. It should be noted that the above adaptive strategies are not limited to fixed rules, but are plug-in scorers and filters that work with the general diversity maintenance mechanism.
[0069] At operation S230, a first checkpoint is set at a preset inference stage, and the second inference paths are evaluated and screened using the first checkpoint to obtain third inference paths.
[0070] According to embodiments of the present disclosure, by setting checkpoints to further evaluate and screen the second inference paths, the inference paths can be optimized and the accuracy and reliability of the final inference results can be ensured, thereby not only providing a screening mechanism for subsequent refinement of inference paths, but also effectively correcting or improving errors or defects that may exist in early paths, thereby achieving stability and efficiency of the inference process.
[0071] To effectively evaluate at the first checkpoint, a standardized evaluation index can be set for each second inference path. For example, the rationality of the path, the matching degree with known facts, the coherence of the inference chain, the consistency of the semantics, the correctness of the logical deduction, and the computational cost involved in the inference process, etc. According to the standardized evaluation index, each path can be scored or ranked, and then the inference path that best meets the target requirements can be selected. The evaluation process can be carried out in various ways, such as rapid estimation based on heuristic algorithms, or using a lightweight neural network model to perform preliminary inference and scoring on the path.
[0072] To ensure the effectiveness and comprehensiveness of the evaluation, the setting of the first checkpoint can be combined with specific application scenarios and problem characteristics. For example, when dealing with technical problems or mathematical reasoning, the checkpoint can pay more attention to the rationality of the path in logical reasoning and calculation steps, ensuring that the path can draw reasonable conclusions within the existing knowledge framework. For example, when dealing with information retrieval or decision-making problems, attention can be paid to the coverage of the path, the degree of satisfaction of key constraints, and the diversity of path output, etc. For example, for complex reasoning tasks, an independent evaluation mechanism can be designed for each type of reasoning path, and dynamic optimization can be combined with deep learning models, so that the evaluation of each path can be more in line with its own characteristics and needs.
[0073] To further improve the reliability of reasoning, the first checkpoint is not limited to the evaluation of the path, but also introduces a verification mechanism to verify each intermediate step in the reasoning path one by one. For example, for reasoning paths involving calculation steps, the calculation results can be repeatedly verified to ensure that each step's result is consistent with expectations; for logical reasoning paths, formal proof methods can be introduced to verify the correctness of the reasoning.
[0074] In embodiments of the present disclosure, to improve path stability and controllability, backtracking information can also be recorded during the checkpoint setting process to facilitate path replacement and recovery when the subsequent reasoning stage fails. Specifically, when the system identifies that a certain path may deviate from the expected situation, it can automatically fall back to a previous step according to the preset backtracking strategy and try to correct the error by modifying the current path or adjusting the reasoning strategy.
[0075] Further, the evaluation of the first checkpoint can also be enhanced by comparison with other paths. By comparing some intermediate steps in the second reasoning path with other parallel reasoning paths, the system can identify which paths may have advantages in certain aspects and which paths may have potential problems in certain steps. This comparative evaluation can help the system better understand the potential of each path and to some extent, integrate or optimize it.
[0076] In addition to the logic and content evaluation of the path, attention can also be paid to the effective use of computing resources. In the reasoning process, the calculation consumption of different paths may differ greatly, which will affect the efficiency of the entire reasoning process. Therefore, the evaluation mechanism of the first checkpoint should also include optimization of the use of computing resources to ensure that the selected reasoning path can not only guarantee the accuracy of the results, but also maximize the efficiency of reasoning under limited computing resources. The system can set a threshold to limit the maximum calculation consumption of each path, and when the path exceeds the resource threshold, optimization or pruning is immediately performed to avoid wasting too many resources on paths with excessive calculation overhead.
[0077] At operation S240, in response to the at least one third reasoning path reasoning to the predetermined endpoint, reasoning chain logic verification is performed on the at least one third reasoning path to obtain a reasoning result.
[0078] Specifically, the reasoning chain logic verification can adopt a multi-level and multi-angle strategy. For example, at a structural level, the system can automatically analyze the logical connection relationship between each step of the reasoning path to determine whether there is a step skipping, omission or reasoning break phenomenon. For example, at a semantic level, the system can use a large model or an auxiliary model to score the semantic consistency of the entire path. During path verification, a reverse reasoning mechanism can also be introduced, that is, starting from the conclusion of the current path endpoint, it is verified whether it can be derived back to the initial condition step by step.
[0079] To further enhance the comprehensiveness of verification, external tools or fact libraries can also be introduced as an aid at operation S240. For example, in a fact question and answer task, the referenced facts can be retrieved and verified through external knowledge graphs, literature databases, legal and regulatory databases, etc. If a key step relies on incorrect or inconsistent information, the path will be marked as unreliable. In engineering or data analysis tasks, calculators, formula evaluators, programming language interpreters and other auxiliary tools can be used to verify the calculation steps in the path to ensure the accuracy of the results.
[0080] Further, in the case of multiple paths in the third reasoning path, inter-path consistency comparison can also be performed, that is, comparing the results obtained in multiple third reasoning paths and their logical chains to evaluate their consistency in conclusion and differences in reasoning methods. If multiple paths lead to the same or similar results through different logical processes, the result can be given a higher confidence; on the contrary, if there are serious differences between the paths in the key steps or the final conclusion, higher weight verification models or manual intervention can be introduced to further review these paths.
[0081] After all the verification mechanisms are completed, one or more third reasoning paths that pass the verification can be integrated, and the one with the most complete logic, the most reasonable explanation and the smallest resource consumption is selected as the final reasoning result for output. In an optional embodiment, multiple paths that meet the conditions can also be summarized and fused to output a multi-perspective, multi-path corroborated explanatory answer to improve the acceptability and trustworthiness of the system at the user end.
[0082] According to embodiments of the present disclosure, through the multi-stage, multi-path and traceable reasoning process, the embodiments of the present disclosure improve the reasoning quality and result reliability of large language models in complex tasks, while reducing the resource overhead caused by invalid calculations.
[0083] The multi-path reasoning method of the embodiments of the present disclosure will be specifically described in the preferred embodiments below.
[0084] In the embodiments of the present disclosure, the process of generating the plurality of first reasoning paths can specifically include the following manners to improve the diversity and coverage of the reasoning paths and enhance the reasoning ability and exploration breadth of the system when facing complex tasks.
[0085] Illustratively, a guiding target prompt can be constructed based on the problem to be solved and input into the large language model to guide the model to generate a plurality of first reasoning paths with differences around the problem. For example, the target prompt can explicitly require the model to "provide the first step of thinking to solve the problem and give multiple possible solutions", or further limit the generation style, such as "please propose several possible solution paths from different angles", so as to stimulate the model to actively develop multiple thinking directions when reasoning.
[0086] Illustratively, the generation uncertainty of the model can be used to naturally induce path differentiation by setting a high temperature sampling parameter during the model reasoning process, so as to obtain candidate paths of multiple reasoning directions. Specifically, when the large language model generates output, the sampling parameter is adjusted so that the model tends to explore output rather than the most certain result in each generation process. By generating multiple samples at a time, the system can capture the reasoning ideas of the model in different possible spaces. Although these ideas may not all be optimal, they can effectively cover different regions of the problem solution space, improve the diversity of the paths, and avoid early local optimization.
[0087] It should be noted that the above-mentioned manners can be used independently or in combination to balance the pertinence of the prompt guidance and the divergence of the sampling mechanism. For example, the model is first guided to focus on the key points of the problem through the prompt, and then multiple reasoning paths with different angles are generated by high-temperature sampling, so as to obtain a first path set with both logical structure and diversity.
[0088] In the embodiments of the present disclosure, the process of pruning and screening the plurality of first reasoning paths can first perform relevance evaluation on the plurality of first reasoning paths generated by the large model, and based on the evaluation results, assign each first reasoning path a relevance score to reflect the matching degree between the path and the original problem to be solved, the logical rationality and the potential solving value. The scoring process can consider multiple dimensions, such as the consistency of the path and the problem semantics, the coherence of the intermediate steps in the path, the proximity of the expected target, the satisfaction of the constraint conditions, etc. In addition, in order to ensure the comprehensiveness and robustness of the scoring, the scoring mechanism can be realized by a pre-trained discrimination model, a set of heuristic rules or a lightweight evaluator, or the large language model can be prompted to output the path score as an "evaluator".
[0089] After obtaining the relevance scores of all the first reasoning paths, the paths can be pruned and screened according to a preset pruning rate threshold. The pruning rate threshold can be statically configured, for example, to retain the top k% highest scoring paths, or dynamically adjusted to automatically determine the screening standard according to the distribution characteristics of the current path scores or the task complexity. The system ranks the paths according to the scores, and selects the paths with scores higher than the threshold or the top-ranked paths as the second reasoning paths to be retained, and the paths with low scores, substandard quality, or reasoning directions obviously deviating from the problem intent are pruned to avoid further consuming computing resources in the subsequent parallel reasoning phase. The pruning process not only effectively compresses the candidate path space and improves the reasoning efficiency, but also ensures the superiority of the retained paths in terms of semantic relevance and logical quality through the quantitative scoring mechanism.
[0090] Through the embodiments of the present disclosure, the system can quickly evaluate and reasonably screen multiple generated ideas at an early stage of reasoning, thereby ensuring that subsequent parallel reasoning resources are concentrated on paths that are more likely to derive high-quality answers. This process provides a controllable and quantitative path optimization mechanism without limiting the model's generation capabilities.
[0091] In the embodiments of the present disclosure, in order to control reasoning quality, dynamically allocate resources, and guide path convergence, one or more checkpoints can be set in advance based on the task type and the computation budget as a periodic pause and evaluation position during the parallel expansion of the second reasoning paths by the large model.
[0092] Figure 3 A flowchart of a method for evaluating and screening second reasoning paths using a first checkpoint is schematically shown according to some example embodiments of the present disclosure.
[0093] As Figure 3 shown, the method for modeling the spatiotemporal relevance of the pair of target image frame sequence tensors includes operations S310-S330.
[0094] At operation S310, in response to the process of parallel reasoning reaching a preset reasoning depth or time consumption threshold, the reasoning is paused and a first checkpoint is set.
[0095] Specifically, the system can continuously monitor the reasoning progress during the parallel expansion of the second reasoning paths, and when the reasoning process of one or more paths reaches a preset reasoning depth threshold (e.g., completes a certain number of steps) or a preset time consumption threshold (e.g., exceeds a certain time limit), a pause mechanism is triggered and a first checkpoint is set at the current stage position. The first checkpoint serves as a stage pause marker for intermediate reasoning, providing a clear reference point for subsequent path quality evaluation and screening.
[0096] At operation S320, the consistency of the intermediate reasoning results of the second reasoning paths at the first checkpoint is evaluated.
[0097] In embodiments of the present disclosure, the intermediate reasoning results reached by each of the second reasoning paths at the first checkpoint can be extracted and consistency evaluation can be performed on the intermediate reasoning results. The evaluation process can determine whether the reasoning direction, key assumptions, fact references, or conclusion trends between different paths are significantly contradictory, deviated, or repetitive, so as to identify which paths are logically convergent and have high credibility, and which paths have deviated reasoning, redundant content, or incorrect premises. The consistency evaluation can be completed by using technical means such as semantic alignment analysis based on a natural language understanding model, structural similarity calculation, and conflict detection mechanism, and can also combine problem context or domain knowledge to build a set of discriminant mechanisms for collaborative evaluation of path rationality and diversity.
[0098] Exemplarily, the intermediate conclusions generated by each of the second reasoning paths at the current stage can be compared to analyze the difference in the target orientation. This difference evaluation helps to identify whether there is a significant conflict, convergence, or complementary relationship between the paths. For example, if the intermediate step conclusions of multiple paths are highly consistent, it indicates that the paths may have over-converged, and the system can select the path with stronger semantic diversity to retain. If the conclusions derived by some paths are significantly deviated from other paths, the system will further determine whether it is an innovative direction or a deviation of logical error.
[0099] Exemplarily, prior knowledge related to the field can also be introduced to perform logical constraint verification on the reasoning process of each path. Specifically, the system can match the key reasoning steps in the path with a set of predefined knowledge rules, logical relationships, or problem background knowledge to determine whether the path reasoning process violates common sense, logical break, or violates the task context. For example, in a mathematical reasoning task, whether the path follows basic mathematical principles (such as conservation, symmetry, causality, etc.); in a policy and regulation task, whether the reasoning conforms to the clause logic or the legal interpretation order, etc. Once the path is identified as deviating from the prior rules, it can be marked as a low-confidence path for subsequent screening, rejection, or weight reduction.
[0100] Exemplarily, the rationality of the current reasoning state of each path can also be quantitatively scored based on a scoring model. The scoring model can be fine-tuned by the language model, or can be constructed by using a lightweight neural network or a rule-enhanced model, and the input is the intermediate reasoning content, the context summary and the question description of the path, and the output is the rationality score of the path. The scoring model can not only reflect the logical coherence and semantic consistency within the path, but also measure the explicitness of the goal promotion and the explainability of the reasoning direction. High-score paths will be preferentially retained in subsequent screening, while low-score paths will enter the elimination or supplement mechanism to maintain the reasoning quality.
[0101] Through the introduction of the consistency evaluation mechanism described above, the system can timely judge the path quality and control the directionality and diversity of the reasoning development in the middle stage of reasoning. This multi-dimensional evaluation method improves the response capability of the reasoning system in complex scenarios, so that the reasoning process not only has the ability of broad exploration, but also can dynamically identify and eliminate potential errors or inefficient paths in reasoning, thereby improving the overall reasoning efficiency and result quality.
[0102] In operation S330, the second reasoning path is screened based on the consistency evaluation result to obtain a third reasoning path.
[0103] In an embodiment of the present disclosure, the second reasoning path can be screened according to the result of the consistency evaluation, and a path set that performs well in semantics, logical structure and goal promotion while having certain differences is retained to form the third reasoning path. The screening strategy can consider the consistency score, self-consistency evaluation, and the ability to cover target elements between paths, and eliminate paths that are highly redundant with other paths, have obvious logical errors, or have deviated from the original intention of the question. Through this process, the system further converges the reasoning path space, so that subsequent resources are concentrated on paths that are more likely to generate high-quality final answers, thereby improving the reasoning efficiency and reliability of the overall output.
[0104] Figure 4 A schematic diagram of a method of performing logical verification of a reasoning chain is shown schematically.
[0105] As shown in Figure 4 , the method of performing logical verification of a reasoning chain can include operation S410 and / or operation S420.
[0106] In operation S410, the reasoning steps in at least one third reasoning path are forward verified, and the forward verification is used to judge the logical coherence between the reasoning steps and / or the derivability of the reasoning result.
[0107] Specifically, in the forward verification process, the logical coherence of each reasoning step in the third reasoning path can be checked in sequence to determine whether the transition between steps conforms to the basic rules of logical reasoning. This verification can be based on the evaluation ability of the language model itself, and the semantic consistency can be determined through prompt questions such as "Can each step above reasonably derive the next step?" In combination with a rule engine or a symbolic logic tool, the derivation relationship between the intermediate conclusion and the premise condition can be formally verified. In particular, in structured fields such as mathematical calculation, programming, and legal reasoning, the system can use calculators, type checkers, and law indexers to perform static verification or semantic verification on intermediate logical links to ensure that each step in the reasoning chain has forward logical derivability and does not have problems such as logical discontinuity, skipping, and missing premises.
[0108] In operation S420, the reasoning steps in at least one third reasoning path are verified in reverse, and the reverse verification is used to verify whether the reasoning result meets the problem constraints or whether the reasoning result conforms to the problem to be solved.
[0109] Specifically, in the reverse verification process, the conclusion output by the reasoning path can be taken as the starting point to determine whether it can be traced back to the key conditions of the initial problem or meet the constraint requirements set by the problem. Reverse verification focuses on evaluating the semantic consistency, goal achievement, and condition satisfaction between the reasoning result and the problem, and is particularly suitable for determining whether a reasoning conclusion can truly solve the original problem. For example, in an open-ended question answering task, the system can check whether the output conclusion accurately answers the core elements such as "who", "when", and "why" in the user's question; for example, in a strategy planning task, the conclusion can be analyzed in reverse to determine whether it meets the hard constraints such as budget, time, and resources.
[0110] In embodiments of the present disclosure, reverse verification can be achieved through meta-task prompts of large models, such as "Does the answer meet all the conditions set by the original problem?" and the like; or by combining context comparison, target state backtracking, and semantic embedding similarity calculation methods to achieve automated evaluation.
[0111] It should be noted that the forward and reverse verification mechanisms can be used alone or in combination to form a closed-loop logical verification framework. In some embodiments, forward verification can be performed first to filter out paths with inconsistent structures, and then reverse verification can be used to further verify the legality and practicality of the results, ensuring that the final reasoning result is not only logically consistent, but also highly consistent with the problem. This multi-level verification process significantly improves the system's ability to control the quality of reasoning, effectively prevents the occurrence of low-confidence outputs such as "the path is reasonable but the result is irrelevant" or "the result is correct but the process is wrong", and enhances the explainability, traceability, and practical application value of the model's reasoning results.
[0112] In embodiments of the present disclosure, a multi-round, multi-stage reasoning path evaluation and screening mechanism can be further included to enhance the stability and controllability of the entire reasoning process. Specifically, after completing the path screening of the first checkpoint, the system can continue to set the Nth checkpoint (where N is a positive integer greater than 1) for further mid-way evaluation and screening of the Mth reasoning path of the current stage to obtain the M+1th reasoning path of the next stage, where M=N+1. The above process embodies a progressive, multi-level reasoning convergence strategy suitable for complex, multi-step, multi-variable dependent reasoning tasks, ensuring quality control and logical calibration at each key stage of the reasoning process.
[0113] In actual execution, the Nth checkpoint can be triggered automatically after the previous round of reasoning path continues to develop for several steps. The triggering conditions can include the length of the reasoning chain, the cumulative time consumption, the number of activated key nodes, and the path quality trend change. When the path reasoning enters a new semantic stage or reaches a new logic branch intensive area, introducing a new checkpoint helps to identify whether the path has a new round of convergence, divergence, or abnormal trend. The system can again evaluate the intermediate reasoning state reached by each Mth path at the Nth checkpoint, identify high-quality paths through consistency analysis, self-consistency judgment, context alignment, and other mechanisms, and form a new M+1th reasoning path set. In order to maintain the breadth and diversity of exploration, the system can continue to apply difference constraints, logical complementarity indicators, or weight adjustment strategies based on path ancestry information to avoid premature convergence or excessive singleness of the path.
[0114] Similarly, when at least one M+1th reasoning path is detected to have successfully reasoned to a predetermined endpoint (e.g., satisfying the problem solving condition, forming a complete answer structure, or triggering a termination judgment rule), the reasoning chain logic verification mechanism is started to finally determine whether the reasoning result of the path can be used as valid output. In some implementation scenarios, if there are multiple M+1th paths that successfully converge, the system can also perform lateral comparison to select the optimal result or combine the multi-path information to form a more explanatory composite answer.
[0115] By introducing multiple checkpoints and multi-stage path screening mechanisms, embodiments of the present disclosure realize a reasoning control closed loop from preliminary divergence, multi-path exploration to stage convergence, and in-depth exploration of key paths. This structured control flow not only effectively improves the reasoning accuracy and logical interpretability of large models in complex tasks, but also significantly reduces the risk of invalid paths occupying computing resources.
[0116] In embodiments of the present disclosure, a backtracking and path recovery mechanism in the inference process can also be included to improve the robustness and inference continuity of the system in complex tasks. Specifically, when the system performs the Nth checkpoint, not only is the consistency of the Mth inference path evaluated and screened, but the state information of each inference path at this checkpoint is also recorded synchronously to form complete backtracking backup information. The state information can include the intermediate inference chain of each path, the generated intermediate conclusions, the related context cache, the score weight, the logical marker information, and the model generation state, etc., which are used to provide accurate recovery basis when a path anomaly occurs.
[0117] When the system detects that a certain target path in the Mth+1 inference path fails in the subsequent inference process, the backtracking mechanism can be triggered to recover the path. The inference failure can be manifested as logical contradiction, self-negation, target deviation, empty loop, resource overrun, or failure to meet the inference termination condition, etc. In response to such failures, the system will back up the target path to its state at the Nth checkpoint (i.e., the most recent checkpoint) and load the pre-saved backtracking backup information to restore the inference context and logical state, providing a complete starting point for restarting the inference.
[0118] In the backtracking process, the system can also reselect other paths that have not been adopted or expanded from the alternative path pool stored at the Nth checkpoint as a replacement for the failed path. The alternative paths were shelved due to low priority or logical branch conflicts during the initial screening, and can be reactivated as supplementary ideas in the current stage. The system can select the most suitable replacement path based on path scores, semantic differences, or complementarity with the failed path, and continue to advance the inference process with the new candidate. By replacing and restarting the inference, the system avoids interrupting the overall inference due to individual path failure, enhancing the flexibility and coverage depth of the problem-solving process.
[0119] According to embodiments of the present disclosure, the backtracking and recovery mechanism not only improves the fault tolerance of complex inference tasks, but also enhances the inference persistence and coping ability of the system when facing highly uncertain problems. At the same time, by coordinating the multi-stage checkpoint and inference path version management mechanism, it provides support for building a dynamic inference system that can be rolled back, branched, and corrected, ensuring the robustness and credibility of the final inference result.
[0120] According to an embodiment of the present disclosure, by introducing mechanisms such as multi-path generation, phased pruning, dynamic checkpoint setting, inference path backtracking and replacement, and forward and reverse verification of inference chains, a multi-stage large model inference process with divergent exploration and convergent control capabilities is constructed, effectively overcoming the limitations of existing CoT and ToT methods in terms of inference stability, accuracy, and computational resource utilization efficiency. Embodiments of the present disclosure improve inference accuracy while reducing the risk of unreliable results caused by single-path errors or inference deviation; by implementing pruning and path evaluation at key stages, low-quality paths are avoided from consuming excessive computing resources, enabling ordered resource allocation and computational efficiency optimization; the checkpoint and backtracking mechanisms enhance system fault tolerance and inference continuity, enabling dynamic adjustment capabilities for correction and recovery; finally, through forward and reverse logical verification, the output results are ensured to be highly consistent and reliable in terms of logical structure and semantic goals, thereby improving the practicality, stability, and interpretability of large models in solving complex problems.
[0121] Corresponding to the above multi-path inference method, an embodiment of the present disclosure also provides a multi-path inference device.
[0122] Figure 5 The structural block diagram of the multi-path inference device according to an embodiment of the present disclosure is schematically shown.
[0123] As Figure 5 shown, the multi-path inference device 500 of this embodiment includes a data acquisition module 510, a pruning module 520, an inference checking module 530, and a verification module 540.
[0124] The data acquisition module 510 can be used to acquire a problem to be solved, input the problem to be solved into a large model, and generate a plurality of first inference paths. In an embodiment, the data acquisition module 510 can be used to perform the operation S210 described above, and details are not repeated here.
[0125] The pruning module 520 can be used to prune and screen the plurality of first inference paths to obtain second inference paths, and perform parallel inference based on the second inference paths using the large model. In an embodiment, the pruning module 520 can be used to perform the operation S220 described above, and details are not repeated here.
[0126] The inference checking module 530 can be used to set a first checkpoint at a preset inference stage, evaluate and screen the second inference paths using the first checkpoint, and obtain third inference paths. In an embodiment, the inference checking module 530 can be used to perform the operation S230 described above, and details are not repeated here.
[0127] The verification module 540 can be configured to perform inference chain logic verification on at least one third inference path in response to the at least one third inference path reasoning to a predetermined end point, and obtain an inference result. In an embodiment, the verification module 540 can be configured to perform the operation S240 described above, and details are not repeated here.
[0128] According to an embodiment of the present disclosure, the data acquisition module 510 can be further configured to input a target prompt to the large language model based on the problem to be solved, to generate a plurality of first inference paths; and set a high heat sampling parameter when the large language model reasons, to generate a plurality of first inference paths.
[0129] According to an embodiment of the present disclosure, the pruning module 520 can be further configured to assign a relevance score to each of the plurality of first inference paths, respectively; and prune and screen the plurality of first inference paths based on the relevance score and a preset pruning rate threshold, to obtain a second inference path.
[0130] According to an embodiment of the present disclosure, the inference checking module 530 can be further configured to pause the reasoning and set a first checkpoint in response to a process of parallel reasoning reaching a preset reasoning depth or time consumption threshold; perform consistency evaluation on an intermediate reasoning result of the second inference path at the first checkpoint; and screen the second inference path based on the consistency evaluation result, to obtain a third inference path.
[0131] According to an embodiment of the present disclosure, the inference checking module 530 can be further configured to set an Nth checkpoint, use the Nth checkpoint to evaluate and screen the Mth inference path, to obtain an M+1th inference path, where N is a positive integer greater than 1, and M=N+1; and perform inference chain logic verification on at least one M+1th inference path in response to the at least one M+1th inference path reasoning to a predetermined end point, to obtain an inference result.
[0132] According to an embodiment of the present disclosure, the inference checking module 530 can be further configured to record state information of the Mth inference path at the Nth checkpoint, to obtain rollback backup information; in response to a target path in the M+1th inference path failing in the reasoning process: roll back the target path to the Nth checkpoint, and load the rollback backup information; obtain an alternative path at the Nth checkpoint, replace the target path with the alternative path, to restart the reasoning process.
[0133] According to an embodiment of the present disclosure, the inference checking module 530 further comprises an evaluation module. The evaluation module can be configured to compare differences in target intermediate conclusions of each path in the second inference path; determine whether the reasoning process of each path in the second inference path conforms to a preset priori knowledge; or score rationality of each path in the second inference path in a current reasoning process based on a scoring model.
[0134] According to an embodiment of the present disclosure, the verification module 540 can be further configured to perform forward verification on the inference steps in the at least one third inference path, the forward verification being configured to judge logical consistency between the inference steps and / or derivability of the inference result; and / or perform backward verification on the inference steps in the at least one third inference path, the backward verification being configured to verify whether the inference result satisfies the problem constraints or whether the inference result is consistent with the problem to be solved.
[0135] According to an embodiment of the present disclosure, any of the data acquisition module 510, the pruning module 520, the inference checking module 530 and the verification module 540 can be combined in one module, or any of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of the modules can be combined with at least part of the functions of the other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the data acquisition module 510, the pruning module 520, the inference checking module 530 and the verification module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, etc. hardware or firmware, or in any one of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the data acquisition module 510, the pruning module 520, the inference checking module 530 and the verification module 540 can be at least partially implemented as a computer program module which can perform corresponding functions when executed.
[0136] Figure 6 A block diagram of an electronic device suitable for implementing the multi-path inference method according to an embodiment of the present disclosure is schematically shown.
[0137] As shown in Figure 6 The electronic device 600 according to an embodiment of the present disclosure includes a processor 601 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset, and / or a special-purpose microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 601 can also include an on-board memory for cache use. The processor 601 can include a single processing unit or a plurality of processing units for performing different actions of the method processes according to an embodiment of the present disclosure.
[0138] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via the bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the programs can also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0139] According to an embodiment of the present disclosure, the electronic device 600 can further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 can further include one or more of the following components connected to the input / output (I / O) interface 605: an input part 606 including a keyboard, a mouse, and the like; an output part 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 608 including a hard disk, and the like; and a communication part 609 including a network interface card such as a LAN card, a modem, and the like. The communication part 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 610 as necessary, so that a computer program read therefrom is installed in the storage part 608 as necessary.
[0140] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0141] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories, such as the ROM 602 and / or the RAM 603 described above, and / or one or more memory chips other than the ROM 602 and the RAM 603.
[0142] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the multi-path reasoning method provided by the embodiments of the present disclosure.
[0143] The above-described functions defined in the system / apparatus / module / unit of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. According to an embodiment of the present disclosure, the above-described system, apparatus, module, unit, etc. can be implemented by computer program modules.
[0144] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal over a network medium, and be installed and executed through the communication part 609, and / or be installed from the detachable medium 611. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.
[0145] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or be installed from the detachable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described system, apparatus, device, module, unit, etc. can be implemented by computer program modules.
[0146] According to embodiments of the present disclosure, program code of the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using a high-level procedural and / or object-oriented programming language, and / or an assembly / machine language. The programming language includes, but is not limited to, a programming language such as Java, C++, Python, "C" language, or a similar programming language. The program code can be executed entirely on a user computing device, partially on a user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).
[0147] The flow diagrams and the block diagrams in the drawings are illustrations of possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0148] Those skilled in the art will understand that features recited in the various embodiments of the present disclosure can be combined and / or integrated in a variety of ways, even if such combinations or integrations have not been explicitly stated in the present disclosure. In particular, features recited in the various embodiments of the present disclosure can be combined and / or integrated in a variety of ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.
[0149] The embodiments of the present disclosure are described above. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. A multi-path reasoning method, characterized in that, The method includes: Identify the problem to be solved, input the problem to be solved into the large model, and generate multiple first inference paths; The multiple first inference paths are pruned and filtered to obtain second inference paths, and the large model is used to perform parallel inference based on the second inference paths. A first checkpoint is set in the preset reasoning stage. The first checkpoint is used to evaluate and filter the second reasoning path to obtain a third reasoning path; and In response to at least one third reasoning path leading to a predetermined endpoint, perform reasoning chain logic verification on at least one third reasoning path to obtain the reasoning result.
2. The method according to claim 1, characterized in that, The step of setting a first checkpoint in a preset reasoning stage, using the first checkpoint to evaluate and filter the second reasoning path, and obtaining a third reasoning path includes: In response to the parallel inference process reaching a preset inference depth or time threshold, the inference is paused and a first checkpoint is set. A consistency evaluation is performed on the intermediate inference results of the second inference path at the first checkpoint; Based on the consistency assessment results, the second inference path is filtered to obtain the third inference path.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Set the Nth checkpoint, use the Nth checkpoint to evaluate and filter the Mth inference path, and obtain the (M+1)th inference path, where N is a positive integer greater than 1, and M = N+1; and In response to at least one M+1th inference path reaching a predetermined endpoint, perform inference chain logic verification on at least one M+1th inference path to obtain the inference result.
4. The method according to claim 3, characterized in that, The method further includes: Record the state information of the Mth inference path at the Nth checkpoint to obtain backtracking backup information; In response to a reasoning failure in the target path of the (M+1)th reasoning path: the target path is rolled back to the Nth checkpoint, and the backtracking backup information is loaded; alternative paths for the Nth checkpoint are obtained, and the alternative paths are used to replace the target path to restart the reasoning process.
5. The method according to claim 1, characterized in that, The response involves reasoning to a predetermined endpoint via at least one third inference path, performing inference chain logic verification on at least one third inference path, and obtaining the inference result, including: Forward verification is performed on the reasoning steps in at least one third reasoning path, the forward verification being used to determine the logical coherence between the reasoning steps and / or the derivability of the reasoning result; and / or The reasoning steps in at least one third reasoning path are reverse-verified, and the reverse verification is used to verify whether the reasoning result satisfies the problem constraints or whether the reasoning result is consistent with the problem to be solved.
6. The method according to claim 2, characterized in that, The consistency evaluation of the intermediate inference results of the second inference path at the first checkpoint includes at least one of the following: Compare the differences in the intermediate conclusions of each path in the second reasoning path; Determine whether the reasoning process of each path in the second reasoning path conforms to the preset prior knowledge; The reasonableness of each path in the second reasoning path is scored based on the scoring model in the current reasoning process.
7. The method according to claim 1, characterized in that, The process involves acquiring the problem to be solved, inputting the problem into a large model, and generating multiple first inference paths, including at least one of the following: Based on the problem to be solved, the target prompt is input into the large language model to generate multiple first inference paths; High-heat sampling parameters are set during the inference process of the large language model to generate multiple first inference paths.
8. The method according to claim 1, characterized in that, The step of pruning and filtering the plurality of first inference paths to obtain second inference paths includes: Assign relevance scores to the plurality of first inference paths respectively; and Based on the relevance score and the preset pruning rate threshold, the multiple first inference paths are pruned and filtered to obtain a second inference path.
9. A multi-path reasoning device, characterized in that, The device includes: The data acquisition module is used to: acquire the problem to be solved, input the problem to be solved into the large model, and generate multiple first inference paths; The pruning module is used to: prune and filter the plurality of first inference paths to obtain second inference paths, and use the large model to perform parallel inference based on the second inference paths; The reasoning check module is used to: set a first checkpoint in a preset reasoning stage, evaluate and filter the second reasoning path using the first checkpoint, and obtain a third reasoning path; and The verification module is used to: in response to at least one third inference path reaching a predetermined endpoint, perform inference chain logic verification on at least one third inference path, and obtain the inference result.
10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Health monitoring and early warning method and system based on multi-source data fusion
CN122067788A
A health monitoring and early warning method and system based on multi-source data fusion
CN122067788B
