Large language model training method for generating intelligent agent and related equipment

By obtaining the component information of the agent and using large language models with large parameters to generate the agent template to be trained, and filtering the target agent template through the tag agent to be selected and trained on the large language model, the problem of poor corpus quality in the agent training is solved and the quality and reliability of the agent is improved.

CN119903172APending Publication Date: 2025-04-29CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411977824.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The prior art relies on a large amount of corpus in the training of agents, resulting in poor training quality, especially in complex tasks, where the effectiveness and reliability of agents are limited.

Method used

By obtaining the component information of the agent, a large language model with large parameters is used to generate multiple proxy templates to be trained, and the target proxy template is filtered out through the tag agent template of the tag agent, and finally the large language model is trained.

Benefits of technology

The quality of the training corpus of large language models has been improved, the quality, reliability and effectiveness of the agent have been improved, and the automatic iteration closed loop has been formed, and the performance of the training corpus and model are continuously optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903172A_ABST
    Figure CN119903172A_ABST
Patent Text Reader

Abstract

The invention provides a large language model training method for generating an agent and related equipment, and relates to the technical field of artificial intelligence, and the method comprises the steps: obtaining agent composition element information of a to-be-trained agent template; generating a plurality of agent templates to be trained through a large language model of a large parameter quantity according to input question query and agent composition meta-information; and according to the label agent template of each label agent, screening the plurality of agent templates to be trained to obtain a target agent template, and according to the target agent template, training the large language model to be trained. According to the method, the generated agent templates are screened by the agent template of the label agent, and the large language model is trained to form an automatic iteration closed loop, so that optimization of agent training corpora and continuous improvement, automatic feedback and adjustment of model performance can be realized, the agent can continuously learn and adapt, and the efficiency is improved. And the stability and reliability of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the field of artificial intelligence, the iteration and optimization of intelligent agents is a complex and critical process. Currently, the training of intelligent agents relies on a large amount of corpus, which often needs to be generated by large models.

[0003] However, these corpora perform poorly for large model training in some aspects. Based on this, how to obtain high-quality agent training corpora and improve the effectiveness and reliability of complex tasks is still a problem that needs to be solved urgently.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides a large language model training method and related equipment for generating intelligent agents, which can at least improve the quality of large language model training predictions, improve the quality of subsequently generated intelligent agents, and improve the reliability and effectiveness of the intelligent agents.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] In a first aspect, an embodiment of the present disclosure provides a large language model training method for generating an agent, the method comprising:

[0008] Obtain the meta-information of the agent composition of the agent template to be trained;

[0009] According to the input question query and the agent composition meta-information, a plurality of agent templates to be trained are generated through a large language model with a large number of parameters;

[0010] According to the label proxy template of each label agent, the plurality of proxy templates to be trained are screened to obtain a target proxy template;

[0011] The large language model to be trained is trained according to the target proxy template.

[0012] In a possible embodiment, the step of obtaining the agent composition meta-information of the agent template to be trained includes:

[0013] Get multiple label agents;

[0014] The common architecture features of the multiple labeled agents are extracted to generate agent composition meta-information of the agent template to be trained.

[0015] In a possible embodiment, the agent component meta-information includes at least one of the following: introduction, instructions, tools, memory, goals, format and user preferences.

[0016] In a possible embodiment, the step of generating multiple agent templates to be trained based on the input question query and the agent composition meta-information through a large language model with a large number of parameters includes:

[0017] Inputting the question query into the large language model with a large number of parameters, determining the application scenario and task requirements corresponding to the agent template of the intelligent agent to be generated, and generating different guidance prompt information;

[0018] The agent group meta information, the guidance prompt information and the question query are input into the large language model with a large number of parameters to generate a plurality of agent templates to be trained.

[0019] In a possible embodiment, inputting the question query into the large language model with a large number of parameters, determining the application scenario and task requirements corresponding to the agent template of the agent to be generated, and generating guidance prompt information includes:

[0020] Inputting the question query into the large language model with a large number of parameters, and determining the application scenario and task requirements corresponding to the agent template of the intelligent agent to be generated;

[0021] According to the application scenario and the task requirement, the guidance prompt information is generated through keyword expansion, context simulation and a preset guidance word template.

[0022] In a possible embodiment, the screening of the plurality of proxy templates to be trained according to the label proxy template of each label agent to obtain a target proxy template includes:

[0023] For any one proxy template to be evaluated and any one of the input multiple question queries, determine a similarity score between the any one proxy template to be evaluated and each label proxy template;

[0024] Filter the target similarity scores whose similarity scores are greater than or equal to the score threshold, and determine the corresponding remaining label proxy templates;

[0025] Determine a relevance score according to the any one of the question queries and the execution results corresponding to the remaining tag proxy templates;

[0026] Determine a comprehensive score between the any one proxy template to be evaluated and each remaining label proxy template according to the relevance score and the target similarity score corresponding to each remaining label proxy template;

[0027] Determine the maximum comprehensive score of any one of the question queries from the comprehensive scores, and determine the maximum comprehensive scores corresponding to the multiple question queries respectively;

[0028] Determine the final score of any one of the proxy templates to be evaluated according to the maximum comprehensive scores corresponding to the multiple question queries, and obtain the final score of each of the proxy templates to be evaluated;

[0029] A target proxy template is determined according to the final score of each proxy template to be evaluated.

[0030] In a possible embodiment, training the large language model to be trained according to the target proxy template includes:

[0031] Mixing the target proxy template, the multiple label proxy templates and a general proxy template dataset to obtain a training dataset;

[0032] A large language model with a small number of parameters is trained according to the training data set.

[0033] In a second aspect, an embodiment of the present disclosure provides a large language model training device for generating an agent, comprising:

[0034] An acquisition unit, used for acquiring the meta information of the agent composition of the agent template to be trained;

[0035] A generating unit, configured to generate a plurality of agent templates to be trained according to an input question query and the agent composition meta-information through a large language model with a large number of parameters;

[0036] A screening unit, configured to screen the plurality of proxy templates to be trained according to the label proxy template of each label agent to obtain a target proxy template;

[0037] The training unit is used to train the large language model to be trained according to the target proxy template.

[0038] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method in the first aspect above by executing the executable instructions.

[0039] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method in the first aspect described above is implemented.

[0040] In a fifth aspect, according to another aspect of the present disclosure, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above methods.

[0041] The embodiments of the present disclosure provide a large language model training method and related equipment for generating an intelligent agent, which relates to the field of artificial intelligence technology. The method includes: obtaining the intelligent agent composition meta information of the agent template to be trained; generating multiple agent templates to be trained through a large language model with a large number of parameters according to the input question query and the intelligent agent composition meta information; screening multiple agent templates to be trained according to the label agent template of each label intelligent agent to obtain a target agent template; training the large language model to be trained according to the target agent template. Through the above method, the generated agent template is screened with the existing high-quality intelligent agent, that is, the agent template of the label intelligent agent, and the large language model is trained to form an automatic iterative closed loop, which can realize the optimization of the intelligent agent training corpus and the continuous improvement of the model performance, automatic feedback and adjustment, so that the intelligent agent can continuously learn and adapt, and improve the stability and reliability of the model.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0044] Figure 1 A flowchart of a large language model training method for generating an intelligent agent in an embodiment of the present disclosure is shown;

[0045] Figure 2 A flowchart of obtaining metadata of an intelligent agent component in an embodiment of the present disclosure is shown;

[0046] Figure 3 A flowchart of generating a to-be-trained agent template in an embodiment of the present disclosure is shown;

[0047] Figure 4 A flowchart of screening target proxy templates according to an embodiment of the present disclosure is shown;

[0048] Figure 5 A flowchart of training a large language model in an embodiment of the present disclosure is shown;

[0049] Figure 6 A schematic diagram showing a large language model training process for generating an intelligent agent in an embodiment of the present disclosure;

[0050] Figure 7 A flowchart showing another large language model training method for generating an intelligent agent in an embodiment of the present disclosure

[0051] Figure 8 A schematic diagram of the structure of a large language model training device for generating an intelligent agent in an embodiment of the present disclosure is shown;

[0052] Fig. 9 A schematic structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0053] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0054] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0055] The nouns that appear in the embodiments of the present disclosure are explained as follows:

[0056] Large Language Models (LLM): refers to complex computational models trained through deep learning and massive text data that can understand and generate natural language. LLMs typically have billions or even hundreds of billions of parameters and can perform a variety of language tasks such as text generation, translation, question answering, and text summarization.

[0057] In the field of artificial intelligence, the iteration and optimization of intelligent agents is a complex and critical process. Currently, the training of intelligent agents relies on a large amount of corpus, which often needs to be generated by large models. However, the singleness of these corpora may cause overfitting of the intelligent agents during training, that is, the model performs well on the training data but poorly on unseen data. To solve this problem, it is necessary to develop technologies that can generate diverse templates to improve the generalization ability of intelligent agents. In addition, although large models have made some progress in automatically generating intelligent agents, there is still a large gap compared with humans in planning, reflection, and tool use. This limits the effectiveness and reliability of intelligent agents in complex tasks.

[0058] The embodiment of the present disclosure provides a large language model training method and related equipment for generating an intelligent agent, which relates to the field of artificial intelligence technology. The method includes: obtaining the intelligent agent composition meta information of the agent template; generating multiple agent templates to be trained through a large language model with a large parameter amount according to the input question query and the intelligent agent composition meta information; screening multiple agent templates to be trained according to the label agent template of each label intelligent agent to obtain a target agent template; training the large language model with a small parameter amount according to the target agent template. Through the above method, it is possible to reduce labor costs, automate and intelligently generate training corpus, reduce the need for manual participation, improve the efficiency of training corpus generation, and improve the ability to generate training corpus in batches. The generated agent template is screened with the existing high-quality intelligent agent, that is, the agent template of the label intelligent agent, and the large language model is trained to form an automatic iterative closed loop, which can realize the optimization of the intelligent agent training corpus and the continuous improvement of the model performance, automatic feedback and adjustment, so that the intelligent agent can continuously learn and adapt, and improve the stability and reliability of the model.

[0059] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.

[0060] First, an embodiment of the present disclosure provides a large language model training method for generating an intelligent agent. The method can be executed by any electronic device with computing and processing capabilities. The following process takes the electronic device as a server as an example.

[0061] Figure 1 A flowchart of a large language model training method for generating an intelligent agent in an embodiment of the present disclosure is shown. Figure 1 As shown, the method provided in the embodiment of the present disclosure includes the following steps:

[0062] S102: Obtaining the agent composition meta-information of the agent template to be trained.

[0063] In a possible embodiment, before generating the training corpus, it is necessary to obtain the agent composition meta-information of the agent template to be trained.

[0064] There are many ways to obtain the information. For example, the meta information of the agent composition of the to-be-trained agent template is preset and the format is determined for input.

[0065] For example, Figure 2 A flowchart of obtaining the meta information of an intelligent agent group in an embodiment of the present disclosure is shown. Figure 2 As shown, the following steps may be included:

[0066] S202: Obtain multiple tag agents.

[0067] S204: Extract common architecture features of multiple labeled agents and generate agent composition meta-information of the agent template to be trained.

[0068] The server can analyze the task requirements and clarify the application scenarios. Based on the application scenarios and task requirements, mature labeled agents can be selected through the large language model as reference standards for the agent templates to be trained.

[0069] A label agent refers to a high-quality agent that can be put into use and meets project requirements and usage scenarios. High quality can be determined by its output results. If the output results of the agent meet the preset conditions, it is determined to be a label agent.

[0070] The usage scenarios may include but are not limited to: operational decision-making, fault reconsideration, on-site comprehensive maintenance, installation and maintenance knowledge, rules and regulations, etc.

[0071] Mature label agents demonstrate relatively excellent capabilities and can meet application scenarios and task requirements. Using label agents as a reference can enable the agent template to be trained to have stronger critical thinking, planning and reflection capabilities.

[0072] After obtaining the label agent, the label agent is analyzed and common architecture features are extracted to generate a large number of agent composition meta-information of the agent.

[0073] The agent composition meta-information includes at least one of the following: introduction, instructions, tools, memory, goals, format, and user preferences. Other information may also be included, which is not limited in the embodiments of the present disclosure.

[0074] Among them, Profile: defines the role and identity of the LLM, which helps the model respond and perform tasks in an appropriate manner.

[0075] Instructions: Provides specific action guidelines and constraints to ensure that agents perform tasks according to established processes and rules.

[0076] Tools: Describes the tools and resources that agents can use when performing tasks, and how to use them.

[0077] Memory: Integrates external knowledge, past tasks, and conversation history, enabling the agent to respond more accurately in context.

[0078] Goal: Specifies the integration of user queries or requirements, clarifies the specific goals of user queries or requirements, and enables the agent to perform tasks in a targeted manner.

[0079] Format: describes how the agent should construct responses and manage iterations to ensure consistent and parsable output.

[0080] The above elements together constitute the agent composition meta-information, that is, an agent system prompt framework.

[0081] S104: Based on the input question query and agent composition meta-information, a plurality of agent templates to be trained are generated through a large language model with a large number of parameters.

[0082] In a possible embodiment, a large language model with a large number of parameters is used, which has better performance, and multiple agent templates to be trained are generated according to the agent composition meta-information and the input question query.

[0083] The query question may be: celebrity information query.

[0084] It should be noted that the generated agent template to be trained is in text form.

[0085] S106: According to the label proxy template of each label agent, multiple proxy templates to be trained are screened to obtain a target proxy template.

[0086] In a possible embodiment, multiple proxy templates to be trained are screened using multiple label proxy templates. The screening can be performed in a similarity manner, and the similarity scores between the generated proxy templates to be trained and the label proxy templates are determined, and a target proxy template to be trained having a similarity score greater than a first threshold is determined, and the target proxy template to be trained is used as the target proxy template.

[0087] The similarity can be determined by using a Recall-Oriented Understudy for Gisting Evaluation (rouge) score or cosine similarity to calculate.

[0088] In another possible embodiment, other methods may be used for screening. For example, by inputting a question query into the agent template to be trained, scoring the output result through other large language models with quality scores, and judging whether the score of the output result is greater than a second threshold. If so, it means that the output result meets the conditions and is retained as the target agent template.

[0089] S108: Training the large language model to be trained according to the target proxy template.

[0090] In a possible embodiment, the large language model to be trained is trained using a target proxy template.

[0091] The large language model to be trained may be a large language model with small-scale parameters.

[0092] In a possible embodiment, after the large language model is trained, the process returns to step S102 and continuously iterates the agent corresponding to the target proxy template to improve the flexibility, scalability and accuracy of the agent.

[0093] Through the method in the embodiment of the present disclosure, it is possible to refer to a variety of different project requirements and usage scenarios, cooperate with mature high-quality label intelligent agents, automatically generate diverse training corpora, and screen out high-quality training corpora (target agent templates) for the training of large language models, which can improve the ability of large language models to generate high-quality intelligent agents, improve the reliability and effectiveness of intelligent agents generated by large language models, and continuously iterate intelligent agents to improve their flexibility, scalability and accuracy. With a self-optimizing and iterative closed-loop system, it is ensured that intelligent agents can quickly adapt to the rapid development of network technology and meet the needs of diversified network service scenarios.

[0094] The method in the disclosed embodiments is applicable to vertical fields of large language models, for example, in the design and application of large models involving complex logical judgments and extensive tool use.

[0095] In S104, since a large number of agent templates to be trained are generated for a question query based on the same agent composition meta-information, a homogenization problem may occur.

[0096] Based on this, Figure 3 A flow chart of generating a to-be-trained agent template in an embodiment of the present disclosure is shown. Figure 3 As shown, the following steps are included:

[0097] S302: Input the question query into a large language model with a large number of parameters, determine the application scenarios and task requirements corresponding to the agent template of the intelligent agent to be generated, and generate different guidance prompt information.

[0098] S304: Inputting the agent composition meta-information, guidance prompt information and question query into a large language model with a large number of parameters to generate multiple agent templates to be trained.

[0099] After obtaining the question query and determining the application scenario and task requirements, the computer can automatically generate different guidance prompt information, use the guidance prompt information as the guidance question, combine it with the meta-information of the intelligent agent, and generate multiple agent templates to be trained based on the large language model.

[0100] Here, taking the query question: celebrity information query as an example, the generated guidance prompt information may be: the user wants to know the life and works of a certain celebrity.

[0101] The corresponding agent composition metadata may include the following:

[0102] Description: You are a professional information retrieval assistant, specializing in providing detailed information about historical and cultural figures.

[0103] Instructions: Please provide accurate information and make sure the source of the information is reliable.

[0104] Tools: You can use the encyclopedia search tool to get biographical information about celebrities, and the news database to find their latest news.

[0105] Memory: Before generating a response, review previous queries and conversation history to ensure information coherence.

[0106] Objective: To provide a detailed biographical profile of the person and their major achievements.

[0107] Format: Please return information in a structured format, including the celebrity's year of birth, major achievements, and representative works.

[0108] User Preferences: Please provide as much information as possible, between 100 and 1000 words.

[0109] In another possible embodiment, the staff may pre-set different guiding questions according to the generated agent composition meta-information and question query, so as to serve as the basis for generating multiple agent templates to be trained.

[0110] In a possible embodiment, the method of automatically generating guidance prompt information by a computer may include: inputting the question query into a large language model with a large number of parameters, determining the application scenarios and task requirements corresponding to the agent template of the intelligent body to be generated, and generating guidance prompt information through keyword expansion, context simulation and pre-set guidance word templates according to the application scenarios and task requirements.

[0111] In a possible embodiment, in step S106, Figure 4 A flowchart of screening target proxy templates in an embodiment of the present disclosure is shown. Figure 4 As shown, the following steps are included:

[0112] S402: For any proxy template to be evaluated and any question query among the input multiple question queries, determine a similarity score between any proxy template to be evaluated and each label proxy template.

[0113] S404: Filter target similarity scores whose similarity scores are greater than or equal to the score threshold, and determine corresponding remaining label proxy templates.

[0114] S406: Determine a relevance score based on any question query and the execution results corresponding to the remaining tag proxy templates.

[0115] S408: Determine a comprehensive score between any proxy template to be evaluated and each remaining label proxy template according to the relevance score and the target similarity score corresponding to each remaining label proxy template.

[0116] S410: Determine the maximum comprehensive score of any question query from the comprehensive scores, and determine the maximum comprehensive scores corresponding to multiple question queries respectively.

[0117] S412: Determine the final score of any proxy template to be evaluated according to the maximum comprehensive score corresponding to the multiple question queries, and obtain the final score of each proxy template to be evaluated.

[0118] S414: Determine a target proxy template according to the final score of each proxy template to be evaluated.

[0119] In a possible embodiment, when screening the agent templates to be trained, it is possible to consider determining the similarity score between the label agent template and the agent template to be trained, and simultaneously consider the correlation score between the input question query and the output result of the label template.

[0120] Based on this, we can simultaneously require that the similarity between the proxy template to be trained and the label proxy template is high, and that the correlation between the input question query and the output result of the label proxy template is high. This not only ensures the quality of the generated proxy template to be trained, but also takes the quality of the label proxy template into consideration. For each question query, the one with the largest comprehensive score is obtained for the final evaluation. The quality of the generated proxy template to be trained is judged by the maximum comprehensive score, which is sufficient to meet the usage requirements.

[0121] It should be noted that the main purpose of considering the relevance score is to critically think, plan, and reflect on mature label proxy templates. It is hoped that the proxy template to be trained can achieve the same effect as its similar label proxy template. The target proxy template generated in this way is of higher quality and is more effective for training large language models.

[0122] In a possible embodiment, the screening of the target proxy template can be determined by the following formula (1), and the score for a proxy template to be trained can be as follows:

[0123]

[0124] Among them, Score represents the final score; N represents the total number of question queries; i represents the index of the question query; M represents the number of label agents; δ(O c,i ,O k,i ) represents the similarity score between the cth proxy template to be trained and the kth label proxy template for the i-th question query; θ represents the score threshold; similarity scores greater than the score threshold will be retained; CR(Q i ,T k ) represents the correlation score; Q i represents the i-th question query, T k Represents the output result of the k-th label proxy template for the i-th question.

[0125] In a possible embodiment, with respect to step S108, after obtaining the target proxy template, the training data set used for training may be further improved. Figure 5 A flowchart of training a large language model in an embodiment of the present disclosure is shown. Figure 5 As shown, the following steps are included:

[0126] S502: Mix the target proxy template, multiple label proxy templates and the general proxy template dataset to obtain a training dataset.

[0127] S504: Train a large language model with a small number of parameters according to the training data set.

[0128] Through the above method, a variety of high-quality proxy templates can be mixed as training data sets, which can improve the diversity of training data sets, increase the source of training corpus for large language models, and improve the accuracy and reliability of the intelligent agents generated by large language models after training.

[0129] Based on the above process, Figure 6 A schematic diagram of a large language model training process for generating an intelligent agent in an embodiment of the present disclosure is shown. Figure 6As shown, first obtain the label agent, extract the meta information of the agent composition, input it into the large language model with large-scale parameters, obtain multiple proxy templates to be trained, further score the multiple proxy templates to be trained by the label proxy template, obtain the target proxy template, and mix them to obtain the training data set for training the large language model with small-scale parameters.

[0130] based on Figure 6 , Figure 7 A flowchart of another large language model training method for generating an intelligent agent in an embodiment of the present disclosure is shown. Figure 7 As shown, the following steps are included:

[0131] S702: Acquire multiple tag agents.

[0132] S704: Extract common architecture features of multiple labeled agents and generate agent composition meta-information of the agent template to be trained.

[0133] S706: Input the question query into a large language model with a large number of parameters, determine the application scenarios and task requirements corresponding to the agent template of the intelligent agent to be generated, and generate different guidance prompt information.

[0134] S708: Inputting the agent composition meta-information, guidance prompt information and question query into a large language model with a large number of parameters to generate multiple agent templates to be trained.

[0135] S710: According to the label proxy template of each label agent, multiple proxy templates to be trained are screened to obtain a target proxy template.

[0136] S712: Mix the target proxy template, multiple label proxy templates and the general proxy template dataset to obtain a training dataset.

[0137] S714: Train a large language model with a small number of parameters according to the training data set.

[0138] Through the above method, the large language model is optimized and adjusted through the meta-agent mechanism, so that it can show better generalization and adaptability in complex scenarios such as information seeking and task automation. By fine-tuning the behavior and output of the large language model, the performance of the intelligent agent system can be improved, making it more flexible and efficient. It can generate and verify agent templates for specific tasks, and through the scoring and screening mechanism, high-quality agent templates can be screened out, and finally the large language model can be trained and adjusted in a loop. It can not only improve the performance of the large language model on specific tasks, but also enable it to show better adaptability and flexibility when facing new tasks and environments.

[0139] It can automatically generate high-quality training corpus, determine the final score of each proxy template to be trained by combining the similarity score, score threshold and correlation score between each proxy template to be trained and each label proxy template, evaluate the accuracy and efficiency of the performance of the proxy template to be trained, automatically generate training corpus using a large language model, and score and filter the corpus through an automated verification algorithm to improve the quality of the corpus, and then train the large language model, forming an automatic iterative closed loop of the intelligent agent.

[0140] Based on the same inventive concept, the present disclosure also provides a large language model training device for generating an intelligent agent, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0141] Figure 8 A schematic diagram of the structure of a large language model training device for generating an intelligent agent in an embodiment of the present disclosure is shown. Figure 8 As shown, the large language model training device 80 for generating an agent includes: an acquisition unit 801, used to obtain the agent composition meta information of the agent template to be trained; a generation unit 802, used to generate multiple agent templates to be trained through a large language model with a large parameter amount according to the input question query and the agent composition meta information; a screening unit 803, used to screen the multiple agent templates to be trained according to the label agent template of each label agent to obtain a target agent template; a training unit 804, used to train the large language model to be trained according to the target agent template.

[0142] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0143] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0144] like Fig. 9As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).

[0145] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps of various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform any step of the above method embodiments.

[0146] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .

[0147] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0148] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0149] The electronic device 900 may also communicate with one or more external devices 940 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0150] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the above embodiment.

[0152] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0153] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0154] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0155] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0156] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0157] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0158] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0159] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0160] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A large language model training method for generating an intelligent agent, characterized in that: The method comprises: Obtain the meta-information of the agent composition of the agent template to be trained; According to the input question query and the agent composition meta-information, a plurality of agent templates to be trained are generated through a large language model with a large number of parameters; According to the label proxy template of each label agent, the plurality of proxy templates to be trained are screened to obtain a target proxy template; The large language model to be trained is trained according to the target proxy template.

2. The method according to claim 1, characterized in that The step of obtaining the meta information of the agent composition of the agent template to be trained includes: Get multiple label agents; The common architecture features of the multiple labeled agents are extracted to generate agent composition meta-information of the agent template to be trained.

3. The method according to claim 1, characterized in that The agent component meta-information includes at least one of the following: introduction, instructions, tools, memory, goals, format and user preferences.

4. The method according to claim 1, characterized in that: The method generates multiple agent templates to be trained based on the input question query and the agent composition meta-information through a large language model with a large number of parameters, including: Inputting the question query into the large language model with a large number of parameters, determining the application scenario and task requirements corresponding to the agent template of the intelligent agent to be generated, and generating different guidance prompt information; The agent group meta information, the guidance prompt information and the question query are input into the large language model with a large number of parameters to generate a plurality of agent templates to be trained.

5. The method according to claim 4, characterized in that The step of inputting the question query into the large language model with a large number of parameters, determining the application scenario and task requirements corresponding to the agent template of the to-be-generated intelligent agent, and generating guidance prompt information includes: Inputting the question query into the large language model with a large number of parameters, and determining the application scenario and task requirements corresponding to the agent template of the intelligent agent to be generated; According to the application scenario and the task requirement, the guidance prompt information is generated through keyword expansion, context simulation and a preset guidance word template.

6. The method according to claim 1, characterized in that The step of screening the plurality of proxy templates to be trained according to the label proxy template of each label agent to obtain a target proxy template includes: For any one proxy template to be evaluated and any one of the input multiple question queries, determine a similarity score between the any one proxy template to be evaluated and each label proxy template; Filter the target similarity scores whose similarity scores are greater than or equal to the score threshold, and determine the corresponding remaining label proxy templates; Determine a relevance score according to the any one of the question queries and the execution results corresponding to the remaining tag proxy templates; Determine a comprehensive score between the any one proxy template to be evaluated and each remaining label proxy template according to the relevance score and the target similarity score corresponding to each remaining label proxy template; Determine the maximum comprehensive score of any one of the question queries from the comprehensive scores, and determine the maximum comprehensive scores corresponding to the multiple question queries respectively; Determine the final score of any one of the proxy templates to be evaluated according to the maximum comprehensive scores corresponding to the multiple question queries, and obtain the final score of each of the proxy templates to be evaluated; A target proxy template is determined according to the final score of each proxy template to be evaluated.

7. The method according to claim 1, characterized in that The training of the large language model to be trained according to the target proxy template includes: Mixing the target proxy template, the multiple label proxy templates and a general proxy template dataset to obtain a training dataset; A large language model with a small number of parameters is trained according to the training data set.

8. A large language model training device for generating an intelligent agent, characterized in that: include: An acquisition unit, used for acquiring the meta information of the agent composition of the agent template to be trained; A generating unit, configured to generate a plurality of agent templates to be trained according to an input question query and the agent composition meta-information through a large language model with a large number of parameters; A screening unit, configured to screen the plurality of proxy templates to be trained according to the label proxy template of each label agent to obtain a target proxy template; The training unit is used to train the large language model to be trained according to the target proxy template.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

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 method according to any one of claims 1 to 7 is implemented.

11. A computer program product comprising: A computer program or instruction, characterized in that when the computer program or instruction is executed by a processor, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Continuous casting quality control method based on meta-cognitive coordination architecture agent cluster

    CN120655248A

  • A continuous casting quality management and control method based on a meta-cognition coordination architecture intelligent agent cluster

    CN120655248B