Agent defect hierarchical processing method and device, equipment and storage medium

By employing a hierarchical processing mechanism, feature extraction and path selection are performed to address the defects of the intelligent agent, enabling rapid correction and long-term optimization. This solves the problems of low resource utilization efficiency and insufficient stability in existing technologies, and improves the response efficiency and processing stability of the intelligent agent.

CN123178147APending Publication Date: 2026-11-27ZHIHAOTONG (TIANJIN) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611365987.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the current technology for handling defects in intelligent agents, rapid correction is insufficient to improve the underlying capabilities of the model. Model training relies on long-term accumulation and has low resource utilization efficiency. Insufficient connection of defect data leads to coarse scheduling and insufficient stability of processing results.

Method used

A hierarchical processing mechanism is introduced. By acquiring defective behavior data of the agent, frequency, impact area, root cause type and repairability features are extracted to determine fast-loop or slow-loop paths. Fast-loop paths are injected with corrective behavior instructions, while slow-loop paths are incrementally trained to achieve rapid correction and long-term optimization.

Benefits of technology

It improves the timeliness of defect handling and the efficiency of resource utilization, enhances the response efficiency and processing stability during the operation of the intelligent agent, and realizes the coordinated scheduling of rapid correction of the behavior layer and training of the model layer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178147A_ABST
    Figure CN123178147A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, in particular to an agent defect hierarchical processing method and device, equipment and a storage medium, aiming to solve the problems of separate operation of fast correction and model training, insufficient defect data connection and lack of quantitative basis for processing path in existing agent defect processing, which leads to extensive scheduling and low resource utilization. The method takes agent defect behavior data as a unified entrance, extracts features such as frequency, influence, root cause type and repairability, and accordingly allocates defects to fast loop or slow loop paths; the correction instructions of the defects are generated through the fast loop path and written into the persistent memory, the labeled samples of the defects are accumulated through the slow loop path, and the underlying model incremental training is performed after the samples meet the threshold, so that the model fine-tuning is realized. The application realizes the collaborative linkage of defect processing and model capability optimization, improves the processing timeliness, training pertinence and result stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and storage medium for layered processing of defects in intelligent agents. Background Technology

[0002] Intelligent agents are typically used in dynamic scenarios such as industrial control, intelligent customer service, code generation, and autonomous driving to address operational defects through operation monitoring, feedback analysis, and rapid correction or model training.

[0003] However, existing solutions often use quick correction and model training separately. While quick correction is faster, it mainly targets behavioral biases and is difficult to improve the underlying capabilities of the model. Although model training can improve the model's capabilities, it relies on the long-term accumulation of defects and high-cost training. Furthermore, the lack of connection between defect data in different processing stages can easily lead to inefficient scheduling, low resource utilization efficiency, and insufficient stability of processing results.

[0004] Therefore, how to balance the timeliness of defect handling with the improvement of model capabilities in a dynamic environment, and improve the resource utilization efficiency and scheduling rationality of defect handling, has become a technical problem that needs to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for hierarchical processing of defects in intelligent agents to solve the aforementioned technical problems. This solution addresses defects generated by intelligent agents during dynamic operation. It constructs a hierarchical processing mechanism that balances short-term correction and long-term capability evolution, focusing on the identification, analysis, and differentiated handling of defective behaviors. This allows the agent's current defects to be matched with corresponding processing paths (fast or slow loop paths) according to their characteristics, thereby coordinating rapid response to defects and optimization of underlying capabilities within the same processing framework.

[0006] In a first aspect, embodiments of this application provide a method for hierarchical processing of defects in an intelligent agent, including:

[0007] Acquire defect behavior data of the defect to be repaired by the agent; extract features from the defect behavior data to obtain defect features of the defect to be repaired, wherein the defect features include at least one of frequency features, impact surface features, root cause type features, and repairability features; determine the processing path of the defect to be repaired based on the defect features; the processing path includes fast loop path and slow loop path; if the processing path is fast loop path, generate correction behavior instructions based on the defect features of the defect to be repaired and inject them into the agent's persistent memory; if the processing path is slow loop path, acquire the labeled training samples corresponding to the defect to be repaired and store them in the sample accumulation pool; after the samples in the sample accumulation pool reach a preset threshold, perform incremental training on the agent's underlying model.

[0008] In one possible embodiment, the defect features include frequency features, impact area features, root cause type features, and repairability features; the defect behavior data includes defect records and historical repair records; feature extraction is performed on the defect behavior data to obtain the defect features of the defect to be repaired, including:

[0009] Based on defect behavior data, the frequency of occurrence of defects to be repaired within a preset time window is counted to obtain frequency characteristics; task execution result information of defects is extracted from defect records, and the severity of task execution result information is classified to obtain impact characteristics; repairability characteristics of defects are determined based on historical repair records; root cause type characteristics are determined based on defect records, historical repair records, and external dependency change logs.

[0010] In one possible embodiment, the historical repair record is used to record the total number of times a defect occurred in the past, the number of times it was successfully processed through the fast loop path, and the injection status of the corresponding corrective action instructions.

[0011] In one possible embodiment, when the total number of times the defect to be repaired is processed through the fast loop path in the historical repair record is not 0, the repairability characteristic of the defect to be repaired is the ratio of the number of successful processing times of the defect to be repaired through the fast loop path to the total number of processing times.

[0012] In one possible implementation, root cause type characteristics are determined based on defect records, historical fix records, and external dependency change logs, including:

[0013] First and second clue information of the defect to be repaired are extracted from historical repair records. The first clue information is used to characterize whether a corrective action instruction for the defect to be repaired has been injected, and the second clue information is used to characterize the repair success rate of the defect through the fast loop path. Based on the defect records, the cross-context reproducibility of the defect to be repaired is determined. Based on the external dependency change log, third clue information of the defect to be repaired is extracted. The third clue information is used to characterize the temporal correlation between the time when the defect first occurs and the external dependency change. Based on the first, second, and third clue information and the cross-context reproducibility, the root cause type characteristics of the defect to be repaired are determined.

[0014] In one possible embodiment, based on first clue information, second clue information, third clue information, and cross-context reproducibility, the root cause type characteristics of the defect to be repaired are determined, including:

[0015] If the first clue indicates that a corrective action instruction for the defect to be repaired has been injected, then the root cause type of the defect to be repaired is determined to be behavioral forgetting type; if the third clue indicates that there is time correlation, then the root cause type of the defect to be repaired is determined to be environmental change type; if the cross-context reproducibility is greater than or equal to the first threshold and the second clue is less than the second threshold, then the root cause type of the defect to be repaired is determined to be model defect type; if none of the above conditions are met, then the root cause type of the defect to be repaired is determined to be strategy defect type.

[0016] In one possible embodiment, the processing path for the defect to be repaired is determined based on defect characteristics, including:

[0017] If the root cause type of the defect to be repaired is environmental change type, then the processing path for the defect to be repaired is determined to be a fast loop path; if the root cause type of the defect to be repaired is behavioral amnesia type or strategy defect type, the repairability characteristic is greater than or equal to the third threshold and the impact characteristic is lower than or equal to the preset level, then the processing path for the defect to be repaired is determined to be a fast loop path.

[0018] In one possible embodiment, the processing path for the defect to be repaired is determined based on defect characteristics, including:

[0019] If the defect characteristics of the defect to be repaired meet any of the following conditions, the processing path of the defect is determined to be a slow loop path: the root cause type characteristic is the model defect type; the impact surface characteristic is higher than the preset level and the repairability characteristic is less than the third threshold; the frequency characteristic is higher than the fourth threshold, and the total number of times the defect to be repaired is processed through the fast loop path within the preset time period is not 0.

[0020] In one possible embodiment, acquiring defect behavior data of the defect to be repaired by the intelligent agent includes:

[0021] Periodically collect multi-source defect raw data; multi-source defect raw data includes user feedback data, agent response self-evaluation data, and quality monitoring data; quality monitoring data is used to evaluate the agent's score in task processing after injecting corrective behavior instructions in multiple evaluation dimensions; based on multi-source defect raw data, generate defect behavior data for at least one defect to be repaired.

[0022] In one possible embodiment, after generating corrective action instructions based on the defect characteristics of the defect to be repaired and injecting them into the agent's persistent memory, the method further includes:

[0023] Based on the quality monitoring data of the agent within a preset time period after injecting the corrective action instruction, the processing score of the task corresponding to the defect to be repaired is determined; when the processing score is higher than the preset score, the number of successful processing of the defect to be repaired through the fast loop path is incremented by 1, and the corrective action instruction in the persistent memory is cleared.

[0024] Secondly, embodiments of this application provide an intelligent agent defect layering processing apparatus, comprising:

[0025] The data acquisition module is used to acquire defect behavior data of the defect to be repaired by the agent; the feature extraction module is used to extract features from the defect behavior data to obtain defect features of the defect to be repaired, wherein the defect features include at least one of frequency features, impact surface features, root cause type features, and repairability features; the path determination module is used to determine the processing path of the defect to be repaired based on the defect features; the processing path includes fast loop path and slow loop path; the fast loop processing module is used to generate corrective behavior instructions and inject them into the agent's persistent memory based on the defect features of the defect to be repaired if the processing path is a fast loop path; the slow loop processing module is used to acquire the labeled training samples corresponding to the defect to be repaired and store them in the sample accumulation pool if the processing path is a slow loop path, and perform incremental training on the agent's underlying model after the samples in the sample accumulation pool reach a preset threshold.

[0026] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the method provided above.

[0027] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided above.

[0028] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0029] This application provides a method, apparatus, device, and storage medium for hierarchical processing of defects in intelligent agents. When defects exist during the processing of tasks by an intelligent agent, defect behavior data of the defects to be repaired is acquired, and features are extracted from the defect behavior data. Based on the extracted defect features, such as frequency features, impact surface features, root cause type features, and repairability features, the processing path of the defects to be repaired is determined. This allows different defects to be directed to fast-loop or slow-loop paths for targeted processing, thus balancing the timeliness of defect processing with the improvement of the underlying model's capabilities. By generating corrective behavior instructions based on the defect features of the defects to be repaired under the fast-loop path and injecting them into the agent's persistent memory, behavioral layer defects can be quickly corrected, thereby improving the response efficiency and processing stability of the agent during operation. By acquiring labeled training samples corresponding to the defects to be repaired under the slow-loop path and storing them in a sample accumulation pool, and incrementally training the agent's underlying model after the samples reach a preset threshold, defect data can be effectively connected to the model optimization stage, thereby improving the resource utilization efficiency and scheduling rationality of defect processing. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0031] Figure 1 A flowchart illustrating a method for hierarchical processing of defects in an intelligent agent provided in this application;

[0032] Figure 2 An architecture diagram of a fast-slow loop collaborative scheduling system is provided in this application;

[0033] Figure 3 This application provides a flowchart illustrating a hierarchical processing method for defects in an intelligent agent.

[0034] Figure 4 A schematic diagram of the structure of an intelligent agent defect layering processing device provided in this application;

[0035] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0036] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0038] Artificial intelligence agent defect handling technology involves processes such as agent operation monitoring, behavior correction, and model optimization, and is applicable to interactive scenarios such as industrial control, intelligent customer service, code generation, and autonomous driving decision-making. Related systems typically include functional units such as operation log collection, feedback recording, defect analysis, rapid correction, and model training, used to detect and repair defects such as abnormal output, response deviations, or task failures during agent operation.

[0039] In existing technologies, fast correction mechanisms or model training mechanisms are typically used to address operational defects in intelligent agents. Fast correction mechanisms mainly inject rules, prompts, or behavioral constraints into the agent after detecting anomalies, enabling the agent to adjust its output in subsequent interactions to correct the defects. Model training mechanisms, on the other hand, fine-tune or incrementally optimize the underlying model based on long-term accumulated feedback samples to improve the model's processing capabilities in specific tasks.

[0040] In practice, the two types of solutions mentioned above are mostly operated separately. Quick correction mainly works on the behavioral layer and can alleviate problems such as format deviation, missing steps, and unstable policy execution, but it is difficult to address systemic defects caused by insufficient model capabilities. Although model training can improve underlying capabilities, it relies on a long period of data accumulation and high computational resource consumption. Scattered defects entering the training process will also reduce training efficiency.

[0041] At the same time, defect data between different processing stages often lacks unified connection. Defect information discovered in the rapid correction stage is difficult to continue to be used for subsequent training. The processing path mostly relies on experience judgment or semantic judgment, lacking clear quantitative basis. This can easily lead to simple defects entering the training process while capability defects remain at the temporary correction level, resulting in extensive scheduling, low resource utilization, and insufficient stability of processing results.

[0042] To address the aforementioned technical issues, this application provides a hierarchical defect processing method for intelligent agents. It introduces a hierarchical routing approach for defect processing, using defect behavior data as a unified entry point. First, it extracts defect features such as frequency features, impact surface features, root cause type features, and repairability features. Then, based on these features, it determines whether the processing path is a fast-loop or slow-loop path. If it's a fast-loop path, it injects the corresponding corrective behavior instructions into persistent memory. If it's a slow-loop path, it acquires the corresponding labeled training samples and stores them in a sample accumulation pool. After reaching a preset threshold, it performs incremental training on the underlying model. This method can improve the timeliness of defect processing in dynamic environments and enhance the targeted optimization of model capabilities.

[0043] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0044] Figure 1 A flowchart illustrating a method for hierarchical processing of defects in an intelligent agent provided in this application is shown below. Figure 1 As shown, the agent defect hierarchical processing method includes:

[0045] S101: Obtain defect behavior data of the agent's defect to be repaired.

[0046] The "defects to be repaired" refers to the shortcomings of the agent that need to be fixed, such as defects that occurred within the current period. Defects include unexpected operational phenomena generated by the agent during task execution, such as output anomalies, response deviations, tool invocation errors, and task execution failures. Defect behavior data includes relevant behavioral information characterizing the defects to be repaired, such as defect identifier, discovery time, associated operation type, defect phenomenon description, and triggering context. The defect identifier uniquely identifies the defect to be repaired, and the triggering context retains the input instructions, environmental information, and external dependency states that led to the defect. Defect behavior data may also include historical repair records of defects of the same type, i.e., historical repair records of defects of this type. Defects of the same type are those with the same defect identifier.

[0047] For example, defect behavior data can be structured defect records. The original record data of the defects to be repaired can be processed first to generate structured defect records.

[0048] It can periodically collect defect behavior data of the agent to be repaired from the data source. The collection of defect behavior data can be triggered by a scheduled task. For example, it can run automatically at 03:00 every day to collect defect behavior data of various defects that occurred in the agent from 03:01 the previous day to 03:00 on the current day from the data source, and obtain the defect behavior data of various defects to be repaired.

[0049] Defect behavior data can be obtained through system monitoring tools, agent self-evaluation, user feedback, and other means.

[0050] S102: Extract features from the defect behavior data to obtain the defect features of the defect to be repaired. The defect features include at least one of the following: frequency features, impact surface features, root cause type features, and repairability features.

[0051] Defect features are used to describe the classification and quantification results of defects to be repaired, and serve as the basis for selecting processing paths. Frequency features are used to characterize the number of times this type of defect to be repaired occurs within a preset time range, such as the number of occurrences within one or more cycles. Impact surface features are used to characterize the degree of impact of the defect to be repaired on the task execution results. Root cause type features are used to characterize the cause category of the defect to be repaired. Repairability features are used to characterize the likelihood that the defect to be repaired can be repaired through a fast-loop path.

[0052] You can query the number of times the same type of defect occurs within a preset time window, such as 7 days or 30 days, and determine the frequency characteristics based on the interval of occurrence. For example, the frequency characteristics can include three values, such as occasional (≤2 times per week), frequent (3-7 times per week), and persistent (>7 times per week).

[0053] Impact characteristics can be categorized into multiple levels, such as severe, moderate, and minor, which can be determined by analyzing the consequences of the defect. For example, causing data corruption or systemic errors is classified as severe; causing single task failure or requiring user intervention is classified as moderate; and affecting only the output format without affecting task completion is classified as minor.

[0054] Root cause type characteristics can be determined by the recorded loop repair status of similar defects and their correlation with the timing of external dependency changes. For example, if a similar defect has been recorded and a corrective action instruction has been injected, it is identified as a behavior forgetting type; if a similar defect occurs multiple times and loop repair fails each time, it is identified as a model defect type; if the occurrence time of a similar defect is highly correlated with the timing of external dependency changes, it is identified as an environmental change type; otherwise, it is identified as a policy defect type. The loop repair status is used to characterize whether the defect was successfully repaired through the loop path. Successful repair can be determined by the number of times the defect of that type occurred after injecting the corresponding behavior correction instruction, the quality score of the agent's task processing, etc.

[0055] Repairability can be represented by the probability of successful repairs of similar defects in the past. Alternatively, it can be represented by the ratio of the number of successful repairs of the same type of defect to the total number of occurrences of that type of defect. If this type of defect occurs for the first time, the repairability feature can be set to a default value.

[0056] When extracting features, the obtained defect behavior data can be organized first, such as through numerical transformation, normalization, and standardization, to form a dataset suitable for calculation. Then, based on the processing needs, at least one of the following can be extracted: frequency features, impact surface features, root cause type features, and repairability features, to obtain the defect features.

[0057] S103: Based on the defect characteristics, determine the processing path for the defect to be repaired; the processing path includes a fast loop path and a slow loop path.

[0058] When determining the processing path, the path can be determined based on the obtained defect characteristics to determine whether a fast loop path or a slow loop path is appropriate.

[0059] Fast loop admission conditions and slow loop admission conditions can be pre-configured. If the defect features meet the fast loop admission conditions, the processing path is determined to be a fast loop path. If the defect features meet the slow loop admission conditions, the processing path is determined to be a slow loop path.

[0060] For example, if the root cause type feature is environmental change type, the treatment path is determined to be a fast loop path. If the root cause type feature is model defect type, the treatment path is determined to be a slow loop path.

[0061] For example, if the frequency of the defect to be repaired is high (e.g., persistent) and the impact area is large (e.g., severe), then the processing path is determined to be a slow-loop path. If the frequency of the defect to be repaired is low (e.g., occasional) and the impact area is small (e.g., minor), then the processing path is determined to be a fast-loop path.

[0062] In some embodiments, the scheduling decision engine built into the agent can determine the processing path for the defect to be repaired based on the defect characteristics.

[0063] Based on the above analysis, this step maps defect features to fast loop paths or slow loop paths, enabling defects to be diverted before entering the processing link, thus achieving coordinated scheduling of rapid correction at the behavior layer and training at the model layer.

[0064] S104: If the processing path is a fast loop path, then based on the defect characteristics of the defect to be repaired, generate corrective behavior instructions and inject them into the agent's persistent memory.

[0065] S105: If the processing path is a slow loop path, the labeled training samples corresponding to the defects to be repaired are obtained and stored in the sample accumulation pool. After the samples in the sample accumulation pool reach the preset threshold, the underlying model of the agent is incrementally trained.

[0066] The fast-loop path has a faster response speed than the slow-loop path. The fast-loop path injects corrective behavioral instructions, enabling the agent to automatically correct its behavior in subsequent sessions to avoid corresponding defects and thus achieve defect repair. The slow-loop path, on the other hand, collects the agent's output results and feedback signals to form training samples. These training samples are then used to fine-tune the agent's underlying model through reinforcement learning, improving the agent's task processing capabilities and fundamentally reducing the probability of recurring similar defects, thereby achieving defect repair.

[0067] Corrective behavior instructions are text instructions used to correct defective behaviors of an agent. By injecting them into the agent's persistent memory, the agent can read the instructions and execute the corresponding rules in subsequent sessions or task processing, thereby reducing the probability of the occurrence of the corresponding type of defect.

[0068] For example, corrective behavior instructions can be agent prompts, behavioral constraint rules, tool invocation conditions, etc. Persistent memory can be memory data that is persistently stored in a storage medium, such as a persistently storable vector memory or rule repository.

[0069] Corrective action instructions are used to constrain the actions that an agent is prohibited from or must perform under certain circumstances.

[0070] For example, a corrective action instruction could be: "Before executing the <related operation / tool>, the <pre-check / preliminary action> must be performed first; it must not be skipped even if the <specific conditions> are met."

[0071] When processing a fast-loop path, a declarative rule can be generated based on one or more of the structured error information in the defect features, including symptoms, remediation plans, root cause type features, and preventive measures, to obtain a corrective action instruction. This corrective action instruction can be generated by the agent's underlying large language model or other large language models based on the aforementioned information in the defect features.

[0072] When generating corrective action instructions, the remedial plan provides the correct behavior or action, the preventive measures provide pre-conditions, and the root cause type characteristics determine the wording emphasis, such as emphasizing sequence or the execution of actions. The corrective action instructions are declarative texts, which are injected into the agent's persistent memory as constraint rules. The agent reads and follows these constraint rules in the next session without modifying the model.

[0073] In some embodiments, the priority of a corresponding defect can be determined based on its frequency and impact features, and the injected corrective action instructions for that defect can be labeled with this priority. The priority determines the injection order and top weight of the corrective action instructions. The higher the top weight, the higher the priority of the corrective action instructions will be retrieved and executed during the agent's task inference process. The higher the frequency and impact features, the higher the determined priority.

[0074] In addition to being related to the injection order and top weight, priority can also determine the period during effect verification, i.e. the length of the preset time period. The higher the priority, the shorter the preset time period.

[0075] For example, the preset time period is 12 hours when the priority is the highest, 24 hours when the priority is the second highest, and 7 days when the priority is the lowest.

[0076] The sample accumulation pool is used to temporarily store and accumulate training samples for slow loop paths. The preset threshold is used to control the timing of starting incremental training of the underlying model. The underlying model can be a large language model to support the core capabilities of the agent. Incremental training is used to perform phased updates based on the original model.

[0077] When processing a slow loop path, the original context, error output, target result, and correction basis are extracted from the current defect behavior data, and labeled training samples are formed based on manual annotation results or automatic correction rules. These labeled training samples include at least the corresponding content from the original context, error output, and correction output, and may also include context labels, capability domain labels, root cause labels, and difficulty labels. Context labels are used to label the task environment and input scenario; capability domain labels indicate the capability domain to which the sample belongs; root cause labels retain the main reasons that led the defect into the slow loop path; and difficulty labels are used to configure the sample weights of the training samples during subsequent model training, ensuring that samples corresponding to high-difficulty defects receive a higher proportion in the training loss calculation, thus enhancing the model's learning effect on high-difficulty defects.

[0078] After the samples are generated, a quality check can be performed. The quality check includes whether the annotation is complete, whether the corrected output is consistent with the task objective, whether there are duplicate samples, and whether the samples contain sensitive fields. After the quality check is passed, the samples are stored in the sample accumulation pool.

[0079] In the sample accumulation pool, training samples can be stored in buckets according to ability domain, difficulty label, etc.

[0080] When the number of samples in the accumulation pool reaches a preset threshold, such as 100, an incremental training task is initiated, triggering LoRA (Low-Rank Adaptation) fine-tuning of the underlying model. During incremental training, the underlying model is not trained from scratch; instead, parameters are updated based on the model's existing parameters, and only some parameters are iteratively optimized to reduce training computational overhead. After training is complete, the updated underlying model is deployed to the agent inference service.

[0081] After training is completed, the new and old models can be compared in the same capability domain of the new task. If the performance improvement of the new model meets the preset conditions, the model switch is executed to complete the online deployment. If the performance improvement does not meet the preset conditions, the model version obtained in this training is discarded and the original underlying model is continued to be used to avoid new defects caused by the degenerate model being connected to the inference service.

[0082] The agent defect hierarchical processing method provided in this application acquires defect behavior data of the defects to be repaired when defects exist during the agent's task processing, extracts features from the defect behavior data, and determines the processing path of the defects to be repaired based on the extracted defect features, such as frequency features, impact surface features, root cause type features, and repairability features. This method can guide defects with different characteristics to fast-loop or slow-loop paths for targeted processing, thereby balancing the timeliness of defect processing with the improvement of the underlying model's capabilities. By generating corrective behavior instructions based on the defect features of the defects to be repaired under the fast-loop path and injecting them into the agent's persistent memory, the method can quickly correct behavioral layer defects, thereby improving the response efficiency and processing stability of the agent during operation. By acquiring labeled training samples corresponding to the defects to be repaired under the slow-loop path and storing them in a sample accumulation pool, and incrementally training the agent's underlying model after the samples reach a preset threshold, the method can effectively connect defect data to the model optimization stage, thereby improving the resource utilization efficiency and scheduling rationality of defect processing.

[0083] Based on the aforementioned embodiments, the defect features further include frequency features, impact area features, root cause type features, and repairability features; the defect behavior data includes defect records and historical repair records; feature extraction is performed on the defect behavior data to obtain the defect features of the defect to be repaired, including:

[0084] Based on defect behavior data, the frequency of occurrence of defects to be repaired within a preset time window is counted to obtain frequency characteristics; task execution result information of defects is extracted from defect records, and the severity of task execution result information is classified to obtain impact characteristics; repairability characteristics of defects are determined based on historical repair records; root cause type characteristics are determined based on defect records, historical repair records, and external dependency change logs.

[0085] Among them, the defect record is the record of the defect currently to be repaired, while the historical repair record is the repair record of this type of defect over a historical period. The preset time window can be an integer multiple of the defect behavior data collection period, such as 7 times, 14 times, 30 times, etc.

[0086] After receiving defect behavior data, the defect identifier is extracted from the defect record, and the number of times the same defect identifier appears in the window is accumulated according to a fixed duration window or a rolling window. If there are duplicate reports, the duplicates are removed first and then the statistics are compiled to form frequency characteristics.

[0087] Based on the impact characteristics, task execution result information such as task failure, output deviation, or need for manual intervention is extracted from the defect records, and these results are classified into different severity levels according to the consequences of failure, the degree of task interruption, or the frequency of manual intervention, thus obtaining the impact characteristics.

[0088] Read historical repair records, count the total number of times the same type of defect has been processed through the fast-loop path and the number of successful processing times, and use the ratio of successful processing times to total processing times to characterize the repairability feature. When the total processing times is zero, the feature is set to a preset value. For example, the repairability feature can range from 0 to 1, and the preset value can be 0.5.

[0089] Root cause type characteristics can be determined based on factors such as the frequency of occurrence of the same type of defect, whether corrective action instructions are injected, the success rate or repairability of the fast loop repair, and the time correlation with external dependency changes.

[0090] For example, root cause type characteristics may include behavioral forgetting type, environmental change type, model defect type, and strategy defect type.

[0091] Through the aforementioned feature extraction process, the frequency of occurrence, scope of impact, historical repairability, and root cause category of the same defect can be uniformly represented as structured features, providing input for subsequent processing path selection. Since frequency features, impact surface features, repairability features, and root cause type features are all directly extracted from defect behavior data, defect judgment has a consistent data source and traceable basis. Using this method, defect classification becomes more granular, and the differentiation between fast-loop repair and slow-loop training becomes clearer, improving the accuracy and consistency of defect processing.

[0092] Based on the aforementioned embodiments, the historical repair record is further used to record the total number of times defects occurring in the past were processed through the fast loop path, the number of successful processing, and the injection of corresponding corrective action instructions.

[0093] In one implementation, historical repair records can be stored one by one in a historical repair table according to defect identifiers, or they can be aggregated and statistically analyzed according to defect type, or summarized records can be formed at a time granularity of day, week, or month. Defect identifiers can be generated from the hash value of defect behavior data, event sequence number, or business task number. The total number of times the fast loop path is processed and the number of successful processes are stored as integer fields, and the corrective behavior instruction injection information is represented by both a status field and a time field.

[0094] Historical repair records can be stored in a library, namely the error mode library. The error mode library is used to record information such as the defect identifier, occurrence time, total number of times and successful processing through the fast loop path, and whether corrective action instructions have been injected for various defects that occurred in history.

[0095] The success count can be determined by injecting the corrective action instruction and verifying the output of the agent in processing the corresponding task to determine whether the corresponding defect has been successfully repaired. If so, the success count is incremented by 1.

[0096] After a corrective action instruction is injected via the fast loop path, the total number of times in the historical repair record is incremented by 1. If the defect is successfully repaired, the corresponding number of successful repairs is incremented by 1.

[0097] Historical repair records retain the number of times defects were processed, the number of successful repairs, and instruction injection information under the fast-track path. This facilitates statistical analysis of the actual corrective effects of corrective action instructions and provides historical reference for defect characteristic judgment and path selection. It can promptly identify failed corrective action instructions, support instruction updates or sample collection, reduce ineffective scheduling, and improve the reliability of defect handling decisions.

[0098] Based on the aforementioned embodiments, further, when the total number of times the defect to be repaired is processed through the fast loop path in the historical repair record is not 0, the repairability characteristic of the defect to be repaired is the ratio of the number of successful processing times of the defect to be repaired through the fast loop path to the total number of processing times.

[0099] By identifying the defect to be repaired, the total number of times and the number of successful repairs of the corresponding defect type through the fast-loop path can be obtained from historical repair records. If the number of successful repairs is not zero, the ratio of the number of successful repairs to the total number of successful repairs is calculated. Based on this ratio, the repairability characteristics of the defect to be repaired are determined. This ratio can be directly determined as the repairability characteristic, or the repairability characteristics of the defect to be repaired can be determined based on the range in which the ratio falls.

[0100] By quantifying the repairability characteristics by the ratio of historical successes to total successes, and using real historical processing data as the basis for calculation, objective quantification of repairability can be achieved. This can intuitively reflect the actual correction level of corrective action instructions, thereby improving the accuracy of processing path determination.

[0101] In one possible implementation, root cause type characteristics are determined based on defect records, historical repair records, and external dependency change logs. This includes: extracting first and second clue information of the defect to be repaired from historical repair records; wherein the first clue information is used to characterize whether a corrective action instruction for the defect to be repaired has been injected, and the second clue information is used to characterize the repair success rate of the defect through the fast loop path; determining the cross-context reproducibility of the defect to be repaired based on defect records; extracting third clue information of the defect to be repaired based on external dependency change logs, wherein the third clue information is used to characterize the temporal correlation between the time of the first occurrence of the defect to be repaired and the external dependency change; and determining the root cause type characteristics of the defect to be repaired based on the first, second, and third clue information and the cross-context reproducibility.

[0102] Cross-context reproducibility characterizes the frequency of a defect's occurrence across different task contexts. Third-clue information characterizes whether the defect's initial occurrence falls within the change window of an external dependency. External dependencies can be external tools, external interfaces, etc.

[0103] The system reads the repair entry corresponding to the current defect identifier from the historical repair record and parses the corrective behavior instruction injection field to determine the first clue information. Simultaneously, it reads the total number of times the fast-loop path is processed and the number of successful processes to obtain the second clue information. In some embodiments, the second clue information can be a repairability feature. The system extracts the task type, input context, runtime environment, and abnormal output behavior from the defect record and calculates the cross-context reproducibility based on the recurrence of the same defect in different contexts. The system performs time alignment processing on the external dependency change log and performs correlation analysis between the time of the first occurrence of the current defect and the time of the external dependency version change to obtain the third clue information.

[0104] Based on the aforementioned four pieces of information, namely the first to third pieces of information and cross-context reproducibility, as well as the preset root cause determination rules, the root cause type characteristics are determined.

[0105] For example, if corrective action instructions have been injected and the fast loop success rate is high, the root cause type feature is classified as the behavior forgetting type; if the cross-context reproducibility is high and the fast loop success rate is low, it is classified as the model defect type; if the third-party clue information indicates that the defect time has a significant temporal correlation with changes in external dependencies, it is classified as the environmental change type; and the rest are classified as the strategy defect type.

[0106] By employing the aforementioned method for determining root cause type features, the system no longer relies solely on a single log signal. Instead, it combines historical repair data, defect recurrence, and changes in external dependencies for joint judgment. This ensures that the classification results align with the actual causes of the defects and provides a more stable basis for subsequent fast-loop repair or slow-loop training. Consequently, the accuracy of root cause identification is improved, and the consistency and interpretability of defect handling path selection are enhanced.

[0107] In one possible implementation, the root cause type feature of the defect to be repaired is determined based on the first clue information, the second clue information, the third clue information, and the cross-context reproducibility. This includes: if the first clue information indicates that a corrective behavior instruction has been injected into the defect to be repaired, then the root cause type feature of the defect to be repaired is determined to be the behavior forgetting type; if the third clue information indicates that there is a time correlation, then the root cause type feature of the defect to be repaired is determined to be the environmental change type; if the cross-context reproducibility is greater than or equal to a first threshold and the second clue information is less than a second threshold, then the root cause type feature of the defect to be repaired is determined to be the model defect type; if none of the above conditions are met, then the root cause type feature of the defect to be repaired is determined to be the strategy defect type.

[0108] The first cue information can include two values, such as 0 and 1. When the value is 1, it indicates that the agent's persistent memory has been injected with corrective action instructions for this type of defect. If the first cue information is 1, but the defect of this type is still detected, it indicates that the agent has the ability to act correctly but has missed the corresponding rules during execution, and the root cause type feature is determined to be the behavior forgetting type.

[0109] The third clue information can include two values, such as 0 and 1. When the value is 1, it means that the time when the defect to be repaired first occurs is related to the change of external dependency. If it falls into the change window of external dependency, it means that the change of external dependency has made the originally correct behavior become the wrong behavior. Then the root cause type feature is determined to be the environmental change type.

[0110] If the reproducibility across contexts is high and the repairability feature of the second clue information is low, it indicates that the defect is reproducible across multiple contexts and the success rate of fast loop repair is low. This is likely a defect caused by the underlying model itself, and the root cause type feature is determined to be the model defect type.

[0111] If the above three categories are not met, it indicates that the agent has a deviation at the decision-making logic or strategy level, such as incorrect tool invocation order or inappropriate heuristic selection. In this case, the root cause type feature is determined to be a strategy defect type.

[0112] When multiple root cause type features are determined based on the aforementioned four pieces of information, the following priority order is used for decision-making: model defect type, environmental change type, and behavioral forgetting type. That is, the root cause type feature with the highest priority is determined as the final root cause type feature. For example, when the root cause type feature is determined to be behavioral forgetting type based on the first piece of information and environmental change type based on the third piece of information, the root cause type feature is ultimately determined to be behavioral forgetting type according to the aforementioned priority. Alternatively, when the root cause type feature is determined to be model defect type based on cross-context reproducibility and the second piece of information, and behavioral forgetting type based on the first piece of information, the root cause type feature is ultimately determined to be model defect type according to the aforementioned priority.

[0113] For example, the first threshold can be 3, 5 or other values, and the second threshold can be 0.3, 0.2 or other values.

[0114] By incorporating injected corrective behaviors, temporal relevance, cross-context reproducibility, and fast-loop repair success rate into a unified judgment, the root causes of defects can be stably classified, and different processing paths can be assigned to behavioral forgetting types, environmental change types, model defect types, and policy defect types, thereby improving the consistency of root cause identification and the matching degree of subsequent processing.

[0115] Based on the aforementioned embodiments, further, based on defect characteristics, the processing path for the defect to be repaired is determined, including: if the root cause type characteristic of the defect to be repaired is environmental change type, then the processing path for the defect to be repaired is determined to be a fast loop path; if the root cause type characteristic of the defect to be repaired is behavioral forgetting type or strategy defect type, the repairability characteristic is greater than or equal to the third threshold and the impact surface characteristic is lower than or equal to the preset level, then the processing path for the defect to be repaired is determined to be a fast loop path.

[0116] After extracting defect features, a joint judgment is made based on the root cause type features, repairability features, impact area features, and frequency features in the defect features to determine the processing path.

[0117] For a fast-loop path, the admission criteria include: the root cause type characteristic is environmental change type, or it meets the following conditions: the root cause type characteristic is behavioral amnesia type or strategy defect type, the repairability characteristic is greater than or equal to the third threshold, and the impact surface characteristic is lower than or equal to the preset level. If the defect characteristics meet the fast-loop path admission criteria, then the processing path is determined to be a fast-loop path.

[0118] For example, the repairability feature can range from 0 to 1, and the third threshold can be 0.7, 0.8, or other values.

[0119] By adopting the above method, defects that are correctable in the short term and have a small impact can be prioritized to enter the fast loop path, shortening the defect handling delay and improving the targeting of the corrective action instruction injection.

[0120] Based on the aforementioned embodiments, further, based on defect characteristics, the processing path of the defect to be repaired is determined, including: if the defect characteristics of the defect to be repaired meet any of the following conditions, the processing path of the defect is determined to be a slow loop path: the root cause type characteristic is a model defect type; the impact surface characteristic is higher than a preset level and the repairability characteristic is less than a third threshold; the frequency characteristic is higher than a fourth threshold, and the total number of times the defect to be repaired is processed through the fast loop path within a preset time period is not 0.

[0121] For example, the preset time period can be 14 days, 30 days, or other values.

[0122] For example, the impact characteristics can include three levels: mild, moderate, and severe, with the preset level being moderate.

[0123] For example, if the same type of defect has occurred at least 5 times in the past 30 days, and the total number of times it has been processed through the fast loop path is not 0, then the processing path is determined to be the slow loop path.

[0124] In some embodiments, the condition that the frequency characteristic is higher than the fourth threshold and the total number of times the defect to be repaired is processed through the fast loop path within a preset time period is not 0 can be replaced with: the frequency characteristic is higher than the fourth threshold, the total number of times the defect to be repaired is processed through the fast loop path within a preset time period is not 0, and the recurrence rate is less than the fifth threshold.

[0125] The recurrence rate can be represented by the ratio of the total number of times the defect to be repaired is processed through the fast loop path within a preset time period after fast loop processing to the total number of times the defect to be repaired is processed through the fast loop path within a preset time period before processing.

[0126] For example, the recurrence rate can be represented as a percentage, and the fifth threshold can be 50%.

[0127] For example, if the same type of defect has been treated at least 5 times in the past 30 days via the fast loop path and the recurrence rate is greater than 50% or 0.5, then the treatment path is determined to be the slow loop path.

[0128] By using the aforementioned slow loop path admission judgment logic, the shortcomings suitable for model training and optimization in different scenarios are covered, avoiding the problem of one-sided judgment caused by single-condition judgment; it can accurately identify the shortcomings that are not suitable for fast loop correction, ensuring the completeness of path judgment and improving the reliability of processing path selection.

[0129] Table 1 Routing Decision Matrix

[0130]

[0131] In some embodiments, the processing path can be determined by looking up a table using the routing decision matrix shown in Table 1, with the root cause type feature as the first dimension and the combination of frequency feature and influence surface feature as the second dimension.

[0132] Among them, occasional, frequent, and persistent are three values ​​for the frequency characteristic; slight, moderate, and severe are three levels of the impact characteristic.

[0133] When the first dimension is the type of behavioral forgetting and the second dimension is "persistent + severe", in addition to determining the processing path as a fast loop path, priority marking can also be performed to increase the priority of the corrective behavior instructions corresponding to the defect.

[0134] When the first dimension is the type of environmental change and the second dimension is "continuous + severe", in addition to determining the processing path as the fast loop path, an alarm can also be issued.

[0135] When the first dimension is the model defect type and the second dimension is "persistent + severe", in addition to determining the processing path as a slow loop path, priority marking can also be performed to increase the weight of the training samples corresponding to the defects.

[0136] In one possible implementation, acquiring defect behavior data of the agent's defect to be repaired includes: periodically collecting multi-source defect source data; the multi-source defect source data includes user feedback data, agent response self-evaluation data, and quality monitoring data; the quality monitoring data is used to evaluate the agent's score in task processing after injecting corrective behavior instructions in multiple evaluation dimensions; and based on the multi-source defect source data, generating defect behavior data of at least one defect to be repaired.

[0137] Among them, the multi-source defect source data includes quality monitoring data collected from the fast ring monitoring data source, user feedback data read from the user feedback data source such as user correction events for the agent output, and agent response self-evaluation data read from the quality self-evaluation source such as the self-evaluation log.

[0138] The agent can score the quality of each response or each target response, thus obtaining the agent's self-evaluation data. Target responses can be responses corresponding to a target business, responses obtained using target tools, etc.

[0139] Quality monitoring data can be obtained by performing multi-dimensional quality assessments on the data output by an intelligent agent during the execution of a task after injecting corrective behavior instructions, including responses and some intermediate data, through external workpieces or other intelligent agents. For example, it can be a comprehensive score.

[0140] It can poll and collect data from various data sources at preset time intervals to periodically collect multi-source defect raw data; it can also proactively trigger data collection when defect alarms, user complaints, task failures, and abnormal fluctuations in quality scores are detected.

[0141] The collected user feedback data, agent response self-evaluation data, and quality monitoring data are first timestamped and associated with identifiers. Then, deduplication, conflict resolution, and field normalization are performed to map the original information from different sources into a unified data structure. Subsequently, based on task identifiers, session identifiers, and defect identifiers, multi-source data of the same type of defect are merged, and fields such as defect phenomenon description, triggering context, associated operation type, and monitoring score changes are extracted to form structured defect behavior data.

[0142] By collecting defect raw data from multiple sources and integrating user feedback, agent self-assessment, and quality monitoring information, the limitations of a single data source are overcome. User feedback reflects real-world usage issues, agent self-assessment enables proactive anomaly detection, and quality monitoring data quantifies task performance after corrective action commands are implemented. The complementary and corroborating information from multiple sources reduces missed defects and misjudgments, generating defect behavior data to ensure the comprehensiveness and accuracy of subsequent defect feature extraction.

[0143] In one possible implementation, after generating corrective action instructions based on the defect characteristics of the defect to be repaired and injecting them into the agent's persistent memory, i.e., after performing fast-loop repair processing, the method further includes:

[0144] After injecting the corrective behavior instruction, within a set time period, acquire task processing data of the agent performing tasks corresponding to the same type of defect. The task processing data includes responses (i.e., agent output) and intermediate data, including task reasoning process data, tool call data, memory matching results, and other data reflecting the agent's thinking process. The task processing data is scored on multiple evaluation dimensions to obtain a processing score. If the processing score is higher than the preset score, the fast loop repair is determined to be successful, the success count is incremented by 1, and the repairability feature of the corresponding defect is updated. If not, the failure count is incremented by 1, and based on the updated repairability feature, determine whether to switch the processing path to the slow loop path, i.e., whether the updated repairability feature meets the slow loop admission criteria, such as being less than 0.7.

[0145] For slow loop handling, the defect incidence rate in the same capability domain before and after incremental training of the model can be statistically analyzed. If the defect incidence rate decreases by more than a preset ratio, such as 50%, after augmented training, the slow loop is considered to have been successfully repaired. If it does not exceed the preset ratio, the model is rolled back.

[0146] In one possible implementation, after generating corrective action instructions based on the defect characteristics of the defect to be repaired and injecting them into the agent's persistent memory, the method further includes: determining the processing score of the type of task corresponding to the defect to be repaired based on the agent's quality monitoring data over a preset time period after the injection of the corrective action instructions; when the processing score is higher than a preset score, incrementing the number of successful processing of the defect to be repaired through the fast loop path by 1, and clearing the corrective action instructions from the persistent memory.

[0147] In practical implementation, after the agent completes the injection of the corrective behavior instruction, it starts timing from the injection time and continuously collects the quality monitoring data of the corresponding task within a preset time period. It then calculates the processing score by combining multiple scoring dimensions such as task correctness, response consistency, format compliance, and constraint satisfaction.

[0148] The processing score for the type of task corresponding to the defect to be repaired can be obtained by weighted summation of multiple dimensions, or the single-item score in the quality monitoring data can be directly used as the processing score.

[0149] When the processing score is higher than the preset score, the defect is determined to have been successfully repaired through the fast-loop path. The corresponding success count is incremented by 1 in the historical repair record, and the corrective action instruction is simultaneously deleted from the persistent memory to prevent subsequent interactions from repeatedly invoking the same constraint. The repairability characteristics of the defect can also be updated simultaneously for direct invocation later. When the processing score is lower than the preset score, the corrective action instruction is retained for continued observation.

[0150] For example, the scoring can be done on a percentage basis, with preset scores of 80, 82, 85, or other values.

[0151] The effectiveness of corrective action instructions is verified by using quality monitoring data within a preset time period. Upon successful verification, the number of successful fast loop cycles is updated and the instruction content in memory is cleared, ensuring that the persistent memory remains consistent with the current defect state.

[0152] With this implementation, the agent can determine whether the fast loop repair is complete based on the quantified processing score, and promptly reclaim the behavior correction instructions upon success. This avoids redundant correction instructions residing in persistent memory for a long time, prevents invalid instructions from occupying memory resources, and avoids conflicts between old and new instructions and mutual interference between weights, thus ensuring the stability of the agent's subsequent task inference.

[0153] This application provides a method for hierarchical processing of defects in intelligent agents. In one possible implementation, multi-source defect raw data is first collected periodically. This multi-source defect raw data includes user feedback data, agent response self-evaluation data, and quality monitoring data. The quality monitoring data is used to evaluate the agent's score during task processing after injecting corrective action instructions across multiple evaluation dimensions. Based on the multi-source defect raw data, defect records of defects to be repaired are generated. Combined with historical repair records formed over a historical period, defect behavior data of the defects to be repaired is obtained. The historical repair records record the total number of times historical defects were processed through the fast-loop path, the number of successful processes, and the injection status of corresponding corrective action instructions.

[0154] Based on defect behavior data, feature extraction is performed to obtain the frequency, impact, root cause type, and repairability characteristics of the defect to be repaired. Frequency characteristics are obtained by statistically analyzing the number of occurrences of the defect within a preset time window. Impact characteristics are obtained by extracting the task execution result information corresponding to the defect from the defect records and classifying the severity of the task execution result information. Repairability characteristics are determined based on historical repair records; when the total number of times the defect to be repaired is processed through the fast-loop path in the historical repair records is not zero, the repairability characteristic is the ratio of the number of successful attempts to the total number of attempts. Root cause type characteristics are determined by combining defect records, historical repair records, and external dependency change logs. Specifically, first and second clue information are extracted from the historical repair records. The first clue information indicates whether a corrective action instruction for the defect to be repaired has been injected, and the second clue information indicates the success rate of repairing the defect through the fast-loop path. The cross-context reproducibility of the defect to be repaired is determined based on the defect records. Third clue information is extracted from the external dependency change logs, and the third clue information indicates the temporal correlation between the first occurrence of the defect to be repaired and the external dependency change.

[0155] After obtaining the first, second, and third clues and cross-context reproducibility, if the first clue indicates that a corrective action instruction for the defect to be repaired has been injected, the root cause type feature is determined to be a behavioral amnesia type; if the third clue indicates that there is a time correlation, the root cause type feature is determined to be an environmental change type; if the cross-context reproducibility is greater than or equal to the first threshold and the second clue is less than the second threshold, the root cause type feature is determined to be a model defect type; if none of the above conditions are met, the root cause type feature is determined to be a strategy defect type. Subsequently, a processing path is determined based on each defect feature. When the root cause type feature is an environmental change type, the processing path is directly determined to be a fast-loop path; when the root cause type feature is a behavioral amnesia type or a strategy defect type, and the repairability feature is greater than or equal to the third threshold and the impact feature is less than or equal to the preset level, the processing path is determined to be a fast-loop path.

[0156] When the defect characteristics meet the slow loop determination criteria, the processing path is determined as a slow loop path. The slow loop determination criteria include: the root cause type characteristic is a model defect type; or the impact surface characteristic is higher than a preset level and the repairability characteristic is less than a third threshold; or the frequency characteristic is higher than a fourth threshold and the total number of times the defect to be repaired is processed through the fast loop path within a preset time period is not zero. When the processing path is determined as a fast loop path, a corrective action instruction is generated based on the defect characteristics of the defect to be repaired and injected into the agent's persistent memory. After injection, the processing score of the corresponding type of task of the defect to be repaired is determined based on the quality monitoring data within the preset time period. When the processing score is higher than a preset value, the number of successful processing of the defect to be repaired through the fast loop path is incremented by 1, and the corrective action instruction in the persistent memory is cleared.

[0157] When the processing path is determined to be a slow loop path, the labeled training samples corresponding to the defects to be repaired are obtained and stored in the sample accumulation pool. The labeled training samples corresponding to the same or related defects are continuously accumulated. After the number of samples in the sample accumulation pool reaches a preset threshold, incremental training is performed on the underlying model of the agent.

[0158] Figure 2 This application provides an architecture diagram of a fast-slow loop collaborative scheduling system, in which users execute the methods provided in the foregoing embodiments, such as... Figure 2 As shown, the system includes: a defect acquisition module, a defect feature extraction module, a scheduling decision engine, a fast loop execution module, a slow loop execution module, and an effect verification module.

[0159] The defect collection module runs periodically, collecting defect behavior data of the intelligent agent's defects to be repaired from three channels: fast loop monitoring source, user feedback source, and quality self-assessment source. This data includes defect records, and each defect record includes at least: defect identifier, discovery time, associated tool or operation type, defect phenomenon description, and triggering context.

[0160] The defect feature extraction module is used to extract features from the collected defect behavior data to obtain defect features. Defect features include frequency feature F, impact surface feature I, root cause type feature R, and repairability feature P. Frequency feature F is determined by counting the number of times the same defect occurs within a time window, based on the interval in which the number of occurrences falls, and is divided into three values: occasional, frequent, and persistent. Impact surface feature I characterizes the severity of the consequences of the defect, divided into three levels: minor, moderate, and severe. Root cause type feature R classifies the root cause of the defect, including four types: behavioral amnesia, strategy defect, model defect, and environmental change. Repairability feature P characterizes the probability that a defect can be repaired after injecting corrective behavioral instructions, and can be obtained by querying the fast-loop repair success rate of the same type of defect in the error pattern library. The fast-loop repair success rate is the ratio of the number of successful repairs through the fast-loop path to the total number of repairs.

[0161] The scheduling decision engine consists of three sub-modules: fast loop admission determination, slow loop admission determination, and routing decision.

[0162] The Fast Loop Admission Determination Submodule is used to determine whether to admit a fast loop path based on defect characteristics. For example, when the root cause type characteristic is behavioral forgetting or strategy defect type, the repairability characteristic is greater than 0.7, and the impact characteristic is mild or moderate, the fast loop path is admitted.

[0163] The slow loop admission decision submodule is used to determine whether to admit a slow loop path based on defect characteristics. For example, a slow loop path is admitted when the root cause type characteristic is a model defect type, or when the impact surface characteristic is a severity level and the repairability characteristic P<0.7, or when a defect of the same type has been treated by a fast loop at least 5 times in the past 30 days but the recurrence rate is still higher than 50%.

[0164] After determining that the processing path is a slow loop path, the defect enters the slow loop candidate queue. Instead of immediately triggering model training, the training samples corresponding to the defect are added to the sample accumulation pool and stored in buckets according to the capability domain. When the number of training samples in a certain capability domain is greater than or equal to the batch threshold (i.e., the preset threshold) and the comprehensive quality score is greater than or equal to the score threshold (e.g., 0.8, 0.85, etc.), incremental model training is triggered.

[0165] A capability domain is a collection of similar business capabilities. For example, logical reasoning, tool invocation, multi-turn dialogue, and text generation belong to different capability domains. The same capability domain represents similar task types and capability requirements. The comprehensive quality score is obtained by comprehensively evaluating the difficulty label, defect severity, sample validity, and noise ratio of a batch of training samples. It is used to determine whether the batch of samples is suitable for incremental training, such as low-rank adaptation fine-tuning.

[0166] The routing decision submodule is used to make a final routing decision based on the aforementioned routing decision matrix, considering the defects of injected slow loop paths and admitted fast loop paths, and output the processing path.

[0167] The fast-loop execution module generates declarative corrective action instructions and attaches priority markers, writing them into the agent's persistent memory so that the agent can automatically read and follow them in the next session. Simultaneously, a verification cycle is set for the corrective action instructions; upon expiration, the instructions are automatically re-evaluated, and once the score is restored, the corrective action instructions are cleared if the score exceeds a preset value.

[0168] The slow loop execution module is used to convert defect records and their associated original context, error output (agent output), and corrected output into training samples. After quality check filtering, they are stored in the sample accumulation pool by capability domain. After reaching the batch thresholds for quantity and quality, the LoRA parameter efficient fine-tuning method is used to incrementally train the underlying model. After training is completed, an A / B comparison evaluation is performed, and a new model adapter is deployed only when the performance improvement exceeds a preset threshold (e.g., 5%).

[0169] The effect verification module, for fast loop processing, re-collects quality monitoring data in the next monitoring cycle after the injected instruction. If the processing score recovers to above the corresponding threshold, it is recorded as a successful fast loop repair, and the repairability feature is updated. If not, it determines whether to switch to a slow loop path. Based on the updated repairability feature, it can determine whether the slow loop admission condition is met, such as less than 0.7. If so, it further determines whether the processing path is a slow loop path through the routing decision matrix. If so, slow loop processing is performed; if not, fast loop processing continues. For slow loop processing, after the incrementally trained model is deployed, the frequency of defect occurrence in the same capability domain is collected. If it decreases by more than a preset ratio, such as 50%, it is recorded as a successful slow loop processing (or repair); otherwise, the model is rolled back.

[0170] To clearly illustrate the methods provided in the foregoing embodiments, the following description will be provided in conjunction with exemplary embodiments.

[0171] In the first week, the monitoring module detected two types of defects: forgetting to import dependency libraries (defect characteristics: behavior forgetting type, frequent, moderate) and low temporal convergence rate (defect characteristics: model defect type, persistent, severe). The routing decision was to admit the former into the fast loop and the latter into the slow loop, and enter the slow loop candidate queue.

[0172] In week 2, after the fast loop processing, the fast loop effect was verified. The score for the defect of forgetting to import dependency libraries improved from 45 points to 82 points, and the corresponding corrective action instructions were removed from persistent memory. The number of training samples with low temporal convergence rate in the sample accumulation pool reached 45.

[0173] Week 4: The number of training samples with low temporal convergence rates in the sample accumulation pool reached 112, exceeding the batch threshold of 100, and the overall quality score was 0.85, exceeding the corresponding threshold, triggering incremental training. These 112 training samples were then used for LoRA fine-tuning.

[0174] Week 5: A / B evaluation showed that the convergence rate of the new model (the finely tuned underlying model) on 50 new time-sensitive tasks improved from 38% to 67%, with a performance improvement of more than 5%, and the LoRA adapter was deployed.

[0175] Week 6: The frequency of the defect of low time series convergence rate decreased from 12 times per week to 3 times, accounting for 75%, which is more than 50%. The effect was verified and the slow loop treatment was successful.

[0176] Figure 3 This application provides a flowchart illustrating a hierarchical processing method for defects in an intelligent agent, which is applied to... Figure 2 The system shown is as follows: Figure 3 The method shown mainly includes the following steps:

[0177] Defect behavior data collection: Collect defect behavior data from the aforementioned three channels;

[0178] Extract four-dimensional features: frequency feature F, influence surface feature I, root cause type feature R, and repairability feature P;

[0179] Route determination: Determine the processing path based on four-dimensional features;

[0180] If it is a fast loop path, then inject corrective behavior instructions;

[0181] If it is a slow loop path, the training samples corresponding to the defects are stored in the sample accumulation pool and divided into buckets according to the capability domain.

[0182] Determine whether the number of samples and the overall quality score in the sample accumulation pool are both greater than or equal to the corresponding thresholds, such as whether the number of samples is greater than or equal to 100 and the overall quality score is greater than or equal to 0.8; if both are yes, then trigger model fine-tuning; if not, continue accumulating training samples.

[0183] The effectiveness of defect repair is verified. For fast-loop paths, the main verification is whether the processing score of the quality monitoring data after the agent injects the corrective behavior instruction is higher than a preset score, such as 80. If so, the instruction is cleared and the repairability feature P is updated; if not, it is determined whether to upgrade to a slow-loop path. If so, the steps of storing the training samples corresponding to the defect into the sample accumulation pool and binning them according to the capability domain are executed; if not, the defect behavior data of the next defect is collected to obtain the four-dimensional features of the newly collected data, thereby performing the next round of routing determination.

[0184] For slow loop paths, A / B testing with LoRA fine-tuning is used to evaluate the model. The fine-tuned and updated underlying model is compared with the original underlying model, and the occurrence frequency of defects in the two models for the same defect is statistically analyzed. If the frequency decreases beyond a corresponding threshold, a LoRA adapter is deployed; if the frequency decreases below the threshold, the model is rolled back, meaning no LoRA adapter deployment is needed, and the original underlying model is used for inference. Afterward, defect behavior data for the next defect is collected to obtain the four-dimensional features of the newly collected data, which are then used for the next round of routing determination.

[0185] Corresponding to the method provided in the foregoing embodiments, Figure 4 This application provides a schematic diagram of the structure of a smart agent defect layering processing device, as shown below. Figure 4 As shown, the intelligent agent defect stratification processing device provided in this embodiment includes:

[0186] The data acquisition module is used to acquire defect behavior data of the defect to be repaired by the agent; the feature extraction module is used to extract features from the defect behavior data to obtain defect features of the defect to be repaired, wherein the defect features include at least one of frequency features, impact surface features, root cause type features, and repairability features; the path determination module is used to determine the processing path of the defect to be repaired based on the defect features; the processing path includes fast loop path and slow loop path; the fast loop processing module is used to generate corrective behavior instructions and inject them into the agent's persistent memory based on the defect features of the defect to be repaired if the processing path is a fast loop path; the slow loop processing module is used to acquire the labeled training samples corresponding to the defect to be repaired and store them in the sample accumulation pool if the processing path is a slow loop path, and perform incremental training on the agent's underlying model after the samples in the sample accumulation pool reach a preset threshold.

[0187] In one possible embodiment, defect features include frequency features, impact area features, root cause type features, and repairability features; defect behavior data includes defect records and historical repair records; the feature extraction module includes:

[0188] The frequency extraction unit is used to count the number of times the defects to be repaired occur within a preset time window based on defect behavior data, and obtain frequency characteristics; the impact surface extraction unit is used to extract the task execution result information of the defects from the defect records, classify the severity of the task execution result information, and obtain impact surface characteristics; the repairability extraction unit is used to determine the repairability characteristics of the defects based on historical repair records; and the root cause extraction unit is used to determine the root cause type characteristics based on defect records, historical repair records, and external dependency change logs.

[0189] In one possible embodiment, the historical repair record is used to record the total number of times a defect occurred in the past, the number of times it was successfully processed through the fast loop path, and the injection status of the corresponding corrective action instructions.

[0190] In one possible embodiment, when the total number of times the defect to be repaired is processed through the fast loop path in the historical repair record is not 0, the repairability characteristic of the defect to be repaired is the ratio of the number of successful processing times of the defect to be repaired through the fast loop path to the total number of processing times.

[0191] In one possible embodiment, the root cause extraction unit is specifically used for:

[0192] First and second clue information of the defect to be repaired are extracted from historical repair records. The first clue information is used to characterize whether a corrective action instruction for the defect to be repaired has been injected, and the second clue information is used to characterize the repair success rate of the defect through the fast loop path. Based on the defect records, the cross-context reproducibility of the defect to be repaired is determined. Based on the external dependency change log, third clue information of the defect to be repaired is extracted. The third clue information is used to characterize the temporal correlation between the time when the defect first occurs and the external dependency change. Based on the first, second, and third clue information and the cross-context reproducibility, the root cause type characteristics of the defect to be repaired are determined.

[0193] In one possible embodiment, the root cause extraction unit, when determining the root cause type characteristics of the defect to be repaired, is specifically used for:

[0194] If the first clue indicates that a corrective action instruction for the defect to be repaired has been injected, then the root cause type of the defect to be repaired is determined to be behavioral forgetting type; if the third clue indicates that there is time correlation, then the root cause type of the defect to be repaired is determined to be environmental change type; if the cross-context reproducibility is greater than or equal to the first threshold and the second clue is less than the second threshold, then the root cause type of the defect to be repaired is determined to be model defect type; if none of the above conditions are met, then the root cause type of the defect to be repaired is determined to be strategy defect type.

[0195] In one possible embodiment, the path determination module is specifically used for:

[0196] If the root cause type of the defect to be repaired is environmental change type, then the processing path for the defect to be repaired is determined to be a fast loop path; if the root cause type of the defect to be repaired is behavioral forgetting type or strategy defect type, the repairability characteristic is greater than or equal to the third threshold and the impact characteristic is lower than or equal to the preset level, then the processing path for the defect to be repaired is determined to be a fast loop path.

[0197] In one possible embodiment, the path determination module is specifically used for:

[0198] If the defect characteristics of the defect to be repaired meet any of the following conditions, the processing path of the defect is determined to be a slow loop path: the root cause type characteristic is the model defect type; the impact surface characteristic is higher than the preset level and the repairability characteristic is less than the third threshold; the frequency characteristic is higher than the fourth threshold, and the total number of times the defect to be repaired is processed through the fast loop path within the preset time period is not 0.

[0199] In one possible embodiment, the data acquisition module is specifically used for:

[0200] Periodically collect multi-source defect raw data; multi-source defect raw data includes user feedback data, agent response self-evaluation data, and quality monitoring data; quality monitoring data is used to evaluate the agent's score in task processing after injecting corrective behavior instructions in multiple evaluation dimensions; based on multi-source defect raw data, generate defect behavior data for at least one defect to be repaired.

[0201] In one possible embodiment, the device further includes an instruction clearing module for:

[0202] After generating corrective action instructions based on the defect characteristics of the defect to be repaired and injecting them into the agent's persistent memory, the processing score of the corresponding type of task of the defect to be repaired is determined based on the quality monitoring data of the agent within a preset time period after the injection of the corrective action instructions. When the processing score is higher than the preset score, the number of successful processing of the defect to be repaired through the fast loop path is incremented by 1, and the corrective action instructions in the persistent memory are cleared.

[0203] The intelligent agent defect layering processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0204] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 505.

[0205] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0206] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0207] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0208] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0209] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus. This application also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.

[0210] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0211] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0212] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0213] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0215] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0216] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0217] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0218] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for hierarchical processing of defects in an intelligent agent, characterized in that, include: Acquire defect behavior data of the intelligent agent to be repaired; Feature extraction is performed on the defect behavior data to obtain the defect features of the defect to be repaired, wherein the defect features include at least one of frequency features, impact surface features, root cause type features, and repairability features; Based on the defect characteristics, a processing path for the defect to be repaired is determined; the processing path includes a fast loop path and a slow loop path. If the processing path is the fast loop path, then based on the defect characteristics of the defect to be repaired, a corrective action instruction is generated and injected into the persistent memory of the agent; If the processing path is the slow loop path, then the labeled training samples corresponding to the defect to be repaired are obtained and stored in the sample accumulation pool. After the samples in the sample accumulation pool reach a preset threshold, the underlying model of the agent is incrementally trained.

2. The method according to claim 1, characterized in that, The defect characteristics include frequency characteristics, impact area characteristics, root cause type characteristics, and repairability characteristics; The defect behavior data includes defect records and historical repair records; The step of extracting features from the defect behavior data to obtain the defect features of the defect to be repaired includes: Based on the defect behavior data, the frequency characteristics are obtained by counting the number of times the defect to be repaired occurs within a preset time window. Extract the task execution result information of the defect from the defect record, classify the severity of the task execution result information, and obtain the impact surface feature; Based on the historical repair records, the repairability characteristics of the defect are determined; Based on the defect records, the historical repair records, and the external dependency change logs, the root cause type characteristics are determined.

3. The method according to claim 2, characterized in that, The historical repair record is used to record the total number of times defects that occurred in the past were processed through the fast loop path, the number of successful processes, and the injection status of corresponding corrective action instructions.

4. The method according to claim 3, characterized in that, When the total number of times the defect to be repaired is processed through the fast loop path in the historical repair record is not 0, the repairability characteristic of the defect to be repaired is the ratio of the number of successful processing times of the defect to be repaired through the fast loop path to the total number of processing times.

5. The method according to claim 2, characterized in that, The determination of the root cause type characteristics based on the defect records, the historical repair records, and the external dependency change logs includes: Extract the first clue information and the second clue information of the defect to be repaired from the historical repair records; wherein, the first clue information is used to characterize whether a corrective behavior instruction for the defect to be repaired has been injected, and the second clue information is used to characterize the repair success rate of the defect to be repaired through the fast loop path; Based on the defect record, the cross-context reproducibility of the defect to be repaired is determined; Based on the external dependency change log, third clue information of the defect to be repaired is extracted. The third clue information is used to characterize the time correlation between the first occurrence of the defect to be repaired and the external dependency change. Based on the first clue information, the second clue information, the third clue information, and the cross-context reproducibility, the root cause type characteristics of the defect to be repaired are determined.

6. The method according to claim 5, characterized in that, The step of determining the root cause type characteristics of the defect to be repaired based on the first clue information, the second clue information, the third clue information, and cross-context reproducibility includes: If the first clue information indicates that a corrective behavior instruction for the defect to be repaired has been injected, then the root cause type characteristic of the defect to be repaired is determined to be the behavior forgetting type. If the third clue information indicates a time correlation, then the root cause type characteristic of the defect to be repaired is determined to be an environmental change type. If the cross-context reproducibility is greater than or equal to the first threshold and the second clue information is less than the second threshold, then the root cause type feature of the defect to be repaired is determined to be the model defect type. If none of the above conditions are met, then the root cause type characteristic of the defect to be repaired is determined to be a strategy defect type.

7. The method according to claim 6, characterized in that, The step of determining the processing path for the defect to be repaired based on the defect characteristics includes: If the root cause type of the defect to be repaired is the environmental change type, then the processing path for the defect to be repaired is determined to be a fast-loop path. If the root cause type of the defect to be repaired is the behavioral forgetting type or the strategy defect type, the repairability feature is greater than or equal to the third threshold, and the impact surface feature is lower than or equal to the preset level, then the processing path of the defect to be repaired is determined to be a fast loop path.

8. The method according to claim 6, characterized in that, The step of determining the processing path for the defect to be repaired based on the defect characteristics includes: If the defect characteristics of the defect to be repaired meet any of the following conditions, then the processing path of the defect is determined to be a slow loop path: The root cause type characteristic is the model defect type; The impact area characteristics are higher than the preset level and the repairability characteristics are less than the third threshold; The frequency characteristic is higher than the fourth threshold, and the total number of times the defect to be repaired is processed through the fast loop path within the preset time period is not 0.

9. The method according to any one of claims 1-8, characterized in that, The acquisition of defect behavior data of the intelligent agent to be repaired includes: Periodically collect multi-source defect raw data; the multi-source defect raw data includes user feedback data, agent response self-evaluation data, and quality monitoring data; the quality monitoring data is used to evaluate the agent's score in task processing after injecting corrective behavior instructions in multiple evaluation dimensions; Based on the original multi-source defect data, defect behavior data for at least one defect to be repaired is generated.

10. The method according to claim 9, characterized in that, After generating corrective action instructions based on the defect characteristics of the defect to be repaired and injecting them into the agent's persistent memory, the method further includes: Based on the quality monitoring data of the agent within a preset time period after the injection of the corrective behavior instruction, the processing score of the task corresponding to the defect to be repaired is determined. When the processing score is higher than the preset score, the number of successful processing of the defect to be repaired through the fast loop path is incremented by 1, and the correction behavior instruction in the persistent memory is cleared.

11. A device for layered processing of defects in an intelligent agent, characterized in that, include: The data acquisition module is used to acquire defect behavior data of the intelligent agent to be repaired. The feature extraction module is used to extract features from the defect behavior data to obtain the defect features of the defect to be repaired, wherein the defect features include at least one of frequency features, impact surface features, root cause type features and repairability features; The path determination module is used to determine the processing path of the defect to be repaired based on the defect characteristics; the processing path includes a fast loop path and a slow loop path; The fast-loop processing module is used to generate a corrective action instruction based on the defect characteristics of the defect to be repaired and inject it into the persistent memory of the agent if the processing path is the fast-loop path. The slow loop processing module is used to obtain the labeled training samples corresponding to the defect to be repaired and store them in the sample accumulation pool if the processing path is the slow loop path. After the samples in the sample accumulation pool reach a preset threshold, the module performs incremental training on the underlying model of the agent.

12. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-10.

14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-10.