Method and system for automatically constructing a large language model agent

By employing modular design, automated assembly, hybrid evaluation, and dynamic reorganization optimization methods, the problems of opaque architecture and poor cross-task adaptability of large language model agents are solved. This enables automated construction and continuous optimization of agents, improving the system's flexibility and the accuracy of performance evaluation.

CN122174861APending Publication Date: 2026-06-09FUDAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610245201.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-02
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The existing architecture of large-scale language model agents is opaque, has poor cross-task adaptability, has a single performance evaluation method, and lacks a self-optimization mechanism, resulting in high development costs, low efficiency, and difficulty in adapting to complex and ever-changing task requirements.

Method used

By adopting a modular design and combining automatic assembly, hybrid evaluation, and dynamic reorganization optimization, an intelligent agent construction system is formed through modular representation, automatic assembly, hybrid evaluation, and iterative optimization. This system enables the automated construction, dynamic optimization, and comprehensive quantitative evaluation of intelligent agents, thereby improving cross-task adaptability and interpretability.

Benefits of technology

It significantly reduces the development cost and threshold of intelligent agents, improves cross-task adaptability and the accuracy of performance evaluation, enables continuous optimization and efficient construction of intelligent agents, and enhances the flexibility and interpretability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174861A_ABST
    Figure CN122174861A_ABST
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence technology, specifically to an automatic construction method and system for large-scale language model intelligent agents. The system includes: S1 Modular representation and knowledge construction, decomposing the intelligent agent into standardized functional modules and establishing a module knowledge base and a historical experience base; S2 Initial intelligent agent automatic assembly, generating an initial configuration from the language model based on task description and dual-base retrieval results; S3 Execution and hybrid evaluation, collecting execution data and generating performance feedback through holistic evaluation of the language model and game theory module contribution evaluation; S4 Dynamic module reorganization and optimization, performing module replacement or optimization based on feedback to achieve knowledge accumulation; S5 Iterative optimization, cyclically executing evaluation and optimization to output the optimal configuration. The system comprises four main units: module management, assembly, execution and evaluation, and optimization, used to implement the above method. This invention achieves automated construction and dynamic optimization of intelligent agents, improving interpretability, cross-task adaptability, and continuous optimization capabilities, while reducing development costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an automatic construction method and system for large-scale language model intelligent agents. Background Technology

[0002] Large-scale language model agents have shown broad application prospects in complex task processing, capable of handling various types of complex tasks such as environmental interaction and planning. However, existing technologies for the construction and optimization of large-scale language model agents have many shortcomings, specifically in the following four aspects: 1. Lack of transparency in architecture design: Existing intelligent agent systems mostly adopt fixed architectures or manually specified module combinations. The internal operation mechanism of the system is not transparent, making it difficult to understand the role and interrelationship of each component, which is not conducive to the debugging and subsequent optimization of the system.

[0003] 2. Limited cross-task adaptability: The agent architecture designed for a specific task is difficult to transfer to other types of tasks and lacks adaptive adjustment capabilities. This means that the architecture needs to be redesigned by technical personnel for each new task, which not only increases development costs but also significantly reduces development efficiency.

[0004] 3. Limited performance evaluation methods: Traditional intelligent agent performance evaluation methods only focus on overall indicators such as task success rate, which cannot quantify the actual contribution of each functional component to the overall task, make it difficult to accurately identify performance bottlenecks, and thus lack targeted optimization basis.

[0005] 4. Lack of self-optimization mechanism: Existing intelligent agent systems all adopt static architecture, which cannot adjust the structure according to task execution feedback, limiting the system's ability to continuously improve and making it difficult to adapt to complex and ever-changing task requirements.

[0006] Therefore, there is an urgent need for a technology and system for building large-scale language model agents that can achieve automatic construction, adaptive optimization, and quantifiable performance evaluation, in order to overcome the aforementioned shortcomings of existing technologies. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide an automatic construction method and system for large-scale language model agents. This method and system address the technical problems of opaque agent architecture, poor cross-task adaptability, single performance evaluation, and lack of self-optimization mechanism in the prior art. It enables the automatic construction, dynamic optimization, and comprehensive quantitative evaluation of large-scale language model agents, improves the agent's cross-task generalization ability, interpretability, and continuous optimization ability, and reduces the development cost and threshold of agents.

[0008] The above objectives are achieved through the following technical solutions: An automated method for constructing large-scale language model agents is proposed. This method relies on a modular design concept and combines automatic assembly, hybrid evaluation, dynamic recombination, and iterative optimization to form a complete agent construction system. Specifically, it includes the following steps: S1: Modular Representation and Knowledge Construction Large-scale language model agents are systematically represented as a combination of multiple functional modules. Each functional module is responsible for implementing a specific sub-function, and all functional modules interact with each other through standardized interfaces to ensure compatibility and replaceability between modules.

[0009] The functional modules described in this invention include, but are not limited to, a task planning module, a logical reasoning module, an information memory module, and a tool invocation module. Specifically: the task planning module is responsible for decomposing the overall goal into an ordered sequence of sub-tasks; the logical reasoning module is responsible for step-by-step reasoning and solving specific problems; the information memory module is responsible for retrieving and utilizing historical information to assist in task execution; and the tool invocation module is responsible for selecting and invoking external tools according to task requirements.

[0010] Simultaneously, two major knowledge bases are established: one is a module knowledge base, which stores the implementation of functional modules with standardized interfaces. Each module in the base contains complete information such as functional description, interface definition, and applicable scenarios; the other is a historical experience base, which stores the complete configuration of existing intelligent agents and their corresponding task performance data, providing experience reference for the construction of intelligent agents for new tasks.

[0011] S2: Automatic assembly of initial agents After receiving the task description input by the user, the system first retrieves candidate modules related to the functional requirements of the task from the module knowledge base, and at the same time retrieves agent configuration experience for similar or related tasks from the historical experience base. Then, the task description, candidate module information and historical configuration experience are input into a large language model. The language model accurately analyzes key information such as task characteristics, task difficulty and task type. Based on the analysis results, it automatically selects an appropriate combination of functional modules and finally generates an initial agent configuration for the current task. The entire process does not require manual intervention in module selection and combination.

[0012] S3: Implementation and Hybrid Assessment The initial agent assembled in step S2 is applied to the actual execution process of the current target task. At the same time, the execution process data of the agent is collected throughout the process, including the module call order, module interaction data, task execution time, and sub-task completion status.

[0013] Based on the collected execution process data, a hybrid evaluation mechanism is adopted to comprehensively and quantitatively evaluate the performance of the agent. This hybrid evaluation mechanism integrates a holistic evaluation based on a language model and a module contribution evaluation based on game theory, as detailed below: Holistic evaluation based on language models: The execution process data and task completion results of the agent are input into a large language model. The language model comprehensively scores the overall performance of the agent from multiple dimensions such as the matching degree between modules and tasks, the collaboration efficiency between modules, execution efficiency, and fault tolerance, so as to achieve a subjective and objective evaluation of the overall performance of the agent.

[0014] Module Contribution Evaluation Based on Game Theory: This method employs contribution allocation methods from game theory, combined with the Shapley value method, to calculate the marginal contribution of each functional module to the overall performance of the agent. Specifically, it involves: first, designing a corresponding empty placeholder module for each type of functional module. This empty placeholder module possesses only the most basic functions to ensure the integrity of the agent system structure; then, iterating through different module combinations and evaluating the agent's performance under each combination; finally, based on the marginal contribution calculation formula and the Shapley value method, deriving the actual marginal contribution value of each functional module, thus achieving precise quantification of the contribution of each module.

[0015] After completing the above two types of assessments, the overall score and module contribution score are merged through a scoring fusion step. Specifically, a weighted fusion method is adopted, and the weight coefficients can be adaptively adjusted according to the task type: for tasks that emphasize subjective quality (such as copywriting tasks), the weight of the overall language model score is increased; for tasks that can be objectively measured (such as data calculation and environmental interaction tasks), the weight of the module contribution score is increased.

[0016] Finally, a structured performance feedback is generated based on the results of the hybrid evaluation. This performance feedback includes at least the overall score of the agent, the marginal contribution value of each functional module, and the identification results of the performance bottleneck module.

[0017] S4: Dynamic Module Reorganization Optimization The structured performance feedback generated in step S3 is input into a large language model. The language model analyzes the performance bottleneck of the agent based on the performance feedback and determines targeted optimization strategies. Subsequently, based on the optimization strategies, module-level structural adjustments are performed. The structural adjustments in this invention include two methods: module replacement and module optimization. The specific operations are as follows: Module replacement: For bottleneck modules with low contribution values ​​identified in performance feedback, perform the following steps: ① Retrieve candidate modules with similar functions to the bottleneck module from the module knowledge base; ② Evaluate the candidate modules based on their historical performance data and adaptability to the current task; ③ Select the best candidate module with the highest score to replace the original bottleneck module, thus completing the module-level adjustment.

[0018] Module Optimization: If there are no suitable candidate modules of the same type in the module knowledge base, or if the existing module has room for optimization, then the bottleneck module is optimized as follows: ① Optimization suggestions are constructed based on the current task description, the existing implementation of the bottleneck module, and the bottleneck issues in the performance feedback; ② The optimization suggestions are input into a large language model, which generates an improved module implementation scheme; ③ The improved new module is verified for interface compatibility and functional correctness to ensure that the new module conforms to the standardized interface specifications and can achieve the target sub-functions; ④ The verified new module is added to the module knowledge base for use in the construction of agents for subsequent tasks.

[0019] After completing module replacement or optimization, the latest configuration of the newly generated functional modules and intelligent agents after this optimization is recorded in the module knowledge base and historical experience base to realize the knowledge accumulation and reuse of the system.

[0020] S5: Iterative Optimization The optimized agent from step S4 is applied again to the current target task. The execution and hybrid evaluation of step S3 and the dynamic module reorganization optimization of step S4 are repeated to form a "execution-evaluation-optimization" loop until the termination condition is met and the iteration stops. Finally, the optimal agent configuration for the current task is output.

[0021] The termination conditions described in this invention include, but are not limited to, the following three situations: reaching the system's preset number of iterations, the agent's performance indicators no longer showing significant improvement, and the system analysis determining that there is no effective optimization solution.

[0022] Furthermore, this invention also provides an automatic construction system for large-scale language model agents. This system is used to implement the aforementioned automatic construction method. The system adopts a modular architecture design, including four core units: a module management unit, an assembly unit, an execution and evaluation unit, and an optimization unit. The functions and composition of each unit are as follows: Module Management Unit: As the core of the system's knowledge storage, it consists of two parts: a module knowledge base and a historical experience base. The module knowledge base stores standardized functional modules, each containing complete information such as functional description, interface definition, and applicable scenarios. The historical experience base stores the agent configurations for various tasks and their performance data, providing historical references for agent construction.

[0023] Assembly Unit: Responsible for the automatic generation of the initial agent. Its specific functions are to receive the task description input by the user, retrieve candidate modules from the module knowledge base, retrieve configuration experience of similar tasks from the historical experience base, input the above information into a large language model, and have the language model analyze the task features and automatically select module combinations to generate the initial agent configuration.

[0024] The execution and evaluation unit undertakes the dual functions of agent execution and performance evaluation. First, it applies the assembled agent to the target task and collects execution process data throughout the process. Then, it uses the above-mentioned hybrid evaluation mechanism to calculate the overall performance score of the agent and the marginal contribution value of each module, and finally generates structured performance feedback that includes bottleneck identification.

[0025] Optimization Unit: As the core of system optimization, based on the performance feedback generated by the execution and evaluation unit, it analyzes performance bottlenecks and formulates optimization plans through a large language model; then, according to the optimization plan, it performs module replacement or module optimization operations to update the agent configuration; at the same time, it synchronizes the optimized new module and new configuration to the module management unit to achieve knowledge accumulation.

[0026] This invention provides an automatic construction method and system for large-scale language model agents. Through modular design and dual-library construction, it clarifies the architectural logic, utilizes task-driven automatic assembly to adapt to diverse tasks, accurately identifies performance bottlenecks through hybrid evaluation, and achieves continuous improvement through dynamic reorganization and iterative optimization. This significantly enhances the interpretability, cross-task adaptability, and optimization efficiency of the agent, while significantly reducing development costs and barriers to entry. Compared with existing technologies, it has the following significant advantages: 1. Solve the problem of opaque architecture and improve the interpretability and debuggability of the system: Through modular design and standardized interfaces, the functions, interface definitions and mutual interaction methods of each component of the intelligent agent are clearly defined, and the internal operation mechanism of the system is clearly visible; at the same time, through the quantification of module contribution, the performance problems of the intelligent agent can be accurately located, which greatly reduces the cost of understanding, debugging and maintaining the intelligent agent.

[0027] 2. Enhance cross-task adaptability, improve versatility and reduce development costs: By adopting task-driven automatic assembly and feedback-based dynamic optimization mechanisms, the agent structure can be adaptively adjusted for different types and difficulties of tasks, without the need for manual redesign of the architecture for each new task. Experimental verification on various types of tasks such as environmental interaction and planning-intensive tasks has demonstrated the good versatility of the method and system of this invention, and has significantly reduced the development threshold and development cost of agents.

[0028] 3. Achieve quantifiable performance evaluation and provide clear basis for optimization: By integrating subjective and objective evaluation mechanisms, it not only achieves a multi-dimensional comprehensive evaluation of the overall performance of the agent, but also accurately quantifies the actual marginal contribution of each functional module, accurately identifies performance bottleneck modules, and provides clear and quantitative basis for the optimization of the agent; experiments show that the module contribution evaluation results of this invention are highly correlated with the actual performance improvement of the agent, and the evaluation accuracy is high.

[0029] 4. Establish a self-optimization mechanism to achieve continuous performance improvement: Through dynamic reorganization and knowledge accumulation from dual libraries, the agent is continuously improved and its performance is enhanced, forming a positive cycle of "execution-evaluation-optimization-accumulation-reuse". The new modules and configurations generated by each optimization can be reused in subsequent tasks, giving the system continuous learning capabilities and enabling the agent's performance to gradually improve with the number of task executions.

[0030] 5. Improve the efficiency of intelligent agent construction and reduce the professional threshold: The entire process of intelligent agent construction, evaluation and optimization is highly automated, without the need for deep intervention of experts in the field of artificial intelligence. Technicians only need to input the task description to realize the automatic construction and optimization of intelligent agents, which greatly reduces the professional threshold of intelligent agent development and shortens the development cycle.

[0031] 6. Ensure evaluation accuracy and reduce evaluation costs: The predictive performance of the hybrid evaluation framework of this invention is highly consistent with the actual execution performance of the agent. It can quickly screen out high-quality configuration schemes before the actual deployment of the agent, avoid the waste of resources caused by ineffective deployment, and significantly reduce the performance evaluation cost of the agent.

[0032] 7. Enhance system flexibility and scalability: Standardized interface design allows for seamless replacement and combination of functional modules with different implementations. The dual adjustment method of module replacement and optimization further enhances the flexibility of agent structure adjustment. At the same time, the module knowledge base supports the continuous addition of new modules, enabling the system's functionality to be continuously expanded and adapted to more types of complex tasks. Attached Figure Description

[0033] Figure 1 This is an overview diagram of the AutoMAC framework of the automatic construction method and system for a large language model agent described in this invention. It shows the interaction relationship of the three core components: modular search space, module dynamic reconstruction, and hybrid performance evaluation, as well as the supporting role of the functional module knowledge base and the agent experience pool. It also shows the fusion method of LLM score and ShapleyValue score and the calculation logic of the total performance evaluation score. Figure 2 The diagrams shown below represent the four core modules of the AutoMAC module in the automatic construction method and system for a large-scale language model agent described in this invention. (a) is a schematic diagram of the Multi-Plan module, illustrating its functions, system prompts, and execution examples; (b) is a schematic diagram of the Step-Think module, illustrating its functions, system prompts, and execution examples; (c) is a schematic diagram of the Multi-Recall module, illustrating its functions, system prompts, and execution examples; and (d) is a schematic diagram of the Tools-Pick module, illustrating its functions, system prompts, and execution examples. Figure 3 This diagram illustrates the Shapley value method used to evaluate the contribution of each module in the automatic construction method and system for a large-scale language model agent described in this invention. Taking the planning module (P), inference module (R), memory module (M), and tool module (T) as examples, it shows the performance score (v value) under different module combinations, and calculates the Shapley value of each module based on this score, thereby quantifying the marginal contribution of each module. The labels in the diagram represent: P - planning module, R - inference module, M - memory module, T - tool module, v - performance score of module combination. Detailed Implementation

[0034] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] This solution provides an automated construction system for large-scale language model agents, including a module management unit, an assembly unit, an execution and evaluation unit, and an optimization unit. These units work collaboratively to achieve the entire process of automated construction, execution, evaluation, and optimization of the agent. The overall system framework is as follows: Figure 1 As shown, the interaction relationship of the three core components—modular search space, dynamic module reconstruction, and hybrid performance evaluation—is clearly demonstrated, as well as the supporting role of the functional module knowledge base and the agent experience pool. It also shows the fusion method of LLM score and ShapleyValue score and the calculation logic of the total performance evaluation score.

[0036] In this invention, the intelligent agent can be represented by the formula: A={M1,M2,...,Mn}, where Mi is the i-th functional module. Each functional module follows a unified input / output interface specification to ensure that modules with different implementations can be interchanged, providing a basis for module replacement and combination.

[0037] Specifically, the functional modules in this invention include a task planning module, a logical reasoning module, an information memory module, and a tool invocation module. Representative examples of each module are as follows: Figure 2 As shown: 1. Planning Module (with appendix) Figure 2 a. Multi-Plan: The module name is deps. Its function is to generate sub-tasks for multi-step reasoning for a task. It is suitable for multi-step reasoning tasks. The system will input exclusive prompts to this module to guide it to generate a sequence of sub-targets based on the task of the multi-step problem, and provide reasoning instructions and tool calling instructions for each sub-task.

[0038] 2. Reasoning Module (with appendix) Figure 2 b, Step-Think): The module name is cot, and its function is to enable LLM to think step by step and solve tasks through multi-step reasoning. The system will input exclusive hints to this module to guide it to solve the target task step by step and output detailed sub-task reasoning steps.

[0039] 3. Memory module (attached) Figure 2 c, Multi-Recall: The module name is dilu. Its function is to perform simple storage and retrieval based on task name. The system will input special prompts to this module to guide it to select the most relevant and useful record from the historical memory record to assist the execution of the current task.

[0040] 4. Tools Module (attached) Figure 2 d, Tools-Pick): The module name is anytool. Its function is to select the tool category and a specific tool based on the task description. The system will provide exclusive prompts to this module to guide it in determining the best tool category and specific tool, and provide the reasons for the selection, usage instructions and code examples.

[0041] In the hybrid evaluation mechanism of this invention, the module contribution evaluation adopts the Shapley value method, and the evaluation process of this method is as follows: Figure 3 As shown, taking the planning module (P), reasoning module (R), memory module (M), and tool module (T) as examples, the performance scores (v values) of different module combinations are displayed, and the Shapley values ​​of each module are calculated based on the scores to achieve accurate quantification of the marginal contribution of each module. Core process description of this solution

[0042] 1. Modular Representation Method: The agent is decomposed into multiple standardized functional modules. Each module has independent functions and a unified interface. The modules interact with each other through standardized interfaces. The overall function of the agent is achieved by the collaboration of each module. The formula is A={M1,M2,...,Mn}, where Mi is the i-th functional module, preferably the task planning, logical reasoning, information memory, and tool calling module.

[0043] 2. Hybrid evaluation mechanism: It includes three steps: overall evaluation, module contribution evaluation, and score fusion. The overall evaluation scores the overall performance of the agent from multiple dimensions through a language model. The module contribution evaluation adopts the game theory + Shapley value method, which ensures structural integrity by using empty placeholder modules and calculates the marginal contribution value of each module by traversing the module combination. The score fusion adopts an adaptive weighting method, which adjusts the weight of the overall score and contribution score according to the task type.

[0044] 3. Dynamic reorganization method: This includes two approaches: module replacement and module optimization. Module replacement involves selecting a better module of the same type to replace the bottleneck module. Module optimization generates improved modules through a language model, verifies them, and then incorporates them into the module knowledge base. Both approaches can achieve adaptive adjustment of the agent's structure.

[0045] The realization of this invention relies on the following four core technical points to ensure the stability, adaptability, and accuracy of the method and system: 1. Interface standardization: By defining a unified module input and output interface specification, functional modules with different implementation methods can be seamlessly replaced and combined, breaking down compatibility barriers between modules and greatly improving the system's flexibility and scalability.

[0046] 2. Knowledge Reuse: Knowledge is accumulated and reused through module knowledge base and historical experience base. The construction of intelligent agents for new tasks can directly draw on the configuration experience and module usage experience of historical tasks, which effectively improves the construction quality of the initial intelligent agent and the efficiency of subsequent optimization.

[0047] 3. Adaptive weighting: In the scoring fusion step of the hybrid evaluation, the weighting coefficients are adaptively adjusted according to the characteristics of different tasks, so that the evaluation results are more in line with the actual needs of the tasks and the accuracy of performance evaluation is improved.

[0048] 4. Empty module mechanism: When calculating the marginal contribution of a module, an empty module with minimal function is used as a placeholder. This ensures the integrity of the agent system structure, eliminates interference from other modules, and accurately measures the actual marginal value of each module.

[0049] Example 1: Environmental Interaction Task Task type: Complete a multi-step item manipulation task in a virtual environment.

[0050] Initial assembly: After receiving the task description, the system selects the basic task planning module, logical reasoning module, information memory module, and tool calling module from the module knowledge base, and combines them into the initial intelligent agent configuration after analyzing the task characteristics through a language model.

[0051] Initial execution and evaluation: The initial agent is applied to the object operation task in the virtual environment. After collecting execution process data, a hybrid evaluation mechanism is used for evaluation. The evaluation results identify the planning module and the memory module as performance bottlenecks (the marginal contribution values ​​of the two types of modules are significantly lower than those of other modules).

[0052] The first round of optimization: Based on performance feedback, the system formulated a combined optimization strategy. First, the execution module was replaced by replacing the basic planning module with an advanced planning module that supports multi-path exploration, thereby improving the rationality of sub-task planning. Second, the execution module was optimized by enhancing the spatial information processing capability of the memory module based on the spatial characteristics of the virtual environment, thereby improving the adaptability of historical information retrieval.

[0053] Optimization results: The optimized agent re-executed the target task, and the task completion rate was significantly improved. Compared with the initial agent, the overall performance of the optimized agent was significantly improved.

[0054] Example 2: Planning-intensive tasks Task type: Develop personalized solutions based on the user's specific needs and multiple constraints.

[0055] Initial assembly and multi-round evaluation: The system selects suitable basic modules from the module knowledge base to form an initial agent. After the first execution, the inference module and tool module are identified as performance bottlenecks through hybrid evaluation. After multiple rounds of execution and evaluation, the bottleneck problem persists.

[0056] Multi-round optimization: The system optimizes through multiple rounds of iteration. First, the inference module is optimized by generating inference logic customized for constraint satisfaction problems based on the constraint characteristics of planning-intensive tasks. Then, the tool module is replaced by selecting the tool call module designed with the appropriate solution to replace the original basic tool module.

[0057] Optimization results: After multiple rounds of iterative optimization, the efficiency and rationality of the agent's scheme formulation have been greatly improved. Compared with the existing fixed-architecture agent construction method, the agent constructed by this invention has significantly improved performance in this type of task.

[0058] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for automatically constructing a large-scale language model intelligent agent, characterized in that, Includes the following steps: S1: Modular representation and knowledge construction, which represents the agent as a combination of multiple functional modules. Each module is responsible for a specific sub-function. The modules interact with each other through standardized interfaces. A module knowledge base is established to store the functional modules with standardized interfaces, as well as a historical experience base to store the existing agent configuration and its performance data. S2: The initial intelligent agent is automatically assembled. After receiving the task description, it retrieves candidate modules related to the task from the module knowledge base and retrieves configuration experience of similar tasks from the historical experience base. It analyzes the task characteristics through a language model, automatically selects a suitable combination of modules, and generates the initial intelligent agent configuration. S3: Execution and Hybrid Evaluation. The assembled agent is applied to the task, execution process data is collected, and a hybrid evaluation mechanism is used to comprehensively evaluate the agent's performance. Based on the evaluation results, performance feedback including overall score, contribution value of each module, and bottleneck identification is generated. S4: Dynamic module reorganization and optimization, based on performance feedback, determines optimization strategies through language model analysis, performs module-level structural adjustments, and records the newly generated modules and configurations in the module knowledge base and the historical experience base to achieve knowledge accumulation; S5: Iterative optimization, repeat steps S3 and S4 until the termination condition is met, and output the optimal agent configuration. The termination condition includes reaching the preset number of iterations, performance no longer improving, or no effective optimization solution.

2. The method for automatically constructing a large-scale language model intelligent agent according to claim 1, characterized in that, In step S1, the functional modules include at least a task planning module, a logical reasoning module, an information memory module, and a tool invocation module. The task planning module is responsible for decomposing the target into a sequence of sub-tasks. The logical reasoning module is responsible for step-by-step reasoning and problem solving. The information memory module is responsible for retrieving and utilizing historical information. The tool invocation module is responsible for selecting and invoking external tools.

3. The method for automatically constructing a large-scale language model intelligent agent according to claim 1, characterized in that, In step S3, the hybrid evaluation mechanism includes a holistic evaluation based on a language model and a module contribution evaluation based on game theory. The holistic evaluation scores the overall performance of the agent from the dimensions of module matching degree, inter-module collaboration efficiency, execution efficiency, and fault tolerance. The module contribution evaluation calculates the marginal contribution value of each module to the overall performance.

4. The method for automatically constructing a large-scale language model intelligent agent according to claim 3, characterized in that, The module contribution evaluation is implemented as follows: design corresponding empty placeholder modules for each type of functional module to ensure the integrity of the system structure; traverse different module combinations and evaluate the performance of each combination; obtain the contribution value of each module according to the marginal contribution calculation formula, and calculate the marginal contribution value using the Shapley value method.

5. The method for automatically constructing a large-scale language model intelligent agent according to claim 3, characterized in that, The hybrid evaluation mechanism also includes a score fusion step, which integrates the overall score and contribution score through a weighted method. The weight coefficients are adaptively adjusted according to the task type, increasing the weight of the language model score for tasks that emphasize subjective quality and increasing the weight of the contribution score for tasks that can be objectively measured.

6. The method for automatically constructing a large-scale language model intelligent agent according to claim 1, characterized in that, In step S4, the module-level structural adjustment includes module replacement and module optimization. Module replacement involves retrieving a replacement module with similar functions but better performance from the module knowledge base and replacing it. Module optimization involves improving the existing module and generating a new version module optimized for the current task.

7. The method for automatically constructing a large-scale language model intelligent agent according to claim 6, characterized in that, The specific steps for module replacement are as follows: identify bottleneck modules with low contribution values; retrieve candidate modules of the same type from the module knowledge base; score the modules based on their historical performance and adaptability indicators; and select the optimal candidate module for replacement.

8. The method for automatically constructing a large-scale language model intelligent agent according to claim 6, characterized in that, The specific steps for module optimization are as follows: construct optimization suggestions based on task description, current module implementation, and performance feedback; generate improved module implementation through language model; verify the interface compatibility and functional correctness of the new module; and add the new module to the module knowledge base for subsequent use.

9. The method for automatically constructing a large-scale language model intelligent agent according to any one of claims 1-8, characterized in that, All functional modules follow a unified input / output interface specification, ensuring that modules with different implementations are interchangeable.

10. An automatic construction system for a large-scale language model intelligent agent, characterized in that, The system for implementing the method according to any one of claims 1-9 includes a module management unit, an assembly unit, an execution and evaluation unit, and an optimization unit; The module management unit includes a module knowledge base and a historical experience base. The module knowledge base stores standardized functional modules, and each module includes a functional description, interface definition, and applicable scenario information. The historical experience base stores the intelligent agent configuration and corresponding performance. The assembly unit is used to receive a task description, retrieve candidate modules from the module knowledge base, retrieve similar configurations from the historical experience base, and generate an initial agent configuration through a language model. The execution and evaluation unit is used to execute the agent and collect process data, and uses a hybrid evaluation mechanism to calculate performance scores and module contribution values, and generate structured feedback; The optimization unit is used to analyze bottlenecks and formulate optimization schemes based on evaluation feedback through language models, perform module replacement or module optimization operations, and update the agent configuration.