AI agent joint optimization method and system based on adaptive circulation, intermediate verification and multi-dimensional feedback
By optimizing the AI agent through adaptive loops and multi-dimensional feedback mechanisms, the problems of fixed loops, single feedback, weak fault tolerance, and fixed framework in existing technologies are solved, and efficient and stable AI agent optimization and adaptation are achieved.
Patent Information
- Application Number
- CN202511519367.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-03-03
AI Technical Summary
Existing AI agent optimization technologies suffer from problems such as fixed loops, single feedback, weak fault tolerance, unbalanced constraints, and fixed frameworks, resulting in low optimization efficiency, poor adaptability, and insufficient stability.
An adaptive loop and multi-dimensional feedback mechanism are adopted. Through a double intermediate verification step and a multi-dimensional feedback-driven strategy, the graph structure and configuration are optimized to form a multi-stage adaptive loop, which is dynamically adjusted by combining numerical and non-numerical feedback.
It significantly improves the optimization efficiency and stability of AI agents, shortens the optimization cycle, reduces resource consumption, and enhances generalization ability and adaptability.
Smart Images

Figure CN121598985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to a method and system for joint optimization of AI agents based on adaptive looping, intermediate verification, and multi-dimensional feedback. Background Technology
[0002] With the development of LLM (Large Language Model) technology, the demand for AI agents in customer service, financial Q&A, RAG and other fields has surged, but their reliability, optimization efficiency and adaptability are still constrained by existing technological bottlenecks. Limitations of optimization logic: Existing technologies (such as Maestro algorithm, GEPA, MIPROv2) have two types of isolated optimization problems—either they only optimize configuration parameters (such as prompt words, model type) and fix the graph structure, which cannot solve structural problems such as "errors caused by lack of verification steps" and "interface timeout failures caused by lack of retry mechanism"; or they follow a fixed loop of "configuration optimization (C-step) → graph structure optimization (G-step)", which cannot dynamically adjust the steps according to the real-time effect, and is prone to invalid iterations such as "performance degradation after G-step but still forcing the next round of C-step".
[0003] Insufficient utilization of feedback: Existing optimization tools rely solely on numerical metrics (such as accuracy and error rate), ignoring non-numerical feedback in the execution trajectory (such as error descriptions and human comments such as "stuck when the user did not provide an order number" and "interface timed out and did not retry"), resulting in poor optimization targeting and requiring a large number of test samples (e.g., GEPA requires 6000+ tests to achieve 69% accuracy), resulting in extremely low sample efficiency.
[0004] The lack of a balance between fault tolerance and constraints: On the one hand, if performance degradation occurs during the optimization process (such as a sharp drop in accuracy after configuration tuning) or abnormal fluctuations in the objective function (caused by excessive modification of the graph structure leading to a crash), there is a lack of automatic rollback or partial restart mechanisms; on the other hand, existing technologies cannot explicitly balance multiple constraints of "accuracy-cost-complexity" (such as doubling the cost of tokens when accuracy is improved, or making deployment difficult due to too many graph nodes), and they rely on specific frameworks (such as the LangChain built-in optimizer), which cannot be well adapted to custom agents and has a long adaptation cycle.
[0005] In summary, existing technologies cannot simultaneously solve the problems of "fixed loops, single feedback, weak fault tolerance, unbalanced constraints, and fixed frameworks." There is an urgent need for a joint optimization technology that integrates adaptive loops, intermediate verification, and multi-dimensional feedback to improve the optimization efficiency, stability, and generalization of AI agents. Summary of the Invention
[0006] The purpose of this invention is to provide a joint optimization method and system for AI agents based on adaptive loops, intermediate verification, and multi-dimensional feedback. On the basis of "graph structure-configuration joint optimization", a dual intermediate verification step (V-step) and a multi-dimensional feedback-driven strategy are added to form a "multi-stage adaptive loop" to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a joint optimization method for AI agents based on adaptive looping, intermediate verification, and multi-dimensional feedback, comprising the following steps: Initialize the agent and optimize parameters, including computation graph and configuration initialization, goal and constraint setting, and rule and feedback definition; A multi-stage adaptive loop is performed, which repeatedly executes the configuration optimization stage, the first intermediate verification and decision stage, the graph structure optimization stage, and the second intermediate verification and loop adjustment stage until the optimization objective is met or the maximum number of loops is reached. Output the optimization results. When the optimization objective is met or the maximum number of iterations is reached, output the final computation graph and configuration to form the optimized AI agent.
[0008] Preferably, the specific steps for initializing the agent and optimizing parameters are as follows: Computation graph and configuration initialization: Construct the initial computation graph G0, defining module nodes and information flow using JSON; set the initial configuration C0, defining the parameters of each node; Goal and Constraint Setting: Define the optimization goal and set constraints; Rule and Feedback Definition: Set adaptive rules and clarify the sources of multi-dimensional feedback, which include numerical feedback and non-numerical feedback.
[0009] The preferred steps of the multi-stage adaptive loop are as follows: The following phases are executed repeatedly until the optimization objective is met or the maximum number of iterations is reached: Phase 1: Configuration optimization C-step, integrating hot start strategy: fixing the current computation graph G t The optimal configuration C is searched in the preset configuration space using a "hot start" method. t+1 ; Phase 2: First Intermediate Validation and Decision V-step1: For C t+1 The effects were fully verified, and dynamic decisions were made based on the results. Phase 3: Graph Structure Optimization G-step, driven by multi-dimensional feedback: With the current configuration fixed, candidate computation graphs are generated based on multi-dimensional feedback, local modifications are made, and the optimal computation graph G is selected. t+1 ; Phase 4: Second Intermediate Validation and Iterative Adjustment V-step2: For G t+1Verify the combined effects with the current configuration and adjust the optimization strategy for the next round.
[0010] Preferably, the specific steps of the first intermediate verification and decision V-step1 are as follows: For C t+1 The effects were fully validated, and dynamic decisions were made based on the results: Performance evaluation: Calculate C t+1 The objective function value on the test set, compared to the previous round of C... t contrast; Constraint checks: Verify whether constraints such as cost and number of test samples are met; Adaptive decision making: If performance improves and constraints are met, proceed to G-step; If performance degrades, triggering "configuration rollback" will reuse C. t And narrow down the configuration search scope and re-execute C-step; If there is no improvement in 3 consecutive C-step rounds, skip G-step and proceed directly to the next C-step round; If costs exceed the budget, the next C-step will prioritize searching for low-resource configurations.
[0011] Preferably, the specific steps of the second intermediate verification and iterative adjustment (V-step2) are as follows: For G t+1 Based on the joint effect verification with the current configuration, adjust the optimization strategy for the next round: Joint performance evaluation: Calculate the objective function value of the two in combination; Adaptive decision making: If performance improves and constraints are met, proceed to C-step; If performance degrades, triggering a "graph structure rollback" will reuse G. t And narrow down the configuration search scope and re-execute G-step; If there is no improvement after 3 consecutive G-step rounds, skip C-step and proceed directly to the next G-step round; If costs exceed the budget, the next G-step will reduce the extent of graph structure modifications.
[0012] A joint optimization system for AI agents based on adaptive looping, intermediate validation, and multi-dimensional feedback includes: The initialization module is used to initialize the agent and optimize parameters, and includes a computation graph and configuration initialization unit, an objective and constraint setting unit, and a rule and feedback definition unit. The multi-stage adaptive loop module is used to repeatedly execute the configuration optimization stage, the first intermediate verification and decision stage, the graph structure optimization stage, and the second intermediate verification and loop adjustment stage until the optimization goal is met or the maximum number of loops is reached. The output module is used to output the final computation graph and configuration when the optimization objective is met or the maximum number of iterations is reached, forming the optimized AI agent.
[0013] Preferably, the initialization module specifically includes: The computation graph and configuration initialization unit is used to construct the initial computation graph G0, define the module nodes and information flow in JSON, and set the initial configuration C0 to define the parameters of each node. The objective and constraint setting unit is used to define the optimization objective and set the constraints. The rule and feedback definition unit is used to set adaptive rules and clarify the sources of multi-dimensional feedback, which include numerical feedback and non-numerical feedback.
[0014] Preferably, the multi-stage adaptive loop module includes: The configuration optimization submodule adopts a "hot start" strategy, fixing the current computation graph G. t Search for the optimal configuration C in the preset configuration space. t+1 The new configuration inherits the optimal parameters from the previous round, and only fine-tunes the parameters for newly added nodes to ensure that the objective function is optimal; The first intermediate verification and decision-making submodule, for C t+1 The effect is fully verified, and dynamic decisions are made based on the results, including performance evaluation, constraint checking, and adaptive decision-making based on the evaluation and check results, which determines whether to enter the graph structure optimization stage, trigger configuration rollback, skip the graph structure optimization stage to focus on configuration fine-tuning, or prioritize searching for low-resource configurations. The graph structure optimization submodule, with the current configuration fixed, generates candidate computation graphs based on multi-dimensional feedback, performs local modifications, and selects the optimal computation graph G. t+1 This includes steps such as feedback extraction, candidate graph generation, and optimal graph selection. The second intermediate verification and loop adjustment submodule, for G t+1 Verify the joint effects with the current configuration, adjust the next round of optimization strategy, including joint performance evaluation and adaptive decision-making based on the evaluation results, deciding whether to enter the configuration optimization phase, trigger graph structure rollback, skip the configuration optimization phase to focus on graph structure fine-tuning, or reduce the magnitude of graph structure modification.
[0015] Preferably, the first intermediate verification and decision-making submodule is executed as follows: Performance evaluation: Calculate C t+1 The objective function value on the test set, and compared with the previous round C. t contrast; Constraint checks: Verify whether constraints such as cost and number of test samples are met; Adaptive decision making: If performance is improved and constraints are met, proceed to the graph structure optimization stage; If performance degrades, triggering "configuration rollback" will reuse C. t And narrow down the configuration search scope and re-execute configuration optimization; If there is no improvement after 3 consecutive rounds of configuration optimization, skip the graph structure optimization stage and proceed directly to the next round of configuration optimization; If costs exceed the budget, the next round of configuration optimization will prioritize searching for low-resource configurations.
[0016] Preferably, the second intermediate verification and loop adjustment submodule is executed as follows: Joint performance evaluation: Calculate G t+1 The objective function value that aligns with the current configuration; Adaptive decision making: If performance improves and constraints are met, proceed to the configuration optimization phase. If performance degrades, triggering a "graph structure rollback" will reuse G. t And narrow down the configuration search scope and re-execute graph structure optimization; If there is no improvement after 3 consecutive rounds of diagram structure optimization, skip the configuration optimization phase and proceed directly to the next round of diagram structure optimization. If costs exceed the budget, the next round of graph structure optimization will reduce the scope of graph structure modifications.
[0017] Compared with the prior art, the beneficial effects of the present invention are: The AI agent joint optimization method and system proposed in this invention, based on adaptive looping, intermediate verification, and multi-dimensional feedback, significantly improves optimization efficiency: the intermediate verification mechanism can terminate invalid iterations in a timely manner, and the configuration / graph structure hot start strategy greatly reduces the dependence on a large number of test samples, significantly improves sample utilization efficiency, and can shorten the optimization cycle of the agent system, reduce the scale of token consumption by test samples, and reduce unnecessary waste of computing resources.
[0018] Resource controllability balance: The multi-constraint balance model can achieve synergistic optimization of "accuracy improvement" and "resource cost control". In cost-sensitive scenarios such as financial RAG, it can effectively improve the accuracy of task processing, reduce the consumption of core resources such as tokens, and control the computation graph complexity within the range that meets deployment requirements, avoiding the difficulties in implementation caused by excessive complexity.
[0019] Excellent generalization and adaptability: The framework-agnostic architecture breaks the dependence on specific development frameworks and can flexibly adapt to the optimization needs of AI agents in multiple fields such as customer service, finance, and healthcare. It can complete the adaptation of different scenarios without modifying the core logic code, which greatly shortens the adaptation cycle. When adding new test data, the agent can still maintain high performance stability, enhancing the agent's generalization ability. Attached Figure Description
[0020] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the present invention clear and complete, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only some, not all, embodiments of the present invention, and are merely illustrative of the embodiments of the present invention. They are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1: This invention provides a technical solution: a joint optimization method for AI agents based on adaptive looping, intermediate verification, and multi-dimensional feedback, comprising the following steps: Step S1: Initialize the agent and optimize parameters Computation graph and configuration initialization: Construct the initial computation graph G0 (defining module nodes and information flow in JSON, such as "user input → intent recognition → tool call → response generation"), and the initial configuration C0 (defining the parameters of each node, such as the LLM model being gpt-3.5-turbo, tool timeout of 3 seconds, and prompt word template). Goal and Constraint Setting: Define optimization goals (e.g., task accuracy ≥ 90%) and constraints (test sample size ≤ 200, single round cost ≤ 5000 tokens, number of graph nodes ≤ 10). Rule and Feedback Definition: Set adaptive rules (performance degradation threshold = 5%, continuous improvement threshold = 3 rounds), and clarify multi-dimensional feedback sources (numerical feedback: error rate / timeout rate; non-numerical feedback: error description, human comments).
[0023] Step S2: Multi-stage adaptive loop (C-step→V-step1→G-step→V-step2) The following phases are executed repeatedly until the optimization objective is met or the maximum number of iterations is reached: Phase 1: Configuration Optimization (C-step, integrating hot start strategy) Fix the current computation graph G t The optimal configuration C is searched in the preset configuration space (such as LLM candidate set: gpt-3.5-turbo / gpt-4o-mini, prompt word version, tool parameter range) using the "hot start" method. t+1 —The new configuration inherits the optimal parameters from the previous round, and only fine-tunes the parameters of newly added nodes (if any) to ensure that the objective function (accuracy - constraint penalty term) is optimal.
[0024] Phase 2: First Intermediate Validation and Decision (V-step1) For C t+1 The effects were fully validated, and dynamic decisions were made based on the results: Performance evaluation: Calculate C t+1 The objective function value (e.g., accuracy) on the test set, compared to the previous round C... t contrast; Constraint checks: Verify whether constraints such as cost and number of test samples are met; Adaptive decision making: If performance improves and constraints are met, proceed to G-step; If performance degrades (accuracy drops by ≥5%), trigger "configuration rollback" and reuse C. t And narrow down the configuration search scope and re-execute C-step; If there is no improvement in 3 consecutive C-steps (improvement rate <1%), skip G-step and proceed directly to the next C-step (focus on configuration fine-tuning).
[0025] If costs exceed the budget, the next C-step will prioritize searching for low-resource configurations (such as switching to the lightweight LLM model gpt-4o-mini).
[0026] Phase 3: Graph Structure Optimization (G-step, multi-dimensional feedback driven) Fix the current configuration (C) t+1 Or the C after rollback t Candidate computation graphs are generated based on multi-dimensional feedback, with only local modifications made (to avoid instability caused by global reconstruction). Feedback Extraction: Extract numerical feedback (node error rate, interface timeout rate) and non-numerical feedback (such as "unverified order number format" and "no retry after timeout") from the execution trajectory. Candidate graph generation: Design modification schemes based on non-numerical / numerical feedback (e.g., add a "format verification node" for "missing order number" and add a "retry node" for "timeout"). Each modification is limited to "adding a maximum of 3 nodes / reconnecting 3 edges". Optimal Graph Selection: Evaluate the joint performance (fit with the current configuration) and complexity (number of nodes ≤ 10) of candidate graphs, and select the optimal computational graph G. t+1 .
[0027] Phase 4: Second Intermediate Validation and Iterative Adjustment (V-step2) For G t+1 Based on the joint effect verification with the current configuration, adjust the optimization strategy for the next round: Joint performance evaluation: Calculate the combined objective function value of the two (e.g., overall accuracy); Adaptive decision making: If performance improves and constraints are met, proceed to C-step; If performance degrades (accuracy decreases by ≥5%), trigger "graph structure rollback" and reuse G. t And narrow down the configuration search scope and re-execute G-step; If there is no improvement in 3 consecutive G-steps (improvement rate <1%), skip C-step and proceed directly to the next G-step (focus graph structure fine-tuning).
[0028] If costs exceed the budget, the next G-step will reduce the scope of graph structure modifications (e.g., only allowing the addition or deletion of one node).
[0029] Step S3: Output optimization results When the optimization objective is met (e.g., accuracy ≥ 90%) or the maximum number of iterations is reached, the final computation graph G_final and configuration C_final are output, forming the optimized AI agent.
[0030] Example 2, based on Example 1, proposes a joint optimization system for AI agents based on adaptive looping, intermediate verification, and multi-dimensional feedback, including: The initialization module is used to initialize the agent and optimization parameters. It includes a computation graph and configuration initialization unit, a goal and constraint setting unit, and a rule and feedback definition unit. Specifically, it includes: a computation graph and configuration initialization unit, which is used to construct the initial computation graph G0, define the module nodes and information flow using JSON, and set the initial configuration C0, defining the parameters of each node; a goal and constraint setting unit, which is used to define the optimization goal and set the constraint conditions; and a rule and feedback definition unit, which is used to set adaptive rules and clarify the multi-dimensional feedback sources, including numerical feedback and non-numerical feedback.
[0031] A multi-stage adaptive loop module is used to iteratively execute the configuration optimization stage, the first intermediate verification and decision stage, the graph structure optimization stage, and the second intermediate verification and loop adjustment stage until the optimization objective is met or the maximum number of loops is reached; it includes: a configuration optimization submodule, which adopts a "hot start" strategy to fix the current computation graph G. t Search for the optimal configuration C in the preset configuration space. t+1 The new configuration inherits the optimal parameters from the previous round, only fine-tuning the parameters for newly added nodes to ensure the objective function is optimal; the first intermediate verification and decision submodule, for C t+1The effectiveness is fully verified, and dynamic decisions are made based on the results, including performance evaluation, constraint checking, and adaptive decision-making based on the evaluation and check results. This determines whether to enter the graph structure optimization phase, trigger configuration rollback, skip the graph structure optimization phase to focus on configuration fine-tuning, or prioritize searching for low-resource configurations. The graph structure optimization submodule fixes the current configuration, generates candidate computation graphs based on multi-dimensional feedback, makes local modifications, and selects the optimal computation graph G. t+1 It includes feedback extraction, candidate graph generation, and optimal graph selection steps; the second intermediate verification and iterative adjustment submodule, for G t+1 Verify the joint effects with the current configuration, adjust the next round of optimization strategy, including joint performance evaluation and adaptive decision-making based on the evaluation results, deciding whether to enter the configuration optimization phase, trigger graph structure rollback, skip the configuration optimization phase to focus on graph structure fine-tuning, or reduce the magnitude of graph structure modification.
[0032] The first intermediate verification and decision-making submodule specifically executes: Performance evaluation: Calculating C... t+1 The objective function value on the test set, and compared with the previous round C. t Comparison; Constraint checking: Verify whether constraints such as cost and number of test samples are met; Adaptive decision: If performance improves and constraints are met, proceed to the graph structure optimization stage; if performance degrades, trigger "configuration rollback" and reuse C. t The search scope for configurations is narrowed, and configuration optimization is re-executed. If there is no improvement after three consecutive rounds of configuration optimization, the graph structure optimization stage is skipped, and the next round of configuration optimization is directly initiated. If the cost exceeds the budget, the next round of configuration optimization will prioritize searching for low-resource configurations.
[0033] The second intermediate verification and iterative tuning submodule specifically executes: Joint performance evaluation: Calculate G. t+1 The objective function value is coordinated with the current configuration; adaptive decision-making: if performance improves and constraints are met, proceed to the configuration optimization phase; if performance degrades, trigger "graph structure rollback" and reuse G. t The configuration search scope is narrowed, and graph structure optimization is re-executed. If there is no improvement after three consecutive rounds of graph structure optimization, the configuration optimization stage is skipped, and the next round of graph structure optimization is directly initiated. If the cost exceeds the budget, the graph structure modification scope is reduced in the next round of graph structure optimization.
[0034] The output module is used to output the final computation graph and configuration when the optimization objective is met or the maximum number of iterations is reached, forming the optimized AI agent.
[0035] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A joint optimization method for AI agents based on adaptive looping, intermediate validation, and multi-dimensional feedback, characterized in that: Includes the following steps: Initialize the agent and optimize parameters, including computation graph and configuration initialization, goal and constraint setting, and rule and feedback definition; A multi-stage adaptive loop is performed, which repeatedly executes the configuration optimization stage, the first intermediate verification and decision stage, the graph structure optimization stage, and the second intermediate verification and loop adjustment stage until the optimization objective is met or the maximum number of loops is reached. Output the optimization results. When the optimization objective is met or the maximum number of iterations is reached, output the final computation graph and configuration to form the optimized AI agent.
2. The AI agent joint optimization method based on adaptive looping, intermediate validation, and multi-dimensional feedback as described in claim 1, characterized in that: The specific steps for initializing the agent and optimizing parameters are as follows: Computation graph and configuration initialization: Construct the initial computation graph G0, defining module nodes and information flow using JSON; set the initial configuration C0, defining the parameters of each node; Goal and Constraint Setting: Define the optimization goal and set constraints; Rule and Feedback Definition: Set adaptive rules and clarify the sources of multi-dimensional feedback, which include numerical feedback and non-numerical feedback.
3. The AI agent joint optimization method based on adaptive looping, intermediate verification, and multi-dimensional feedback according to claim 2, characterized in that: The steps of a multi-stage adaptive loop are as follows: The following phases are executed repeatedly until the optimization objective is met or the maximum number of iterations is reached: Phase 1: Configuration optimization C-step, integrating hot start strategy: fixing the current computation graph G t The optimal configuration C is searched in the preset configuration space using a "hot start" method. t+1 ; Phase 2: First Intermediate Validation and Decision V-step1: For C t+1 The effects were fully verified, and dynamic decisions were made based on the results. Phase 3: Graph Structure Optimization G-step, driven by multi-dimensional feedback: With the current configuration fixed, candidate computation graphs are generated based on multi-dimensional feedback, local modifications are made, and the optimal computation graph G is selected. t+1 ; Phase 4: Second Intermediate Validation and Iterative Adjustment V-step2: For G t+1 Verify the combined effects with the current configuration and adjust the optimization strategy for the next round.
4. The AI agent joint optimization method based on adaptive looping, intermediate verification, and multi-dimensional feedback as described in claim 3, characterized in that: The specific steps of the first intermediate verification and decision-making V-step1 are as follows: For C t+1 The effects were fully validated, and dynamic decisions were made based on the results: Performance evaluation: Calculate C t+1 The objective function value on the test set, compared to the previous round of C... t contrast; Constraint checks: Verify whether constraints such as cost and number of test samples are met; Adaptive decision making: If performance improves and constraints are met, proceed to G-step; If performance degrades, triggering "configuration rollback" will reuse C. t And narrow down the configuration search scope and re-execute C-step; If there is no improvement in 3 consecutive C-step rounds, skip G-step and proceed directly to the next C-step round; If costs exceed the budget, the next C-step will prioritize searching for low-resource configurations.
5. The AI agent joint optimization method based on adaptive looping, intermediate validation, and multi-dimensional feedback according to claim 4, characterized in that: The specific steps of the second intermediate verification and iterative adjustment (V-step2) are as follows: For G t+1 Based on the joint effect verification with the current configuration, adjust the optimization strategy for the next round: Joint performance evaluation: Calculate the objective function value of the two in combination; Adaptive decision making: If performance improves and constraints are met, proceed to C-step; If performance degrades, triggering "graph structure rollback" will reuse G. t And narrow down the configuration search scope and re-execute G-step; If there is no improvement after 3 consecutive G-step rounds, skip C-step and proceed directly to the next G-step round; If costs exceed the budget, the next G-step will reduce the extent of graph structure modifications.
6. A joint optimization system for AI agents based on adaptive looping, intermediate verification, and multi-dimensional feedback, employing the method described in claim 5, characterized in that: include: The initialization module is used to initialize the agent and optimize parameters, and includes a computation graph and configuration initialization unit, an objective and constraint setting unit, and a rule and feedback definition unit. The multi-stage adaptive loop module is used to repeatedly execute the configuration optimization stage, the first intermediate verification and decision stage, the graph structure optimization stage, and the second intermediate verification and loop adjustment stage until the optimization goal is met or the maximum number of loops is reached. The output module is used to output the final computation graph and configuration when the optimization objective is met or the maximum number of iterations is reached, forming the optimized AI agent.
7. The AI agent joint optimization system based on adaptive looping, intermediate verification, and multi-dimensional feedback as described in claim 6, characterized in that: The initialization module specifically includes: The computation graph and configuration initialization unit is used to construct the initial computation graph G0, define the module nodes and information flow in JSON, and set the initial configuration C0 to define the parameters of each node. The objective and constraint setting unit is used to define the optimization objective and set the constraints. The rule and feedback definition unit is used to set adaptive rules and clarify the sources of multi-dimensional feedback, which include numerical feedback and non-numerical feedback.
8. The AI agent joint optimization system based on adaptive looping, intermediate verification, and multi-dimensional feedback according to claim 7, characterized in that: The multi-stage adaptive loop module includes: The configuration optimization submodule adopts a "hot start" strategy, fixing the current computation graph G. t Search for the optimal configuration C in the preset configuration space. t+1 The new configuration inherits the optimal parameters from the previous round, and only fine-tunes the parameters for newly added nodes to ensure that the objective function is optimal; The first intermediate verification and decision-making submodule, for C t+1 The effect is fully verified, and dynamic decisions are made based on the results, including performance evaluation, constraint checking, and adaptive decision-making based on the evaluation and check results, which determines whether to enter the graph structure optimization stage, trigger configuration rollback, skip the graph structure optimization stage to focus on configuration fine-tuning, or prioritize searching for low-resource configurations. The graph structure optimization submodule, with the current configuration fixed, generates candidate computation graphs based on multi-dimensional feedback, performs local modifications, and selects the optimal computation graph G. t+1 This includes steps such as feedback extraction, candidate graph generation, and optimal graph selection. The second intermediate verification and loop adjustment submodule, for G t+1 Verify the joint effects with the current configuration, adjust the next round of optimization strategy, including joint performance evaluation and adaptive decision-making based on the evaluation results, deciding whether to enter the configuration optimization phase, trigger graph structure rollback, skip the configuration optimization phase to focus on graph structure fine-tuning, or reduce the magnitude of graph structure modification.
9. The AI agent joint optimization system based on adaptive looping, intermediate verification, and multi-dimensional feedback according to claim 8, characterized in that: The first intermediate verification and decision-making submodule is executed as follows: Performance evaluation: Calculate C t+1 The objective function value on the test set, and compared with the previous round C. t contrast; Constraint checks: Verify whether constraints such as cost and number of test samples are met; Adaptive decision making: If performance is improved and constraints are met, proceed to the graph structure optimization stage; If performance degrades, triggering "configuration rollback" will reuse C. t And narrow down the configuration search scope and re-execute configuration optimization; If there is no improvement after 3 consecutive rounds of configuration optimization, skip the graph structure optimization stage and proceed directly to the next round of configuration optimization; If costs exceed the budget, the next round of configuration optimization will prioritize searching for low-resource configurations.
10. The AI agent joint optimization system based on adaptive looping, intermediate verification, and multi-dimensional feedback according to claim 9, characterized in that: The second intermediate verification and loop adjustment submodule is executed as follows: Joint performance evaluation: Calculate G t+1 The objective function value that aligns with the current configuration; Adaptive decision making: If performance improves and constraints are met, proceed to the configuration optimization phase. If performance degrades, triggering "graph structure rollback" will reuse G. t And narrow down the configuration search scope and re-execute graph structure optimization; If there is no improvement after 3 consecutive rounds of diagram structure optimization, skip the configuration optimization phase and proceed directly to the next round of diagram structure optimization. If costs exceed the budget, the next round of graph structure optimization will reduce the scope of graph structure modifications.