Intelligent agent network construction method and device, computer equipment and storage medium
By cyclically iteratively training examples and dynamically generating agents, the agent network structure is optimized, solving the time-consuming and labor-intensive problem of building a large language model agent network, and achieving the effect of quickly building an efficient agent network.
Patent Information
- Application Number
- CN202410725538.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
Building an agent network for a large language model requires a lot of time and effort, especially when designing the architecture and ensuring that the agents work together, and there are problems with sub-optimal performance.
By initializing the agent network, obtaining training examples, analyzing the gap between the output results and the expected output, obtaining the update strategy, and dynamically generating new agents through the loop iteration process, optimizing the network structure until the preset conditions are met.
It achieves the rapid construction of an agent network that can complete complex tasks, reduces the workload of manual network architecture design and debugging, and improves agent performance.
Smart Images

Figure CN118569299A
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic digital data processing technology. Specifically, the present application relates to a method, device, computer equipment and storage medium for constructing an intelligent agent network. Background Art
[0002] When dealing with complex tasks, a single agent based on a large language model usually faces the problem of limited capabilities. To solve this problem, complex tasks are generally decomposed into multiple subtasks, each of which is completed by an agent based on a large language model. These agents are connected to form an agent network and work together to complete the entire complex task.
[0003] However, building such a large language model requires a lot of time and effort. Specifically, the main difficulties include the following two points: first, effectively designing the agent network architecture; second, checking each agent, identifying and solving problems that lead to suboptimal performance, and ensuring that the agents work together effectively.
[0004] Therefore, how to quickly build an intelligent agent network that can complete complex tasks has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for constructing an intelligent agent network to address the above technical problems.
[0006] In a first aspect, the present application provides a method for constructing an agent network. The agent network is formed by connecting multiple agents, and the method comprises:
[0007] In response to the task description information input by the user account, the intelligent agent network is initialized according to the task description information; wherein the intelligent agent network includes only one intelligent agent after initialization;
[0008] Acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0009] Among the plurality of training examples, selecting a training example as a target training example;
[0010] Inputting the network input data in the target training example into the agent network for training, and calculating the difference between the network output result output by the agent network and the expected output result in the target training example;
[0011] Analyzing the error cause of the gap in the agent network, obtaining an agent network update strategy associated with the error cause, and updating the agent network according to the agent network update strategy;
[0012] After the intelligent agent network is updated, returning to the step of selecting a training example from the plurality of training examples as a target training example, so as to iterate the intelligent agent network in a loop until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network;
[0013] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0014] In one embodiment, the method further comprises:
[0015] Display the running results of each step in the process of building the intelligent agent network;
[0016] In response to the editing operation of the user account on the target running result, the editing result obtained by the user account editing the target running result is obtained, and the corresponding steps are re-executed according to the editing result.
[0017] In one of the embodiments, the editing operation of the user account on the target running result is that the user account modifies an important part of the target running result and uses a placeholder for an unimportant part.
[0018] In one embodiment, the method further comprises:
[0019] receiving a natural language prompt inputted by the user account;
[0020] According to the natural language prompt, the corresponding steps of constructing the agent network are re-executed.
[0021] In one embodiment, updating the agent network according to the update strategy includes:
[0022] According to the update strategy, calculate the parameters to be updated;
[0023] The agent network is updated according to the parameters to be updated.
[0024] In one embodiment, the agent includes an input module, a control module, an execution module and an output module; wherein,
[0025] The input module is used to receive input data from an upstream agent;
[0026] The control module is used to determine whether the agent needs to run;
[0027] The execution module is used to calculate the output result according to the task of the agent and the input data if the control module determines that the agent needs to run;
[0028] The output module is used to transmit the output result to the downstream agent if the control module determines that the agent needs to run; and if the control module determines that the agent does not need to run, the output module is used to forward the input data to the downstream agent.
[0029] In one of the embodiments, a large language model is used in the control module, and the control module includes a sample library and a knowledge base;
[0030] A large language model is adopted in the execution module, and the execution module includes a sample library and a knowledge base.
[0031] In a second aspect, the present application provides a device for constructing an agent network. The agent network is formed by connecting multiple agents; the device includes:
[0032] A network initialization module, configured to respond to task description information input by a user account and initialize an agent network according to the task description information; wherein the agent network only includes one agent after initialization;
[0033] An example acquisition module is used to acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0034] An example selection module, used for selecting a training example from the plurality of training examples as a target training example;
[0035] A gap calculation module, used for inputting the network input data in the target training example into the agent network for training, and calculating the gap between the network output result output by the agent network and the expected output result in the target training example;
[0036] A network update module, configured to analyze the error cause of the gap in the agent network, obtain an agent network update strategy associated with the error cause, and update the agent network according to the agent network update strategy;
[0037] A loop iteration module, used for returning to the step of selecting a training example as a target training example from the plurality of training examples after the updating of the intelligent agent network is completed, so as to loop iterate the intelligent agent network until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network;
[0038] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0039] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0040] In response to the task description information input by the user account, the intelligent agent network is initialized according to the task description information; wherein the intelligent agent network includes only one intelligent agent after initialization;
[0041] Acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0042] Among the plurality of training examples, selecting a training example as a target training example;
[0043] Inputting the network input data in the target training example into the agent network for training, and calculating the difference between the network output result output by the agent network and the expected output result in the target training example;
[0044] Analyzing the error cause of the gap in the agent network, obtaining an agent network update strategy associated with the error cause, and updating the agent network according to the agent network update strategy;
[0045] After the intelligent agent network is updated, returning to the step of selecting a training example from the plurality of training examples as a target training example, so as to iterate the intelligent agent network in a loop until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network;
[0046] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] In response to the task description information input by the user account, the intelligent agent network is initialized according to the task description information; wherein the intelligent agent network includes only one intelligent agent after initialization;
[0049] Acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0050] Among the plurality of training examples, selecting a training example as a target training example;
[0051] Inputting the network input data in the target training example into the agent network for training, and calculating the difference between the network output result output by the agent network and the expected output result in the target training example;
[0052] Analyzing the error cause of the gap in the agent network, obtaining an agent network update strategy associated with the error cause, and updating the agent network according to the agent network update strategy;
[0053] After the intelligent agent network is updated, returning to the step of selecting a training example from the plurality of training examples as a target training example, so as to iterate the intelligent agent network in a loop until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network;
[0054] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0055] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0056] In response to the task description information input by the user account, the intelligent agent network is initialized according to the task description information; wherein the intelligent agent network includes only one intelligent agent after initialization;
[0057] Acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0058] Among the plurality of training examples, selecting a training example as a target training example;
[0059] Inputting the network input data in the target training example into the agent network for training, and calculating the difference between the network output result output by the agent network and the expected output result in the target training example;
[0060] Analyzing the error cause of the gap in the agent network, obtaining an agent network update strategy associated with the error cause, and updating the agent network according to the agent network update strategy;
[0061] After the intelligent agent network is updated, returning to the step of selecting a training example from the plurality of training examples as a target training example, so as to iterate the intelligent agent network in a loop until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network;
[0062] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0063] The method, device, computer equipment, computer-readable storage medium and computer program product for constructing the above-mentioned agent network initialize the agent network according to the task description information input by the user, and initially the network contains only one agent. Then obtain multiple training examples, including input data and its corresponding expected output results. Select one as the target training example in the training example, input it into the agent network for training, and calculate the gap between the output result and the expected output result. Next, analyze the error cause of the gap, obtain the agent network update strategy, and update the agent network according to this strategy. Then repeat the cyclic iterative process of selecting training examples, training, analyzing the cause of the error, and updating the agent network until the preset iteration termination condition is met to obtain the final agent network. It can be understood that the present application gradually trains a single agent into an agent network that meets the task requirements by cyclically iterating training examples, analyzing the cause of the error, and continuously updating the agent network. And the update strategy includes a method for generating new agents, allowing the agent network to dynamically generate new agents during the training process to expand and optimize the network structure. This makes it possible to automatically adjust the network and improve the performance of the agent based on training examples, reduce the need to manually design the network architecture, and reduce the workload of manually debugging the agent, which is conducive to quickly building an agent network that can complete complex tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of a process for constructing an agent network in one embodiment;
[0065] Figure 2 is a structural block diagram of a device for constructing an intelligent agent network in one embodiment;
[0066] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0068] In one embodiment, Figure 1 As shown, a method for constructing an agent network is provided. The agent network is formed by connecting multiple agents to form a directed acyclic graph. The method includes the following steps S101-S106:
[0069] Step S101, in response to task description information input by a user account, initialize the agent network according to the task description information.
[0070] The agent network only includes one agent after initialization, that is, the agent network obtained in step S101 only includes one agent. Optionally, the agent is constructed based on a large language model (LLM).
[0071] The agent contains an input module, a control module, an execution module, and an output module. The input modules and output modules between different agents are connected to form an agent network. The input module is used to receive input from the upstream agent and remove duplicate inputs (if any). The control module is used to decide whether the agent needs to run. If the agent does not need to run, the output module will directly forward the content received by the input module; otherwise, the agent will run the execution module to obtain the output. The execution module is used to calculate the output based on the current agent's task and input. The output module is used to transfer data to the downstream agent. If the control module believes that the current agent should not run, the output module simply forwards the input obtained by the input module; otherwise, the output module outputs the result of the execution module.
[0072] The control module and the execution module use a large language model. That is, the control module uses the large language model to decide whether the agent needs to run. The execution module uses the large language model to calculate the output based on the current agent's task and input. Both modules contain a sample library (describing "when the input is xxx, the output should be xxx") and a knowledge base (general knowledge summarized in natural language). By updating the sample library and knowledge base, the ability can be improved.
[0073] Specifically, a user account is the user's identity. The user logs in with his account and can then perform various operations, such as entering task description information. The task description information is a natural language description of the target task. The target task can be a complex task or a simple task. According to the task description information, the agent network is initialized to generate an initial network containing only a single agent based on a large language model (i.e., an LLM agent). This single agent directly generates the final output of the target task.
[0074] Step S102, obtaining several training examples.
[0075] The training examples include network input data and its corresponding expected output results.
[0076] Specifically, the training examples may be input by the user account itself, or may be pre-stored in a database or storage medium for quick retrieval.
[0077] Step S103: Select one training example from a plurality of training examples as a target training example.
[0078] Specifically, among a plurality of given training examples, training examples may be selected one by one as target training examples according to the arrangement order of the training examples.
[0079] Step S104, inputting the network input data in the target training example into the intelligent agent network for training, and calculating the difference between the network output result output by the intelligent agent network and the expected output result in the target training example.
[0080] Specifically, the network input data in the target training example is input into the agent network, and the network input data is processed by the agent network to generate the network output result. The gap between the network output result and the expected output result in the target training example is calculated. The gap can be calculated by a loss function or an evaluation indicator.
[0081] Step S105, analyzing the error causes of the gap in the intelligent agent network, obtaining the intelligent agent network update strategy associated with the error causes, and updating the intelligent agent network according to the intelligent agent network update strategy.
[0082] Specifically, the reasons for the errors in analyzing the gap may be as follows:
[0083] A) Missing agent;
[0084] B) False activation of an agent, meaning an agent is running when it should not be running;
[0085] C) Poor agent performance. Poor agent performance can be further divided into:
[0086] 1) The agent lacks knowledge;
[0087] 2) The agent lacks input;
[0088] 3) The agent needs to be further divided into multiple steps or situations;
[0089] 4) The agent should have run, but it did not.
[0090] Select an update strategy based on the cause of the error. Each cause of the error corresponds to an update strategy. According to the update strategy, calculate the parameters to be updated (for example, if you want to add an agent, you need to calculate what its task is, where it receives input, and which agents the output is transmitted to). According to the parameters to be updated, update the agent network, including adjusting the network structure (for example, adding a new agent to the network or splitting the agent) and optimizing the agent content (such as adding a piece of knowledge to the agent).
[0091] For example, the error reason is A): no agent is responsible for the corresponding subtask, that is, the agent is missing. The update strategy is to choose to create a new agent.
[0092] The error reason is as mentioned above B): executing a subtask that should not be executed, but activating the corresponding agent, that is, erroneously activating the agent. The update strategy is to select the knowledge of the control module of the updated agent to deactivate it.
[0093] The reason for the error is C.1) above: the agent lacks knowledge. The update strategy is to add the required knowledge to the knowledge base of the agent's execution module to improve its performance.
[0094] The reason for the error is C.2) above: the agent needs additional input from other agents. The update strategy is to choose to add new edges to the network, allowing the agent to receive the necessary input. These additional inputs should have been calculated in the agent network; otherwise, an agent will be created to be responsible for their calculation.
[0095] The reason for the error is C.3) above: the agent needs a more sophisticated internal structure. The update strategy is to choose to divide the agent into two or more agents and determine their interconnection.
[0096] The error reason is as above C.4): the agent is not activated. The update strategy is to update the knowledge in the control module of the agent to activate it.
[0097] Step S106, after the intelligent agent network is updated, return to the step of selecting a training example from several training examples as a target training example to iterate the intelligent agent network in a loop until a preset iteration termination condition is met to obtain the final intelligent agent network.
[0098] Among them, during the cyclic iteration of the agent network, the update strategy includes generating new agents.
[0099] In the above-mentioned method for constructing an agent network, the agent network is initialized according to the task description information input by the user, and initially the network contains only one agent. Then, multiple training examples are obtained, including input data and its corresponding expected output results. Select one of the training examples as the target training example, input it into the agent network for training, and calculate the difference between the output result and the expected output result. Next, analyze the error cause that causes the difference, obtain the agent network update strategy, and update the agent network according to this strategy. Then repeat the cyclic iterative process of selecting training examples, training, analyzing the cause of the error, and updating the agent network until the preset iteration termination condition is met to obtain the final agent network. It can be understood that this method gradually trains a single agent into an agent network that meets the task requirements by cyclically iterating training examples, analyzing the cause of the error, and continuously updating the agent network. And the update strategy includes a method for generating new agents, allowing the agent network to dynamically generate new agents during the training process to expand and optimize the network structure. This makes it possible to automatically adjust the network and improve the performance of the agent based on training examples, reduce the need to manually design the network architecture, and reduce the workload of manually debugging the agent, which is conducive to quickly building an agent network that can complete complex tasks.
[0100] Further, in one embodiment, after the agent network update is completed in step S106, and before returning to execute the step of selecting a training example as a target training example from a plurality of training examples, the method further includes:
[0101] A preset consistency strategy is adopted to ensure the accuracy of previous historical training examples, that is, the application of the update strategy should not harm the accuracy of past training inputs, as follows:
[0102] 1) For added agents, ensure that these added agents are not activated when processing historical training examples. This can be achieved by adjusting the sample library of the control module of the added agent, specifically by adding negative examples;
[0103] 2) In the case of splitting the original agent into multiple parallel new agents, ensure that the historical training examples only activate one of the new agents, and the output of this agent is the same as the output of the original agent. This can be achieved by adjusting the sample library of the control module and execution module of the new agent;
[0104] 3) When the original agent is split into multiple serial new agents, it is only necessary to ensure that the output of the last new agent is the same as the output of the original agent. This can be achieved by adjusting the execution module of the new agent;
[0105] 4) For other non-structural adjustments, the sample library of the modified agent is adjusted to ensure that the results produced by the adjusted agent when processing historical training examples remain unchanged.
[0106] In this embodiment, a consistency strategy is adopted to ensure that when the agent is modified or split, the processing of historical training examples will not lead to inconsistent or erroneous outputs.
[0107] In one embodiment, the method further comprises the following steps:
[0108] Step S201, displaying the operation results of each step in the process of building the intelligent agent network;
[0109] Step S202, in response to the user account's editing operation on the target running result, obtaining the editing result obtained by the user account editing the target running result, and re-executing the corresponding steps according to the editing result.
[0110] The target running result is the running result selected and edited by the user account.
[0111] Specifically, during the construction of the intelligent agent network, the system will display the operating results of each step, that is, the results of the steps involved in the construction method of the intelligent agent network provided by the embodiment of the present application. Optionally, the reason for obtaining such a result can also be displayed. For example, a user interface is implemented in the browser to facilitate the user to check and control the update process. In this way, the user can see the output results of each stage in the construction process of the intelligent agent network and understand the impact of each step on the construction of the entire intelligent agent network. When the user finds an error in it, the user can manually modify the errors or inaccuracies in the displayed operating results. As an example, the user can modify the important parts of the operating results, and for the unimportant parts, placeholders (<???>) can be used, and the computer can complete them by itself. Subsequently, the system will recalculate the relevant steps based on the user's editing feedback to correct or update the intelligent agent network.
[0112] In this embodiment, a human-machine collaborative mode of "human-supervising-machine" is adopted to provide a visual display of the results of the steps involved in the intelligent network construction method, so that users can supervise the entire operation process. Users can also manually modify the results of the intelligent network construction process, especially when errors are found or improvements are needed. In this mode, users can participate in and guide the construction and correction of the intelligent network as supervisors to ensure that the constructed intelligent network meets user needs and expectations.
[0113] Furthermore, in one embodiment, the method further comprises the following steps:
[0114] Step S301, receiving a natural language prompt input by a user account;
[0115] Step S302, re-execute the corresponding steps of building the intelligent agent network according to the natural language prompt.
[0116] Specifically, users can also give some natural language prompts (for example, "I think xxx", where xxx represents the user's views, suggestions or opinions). Then, based on the natural language information provided by the user, the system will recalculate, adjust or modify certain steps in the agent network construction process to meet the user's opinions or requirements.
[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0118] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing an intelligent agent network for implementing the method for constructing an intelligent agent network involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more intelligent agent network construction devices provided below can refer to the limitations of the intelligent agent network construction method above, and will not be repeated here.
[0119] In one embodiment, Figure 2 As shown, a device for constructing an intelligent agent network is provided. The intelligent agent network is formed by connecting multiple intelligent agents. The device includes:
[0120] A network initialization module 201 is used to respond to the task description information input by the user account and initialize the agent network according to the task description information; wherein the agent network only includes one agent after initialization;
[0121] An example acquisition module 202 is used to acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results;
[0122] An example selection module 203 is used to select a training example from the plurality of training examples as a target training example;
[0123] A gap calculation module 204 is used to input the network input data in the target training example into the agent network for training, and calculate the gap between the network output result output by the agent network and the expected output result in the target training example;
[0124] A network update module 205, configured to analyze the error cause of the gap in the agent network, obtain an agent network update strategy associated with the error cause, and update the agent network according to the agent network update strategy;
[0125] A loop iteration module 206 is used to return to the step of selecting a training example as a target training example from the plurality of training examples after the agent network is updated, so as to loop iterate the agent network until a preset iteration termination condition is met, thereby obtaining a final agent network;
[0126] Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
[0127] In the above-mentioned intelligent agent network construction device, the intelligent agent network is initialized according to the task description information input by the user, and initially the network contains only one intelligent agent. Then, multiple training examples are obtained, including input data and its corresponding expected output results. Select one of the training examples as the target training example, input it into the intelligent agent network for training, and calculate the gap between the output result and the expected output result. Next, analyze the error cause that causes the gap, obtain the intelligent agent network update strategy, and update the intelligent agent network according to this strategy. Then repeat the cyclic iterative process of selecting training examples, training, analyzing the cause of the error, and updating the intelligent agent network until the preset iteration termination condition is met to obtain the final intelligent agent network. It can be understood that this device gradually trains a single intelligent agent into an intelligent agent network that meets the task requirements by cyclically iterating training examples, analyzing the cause of the error, and continuously updating the intelligent agent network. And the update strategy includes a method for generating new agents, allowing the intelligent agent network to dynamically generate new agents during the training process to expand and optimize the network structure. This makes it possible to automatically adjust the network and improve the performance of the agent based on training examples, reduce the need to manually design the network architecture, and reduce the workload of manually debugging the agent, which is conducive to quickly building an agent network that can complete complex tasks.
[0128] It should be noted that the intelligent network construction device provided in the above embodiment only uses the division of the above functional modules as an example when implementing the corresponding functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the intelligent network construction device provided in the above embodiment and the intelligent network construction method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0129] According to one aspect of the present application, an embodiment of the present invention further provides a computer program product, which includes a computer program, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part. When the computer program is executed by the processor, the construction method of the intelligent agent network provided by the embodiment of the present application is executed.
[0130] In addition, an embodiment of the present invention also provides a computer device, which includes a processor and a memory, the memory stores a computer program, and the processor can execute the computer program stored in the memory. When the computer program is executed by the processor, the method for constructing an intelligent agent network provided in any of the above embodiments can be implemented.
[0131] For example, Figure 3A computer device provided by an embodiment of the present invention is shown. The device includes a bus 1110 , a processor 1120 , a transceiver 1130 , a bus interface 1140 , a memory 1150 , and a user interface 1160 .
[0132] In an embodiment of the present invention, the device also includes: a computer program stored in the memory 1150 and executable on the processor 1120, and when the computer program is executed by the processor 1120, each process of the above-mentioned intelligent agent network construction method embodiment is implemented.
[0133] The transceiver 1130 is configured to receive and send data under the control of the processor 1120 .
[0134] In an embodiment of the present invention, the bus architecture (represented by bus 1110), bus 1110 may include any number of interconnected buses and bridges, and bus 1110 connects various circuits including one or more processors represented by processor 1120 and a memory represented by memory 1150.
[0135] Bus 1110 represents one or more of any of several types of bus structures, including a memory bus and memory controller, a peripheral bus, an Accelerate Graphical Port (AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example and not limitation, such architectures include: Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA), Peripheral Component Interconnect (PCI) bus.
[0136] The processor 1120 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processors include: a general-purpose processor, a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a programmable logic array (PLA), a microcontroller unit (MCU) or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. For example, the processor may be a single-core processor or a multi-core processor, and the processor may be integrated into a single chip or located in multiple different chips.
[0137] Processor 1120 can be a microprocessor or any conventional processor. The method steps disclosed in conjunction with the embodiments of the present invention can be directly executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a readable storage medium known in the art, such as a random access memory (RAM), a flash memory (FlashMemory), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a register, etc. The readable storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware.
[0138] The bus 1110 may also connect various other circuits such as peripheral devices, voltage regulators or power management circuits, and the bus interface 1140 provides an interface between the bus 1110 and the transceiver 1130, which are well known in the art. Therefore, the embodiments of the present invention will not be further described.
[0139] The transceiver 1130 may be one element or multiple elements, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on a transmission medium. For example, the transceiver 1130 receives external data from other devices, and the transceiver 1130 is used to send data processed by the processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, such as a touch screen, a physical keyboard, a display, a mouse, a speaker, a microphone, a trackball, a joystick, and a stylus.
[0140] It should be understood that in an embodiment of the present invention, the memory 1150 may further include a memory remotely arranged relative to the processor 1120, and these remotely arranged memories may be connected to the server through a network. One or more parts of the above-mentioned network may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless local area network (WLAN), a wide area network (WAN), a wireless wide area network (WWAN), a metropolitan area network (MAN), the Internet, a public switched telephone network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless network, a wireless fidelity (Wi-Fi) network, and a combination of two or more of the above-mentioned networks. For example, the cellular telephone network and the wireless network can be a Global System for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, a LTE Frequency Division Duplex (FDD) system, a LTE Time Division Duplex (TDD) system, an Advanced Long Term Evolution (LTE-A) system, a Universal Mobile Telecommunications (UMTS) system, an Enhanced Mobile Broadband (Enhance Mobile Broadband, eMBB) system, a massive Machine Type of Communication (mMTC) system, an Ultra-Reliable Low Latency Communications (UltraReliable Low Latency Communications, uRLLC) system, etc.
[0141] It should be understood that the memory 1150 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory includes: a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0142] Volatile memory includes: Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as: Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Synchronous Link Dynamic Random Access Memory (SLDRAM) and Direct Rambus RAM (DRRAM). The memory 1150 described in the embodiments of the present invention includes but is not limited to the above and any other suitable types of memory.
[0143] In the embodiment of the present invention, the memory 1150 stores the following elements of the operating system 1151 and the application program 1152: executable modules, data structures, or subsets thereof, or extended sets thereof.
[0144] Specifically, the operating system 1151 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 1152 includes various applications, such as a media player (Media Player) and a browser (Browser), which are used to implement various application services. The program for implementing the method of the embodiment of the present invention may be included in the application 1152. The application 1152 includes applets, objects, components, logic, data structures, and other computer system executable instructions that perform specific tasks or implement specific abstract data types.
[0145] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned intelligent agent network construction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0146] Computer readable storage media include: permanent and non-permanent, removable and non-removable media, which are tangible devices that can retain and store instructions for use by instruction execution devices. Computer readable storage media include: electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, and any suitable combination of the above. Computer readable storage media include: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanical encoding devices (such as punched cards or raised structures in grooves with instructions recorded thereon) or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined in the embodiments of the present invention, computer-readable storage media do not include temporary signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (such as light pulses passing through fiber optic cables), or electrical signals transmitted through wires.
[0147] In the several embodiments provided in the present application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one location or distributed over multiple network units. Some or all of the units may be selected according to actual needs to solve the problem to be solved by the embodiments of the present invention.
[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] If the integrated unit is implemented in the form of 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 the embodiment of the present invention is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (including: a personal computer, a server, a data center or other network device) to perform all or part of the steps of the method described in each embodiment of the present invention. The above-mentioned storage medium includes various media that can store program codes as listed above.
[0151] In the description of the embodiments of the present invention, those skilled in the art should know that the embodiments of the present invention can be implemented as methods, devices, equipment and storage media. Therefore, the embodiments of the present invention can be specifically implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), a combination of hardware and software. In addition, in some embodiments, the embodiments of the present invention can also be implemented in the form of a computer program product in one or more computer-readable storage media, and the computer-readable storage medium contains computer program code.
[0152] The above-mentioned computer-readable storage medium may adopt any combination of one or more computer-readable storage media. Computer-readable storage media include: electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memories, optical fibers, compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices or any combination of the above. In an embodiment of the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device, or device.
[0153] The computer program code contained in the above-mentioned computer-readable storage medium can be transmitted using any appropriate medium, including: wireless, wire, optical cable, radio frequency (RF) or any suitable combination thereof.
[0154] The embodiments of the present invention describe the provided methods, devices, and apparatuses through flowcharts and / or block diagrams.
[0155] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer-readable program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified by the boxes in the flowchart and / or block diagram.
[0156] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable data processing apparatus to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0157] The above is only a specific implementation of the embodiment of the present invention, but the protection scope of the embodiment of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiment of the present invention, which should be included in the protection scope of the embodiment of the present invention. Therefore, the protection scope of the embodiment of the present invention should be based on the protection scope of the claims.
Claims
1. A method for constructing an agent network, characterized in that: The agent network is formed by connecting a plurality of agents; the method comprises: In response to the task description information input by the user account, the intelligent agent network is initialized according to the task description information; wherein the intelligent agent network includes only one intelligent agent after initialization; Acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results; Among the plurality of training examples, selecting a training example as a target training example; Inputting the network input data in the target training example into the agent network for training, and calculating the difference between the network output result output by the agent network and the expected output result in the target training example; Analyzing the error cause of the gap in the agent network, acquiring an agent network update strategy associated with the error cause, and updating the agent network according to the agent network update strategy; After the intelligent agent network is updated, returning to the step of selecting a training example from the plurality of training examples as a target training example, so as to iterate the intelligent agent network in a loop until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network; Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
2. The method according to claim 1, characterized in that The method further comprises: Display the running results of each step in the process of building the intelligent agent network; In response to the editing operation of the user account on the target running result, the editing result obtained by the user account editing the target running result is obtained, and the corresponding steps are re-executed according to the editing result.
3. The method according to claim 2, characterized in that The editing operation of the user account on the target running result is that the user account modifies the important part of the target running result and uses a placeholder for the unimportant part.
4. The method according to claim 2, characterized in that: The method further comprises: receiving a natural language prompt inputted by the user account; According to the natural language prompt, the corresponding steps of constructing the agent network are re-executed.
5. The method according to claim 1, characterized in that The updating of the agent network according to the updating strategy includes: According to the update strategy, calculate the parameters to be updated; The agent network is updated according to the parameters to be updated.
6. The method according to any one of claims 1 to 5, characterized in that: The intelligent agent includes an input module, a control module, an execution module and an output module; wherein, The input module is used to receive input data from an upstream agent; The control module is used to determine whether the agent needs to run; The execution module is used to calculate the output result according to the task of the agent and the input data if the control module determines that the agent needs to run; The output module is used to transmit the output result to the downstream agent if the control module determines that the agent needs to run; and if the control module determines that the agent does not need to run, the output module is used to forward the input data to the downstream agent.
7. The method according to claim 6, characterized in that A large language model is used in the control module, and the control module includes a sample library and a knowledge base; A large language model is adopted in the execution module, and the execution module includes a sample library and a knowledge base.
8. A device for constructing an intelligent agent network, characterized in that: The agent network is formed by connecting a plurality of agents; the device comprises: A network initialization module, configured to respond to task description information input by a user account and initialize an agent network according to the task description information; wherein the agent network only includes one agent after initialization; An example acquisition module is used to acquire a number of training examples; wherein the training examples include network input data and its corresponding expected output results; An example selection module, used for selecting a training example from the plurality of training examples as a target training example; A gap calculation module, used for inputting the network input data in the target training example into the agent network for training, and calculating the gap between the network output result output by the agent network and the expected output result in the target training example; A network update module, configured to analyze the error cause of the gap in the agent network, obtain an agent network update strategy associated with the error cause, and update the agent network according to the agent network update strategy; A loop iteration module, used for returning to the step of selecting a training example as a target training example from the plurality of training examples after the updating of the intelligent agent network is completed, so as to loop iterate the intelligent agent network until a preset iteration termination condition is met, thereby obtaining a final intelligent agent network; Wherein, during the process of the agent network performing cyclic iterations, the updating strategy includes generating new agents.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Construction method and device of intellectual body for unmanned driving vehicle test
CN106228233A
Reinforcement learning model training and business execution method and device, and electronic equipment
CN117725985A
Multi-agent system and control method therefor
WO2022001120A1
Cited By
Data processing method and related system
WO2026066400A1
Method for obtaining agent system, and related device
WO2026208440A1
