Business Decision-Making Method and Apparatus Based on Self-Healing Intelligent Agent and Weighted Consensus

CN122735898APending Publication Date: 2026-09-11BEIJING JIZHI DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610710508.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0003]但由于每个解决方案的推理路径是脆弱的,任何一个中间环节的失败(特别是代码执行过程中一个微小的语法或逻辑错误)都会导致对应的推理路径被直接终止,这不仅浪费了计算资源,而且还会导致最终可用于投票的样本过少,决策成功率低,系统的整体鲁棒性差

Benefits of technology

[0011]本申请实施例中的上述一个或多个技术方案,至少具有如下技术效果之一:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122735898A_ABST
    Figure CN122735898A_ABST
Patent Text Reader

Abstract

This application discloses a business decision-making method and apparatus based on self-healing agents and weighted consensus, belonging to the field of artificial intelligence. The method includes: acquiring initial business data and converting it into initial prompts that can be parsed by a large language model; generating an agent pool based on the initial prompts, the agent pool including at least one agent capable of self-healing and parallel execution; distributing decision tasks to each agent, enabling each agent to execute the task and initiating a self-healing process upon failure until a decision result is output, including success and failure results; collecting all success results and their reasoning evidence, and using a reward model to evaluate each success result and its reasoning evidence to obtain a quality evaluation value for each success result; and obtaining and outputting the final decision result based on the quality evaluation values. This method achieves highly robust and high-quality business decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence, and in particular relates to a business decision-making method and apparatus based on self-healing intelligent agents and weighted consensus. Background Technology

[0002] In business scenarios such as dynamic pricing, financial risk control, and automated auditing, systems need to quickly generate accurate and reliable decision parameters based on real-time data and a complex set of business rules. Current technology uses Large Language Models (LLMs) to understand and execute rules described in natural language. To improve the reliability of decisions, existing technologies often employ a self-consistency strategy, generating multiple independent solutions and then determining the final answer through majority voting.

[0003] However, because the reasoning paths of each solution are fragile, the failure of any intermediate step (especially a minor syntax or logical error during code execution) will cause the corresponding reasoning path to terminate directly. This not only wastes computational resources but also results in too few samples available for voting, leading to a low success rate and poor overall robustness of the system. Furthermore, when voting on multiple solutions to determine the final answer, the core assumption is that "the contribution of each solution's reasoning path is equal." However, the quality of different reasoning paths varies greatly. A logically clear and direct path is given the same voting weight as a logically roundabout path that happens to be correct. This leads to the final decision being merely the "most common," not necessarily the "highest quality." Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes a business decision-making method and apparatus based on self-healing intelligent agents and weighted consensus, which can achieve highly robust and high-quality business decisions.

[0005] Firstly, this application provides a business decision-making method based on self-healing intelligent agents and weighted consensus, the method comprising: Obtain initial business data and convert the initial business data into initial prompt information that can be parsed by a large language model; A pool of intelligent agents is generated based on the initial prompt information, and the pool of intelligent agents includes at least one intelligent agent capable of self-repair and parallel execution. A decision task is distributed to each of the intelligent agents so that each of the intelligent agents can execute the decision task, and a self-repair process is initiated when the execution fails until a decision result is output, the decision result including a success result and a failure result; Collect all the successful outcomes and the reasoning evidence for each successful outcome, and call the reward model to evaluate each successful outcome and its reasoning evidence to obtain a quality assessment value for each successful outcome. Based on the quality assessment values, obtain the final decision result and output it.

[0006] Secondly, this application provides a business decision-making device based on a self-healing intelligent agent and weighted consensus, the device comprising: The acquisition and conversion module is used to acquire initial business data and convert the initial business data into initial prompt information that can be parsed by the large language model; A generation module is used to generate an agent pool based on the initial prompt information, the agent pool including at least one agent capable of self-repair and parallel execution; The repair module is used to distribute decision tasks to each of the intelligent agents so that each of the intelligent agents can execute the decision tasks, and to initiate a self-repair process when the execution fails until the decision result is output, the decision result including a success result and a failure result; The decision output module is used to collect all the successful results and the reasoning evidence for each successful result, and call the reward model to evaluate each successful result and its reasoning evidence to obtain the quality evaluation value of each successful result. Based on the quality evaluation value, the final decision result is obtained and output.

[0007] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the business decision-making method based on self-healing intelligent agents and weighted consensus as described in the first aspect above.

[0008] Fourthly, this application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the business decision-making method based on self-healing intelligent agents and weighted consensus as described in the first aspect above.

[0009] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the business decision-making method based on self-healing intelligent agents and weighted consensus as described in the first aspect.

[0010] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the business decision-making method based on self-healing intelligent agents and weighted consensus as described in the first aspect above.

[0011] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: Furthermore, this application embodiment constructs a system that deeply integrates natural language business rules, multi-agent parallel reasoning, and external tool execution. This system achieves effective separation and coordination of business logic (existing in natural language form), the reasoning process (executed by parallel self-healing agents), and precise computation (executed by external tools), providing a complete end-to-end technical solution for solving complex automated decision-making problems requiring high flexibility, robustness, and accuracy.

[0012] Furthermore, this application proposes a parallel agent architecture with tool usage and self-healing capabilities. When each inference path (agent) in this architecture encounters a failure in calling an external tool (such as a code executor), it can utilize the feedback information from the failure (such as error logs) to construct a new repair task and perform iterative corrections, thereby significantly improving the end-to-end execution success rate of complex multi-step tasks and the overall robustness of the system.

[0013] Furthermore, this application's embodiments design and implement a weighted consensus decision-making mechanism based on an external reward model. This mechanism no longer employs traditional, equally weighted majority voting, but instead introduces an independent reward model to quantify the quality of each successful decision path. Through a weighted geometric average voting algorithm, decisions derived through high-quality reasoning dominate the final consensus, thereby effectively improving the upper limit of the final decision's quality.

[0014] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0015] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is one of the flowcharts illustrating the business decision-making method based on self-healing intelligent agents and weighted consensus provided in the embodiments of this application; Figure 2 This is the second flowchart illustrating the business decision-making method based on self-healing intelligent agents and weighted consensus provided in the embodiments of this application; Figure 3 This is the third flowchart illustrating the business decision-making method based on self-healing intelligent agents and weighted consensus provided in the embodiments of this application; Figure 4 This is the fourth flowchart illustrating the business decision-making method based on self-healing intelligent agents and weighted consensus provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of a business decision-making device based on a self-healing intelligent agent and weighted consensus provided in an embodiment of this application; Figure 6 This is a schematic diagram of the architecture of a business decision-making system based on self-healing intelligent agents and weighted consensus provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0017] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0018] To clearly understand the technical solution of this application, the relevant technical solutions of this application will be explained below: In business scenarios such as dynamic pricing, financial risk control, and automated auditing, the system needs to quickly generate accurate and reliable decision parameters based on real-time data and a set of complex business rules.

[0019] The current technical solution executes business rules by generating N independent inference paths in parallel. Within each inference path, a large language model is allowed to generate executable code segments (e.g., Python code) to invoke external tools for precise calculations. After all N inference paths have been executed, the system collects the results of all paths that successfully arrive at the final answer and determines the final decision through a simple majority vote (i.e., each successful path has equal voting weight).

[0020] However, the current technical solution has at least the following technical problems: 1. Low decision-making success rate, poor system robustness, and low fault tolerance: Causal analysis: Due to the fragility of current inference paths, failure at any intermediate step (especially a minor syntax or logic error during code execution) can directly terminate the entire inference path. In a complex task requiring multiple computational steps, the probability of at least one step failing is high. This causes many parallel inference paths to fail midway, resulting in a small number of paths ultimately leading to a successful answer. This not only wastes computational resources but also results in too few samples available for voting, leading to a low decision success rate.

[0021] 2. The decision aggregation mechanism is crude and cannot guarantee optimal decision quality: Causal analysis: The simple majority voting mechanism currently used in technology assumes that "each successful path contributes equally." However, in practice, the quality of different reasoning paths varies greatly. A logically clear and direct path is given the same voting weight as a logically roundabout path that happens to be correct. This leads to the final decision being merely the "most common," rather than necessarily the "highest quality."

[0022] The following description, in conjunction with the accompanying drawings, details the business decision-making method, device, electronic device, and readable storage medium based on self-healing intelligent agents and weighted consensus provided in this application, through specific embodiments and application scenarios.

[0023] Among them, the business decision-making method based on self-healing intelligent agents and weighted consensus can be applied to the terminal, specifically executed by the hardware or software in the terminal.

[0024] The business decision-making method based on self-healing intelligent agents and weighted consensus provided in this application embodiment can be executed by an electronic device or a functional module or functional entity in an electronic device that can implement the business decision-making method based on self-healing intelligent agents and weighted consensus. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras, and wearable devices. The following uses an electronic device as the execution subject to illustrate the business decision-making method based on self-healing intelligent agents and weighted consensus provided in this application embodiment.

[0025] like Figure 1 As shown, this business decision-making method based on self-healing intelligent agents and weighted consensus includes the following steps: S110: Obtain initial business data and convert it into initial prompt information that can be parsed by the large language model.

[0026] Specifically, step S110 may include: acquiring initial business data, parsing the initial business data to obtain the feature data and business rules corresponding to the initial business data, integrating the feature data and business rules, and converting them into initial prompt information that the large language model can understand.

[0027] Understandably, initial business data can be obtained from business data sources such as relational databases (MySQL, Oracle), API interfaces, message queues, log files, Excel spreadsheets, and third-party systems (CRM, ERP). This initial business data can be entered by the user at the input layer or automatically retrieved by the system from the business data source.

[0028] S120, Generate an agent pool based on the initial prompt information. The agent pool includes at least one agent capable of self-repair and parallel execution.

[0029] It should be noted that this initial prompt information can be sent to the core inference engine, which generates an agent pool based on the initial prompt information. At the same time, the core inference engine also manages the lifecycle of each agent in the agent pool.

[0030] The core inference engine is the core processing module of a system, responsible for completing specific, complex, and repetitive tasks. It typically provides a simple interface to the outside world, while encapsulating complex logic, algorithms, or state control internally, enabling it to complete the corresponding tasks independently and efficiently.

[0031] S130: Distribute decision tasks to each agent so that each agent can execute the decision tasks and initiate a self-repair process when execution fails until the decision results are output, including success results and failure results.

[0032] Understandably, after generating the pool of agents, the core inference engine will distribute corresponding decision-making tasks to each agent, and each agent will execute the decision-making tasks independently and in parallel.

[0033] Specifically, each agent generates code instructions when independently executing a decision-making task. These instructions are sent to an external toolset, where a code executor executes them in a sandbox environment to ensure security. The code executor returns both successful and error responses to the corresponding agent as the basis for its next reasoning step. For example, the code executor could be a Python code executor.

[0034] It is worth noting that each agent in this step has self-repair capabilities. That is, when calling an external code executor to execute code instructions, if an error is returned, each agent will adjust / modify the code instructions and call the code executor again to execute the adjusted / modified code instructions, thereby increasing the probability of success of each agent's decision.

[0035] S140: Collect all successful outcomes and the reasoning evidence for each successful outcome, and call the reward model to evaluate each successful outcome and its reasoning evidence to obtain the quality assessment value of each successful outcome. Based on the quality assessment value, obtain the final decision result and output it.

[0036] It is worth noting that the final decision in this step is determined based on the reasoning quality (quality assessment value) of each agent, and the reasoning quality of each agent is no longer regarded as the same. Therefore, the voice of agents with high reasoning quality (such as those with clear logic and direct reasoning methods) can be greatly enhanced, and the final decision is more accurate and reliable.

[0037] In some embodiments, the quality assessment value is proportional to the reasoning quality of the corresponding agent.

[0038] It should be understood that failure results are meaningless to the final decision outcome, therefore there is no need to collect failure results.

[0039] The reward model can be a pre-trained, independent large language model, or a general large language model including scoring criteria that is dynamically constructed when evaluation is required. The large language model can be the large language model in the aforementioned step S110, or other large language models.

[0040] The business decision-making method based on self-healing agents and weighted consensus provided in this application converts initial business data into initial prompts that can be understood by a large language model. An intelligent pool is then generated based on these prompts. Each agent in the intelligent pool independently and in parallel executes decision-making tasks, initiating a self-healing process upon failure until a data-driven decision is achieved. Successful results and reasoning evidence from each agent's decision-making tasks are searched, and a reward model is used to evaluate these results and evidence, obtaining a quality assessment value for each agent. This quality assessment value is then used to obtain and output the final decision result. Because each agent possesses self-healing capabilities, the success rate of each agent's decision-making tasks is improved, thereby enhancing overall fault tolerance and robustness. Furthermore, by utilizing the reasoning quality of each agent, the authority of agents with high reasoning quality is significantly increased, effectively raising the upper limit of the final decision's quality.

[0041] In some embodiments, such as Figure 2 As shown, step S130 includes: S131, each agent drives the large language model to reason about the decision-making task and obtains its own corresponding reasoning text information.

[0042] S132, each agent parses the corresponding reasoning text information.

[0043] S133, if the reasoning text information contains code and the code execution fails, analyze the error information in the code and repair the error information until the error information is successfully repaired within a preset number of repairs to obtain a successful result, or until the preset number of repairs is reached to obtain a failure result.

[0044] The purpose of parsing the corresponding reasoning text information is to obtain the output content type.

[0045] Furthermore, in some embodiments, such as Figure 3 As shown, step S133 includes: S1331, If ​​the inference text information contains code and the code execution fails, determine whether the count value of the repair counter has reached the preset number of repairs; S1332, if so, then the agent's decision result is determined to be a failure.

[0046] S1333, if not, each agent analyzes the error information in the code, generates a repair prompt containing the error information and repair guidance, uses the repair prompt as feedback information for the agent to re-execute the decision task, and increments or decrements the repair counter by 1 until the preset number of repairs is reached or the repair is successful.

[0047] Among them, the repair guidance can provide repair suggestions for each agent during the next execution, thereby improving the repair success rate.

[0048] In some embodiments, such as Figure 2 As shown, step S130 further includes: S134, if the reasoning text information contains code and the code is executed successfully, each agent formats the result of the successful code execution and uses it as feedback information to re-execute the decision task, and the reasoning text information output after the next execution of the decision task includes the decision result.

[0049] In some embodiments, such as Figure 2 As shown, step S130 further includes: S135, If the reasoning text information includes the decision result, then the decision result is taken as the successful result, and the reasoning evidence of the successful result is extracted. S136, if there is no explicit action information in the reasoning text information, then the decision result of the corresponding first agent is regarded as a failure result, and the reasoning of the first agent is terminated.

[0050] Understandably, the foregoing embodiments represent various decision-making outcomes for each agent when performing decision-making tasks. These include cases where a successful result is directly output, such as when the reasoning text information in step S134 includes the decision result; cases where a failed result is directly output, such as when the reasoning text information in step S135 does not contain explicit action information; cases where a successful result is indirectly output, such as when the code execution in step S133 is successful and a successful result is output after the next execution of the decision-making task, or when a successful result is obtained by successfully repairing within a preset number of repair attempts in step S132; and cases where a failed result is indirectly output, such as when a failed repair attempt is not obtained after reaching a preset number of repair attempts in step S132. The above embodiments improve the decision-making success rate of each agent, provide more successful result samples for subsequent voting decisions, resulting in better overall prediction results. Furthermore, they significantly improve the end-to-end execution success rate and overall robustness of complex multi-step tasks.

[0051] It should be noted that each agent does not have logical reasoning ability but has text parsing ability. Therefore, it is necessary to call the large language model and use its logical reasoning ability to perform reasoning in order to obtain the corresponding reasoning text information for each agent to parse and obtain the decision result.

[0052] In some embodiments, such as Figure 4 As shown, step S140 includes: S141, convert the quality assessment value into a safety quality factor, where the safety quality factor is a positive number and less than 1.

[0053] In some embodiments, step S141 further includes converting each quality assessment value into a quality factor using a preset function, wherein the quality factor is a value greater than 0 and less than 1.

[0054] The maximum value between the quality factor and the preset lower threshold is used as the safety quality factor, and the preset lower threshold is used to limit the minimum value of the safety quality factor.

[0055] In this embodiment, since the quality assessment value output by the reward model may be negative or zero, and the average value is used to calculate the quality contribution of each agent, which requires all inputs to be positive, it is necessary to convert any quality assessment value into a "quality factor" in the range of (0, 1). In order to prevent the quality factor from being too low and affecting the final decision result, a preset lower limit threshold is set to minimize the value, and then a safe quality factor is obtained based on the quality factor and the preset lower limit threshold.

[0056] In some embodiments, the quality factor can be calculated using the following formula (1): (1) Where S is the quality assessment value, q is the quality factor, and e is the base of the natural logarithm.

[0057] Assuming the preset lower threshold is ε, then the safety quality factor It can be represented as .

[0058] The preset function can be the Sigmoid function. For example, ε = .

[0059] S142, based on the decision content of each successful outcome, group the successful outcomes to obtain decision groups, and the decision content of each successful outcome within a decision group is the same.

[0060] Suppose the agent pool contains X agents, of which K agents are target agents that output successful results. Among the K successful results, there are a successful results with decision content A, b successful results with decision content B, and C successful results with decision content C. Then, group all successful results with decision content A into decision group A, all successful results with decision content B into decision group B, and all successful results with decision content C into decision group C, resulting in three decision groups. Where a + b + c ≤ K.

[0061] S143, calculate the total weight of each decision group based on the safety quality factor and the number of votes corresponding to each decision group, and output the decision content represented by the decision group with the largest total weight as the final decision result.

[0062] Furthermore, in some embodiments, step S143 includes: Based on the safety quality factors of each successful outcome within each decision group, the average value of each decision group is calculated, which is either the geometric mean or the arithmetic mean.

[0063] Specifically, in some embodiments, the geometric mean w1 can be calculated using the following formula (2): W1= (2) Where N is the number of successful results in each decision group, that is, the number of votes, which can be one of a, b, and c in the aforementioned step S142, and Π represents the geometric mean function.

[0064] Specifically, in some embodiments, the arithmetic mean w2 can be calculated using the following formula (3): w2= (3) Where N is the number of successful results in each decision group, that is, the number of votes, which can be one of a, b, and c in the aforementioned step S142, and Σ represents the arithmetic mean function.

[0065] In some embodiments, outlier data is pruned before calculating the geometric mean and arithmetic mean to eliminate extreme outliers that the reward model might produce. For example, the highest and lowest scores are removed.

[0066] Obtain the number of votes N for each decision group, and calculate the total weight W for each decision group using the average value and the number of votes.

[0067] Specifically, in some embodiments, the total weight W can be calculated using the following formula (4) or (5): W=N w1(4) W=N w2(5) The decision content represented by the decision group with the highest total weight will be output as the final decision result.

[0068] For example, if the total weight of decision group B is the largest according to the aforementioned formula, then decision content B will be the final decision result. Here, the number of successful results in decision group B is b. For instance, b can be a value less than a and greater than c. It is clear that the final decision result is no longer solely determined by the number of votes, but rather by the quality of the decision.

[0069] In this embodiment, instead of using the traditional, equally weighted majority voting, an independent reward model is introduced to quantify the quality of each successful decision path. Then, a weighted geometric average voting algorithm is used to ensure that decisions derived from high-quality reasoning dominate the final consensus, thereby effectively improving the upper limit of the quality of the final decision.

[0070] The service decision-making method based on self-healing agents and weighted consensus provided in this application can be executed by a service decision-making device based on self-healing agents and weighted consensus. This application uses the execution of the service decision-making method based on self-healing agents and weighted consensus by a service decision-making device based on self-healing agents and weighted consensus as an example to illustrate the service decision-making device based on self-healing agents and weighted consensus provided in this application.

[0071] This application also provides a business decision-making device 100 based on a self-healing intelligent agent and weighted consensus, such as... Figure 5As shown, the business decision-making device 100 based on self-healing agents and weighted consensus includes: an acquisition and conversion module 110, used to acquire initial business data and convert the initial business data into initial prompt information that can be parsed by a large language model; a generation module 120, used to generate an agent pool based on the initial prompt information, the agent pool including at least one agent capable of self-healing and parallel execution; a repair module 130, used to distribute decision tasks to each agent, so that each agent can execute the decision task, and initiate a self-repair process until a decision result is output when execution fails, the decision result including a success result and a failure result; and a decision output module 140, used to collect all the success results and the reasoning evidence for each success result, and call a reward model to evaluate each success result and its reasoning evidence to obtain a quality evaluation value for each success result, and obtain and output the final decision result based on each quality evaluation value.

[0072] According to the business decision-making device based on self-healing agents and weighted consensus provided in the embodiments of this application, the initial business data is converted into initial prompt information that can be understood by a large language model, and an intelligent pool is generated based on the initial prompt information. Then, each agent in the intelligent pool independently and in parallel executes decision-making tasks, and initiates a self-healing process until the data decision result is obtained when execution fails. The successful results and reasoning evidence of each agent's execution of decision-making tasks are searched, and a reward model is called to evaluate each successful result and reasoning evidence to obtain the quality evaluation value corresponding to each agent. Then, the final decision result is obtained and output using the quality evaluation value. Since each agent has self-healing capabilities, the success rate of each agent's execution of decision-making tasks can be improved, thereby improving the overall fault tolerance and robustness. Since the reasoning quality of each agent is utilized, the voice of agents with high reasoning quality can be greatly enhanced, thereby effectively improving the quality ceiling of the final decision.

[0073] In some embodiments, the repair module 130 includes a repair submodule configured in each agent, used to drive the large language model to reason about the decision task and obtain the corresponding reasoning text information of each agent; each agent parses the corresponding reasoning text information, and if the reasoning text information contains code and the code execution fails, it analyzes the error information in the code and repairs the error information until the error information is successfully repaired within a preset number of repairs to obtain the successful result, or the preset number of repairs is reached to obtain the failed result.

[0074] In some embodiments, the repair submodule is further configured to, if the inference text information contains code and the code is executed successfully, format the result of the successful execution of the code and use it as feedback information for the agent to re-execute the decision task, and the inference text information output after the next execution of the decision task includes the decision result.

[0075] In some embodiments, the repair submodule is further configured to determine whether the count value of the repair counter has reached a preset number of repairs if the inference text information contains code and the code execution fails; if yes, then the decision result of the agent is determined to be a failure result; if no, then each agent analyzes the error information in the code, generates a repair prompt containing the error information and repair guidance, uses the repair prompt as feedback information of the agent to re-execute the decision task, and increments or decrements the count value of the repair counter by 1 until the preset number of repairs is reached or the repair is successful.

[0076] In some embodiments, the repair submodule is further configured to, if the reasoning text information includes a decision result, treat the decision result as a successful result and extract the reasoning evidence of the successful result; if the reasoning text information does not contain explicit action information, treat the decision result of the corresponding first agent as a failure result and terminate the reasoning of the first agent.

[0077] In some embodiments, the decision output module 140 is further configured to convert the quality assessment value into a safety quality factor, wherein the safety quality factor is a positive number and less than 1; group the successful results according to the decision content of each successful result to obtain decision groups, wherein the decision content of each successful result in the decision group is the same; calculate the total weight of each decision group based on the safety quality factor and the number of votes corresponding to each decision group, and output the decision content represented by the decision group with the largest total weight as the final decision result.

[0078] In some embodiments, the decision output module 140 is further configured to convert each of the quality assessment values ​​into a quality factor using a preset function, wherein the quality factor is a value greater than 0 and less than 1; and to use the maximum value of the quality factor and a preset lower limit threshold as the safety quality factor, wherein the preset lower limit threshold is used to limit the minimum value of the safety quality factor.

[0079] In some embodiments, the decision output module 140 is further configured to calculate the average value of each decision group based on the safety quality factor of each successful result within each decision group, wherein the average value is a geometric mean or an arithmetic mean; obtain the number of votes for each decision group; calculate the total weight of each decision group using the average value and the number of votes; and output the decision content represented by the decision group with the largest total weight as the final decision result.

[0080] The business decision-making device based on self-healing intelligent agents and weighted consensus provided in this application embodiment can achieve at least one of the following technical effects: 1) This application proposes a parallel agent architecture with tool usage and self-healing capabilities. When each inference path (agent) in this architecture encounters a failure in calling an external tool (such as a code executor), it can use the feedback information of the failure (such as error logs) to construct a new repair task and perform iterative correction, thereby significantly improving the end-to-end execution success rate of complex multi-step tasks and the overall robustness of the system.

[0081] 2) This application's embodiments design and implement a weighted consensus decision-making mechanism based on an external reward model. This mechanism no longer uses traditional, equally weighted majority voting, but instead introduces an independent reward model to quantify the quality of each successful decision path. Through a weighted geometric average voting algorithm, decisions derived through high-quality reasoning dominate the final consensus, thereby effectively improving the upper limit of the final decision's quality.

[0082] 3) This application embodiment constructs a device that deeply integrates natural language business rules, multi-agent parallel reasoning, and external tool execution. This device achieves effective separation and coordination of business logic (existing in the form of natural language), reasoning process (executed by parallel self-healing agents), and accurate calculation (executed by external tools), providing a complete end-to-end technical solution for solving complex automated decision-making problems that require high flexibility, robustness, and accuracy.

[0083] The business decision-making device based on self-healing intelligent agents and weighted consensus in this application embodiment can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific devices.

[0084] The business decision-making device based on self-healing intelligent agents and weighted consensus in this application embodiment can be a device with an operating system. This operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems; this application embodiment does not specifically limit it.

[0085] The business decision-making device based on self-healing intelligent agents and weighted consensus provided in this application embodiment can achieve... Figures 1 to 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0086] In practical implementation, the business decision-making method based on self-healing intelligent agents and weighted consensus provided in this application embodiment can be implemented as follows: Figure 6 The system shown is based on a self-healing intelligent agent and weighted consensus to implement a business decision-making system, which includes: Input layer 201 is used to provide business data sources, through which users can provide initial business data.

[0087] The prompting module 202 is used to parse and process the initial business data input from the input layer 201 to obtain the initial prompting information.

[0088] Specifically, in some embodiments, the prompting engineering module 202 further includes a rule parser, a feature extractor, and a prompt generator. The rule parser parses the initial business data to obtain business rules; the feature extractor extracts features from the initial business data to obtain feature data; and the prompt generator combines the feature data and business rules to generate initial prompt information, which is then input into the core inference engine 203.

[0089] The core inference engine 203 includes an event loop controller, which receives initial prompts from the prompt generator, generates a parallel self-healing agent pool 204, and distributes decision tasks to each agent in the agent pool. The agent pool 204 comprises X agents that can execute in parallel and possess self-healing capabilities. During this process, the event loop controller also manages the generation cycle of each agent, promptly cleaning up expired agents to avoid resource consumption.

[0090] Each agent in the agent pool 204 receives a decision task distributed by the event loop controller, and executes the decision task in parallel and independently. The decision results include successful results and failure results.

[0091] Specifically, after receiving a decision task, each agent in the agent pool 204 invokes a large language model to reason about the decision task, obtaining its own reasoning text information. This reasoning text information is then parsed to determine the content type. If the reasoning text information includes a decision result, it is considered a successful result, and the reasoning evidence for that successful result is extracted and sent to the weighted decision module 206. If the reasoning text information includes code, an external toolset 205 is invoked, and the Python code executor within the external toolset is used to execute the code in a sandbox environment. Regardless of whether the code executor outputs a successful or incorrect result, it returns the result to the corresponding agent as the basis for its next reasoning step. For example, if the code executor executes successfully, the formatted result is fed back to the agent as feedback information to enable the agent to make the next decision. Conversely, if the code executor fails, a failure result is fed back to the agent, which analyzes the error information in the code and attempts to fix it until the error information is successfully fixed within a preset number of fixes, resulting in a successful result, or until the preset number of fixes is reached, resulting in a failure result.

[0092] The weighted decision module 206 collects all successful results and the reasoning evidence for each successful result, and calls the reward model to evaluate each successful result and its reasoning evidence to obtain the quality assessment value (i.e., quality score) of each successful result. Then, it uses a weighted voting algorithm to calculate the weighted average of each type of decision content, and combines the weighted average of each decision content with the number of votes to calculate the total weight of each type of decision content. The decision content with the largest total weight is taken as the final decision.

[0093] Output layer 207 outputs the final decision, which is displayed in a structured form for easy reference by users.

[0094] In some embodiments, such as Figure 7 As shown, this application embodiment also provides an electronic device 800, including a processor 801, a memory 802, and a computer program stored on the memory 802 and executable on the processor 801. When the program is executed by the processor 801, it implements the various processes of the above-described business decision-making method embodiment based on self-healing intelligent agents and weighted consensus, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0095] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0096] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described business decision-making method embodiments based on self-healing intelligent agents and weighted consensus, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0097] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0098] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described business decision-making method based on self-healing intelligent agents and weighted consensus.

[0099] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0100] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described business decision-making method embodiment based on self-healing intelligent agents and weighted consensus, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0101] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0102] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0104] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0105] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0106] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. A business decision-making method based on self-healing intelligent agents and weighted consensus, characterized in that, include: Obtain initial business data and convert the initial business data into initial prompt information that can be parsed by a large language model; A pool of intelligent agents is generated based on the initial prompt information, and the pool of intelligent agents includes at least one intelligent agent capable of self-repair and parallel execution. A decision task is distributed to each of the intelligent agents so that each of the intelligent agents can execute the decision task, and a self-repair process is initiated when the execution fails until a decision result is output, the decision result including a success result and a failure result; Collect all the successful outcomes and the reasoning evidence for each successful outcome, and call the reward model to evaluate each successful outcome and its reasoning evidence to obtain a quality assessment value for each successful outcome. Based on the quality assessment values, obtain the final decision result and output it.

2. The method according to claim 1, characterized in that, Each of the intelligent agents executes the decision-making task and initiates a self-repair process when execution fails until the decision result is output; Each of the aforementioned intelligent agents drives the large language model to reason about the decision-making task, thereby obtaining the corresponding reasoning text information of each of the intelligent agents; Each of the intelligent agents parses the corresponding reasoning text information. If the reasoning text information contains code and the code execution fails, the agent analyzes the error information in the code and repairs the error information until the error information is successfully repaired within a preset number of repairs to obtain the successful result, or the preset number of repairs is reached to obtain the failed result.

3. The method according to claim 2, characterized in that, If the reasoning text information contains code and the code executes successfully, the method further includes: Each of the intelligent agents formats the result of the successful execution of the code and uses it as feedback information to re-execute the decision task. The reasoning text information output after the next execution of the decision task includes the decision result. If the reasoning text information contains code and the code execution fails, the error information in the code is analyzed and repaired until the error information is successfully repaired within a preset number of repairs to obtain the successful result, or the preset number of repairs is reached to obtain the failure result, including: If the reasoning text information contains code and the code execution fails, determine whether the count value of the repair counter has reached the preset number of repairs; If so, then the decision result of the intelligent agent is determined to be a failure. If not, each of the intelligent agents analyzes the error information in the code, generates a repair prompt containing the error information and repair guidance, uses the repair prompt as feedback information for the intelligent agent to re-execute the decision task, and increments or decrements the count value of the repair counter by 1 until the preset number of repairs is reached or the repair is successful.

4. The method according to claim 2, characterized in that: If the reasoning text information includes a decision result, then the decision result is taken as a successful result, and the reasoning evidence for the successful result is extracted. If there is no explicit action information in the reasoning text information, the decision result of the corresponding first agent is regarded as a failure result, and the reasoning of the first agent is terminated.

5. The method according to any one of claims 1-4, characterized in that, The process of obtaining and outputting the final decision result based on each of the quality assessment values ​​includes: The quality assessment value is converted into a safety quality factor, wherein the safety quality factor is a positive number and a value less than 1. Based on the decision content of each successful outcome, the successful outcomes are grouped to obtain decision groups, wherein the decision content of each successful outcome within a decision group is the same; The total weight of each decision group is calculated based on the safety quality factor and the number of votes corresponding to each decision group. The decision content represented by the decision group with the largest total weight is output as the final decision result.

6. The method according to claim 5, characterized in that, The step of converting the quality assessment value into a safety quality factor includes: Each of the quality assessment values ​​is converted into a quality factor using a preset function, where the quality factor is a value greater than 0 and less than 1. The maximum value between the quality factor and the preset lower threshold is used as the safety quality factor, and the preset lower threshold is used to limit the minimum value of the safety quality factor.

7. The method according to claim 5, characterized in that, The process of calculating the total weight of each decision group based on the safety quality factor and the number of votes corresponding to each decision group, and outputting the decision content represented by the decision group with the largest total weight as the final decision result, includes: Based on the safety quality factor of each success result within each decision group, the average value of each decision group is calculated, wherein the average value is a geometric mean or an arithmetic mean; Obtain the number of votes for each decision group, and calculate the total weight of each decision group using the average value and the number of votes for each decision group; The decision content represented by the decision group with the largest total weight is output as the final decision result.

8. A business decision-making device based on self-healing intelligent agents and weighted consensus, characterized in that, The acquisition and conversion module is used to acquire initial business data and convert the initial business data into initial prompt information that can be parsed by the large language model; A generation module is used to generate an agent pool based on the initial prompt information, the agent pool including at least one agent capable of self-repair and parallel execution; The repair module is used to distribute decision tasks to each of the intelligent agents so that each of the intelligent agents can execute the decision tasks, and to initiate a self-repair process when the execution fails until the decision result is output, the decision result including a success result and a failure result; The decision output module is used to collect all the successful results and the reasoning evidence for each successful result, and call the reward model to evaluate each successful result and its reasoning evidence to obtain the quality evaluation value of each successful result. Based on the quality evaluation value, the final decision result is obtained and output.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the business decision-making method based on self-healing intelligent agents and weighted consensus as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the business decision-making method based on self-healing agents and weighted consensus as described in any one of claims 1-7.