Intelligent agent fault attribution method and device based on impedance calculation model and medium
By mapping the agent's task execution process to a circuit topology and utilizing a computational impedance model, the problem of insufficient accuracy and reliability in agent fault detection in existing technologies is solved. This enables accurate fault attribution and the generation of optimization instructions, thereby enhancing autonomous learning capabilities.
Patent Information
- Application Number
- CN202610065011.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-19
AI Technical Summary
Existing intelligent agent systems based on large language models suffer from insufficient accuracy and reliability in fault detection, and are unable to effectively separate surface errors from cross-level causal roots, thus limiting their autonomous evolution capabilities.
By employing a computational impedance model, the traceable logs of the agent's task execution are formalized into a circuit topology. Local computational impedance analysis is used to assess the decision confidence, action complexity, and knowledge deficit of each node. Circuit analysis is then used to determine the causes of failures and generate optimization instructions.
It improves the accuracy of intelligent agent fault analysis and the reliability of autonomous learning, enables precise attribution of failures in complex tasks, and enhances the optimization efficiency and reliability of the system.
Smart Images

Figure CN121542095A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus and medium for attributing faults in intelligent agents based on a computational impedance model. Background Technology
[0002] Existing agent systems based on large language models (LLMs), such as agents deployed in autonomous software development, DevOps (Development and Operations) chain diagnostics, or complex decision-making environments, face fundamental challenges in achieving continuous self-improvement and adapting to dynamic environments.
[0003] In related technologies, fault detection for intelligent agents has shortcomings that limit the agent's ability to evolve autonomously. The self-reflection mechanisms employed in these technologies typically rely on qualitative checks of the logic or semantics of the Chain of Thought (CoT), essentially a form of correlational diagnosis. Judging errors solely based on semantic coherence lacks causal constraints from the physical world, failing to effectively separate surface errors from cross-level causal roots (e.g., only detecting that code written by the agent cannot run, but not determining the root cause of the error, such as knowledge failure, planning and reasoning failure, or tool failure). Furthermore, it is susceptible to output biases and illusory causal links inherent in LLMs, resulting in diagnostic results with accuracy and reliability far below practical application requirements; for example, in multi-agent systems (MAS), identifying steps leading to task failure and decisive errors remains undetectable. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, and storage medium for agent fault attribution based on a computational impedance model, which can improve the accuracy of agent fault analysis. The specific solution is as follows:
[0005] In a first aspect, this application discloses an agent fault attribution method based on a computational impedance model, comprising: Obtain traceable logs generated by the agent in executing the target task, and construct a circuit topology based on the traceable logs; a node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationship between nodes in the circuit topology represents the logical relationship between different decisions; Based on the decision confidence, action complexity, and knowledge deficiency degree of each node in the circuit topology, the local computational impedance of each node is determined using a computational impedance model. Target nodes are selected based on the local calculated impedance, the cause of agent failure is determined based on the impedance composition of the target nodes, and corresponding optimization instructions for agent updates are generated.
[0006] Optionally, determining the local computational impedance of each node using a computational impedance model based on the decision confidence, action complexity, and knowledge deficit level of each node in the circuit topology includes: Based on the decision confidence of the current node, the entropy of the action sequence executed by the current node, the difference between the new knowledge retrieved by the current node and the old knowledge in the agent, and the weights of each item, the local computational impedance of the current node is obtained by weighted calculation. The decision confidence is negatively correlated with the local computational impedance, the entropy is positively correlated with the local computational impedance, and the difference is positively correlated with the local computational impedance.
[0007] Optionally, after determining the local calculated impedance corresponding to each node, the method further includes: Calculate the reference total calculated impedance corresponding to the circuit topology; Based on the local calculated impedance of each node and the circuit topology, the actual total calculated impedance corresponding to the circuit topology is calculated through circuit analysis. The decision confidence, the entropy, and the weights of the difference are updated based on the degree of difference between the reference total calculated impedance and the actual total calculated impedance.
[0008] Optionally, calculating the reference total calculated impedance corresponding to the circuit topology includes: The target parameters for task success scoring are determined based on the task type of the target task. The severity of task failure is determined based on the task success score, and the computational throughput is determined based on the effective information during the agent's task execution process. Using the severity of the task failure as the potential difference and the computational throughput as the effective current, calculate the total computational impedance corresponding to the task.
[0009] Optionally, before determining the computational throughput based on valid information during the agent's task execution, the method further includes: The content generated by the agent is subjected to syntactic analysis, and the content that conforms to syntactic validity is taken as the valid information. The knowledge retrieved by the agent is subjected to a relevance threshold check, and the knowledge that passes the check is taken as the valid information. The number of conflict-free messages transmitted is taken as the valid information.
[0010] Optionally, the step of filtering target nodes based on the locally calculated impedance includes: The node corresponding to the maximum local calculated impedance is selected as the target node, or the top N nodes with the highest local calculated impedance values are selected as the target nodes, or the node with a local calculated impedance greater than a preset local calculated impedance threshold is selected as the target node.
[0011] Optionally, the traceable log includes cognitive data and execution data. The cognitive data includes thought chains and tool call sequences, while the execution data includes stack traces and execution-related error codes.
[0012] Optionally, the step of determining the cause of agent failure based on the impedance composition of the target node and generating corresponding optimization instructions for agent updates includes: If the contribution of the knowledge deficiency degree of the target node to the local computational impedance is greater than the contribution threshold, then a first optimization instruction is generated; According to the first optimization instruction, a new weight for the target old knowledge point is determined based on the weight of the target old knowledge point and the forgetting rate parameter, or the target old knowledge point is isolated; the target old knowledge point is a knowledge point in the agent's knowledge graph that is related to the degree of knowledge deficiency. If the contribution of the target node's action complexity to the local computational impedance is greater than the contribution threshold, then a second optimization instruction is generated. According to the second optimization instruction, the action sequence executed by the target node is decomposed into an atomic operation sequence, and / or, the parameter constraint mode of the tool call is enabled, and / or, the application programming interface is called in order of priority from high to low; wherein, the more singular the function of the application programming interface is called, the higher the priority, and the higher the determinism, the higher the priority. If the contribution of the decision confidence of the target node to the local computational impedance is greater than the contribution threshold, then a third optimization instruction is generated. According to the third optimization instruction, update the thought chain planning framework, and / or add logical verification rules for decisions in the decision sequence, and / or add a counterfactual reasoning verification mechanism.
[0013] Secondly, this application discloses an agent fault attribution device based on a computational impedance model, comprising: A circuit topology construction module is used to acquire traceable logs generated by the agent when performing a target task, and construct a circuit topology based on the traceable logs; a node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationship between nodes in the circuit topology represents the logical relationship between different decisions; The local computational impedance calculation module is used to determine the local computational impedance of each node based on the decision confidence, action complexity, and knowledge deficiency degree of each node in the circuit topology using the computational impedance model. The fault cause determination module is used to filter out target nodes based on the local calculated impedance, determine the cause of the agent's fault based on the impedance composition of the target nodes, and generate corresponding optimization instructions for agent updates.
[0014] Thirdly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned intelligent agent fault attribution method based on a computational impedance model.
[0015] In this application, a traceable log generated by an agent executing a target task is obtained, and a circuit topology is constructed based on the traceable log. A node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationships between nodes in the circuit topology represent the logical relationships between different decisions. Based on the decision confidence, action complexity, and knowledge deficiency degree corresponding to each node in the circuit topology, a computational impedance model is used to determine the local computational impedance corresponding to each node. Target nodes are selected based on the local computational impedance, and the cause of agent failure is determined based on the impedance composition of the target nodes. Corresponding optimization instructions for agent updates are then generated. As can be seen, by mapping the agent's task execution process to a circuit topology and using an impedance model to quantify the agent's decision confidence, action complexity, and the degree of knowledge deficiency as impedance in the circuit, the cause of agent failure can be determined by analyzing the impedance, and optimization instructions for agent updates can be generated based on the cause of the failure. This improves the accuracy of agent failure analysis and the efficiency and reliability of agent optimization. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort. Figure 1 A flowchart of an agent fault attribution method based on a computational impedance model provided in this application; Figure 2 A schematic diagram of a fault attribution device for an intelligent agent based on a computational impedance model provided in this application; Figure 3 This application provides a structural diagram of an electronic device. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] In related technologies, self-reflection mechanisms typically rely on qualitative checks of the logic or semantics of thought chains, essentially a form of correlation diagnosis. Judging errors solely based on semantic coherence lacks causal constraints from the physical world, fails to effectively separate surface errors from cross-level causal roots, and is easily affected by LLM's own output bias and illusory causal links, resulting in diagnostic results with accuracy and reliability far below practical application requirements. To overcome these technical problems, this application proposes an agent fault attribution method based on computational impedance modeling. This method formalizes the agent's execution process as a circuit and utilizes computational impedance modeling to quantitatively and accurately attribute the root causes of failures in complex, multi-granular tasks, significantly improving the accuracy of fault analysis in agent systems, as well as their autonomous learning efficiency and reliability.
[0019] This application discloses a fault attribution method for intelligent agents based on a computational impedance model, where the computational impedance model identifies a circuit-based physical impedance model. See also... Figure 1 As shown, the method may include the following steps:
[0020] Step S11: Obtain traceable logs generated by the agent in executing the target task, and construct a circuit topology based on the traceable logs; a node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationship between nodes in the circuit topology represents the logical relationship between different decisions.
[0021] First, acquire traceable logs generated by the agent during the execution of a task. These traceable logs include cognitive data and execution data. The cognitive data includes thought chains and tool call sequences, while the execution data includes stack traces and runtime error codes. It is understood that the first step is to acquire traceable logs generated by the self-evolving agent during the execution of complex tasks. These logs contain high-level cognitive data, such as the agent's thought chains (CoT) and tool call sequences; they also include low-level execution data, such as stack traces (a call path report automatically generated by the system when an exception or error occurs during program execution, used to show the order of function calls when the error occurs), runtime error codes, etc.
[0022] Based on traceable logs, the task execution path of the intelligent agent is formalized into a circuit topology, which consists of a series of computing nodes ( The system is composed of nodes, each corresponding to a decision in the agent's decision sequence; such as a decision in knowledge retrieval, a decision in planning, a decision in code generation, or a decision in tool invocation. The connection relationships between nodes are defined according to the logical or temporal dependencies of the task, forming series, parallel, or hybrid circuit structures. For example, parallel decision steps correspond to parallel circuits, while time-dependent decision steps correspond to series circuits. This circuit topology achieves causal decoupling at two levels of granularity. On the one hand, it achieves decoupling at the macroscopic topological granularity level, i.e., by locating the temporal bottleneck in the task execution process through the series and parallel structure of circuit nodes; that is, identifying which step went wrong. On the other hand, it achieves decoupling at the microscopic cognitive granularity level, by subsequently calculating the local impedance of nodes to decouple the cognitive root cause of the failure of that decision step.
[0023] Step S12: Based on the decision confidence, action complexity, and knowledge deficiency degree of each node in the circuit topology, determine the local computational impedance of each node using the computational impedance model.
[0024] In this embodiment, for each node i in the circuit topology, the calculated impedance Zi of the node (i.e. the local calculated impedance mentioned above) is calculated. The local calculated impedance is a quantitative measure of the resistance or interference of information flow in the decision-making step corresponding to the node. Specifically, it can be analyzed based on three dimensions: the planning uncertainty, the action complexity, and the knowledge deficiency of the decision.
[0025] In some embodiments, determining the local computational impedance of each node based on its decision confidence, action complexity, and knowledge deficiency degree in the circuit topology using a computational impedance model includes: calculating the local computational impedance of the current node by weighting the decision confidence, the entropy of the action sequence executed by the current node, and the difference between the new knowledge retrieved by the current node and the old knowledge in the agent; the decision confidence is negatively correlated with the local computational impedance, the entropy is positively correlated with the local computational impedance, and the difference is positively correlated with the local computational impedance. The local computational impedance employs a multi-factor linear combination model, integrating the uncertainty at the cognitive level and the degree of disruption of the timeliness of knowledge into a single, computable physical quantity to achieve accurate separation of multi-granularity fault root causes.
[0026] In a preferred embodiment, the formula for calculating the impedance model is as follows: ; in, , , These are trainable regularization coefficients used to dynamically adjust the weights of each impedance term, satisfying... + + =1. This represents the decision confidence level corresponding to node i. This represents the entropy of the action sequence corresponding to node i. This represents the new knowledge retrieved by node i. With existing knowledge in the intelligent agent The KL divergence between them can be represented by other methods besides KL divergence.
[0027] Representing rule uncertainty impedance, it is used to quantitatively measure the risk of errors in reasoning and planning. Let be the agent's internal confidence in its own decision when performing step i. The peak value of the ActionSoftmax probability output by the large language model can be extracted, or the large language model can be required to report its decision confidence in numerical form within a range through structured cueing engineering. Decision confidence is negatively correlated with local computational impedance; therefore, when the agent exhibits extremely low confidence in key decisions (i.e., When the impedance approaches zero, the local computational impedance will increase exponentially, thus strongly indicating uncertainty errors in planning or logic, which is an important step in identifying the mental vulnerabilities of an intelligent agent.
[0028] Representing the resistance to action complexity, specifically using Shannon entropy. This measures the complexity and randomness of the generated action sequences. High entropy corresponds to high inherent risk because complex actions are more likely to introduce logical flaws or fail to execute. Action complexity resistance can penalize agents for generating unnecessary complex or redundant operations, guiding them to adopt simpler and more robust planning paths.
[0029] This represents the knowledge timeliness impedance, used to quantitatively measure the degree of knowledge deficiency. Specifically, Claus relative entropy (KL divergence) can be used to represent the difference between the new knowledge retrieved at the current node and the old knowledge in the agent. KL divergence is an asymmetric measure of the difference between two probability distributions, which can quantify the distribution of the new knowledge retrieved in step i. Relative to the agent's inherent distribution of prior knowledge The difference lies in the KL value. A high KL value indicates a significant difference between new and old knowledge. For example, a conflict may exist between retrieved new API documents and stored old API documents, hindering information flow and increasing impedance. By axiomatically and quantitatively measuring knowledge deficiencies, the problem of confusion between knowledge deficiencies and planning failures, which has long existed in traditional attribution methods, is solved, significantly improving the targeting of failure attribution.
[0030] In some embodiments, after determining the local calculated impedance corresponding to each node, the method further includes: calculating the reference total calculated impedance corresponding to the circuit topology; calculating the actual total calculated impedance corresponding to the circuit topology through circuit analysis based on the local calculated impedance of each node and the circuit topology; and updating the decision confidence, the entropy, and the weights of the difference based on the difference between the reference total calculated impedance and the actual total calculated impedance. That is, the reference total calculated impedance is an ideal value, and the above is adjusted in reverse based on the difference between the reference total calculated impedance and the actual total calculated impedance. , , The numerical value is used to enhance the agent's sensitivity to faults, thereby improving the fault detection rate. Additionally, by performing calculations and analysis on the circuit, and based on circuit connection rules (such as summing the impedances of series nodes), the actual total calculated impedance is obtained. .
[0031] The calculation of the reference total computational impedance corresponding to the circuit topology includes: determining a target parameter for task success scoring based on the task type of the target task; determining the task failure severity based on the task success score; determining the computational throughput based on the effective information during the agent's task execution process; and calculating the total computational impedance corresponding to the task using the task failure severity as the potential difference and the computational throughput as the effective current. In some embodiments, before determining the computational throughput based on the effective information during the agent's task execution process, the calculation further includes: performing syntactic analysis on the content generated by the agent, and using content that conforms to syntactic validity as the effective information; performing a relevance threshold check on the knowledge retrieved by the agent, and using the knowledge that passes the check as the effective information; and using the number of conflict-free message transmissions as the effective information.
[0032] The potential for ultimate failure of the mission Computational throughput during Agent execution By linking these factors together, the total computational reference impedance leading to failure can be determined. The failure phenomena during agent task execution are mapped to a physical model based on Ohm's law, thus establishing computable causal constraints. Specifically, this is defined as: the ultimate failure potential of the task... The formal analogy is the potential difference (voltage) in a circuit, and its calculation formula is: ; in, Characterizes the task success score. This is a normalized scalar (range [0,1]) used to measure the degree of achievement of task objectives. The specific calculation metric can be determined based on the task type; for code generation tasks, the pass rate or execution success rate of unit test cases can be used; for knowledge-based question answering or reasoning tasks, the exact match between the generated answer and the standard truth value or the F1 score can be used; for open-ended planning tasks, the completion rate of key sub-objectives or the human preference score based on human feedback can be used. As a scalar, it represents the macroscopic signal driving attribution analysis; the higher the value, the more severe the failure, i.e., the larger the potential difference.
[0033] The amount of effective information successfully processed, generated, or transmitted by the Agent in the execution path is defined as the computational throughput. Calculate throughput This refers to the throughput of effective information flow, which can be approximated by counting the number of lines of code successfully executed by the Agent, the number of effectively retrieved knowledge fragments, or the number of conflict-free messages transmitted. That is, its calculation not only counts the generated Tokens (the basic unit of text processing, i.e., the smallest unit when the AI model processes text) or lines of code, but also incorporates analyses such as syntactic validity filters. For example, only generated code blocks that pass static syntax analysis, or retrieved knowledge fragments that pass a relevance threshold check, are included in the calculation. The effective current in the circuit is simulated by the effective information flow, eliminating interference from heat loss (i.e., invalid generation). The throughput is formally analogized to the current in the circuit, and the total calculated impedance is referenced. ; in, This indicates a direct proportional relationship. The reference total calculated impedance represents the agent's cumulative resistance or interference with the information flow throughout the task execution process. This constraint ensures that the attribution analysis is physically consistent; that is, the total impedance is the potential to lead to failure. The underlying cause of the increase is thus transformed from a vague concept of failure into a calculable impedance value, providing a basis for subsequent precise attribution.
[0034] Step S13: Filter out target nodes based on the local calculated impedance, determine the cause of agent failure based on the impedance composition of the target nodes, and generate corresponding optimization instructions for agent update.
[0035] The step of selecting target nodes based on the local calculated impedance includes: selecting the node corresponding to the maximum local calculated impedance as the target node; or selecting the top N nodes with the highest local calculated impedance values as the target nodes; or selecting nodes with local calculated impedance values greater than a preset local calculated impedance threshold as the target nodes. It can be understood that the node corresponding to the maximum local calculated impedance is considered the path with the highest impedance, and the top N nodes or nodes with impedance values greater than the preset local calculated impedance threshold are paths with higher impedance. Subsequent targeted agent updates are performed based on the impedance composition of these paths, thereby achieving efficient autonomous evolution. Specifically, optimization instructions can be generated based on the impedance composition of each target node, thereby eliminating multiple high-impedance sources in parallel during a single evolution iteration, achieving a reduction in the actual total impedance of the system and a significant improvement in its capabilities.
[0036] The optimization method is determined by calculating the relative contribution of each impedance (planning uncertainty impedance, action complexity impedance, and knowledge deficiency impedance) in the local computational impedance. The relative contribution can be defined as the proportion of a certain impedance to the overall performance of the local computational impedance. Percentage of the total value.
[0037] In some embodiments, if the contribution of the knowledge defect level of the target node to the local computational impedance is greater than the contribution threshold, a first optimization instruction is generated; according to the first optimization instruction, a new weight of the target old knowledge point is determined based on the weight of the target old knowledge point and the forgetting rate parameter, or the target old knowledge point is isolated; the target old knowledge point is a knowledge point in the agent knowledge graph that is related to the knowledge defect level.
[0038] That is, if knowledge timeliness is a resistance Contribution of the item Exceeding the preset threshold (For example, 70%), then optimization instructions are generated to address knowledge deficiencies. The first optimization instruction includes: guiding the knowledge management module (e.g., a continuous learning module based on a graph database) to perform weight reduction or isolation (forgetting) operations on old knowledge nodes in the knowledge graph that are related to the KL conflict. The weight calculation formula is as follows: ; in, This represents the new weight of the old knowledge node. This represents the old weight of the old knowledge node; This is the forgetting rate parameter. Updating knowledge point weights ensures accurate forgetting, preventing outdated knowledge or incorrect experiences from interfering with subsequent decisions.
[0039] In some embodiments, if the contribution of the action complexity of the target node to the local computational impedance is greater than a contribution threshold, a second optimization instruction is generated; according to the second optimization instruction, the action sequence executed by the current node is decomposed into an atomic operation sequence, and / or, the parameter constraint mode of the tool call is enabled, and / or, the application programming interface is called in order of priority from high to low; wherein, the simpler the function of the application programming interface, the higher the priority, and the higher the determinism, the higher the priority.
[0040] That is, if the complexity of the action is resisted If the relative contribution of an item is dominant, the generated second optimization instructions include: 1. Atomization Restructuring: guiding the planning module to decompose the current high-complexity action into a set of low-entropy atomic operation sequences; 2. Parameter Constraints: forcibly enabling parameter constraint mode during tool calls to limit the model from generating unnecessary redundant parameters; each tool has a strict mode definition when provided to the model, and even if the tool mode definition defines certain parameters as not necessary, the model may still use them when generating calls. Parameter constraints can reduce such parameters; 3. API Degradation and Replacement: guiding the Agent to prioritize searching for and calling alternative APIs with simpler functions and higher determinism to reduce the risk of randomness at the execution level.
[0041] In some embodiments, if the contribution of the decision confidence of the target node to the local computational impedance is greater than the contribution threshold, a third optimization instruction is generated; according to the third optimization instruction, the thought chain planning framework is updated, and / or, logical verification rules for decisions in the decision sequence are added, and / or a counterfactual reasoning verification mechanism is added.
[0042] That is, if the planning uncertainty impedance If an item's contribution is dominant, then optimized execution of the plan is generated, including: guiding the self-reflective module to rewrite the CoT plan, adding logical verification steps, or using counterfactual reasoning verification mechanisms to improve decision confidence. This instruction is directly fed back to the prompt word structure of the large language model or the agent's decision-making architecture.
[0043] The aforementioned optimization instructions will serve as the highest-priority feedback signals, inputting into the downstream optimization module of the self-evolving intelligent agent system. This ensures that the system can self-correct and leap forward in capabilities with the highest efficiency and verifiable accuracy during continuous evolution, thereby achieving a non-linear, stepwise increase in task success rate. Understandably, in a self-evolving intelligent agent system, the agent does not rely on human intervention, but continuously improves its capabilities, strategies, knowledge, or structure through its own experience, reflection, trial and error, or the generation of new data. Therefore, it heavily relies on the accuracy of fault analysis. However, related technologies cannot distinguish between logical flaws in reasoning planning and defects in knowledge stored in the knowledge graph, potentially leading to a waste of numerous iterations and computational resources to optimize the correct reasoning process while neglecting outdated knowledge that truly needs updating. This application, by mapping cognitive factors such as uncertainty and knowledge deficiencies in the agent's decision-making onto a single, computable physical quantity, achieves high-precision, verifiable causal attribution.
[0044] This application introduces a physical impedance model, shifting the judgment of errors from fuzzy semantic probabilities to calculable physical conservation quantities. This enables accurate multi-granularity causal attribution, allowing for quantitative and precise attribution of the root causes of failures in complex tasks within self-evolving intelligent agent systems. It addresses core issues in related technologies, such as the qualitative nature of fault attribution, the inability to separate planning errors from knowledge deficiencies, and the lack of unified quantitative metrics. By introducing the concept of impedance (Z) from circuit theory, the agent's decision-making process is formalized as a hierarchical computational circuit. By quantitatively calculating the resistance of each decision step in the circuit to information flow, the contribution of reasoning planning errors and knowledge timeliness deficiencies is precisely distinguished, thereby generating highly accurate mental optimization instructions. This empowers self-evolving intelligent agents to achieve efficient and reliable continuous learning. By transforming abstract cognitive failures into calculable physical quantities, the reliability and accuracy of fault attribution are greatly improved, thereby increasing the efficiency of subsequent optimization.
[0045] As can be seen from the above, this embodiment obtains traceable logs generated by the agent executing the target task, and constructs a circuit topology based on the traceable logs. A node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationships between nodes in the circuit topology represent the logical relationships between different decisions. Based on the decision confidence, action complexity, and knowledge deficiency degree corresponding to each node in the circuit topology, a computational impedance model is used to determine the local computational impedance corresponding to each node. Target nodes are selected based on the local computational impedance, and the cause of agent failure is determined based on the impedance composition of the target nodes. Corresponding optimization instructions for agent updates are then generated. As can be seen from the above, by mapping the agent's task execution process to a circuit topology and using an impedance model to quantify the agent's decision confidence, action complexity, and the degree of knowledge deficiency as impedance in the circuit, the cause of agent failure can be determined by analyzing the impedance, and optimization instructions for agent updates can be generated based on the cause of the failure. This improves the accuracy of agent failure analysis and the efficiency and reliability of agent optimization.
[0046] Accordingly, embodiments of this application also disclose an agent fault attribution device based on a computational impedance model, see [link to relevant documentation]. Figure 2 As shown, the device includes:
[0047] The circuit topology construction module 11 is used to acquire traceable logs generated by the agent when performing the target task, and construct a circuit topology based on the traceable logs; a node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationship between nodes in the circuit topology represents the logical relationship between different decisions;
[0048] The local calculated impedance module 12 is used to determine the local calculated impedance of each node based on the decision confidence, action complexity and knowledge deficiency degree of each node in the circuit topology using the calculated impedance model.
[0049] The fault cause determination module 13 is used to filter out target nodes based on the local calculated impedance, determine the cause of the agent fault based on the impedance composition of the target nodes, and generate corresponding optimization instructions for agent updates.
[0050] As can be seen from the above, this embodiment obtains traceable logs generated by the agent executing the target task, and constructs a circuit topology based on the traceable logs. A node in the circuit topology corresponds to a decision in the decision sequence of the target task, and the connection relationships between nodes in the circuit topology represent the logical relationships between different decisions. Based on the decision confidence, action complexity, and knowledge deficiency degree corresponding to each node in the circuit topology, a computational impedance model is used to determine the local computational impedance corresponding to each node. Target nodes are selected based on the local computational impedance, and the cause of agent failure is determined based on the impedance composition of the target nodes. Corresponding optimization instructions for agent updates are then generated. As can be seen from the above, by mapping the agent's task execution process to a circuit topology and using an impedance model to quantify the agent's decision confidence, action complexity, and the degree of knowledge deficiency as impedance in the circuit, the cause of agent failure can be determined by analyzing the impedance, and optimization instructions for agent updates can be generated based on the cause of the failure. This improves the accuracy of agent failure analysis and the efficiency and reliability of agent optimization.
[0051] In some specific embodiments, the local impedance calculation module 12 may specifically include: The local computational impedance calculation unit is used to calculate the local computational impedance of the current node by weighting the decision confidence of the current node, the entropy of the action sequence executed by the current node, the difference between the new knowledge retrieved by the current node and the old knowledge in the agent, and the weights of each item. The decision confidence is negatively correlated with the local computational impedance, the entropy is positively correlated with the local computational impedance, and the difference is positively correlated with the local computational impedance.
[0052] In some specific embodiments, the intelligent agent fault attribution device may specifically include: The reference total calculated impedance calculation unit is used to calculate the reference total calculated impedance corresponding to the circuit topology after determining the local calculated impedance corresponding to each node. The actual total calculated impedance unit is used to calculate the actual total calculated impedance corresponding to the circuit topology through circuit analysis based on the local calculated impedance of each node and the circuit topology. The weight update unit is used to update the weights of the decision confidence, the entropy, and the difference based on the difference between the reference total calculated impedance and the actual total calculated impedance.
[0053] In some specific embodiments, the reference total computational impedance calculation unit is used to determine the target parameter as the task success score according to the task type of the target task; determine the task failure severity based on the task success score; determine the computational throughput based on the effective information during the agent's task execution process; and calculate the total computational impedance corresponding to the task using the task failure severity as the potential difference and the computational throughput as the effective current.
[0054] In some specific embodiments, the agent fault attribution device may specifically include an effective information statistics unit, which is used to perform syntactic analysis on the content generated by the agent before determining the computing throughput based on the effective information during the agent's task execution process, and to take the content that conforms to syntactic validity as the effective information; to perform relevance threshold verification on the knowledge retrieved by the agent, and to take the knowledge that passes the verification as the effective information; and to take the number of conflict-free message transmissions as the effective information.
[0055] In some specific embodiments, the fault cause determination module 13 may specifically include: The target node filtering unit is used to select the node corresponding to the maximum local calculated impedance as the target node, or to select the top N nodes with the local calculated impedance values as the target nodes, or to select the node with the local calculated impedance greater than the preset local calculated impedance threshold as the target node.
[0056] In some specific embodiments, the traceable log includes cognitive data and execution data. The cognitive data includes thought chains and tool call sequences, while the execution data includes stack traces and execution-related error codes.
[0057] In some specific embodiments, the fault cause determination module 13 may specifically include: The first optimization unit is configured to generate a first optimization instruction if the contribution of the knowledge defect level of the target node to the local computational impedance is greater than a contribution threshold; and, based on the first optimization instruction, determine a new weight for the target old knowledge point based on the weight of the target old knowledge point and the forgetting rate parameter, or isolate the target old knowledge point; the target old knowledge point is a knowledge point in the agent's knowledge graph that is related to the knowledge defect level. The second optimization unit is used to generate a second optimization instruction if the contribution of the action complexity of the target node to the local computational impedance is greater than a contribution threshold; according to the second optimization instruction, the action sequence executed by the target node is decomposed into an atomic operation sequence, and / or, the parameter constraint mode of the tool call is enabled, and / or, the application programming interface is called in order of priority from high to low; wherein, the simpler the function of the application programming interface is, the higher the priority, and the higher the determinism, the higher the priority. The third optimization unit is used to generate a third optimization instruction if the contribution of the decision confidence of the target node to the local computational impedance is greater than the contribution threshold; and update the thought chain planning framework according to the third optimization instruction, and / or add logical verification rules for decisions in the decision sequence, and / or add a counterfactual reasoning verification mechanism.
[0058] Furthermore, embodiments of this application also disclose an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the aforementioned intelligent agent fault attribution method based on a computational impedance model. See also Figure 3 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.
[0059] Figure 3 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the intelligent agent fault attribution method based on a computational impedance model disclosed in any of the foregoing embodiments.
[0060] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0061] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon include operating system 221, computer program 222 and data 223 including traceable logs, etc., and the storage method can be temporary storage or permanent storage.
[0062] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the intelligent agent fault attribution method based on a computational impedance model, which is executed by the electronic device 20 according to any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0063] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the steps of the intelligent agent fault attribution method based on the computational impedance model disclosed in any of the foregoing embodiments.
[0064] Furthermore, embodiments of this application also disclose a computer program product, including a computer program that, when executed by a processor, implements the steps of the intelligent agent fault attribution method based on a computational impedance model disclosed in any of the foregoing embodiments.
[0065] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0066] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0067] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.
[0068] The foregoing has provided a detailed description of the intelligent agent fault attribution method, apparatus, device, and storage medium based on a computational impedance model provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A fault attribution method for intelligent agents based on a computational impedance model, characterized in that, The method comprises the following steps: acquiring a traceable log generated by an agent performing a target task, and constructing a circuit topology based on the traceable log; one node in the circuit topology corresponds to one decision in a decision sequence of the target task, and a connection relationship between nodes in the circuit topology represents a logical relationship between different decisions; determining a local computing impedance corresponding to each node in the circuit topology according to a decision confidence, an action complexity and a knowledge defect degree corresponding to each node in the circuit topology, and utilizing a computing impedance model; screening a target node according to the local computing impedance, determining a fault reason of the agent according to an impedance composition of the target node, and generating an optimization instruction for updating the agent. 2.The computing-impedance-model-based agent fault attribution method according to claim 1, wherein, determining a local computing impedance corresponding to each node in the circuit topology according to a decision confidence, an action complexity and a knowledge defect degree corresponding to each node in the circuit topology, and utilizing a computing impedance model, comprises: obtaining the local computing impedance corresponding to the current node by weighted calculation based on the decision confidence corresponding to the current node, an entropy of an action sequence performed by the current node, and a difference degree between new knowledge retrieved by the current node and old knowledge in the agent, and weights corresponding to each item; the decision confidence and the local computing impedance are negatively correlated, the entropy and the local computing impedance are positively correlated, and the difference degree and the local computing impedance are positively correlated.
3. The method of claim 2, wherein, After determining the local computing impedance corresponding to each node, the method further comprises: calculating a reference total computing impedance corresponding to the circuit topology; calculating an actual total computing impedance corresponding to the circuit topology by circuit analysis according to the local computing impedance of each node and the circuit topology; updating weights of the decision confidence, the entropy and the difference degree according to a difference degree between the reference total computing impedance and the actual total computing impedance.
4. The method of claim 3, wherein, calculating the reference total computing impedance corresponding to the circuit topology, comprises: determining a target parameter as a task success score according to a task type of the target task; determining a task failure severity based on the task success score, and determining a computing throughput according to effective information in a task execution process of the agent; calculating a total computing impedance corresponding to the task by taking the task failure severity as an electric potential difference and taking the computing throughput as an effective current.
5. The method of claim 4, wherein, Before determining the computing throughput according to the effective information in the task execution process of the agent, the method further comprises: performing syntax analysis on content generated by the agent, and taking content meeting syntax validity as the effective information; performing relevance threshold verification on knowledge retrieved by the agent, and taking knowledge passing the verification as the effective information; taking a number of conflict-free delivered messages as the effective information.
6. The computational impedance model based agent fault attribution method of claim 1, wherein, screening the target node according to the local computing impedance, comprises: taking a node corresponding to a maximum local computing impedance as the target node, or taking N nodes with the largest local computing impedances as the target node, or taking a node with a local computing impedance greater than a preset local computing impedance threshold as the target node.
7. The computational impedance model based agent fault attribution method of claim 1, wherein, The traceable log comprises cognitive data and execution data, the cognitive data comprises a thinking chain and a tool calling sequence, and the execution data comprises a stack trajectory and an error code related to running.
8. The computational impedance model based agent fault attribution method according to any one of claims 1 to 7, characterized in that, According to the impedance composition of the target node, the agent fault reason is determined, and corresponding optimization instructions for agent updating are generated, including: If the contribution degree of the knowledge defect degree of the target node to the local computing impedance is greater than the contribution degree threshold, a first optimization instruction is generated; According to the first optimization instruction, the new weight of the target old knowledge point is determined based on the weight of the target old knowledge point and the forgetting rate parameter, or the target old knowledge point is isolated; the target old knowledge point is a knowledge point related to the knowledge defect degree in the agent knowledge graph; If the contribution degree of the action complexity of the target node to the local computing impedance is greater than the contribution degree threshold, a second optimization instruction is generated; According to the second optimization instruction, the action sequence executed by the target node is disassembled into an atomic operation sequence, and / or the parameter constraint mode of tool calling is started, and / or the application program interface is called in order of priority from high to low; the higher the priority, the more single the function of the called application program interface, and the higher the priority, the higher the certainty; If the contribution degree of the decision confidence of the target node to the local computing impedance is greater than the contribution degree threshold, a third optimization instruction is generated; According to the third optimization instruction, the thought chain planning framework is updated, and / or the logic verification rule for the decision in the decision sequence is added, and / or the counterfactual reasoning verification mechanism is increased.
9. A fault attribution device for intelligent agents based on a computational impedance model, characterized in that, Including: The circuit topology construction module is used for acquiring the traceable log generated by the agent executing the target task, and constructing the circuit topology based on the traceable log; One node in the circuit topology corresponds to one decision in the decision sequence of the target task, and the connection relationship between the nodes in the circuit topology represents the logical relationship between different decisions; The local computing impedance calculation module is used for determining the local computing impedance corresponding to each node in the circuit topology according to the decision confidence, action complexity and knowledge defect degree corresponding to each node in the circuit topology by using the computing impedance model; The fault reason determination module is used for screening out the target node according to the local computing impedance, determining the agent fault reason according to the impedance composition of the target node, and generating corresponding optimization instructions for agent updating.
10. A computer-readable storage medium, characterized in that, A computer program for storing a computer program; wherein the computer program is executed by a processor to realize the agent fault attribution method based on the computing impedance model according to any one of claims 1 to 8.
Citation Information
Patent Citations
Equipment fault early warning method based on neural network, medium and equipment
CN120046087A
Big data-based AI agent design platform decision optimization method
CN120295859A
Multi-agent collaborative optimization scheduling method and device of power system and electronic equipment
CN120409754A
Convergent Intelligence Fabric for Multi-Domain Orchestration of Distributed Agents with Hierarchical Memory Architecture and Quantum-Resistant Trust Mechanisms
US20250259085A1