Plug-in arrangement task generation method and device, and intelligent agent

By obtaining and utilizing pre-created plug-in libraries and example Q&A pairs, combined with pre-trained Q&A pair generation modules, generating training data for plug-in orchestration tasks, the problem of high cost of training data generation in the existing technology is solved, and efficient and accurate training data generation is achieved.

CN119960932APending Publication Date: 2025-05-09BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411904407.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The prior art is difficult to generate training data for plug-in orchestration tasks in automated and high-quality, resulting in excessive training costs for LLM in complex tasks.

Method used

By obtaining pre-created plug-in libraries, sample Q&A pairs and target prompt word templates, using pre-trained Q&A pairs to generate modules to generate training data for plug-in orchestration tasks, including problem-solving plug-in orchestration trajectories.

Benefits of technology

It realizes the accurate and efficient generation of training data for plug-in orchestration tasks, reduces manual labeling costs, and improves the training efficiency of LLM in complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960932A_ABST
    Figure CN119960932A_ABST
Patent Text Reader

Abstract

The invention provides a plug-in arrangement task generation method and device, equipment and a medium, and relates to the technical field of artificial intelligence such as large models, machine learning and natural language processing. According to the specific implementation scheme, the method comprises the steps of obtaining a pre-created plug-in library, a plurality of example question and answer pairs and a target cue word template; the plug-in library comprises a plurality of plug-ins, and example answers of the example question and answer pairs comprise plug-in arrangement processes adopted for solving example questions; based on the plug-in library, the multiple example question and answer pairs and the target cue word template, adopting a pre-trained question and answer pair generation module to generate training data of multiple plug-in arrangement tasks; the training data of each plug-in arrangement task comprises a problem and a plug-in arrangement track used for solving the problem. According to the technology disclosed by the invention, the training data of the plug-in arrangement task can be accurately and effectively generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to the field of artificial intelligence technology such as large models, machine learning and natural language processing, and more particularly to a method, device, equipment and medium for generating a plug-in orchestration task. Background Art

[0002] Large Language Model (LLM) is the basis for building models or agents with various functions. It can be designed to solve various complex tasks and solve user problems.

[0003] In order to enable LLM to have the ability to solve complex tasks, a large amount of training data can be collected to train the large model. Summary of the invention

[0004] The present disclosure provides a method, apparatus, device and medium for generating a plug-in orchestration task.

[0005] According to one aspect of the present disclosure, a method for generating a plug-in orchestration task is provided, comprising:

[0006] Obtain a pre-created plug-in library, multiple sample question-answer pairs, and a target prompt word template; the plug-in library includes multiple plug-ins, and the sample answers to the sample question-answer pairs include a plug-in orchestration process used to solve the sample questions;

[0007] Based on the plug-in library, the multiple example question-answer pairs and the target prompt word template, a pre-trained question-answer pair generation module is used to generate training data for multiple plug-in orchestration tasks; the training data for each plug-in orchestration task includes: a problem and a plug-in orchestration trajectory used to solve the problem.

[0008] According to another aspect of the present disclosure, a method for training a plug-in orchestration model is provided, comprising:

[0009] Obtain training data generated by the aspects and any possible implementations described above;

[0010] The plug-in orchestration model is trained based on the training data.

[0011] According to another aspect of the present disclosure, there is provided a method for training an intelligent agent, comprising:

[0012] Obtain training data generated by the aspects and any possible implementations described above;

[0013] Based on the training data, the plug-in orchestration agent is trained; the plug-in orchestration agent is obtained based on the plug-in orchestration model integration.

[0014] According to yet another aspect of the present disclosure, a device for generating training data for a plug-in orchestration task is provided, comprising:

[0015] An acquisition module is used to acquire a pre-created plug-in library, a plurality of sample question-answer pairs, and a target prompt word template; the plug-in library includes a plurality of plug-ins, and the sample answers to the sample question-answer pairs include a plug-in orchestration process used to solve the sample questions;

[0016] A generation module is used to generate training data for multiple plug-in orchestration tasks based on the plug-in library, the multiple example question-answer pairs, and the target prompt word template, using a pre-trained question-answer pair generation module; the training data of each plug-in orchestration task includes: a problem and a plug-in orchestration trajectory used to solve the problem.

[0017] According to yet another aspect of the present disclosure, a training device for a plug-in orchestration model is provided, comprising:

[0018] An acquisition module, used to acquire training data generated by the above aspects and any possible implementation method;

[0019] The training module is used to train the plug-in orchestration model based on the training data.

[0020] According to yet another aspect of the present disclosure, there is provided a training device for an intelligent agent, comprising:

[0021] An acquisition module, used to acquire training data generated by the above aspects and any possible implementation method;

[0022] A training module is used to train the plug-in orchestration agent based on the training data; the plug-in orchestration agent is obtained based on the plug-in orchestration model integration.

[0023] According to yet another aspect of the present disclosure, there is provided an electronic device, including:

[0024] at least one processor; and

[0025] a memory communicatively connected to the at least one processor; wherein,

[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any possible implementation manner and the aspects described above.

[0027] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method of the above-mentioned aspects and any possible implementation manner.

[0028] According to yet another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the above-mentioned aspects and any possible implementation method.

[0029] According to the technology disclosed in the present invention, training data for plug-in orchestration tasks can be generated accurately and effectively.

[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0032] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0033] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0034] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;

[0035] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0036] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0037] Figure 6 is a schematic diagram according to a sixth embodiment of the present disclosure;

[0038] Figure 7 is a schematic diagram according to a seventh embodiment of the present disclosure;

[0039] Figure 8 is a schematic diagram according to an eighth embodiment of the present disclosure;

[0040] Fig. 9 The block diagram is a block diagram of an electronic device for implementing the method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0042] Obviously, the described embodiments are only part of the embodiments of the present disclosure, but not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.

[0043] It should be noted that the terminal devices involved in the embodiments of the present disclosure may include but are not limited to mobile phones, personal digital assistants (PDAs), wireless handheld devices, tablet computers and other smart devices; display devices may include but are not limited to personal computers, televisions and other devices with display functions.

[0044] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0045] In office scenarios, LLM can be designed to implement plug-in orchestration tasks, but the training data for plug-in orchestration tasks cannot be effectively collected and can only be manually labeled. The training data required for training LLM is very large, and the cost of manual labeling is extremely high. Based on this, how to automatically and high-quality generate training data for plug-in orchestration tasks is an urgent problem to be solved.

[0046] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure; Figure 1 The present embodiment provides a method for generating training data for a plug-in orchestration task, which may specifically include the following steps:

[0047] S101, obtaining a pre-created plug-in library, multiple sample question-answer pairs, and a target prompt word template; the plug-in library includes multiple plug-ins, and the sample answers to the sample question-answer pairs include a plug-in orchestration process used to solve the sample questions;

[0048] The execution subject of the method for generating training data of plug-in orchestration tasks in this embodiment may be a device for generating training data of plug-in orchestration tasks, and the device may be an electronic entity or an application integrated by software.

[0049] In this embodiment, the pre-created plug-in library may include multiple plug-ins, and the plug-in of this embodiment may be an application programming interface (API). Specifically, the JSON format may be used to implement a standardized description of all plug-ins. The JSON description is a universal format that is easier for LLM to understand. When generating training data, the format and data quality check can also be easily performed.

[0050] The multiple plug-ins in the plug-in library of this embodiment can be collected from the developed program products.

[0051] The multiple example question-answer pairs of this embodiment are used as examples for generating training data, and the number of example question-answer pairs of this embodiment is not limited, and one, two, or several are all acceptable. Specifically, they can be manually annotated, or generated using a pre-trained LLM, and manually tested to ensure the accuracy of the example question-answer pairs.

[0052] The target prompt word template of this embodiment is the prompt template used for generating the training data of the plug-in arrangement task. It should be noted that in the process of generating training data, a variety of different target prompt word templates can be used to enhance the diversity of the generated training data.

[0053] S102, based on the plug-in library, multiple example question-answer pairs and target prompt word templates, using a pre-trained question-answer pair generation module to generate training data for multiple plug-in orchestration tasks; the training data for each plug-in orchestration task includes: a question and a plug-in orchestration track used to solve the question;

[0054] Specifically, the training data of each plug-in orchestration task is also in the form of a question-answer (QA) pair, in which the answer is the plug-in orchestration track used to solve the problem. Specifically, the plug-in coding track may include multiple steps, and at least one plug-in may be called in each step.

[0055] The method for generating training data for plug-in orchestration tasks of this embodiment, by adopting the above technical solution, can accurately and effectively generate training data for plug-in orchestration tasks, and provide effective data support for the training of plug-in orchestration task models.

[0056] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure; the method for generating training data for the plug-in orchestration task of this embodiment, in the above Figure 1 Based on the technical solutions of the embodiments shown in the figure, the technical solutions of the present disclosure are further described in more detail. Figure 2 As shown, the method for generating training data for the plug-in orchestration task in this embodiment may specifically include the following steps:

[0057] S201, obtaining a pre-created plug-in library and multiple sample question-answer pairs;

[0058] For example, the following is an example of a plug-in provided in this embodiment:

[0059]

[0060]

[0061] All plugins in the plugin library can be described in a clear and concise specification in the above format, which can effectively assist in the generation of training data and effectively improve the quality of the generated training data.

[0062] The multiple example question-answer pairs of this embodiment can be generated based on different LLMs, which can effectively enhance the diversity of generated data. In addition, preference learning data can also be constructed.

[0063] S202, obtaining a target prompt word template from a preset prompt word template library;

[0064] For example, multiple query data related to the plug-in arrangement task can be searched in open source data sets and search engines; multiple query data can be clustered according to semantics; and LLM is used for multiple related query statements after clustering to generate multiple prompt word templates related to multiple plug-in arrangement tasks to form a prompt word template library.

[0065] In this embodiment, according to the above method, prompt word templates of various forms and styles can be generated. When generating training data for plug-in arrangement tasks, different prompt word templates can also be used to generate rich training data for plug-in arrangement tasks.

[0066] For example, the following is a ReAct-style prompt template:

[0067]

[0068]

[0069] The above prompt word template is only an example. In actual application, multiple prompt word templates can be generated to form a prompt word template library, which can also be called a prompt word project, namely, Prompt Factory.

[0070] S203, based on the plug-in library, multiple example question-answer pairs and target prompt word templates, using a pre-trained question-answer pair generation module to generate training data for multiple plug-in orchestration tasks; the training data for each plug-in orchestration task includes: questions and plug-in orchestration trajectories used to solve the questions;

[0071] S204, verifying the training data of multiple plug-in orchestration tasks;

[0072] In order to improve the quality of the training data of the generated plug-in orchestration tasks, the training data of multiple plug-in orchestration tasks can be verified, and the unreasonable ones can be removed. Only the high-quality training data of the plug-in orchestration tasks can be retained for effective training of the plug-in orchestration task model in the future.

[0073] For example, when step S204 of this embodiment is specifically performed, it may include at least one of the following verification methods:

[0074] The first method is to verify the trajectory of the training data of multiple plug-in orchestration tasks;

[0075] The second method is to execute and verify the training data of multiple plug-in orchestration tasks;

[0076] The third method is to perform semantic verification on the training data of multiple plug-in orchestration tasks.

[0077] That is to say, in this embodiment, the training data of multiple plug-in orchestration tasks can be effectively verified from the dimensions of trajectory verification, execution verification, and semantic verification, thereby effectively improving the quality of the retained training data.

[0078] For example, for the first type of verification, the specific implementation may include at least one of the following situations:

[0079] (1) For each piece of training data, detect whether the format of the plug-in arrangement track is consistent with the output format defined by the target prompt word template; in response to the format of the plug-in arrangement track being inconsistent with the output format defined by the target prompt word template, filter the corresponding training data.

[0080] Since the training data is generated based on the target prompt word template, the format of the plug-in arrangement track should be consistent with the output format of the plug-in arrangement track defined in the target prompt word template. If it is inconsistent, the generated training data is considered to be wrong and needs to be filtered.

[0081] For example, a React-style prompt requires the output format to be Thought / Action / Actioninput / .... / Thought / Final Answer. If the output format of the plugin orchestration track in the generated training data is inconsistent, the training data is filtered.

[0082] (2) For each piece of training data, detect whether the plug-in in the plug-in arrangement trajectory is in the sample plug-in provided by the target prompt word template; in response to the plug-in in the plug-in arrangement trajectory not being in the sample plug-in provided by the target prompt word template, filter the corresponding training data.

[0083] A sample plug-in is provided in the target prompt word template, and the sample plug-in here can be a plug-in in the plug-in library. There is no limit on the number of sample plug-ins provided in the target prompt word template.

[0084] Since sample plug-ins are provided in the target prompt word template, the plug-ins in the plug-in arrangement track in the generated training data can only be plug-ins in the sample plug-ins, otherwise, the generated training data is considered to be wrong and needs to be filtered out.

[0085] (3) For each piece of training data, check whether the plug-in calling parameters in the plug-in orchestration trace are legal; in response to the plug-in calling parameters in the plug-in orchestration trace being illegal, filter the corresponding training data.

[0086] If the calling parameters of the plug-in in the plug-in arrangement track in the generated training data are illegal, the plug-in cannot be called. Therefore, it is also necessary to filter the training data with illegal plug-in calling parameters.

[0087] Specifically, a preset strategy or a pre-trained parameter legality verification model may be used to detect the legality of the plug-in calling parameters.

[0088] It should be noted that in practical applications, one, two or all of the three situations in steps (1) to (3) above can be selected for verification. The more verification methods selected, the more accurate and high-quality the training data obtained in the end.

[0089] The second method of verification may include at least one of the following scenarios during implementation:

[0090] (a) For each piece of training data, detect whether the plug-in in the step of the plug-in arrangement trajectory can be called; in response to the plug-in in the step of the plug-in arrangement trajectory not being called, filter the corresponding training data.

[0091] This verification method is used to detect whether the plug-in can be executed. When verifying, the plug-in can be imported into a separate child process for execution. If it can be executed, it is considered that the plug-in can be called. Otherwise, if it cannot be executed, it is considered that the plug-in cannot be called.

[0092] (b) For each piece of training data, obtain the status code returned by the plug-in after being called in the step of plug-in orchestration trajectory; based on the status code, detect whether the plug-in is called successfully; in response to the plug-in call failure, filter the corresponding training data.

[0093] In actual applications, the status code returned by a successful plug-in call is inconsistent with the status code returned by an abnormal plug-in call. Therefore, in this embodiment, by detecting the status code returned after the plug-in call, it is possible to detect whether the plug-in call is successful. For plug-ins that fail to call, the corresponding training data is filtered.

[0094] Similarly, you can choose to perform one or both of the above steps (a)-(b) of verification. The more verification methods you choose, the more accurate and high-quality the training data you will eventually get.

[0095] The third method of verification may include at least one of the following scenarios during implementation:

[0096] (A) For each piece of training data, detect whether the plug-in in the plug-in orchestration trajectory is related to the problem; in response to the plug-in in the plug-in orchestration trajectory being not related to the problem, filter the corresponding training data.

[0097] Specifically, each plug-in in the plug-in orchestration track is to help solve the problem, so the plug-ins in the plug-in orchestration track should be relevant to the problem. If not, it is considered that the selection of the plug-in is unreasonable and the corresponding training data needs to be filtered out.

[0098] In actual applications, the plug-in library also includes description information of each plug-in, such as the function introduction of the plug-in or the services provided by the plug-in. Based on this, based on the description information of the plug-in, the relevance between the plug-in and the question can be calculated. For example, the feature vector of the description information of the plug-in and the feature vector of the question are obtained, and then the similarity between the two vectors is calculated as the relevance between the plug-in and the question. If the relevance is greater than the preset relevance threshold, the plug-in is considered to be related to the question, otherwise the plug-in is considered to be unrelated to the question.

[0099] (B) For each piece of training data, detect whether the target result obtained after calling the plug-in in all steps of the plug-in orchestration trajectory can solve the problem; in response to the target result not being able to solve the problem, filter the corresponding training data.

[0100] After all steps of the plug-in orchestration trajectory are executed, the corresponding problem can be solved in theory. Therefore, it is possible to detect whether the target result obtained after the plug-in call of all steps in the plug-in orchestration trajectory solves the problem. If not, it is considered that there is a problem with the plug-in orchestration trajectory and the corresponding training data needs to be filtered out.

[0101] Specifically, a pre-trained big model can be used to detect whether the target result solves the problem; specifically, the target result and the problem are input into the big model, and the big model can detect whether the target result solves the problem.

[0102] In the above steps (A)-(B) of semantic verification, you can choose to verify one or both. The more verification methods you choose, the more accurate and higher quality the training data you will get.

[0103] The method for generating training data for plug-in orchestration tasks of this embodiment, by adopting the above technical solution, can not only accurately and effectively generate training data for plug-in orchestration tasks, but also provide effective data support for the training of plug-in orchestration task models. Furthermore, it can also accurately and effectively verify the generated training data for plug-in orchestration tasks, filter out unreasonable training data, further effectively improve the quality of the retained training data, and thus be able to train a more accurate plug-in orchestration task model.

[0104] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure; Figure 3 As shown, this embodiment provides a training method for a plug-in orchestration model, which may specifically include the following steps:

[0105] S301, obtaining training data;

[0106] The training data in this embodiment refers to the above Figure 1 or Figure 2 The training data of the plug-in orchestration task generated by the illustrated embodiment is described in detail with reference to the description of the above embodiment, which will not be repeated here.

[0107] S302: Train the plug-in orchestration model based on the training data.

[0108] The training data obtained above includes the problem and the plug-in orchestration track used to solve the problem. Using such training data to train the plug-in orchestration model can enable the plug-in orchestration model to learn the ability to generate plug-in orchestration tracks based on the problem.

[0109] The plug-in orchestration model training method of this embodiment, by adopting the above method, can efficiently and accurately train the plug-in orchestration model, so that the plug-in orchestration model learns the plug-in orchestration capability.

[0110] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure; Figure 4 As shown, this embodiment provides a method for training an intelligent agent, which may specifically include the following steps:

[0111] S401, obtaining training data;

[0112] The training data in this embodiment refers to the above Figure 1 or Figure 2The training data of the plug-in orchestration task generated by the illustrated embodiment is described in detail with reference to the description of the above embodiment, which will not be repeated here.

[0113] S402. Based on the training data, the plug-in orchestration agent is trained; the plug-in orchestration agent is obtained based on the plug-in orchestration model integration.

[0114] The implementation principle of the training method of the intelligent agent in this embodiment is similar to the above Figure 3 The implementation principle of the training method of the plug-in orchestration model in the embodiment shown is the same, and the details can also be referred to the above Figure 3 The description of the illustrated embodiment will not be repeated here.

[0115] The training method of the intelligent agent of this embodiment, by adopting the above method, can efficiently and accurately train the intelligent agent so that the intelligent agent can learn the ability of plug-in orchestration.

[0116] Figure 5 is a schematic diagram according to the fifth embodiment of the present disclosure; Figure 5 As shown, this embodiment provides a device 500 for generating training data of a plug-in orchestration task, including:

[0117] The acquisition module 501 is used to acquire a pre-created plug-in library, a plurality of example question-answer pairs, and a target prompt word template; the plug-in library includes a plurality of plug-ins, and the example answers to the example question-answer pairs include a plug-in arrangement process used to solve the example questions;

[0118] A generation module 502 is used to generate training data for multiple plug-in orchestration tasks based on the plug-in library, the multiple example question-answer pairs, and the target prompt word template, using a pre-trained question-answer pair generation module; the training data for each plug-in orchestration task includes: a problem and a plug-in orchestration trajectory used to solve the problem.

[0119] The device 500 for generating training data for the plug-in orchestration task of this embodiment, by adopting the above-mentioned module to implement the implementation principle and technical effect of generating training data for the plug-in orchestration task, is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0120] Figure 6 is a schematic diagram according to the sixth embodiment of the present disclosure; the device 600 for generating training data for plug-in scheduling tasks in this embodiment, in the above Figure 5 Based on the technical solutions of the embodiments shown in the figure, the technical solutions of the present disclosure are further described in more detail. Figure 6 As shown, the training data generating device 500 of the plug-in arrangement task of this embodiment includes the above Figure 5The modules with the same name and function are shown as: an acquisition module 601 and a generation module 602 .

[0121] like Figure 6 As shown, the apparatus 600 for generating training data for plug-in orchestration tasks in this embodiment further includes:

[0122] The verification module 603 is used to verify the training data of the plurality of plug-in orchestration tasks.

[0123] Further optionally, if Figure 6 As shown, in one embodiment of the present disclosure, the verification module 603 includes at least one of the following units:

[0124] A trajectory verification unit 6031 is used to perform trajectory verification on the training data of the plurality of plug-in orchestration tasks;

[0125] An execution verification unit 6032 is used to execute and verify the training data of the plurality of plug-in orchestration tasks;

[0126] The semantic verification unit 6033 is used to perform semantic verification on the training data of the plurality of plug-in orchestration tasks.

[0127] Further optionally, in one embodiment of the present disclosure, the trajectory verification unit 6031 is used to:

[0128] For each piece of the training data, detecting whether the format of the plug-in arrangement track is consistent with the output format defined by the target prompt word template;

[0129] In response to the format of the plug-in arrangement trajectory being inconsistent with the output format defined by the target prompt word template, the corresponding training data is filtered.

[0130] Further optionally, in one embodiment of the present disclosure, the trajectory verification unit 6031 is used to:

[0131] For each piece of the training data, detecting whether the plug-in in the plug-in arrangement track is in the sample plug-in provided by the target prompt word template;

[0132] In response to the plug-in in the plug-in arrangement track not being in the sample plug-in provided by the target prompt word template, filtering the corresponding training data.

[0133] Further optionally, in an embodiment of the present disclosure, the track verification unit 6031 is used to: for each piece of the training data, detect whether the plug-in call parameter in the plug-in arrangement track is legal;

[0134] In response to the plug-in call parameters in the plug-in orchestration trace being illegal, filtering the corresponding training data.

[0135] Further optionally, in one embodiment of the present disclosure, the verification unit 6032 is executed to:

[0136] For each piece of the training data, detecting whether the plug-in in the step of arranging the plug-in track can be called;

[0137] In response to the plug-in in the step of arranging the track by the plug-in being unable to be called, filtering the corresponding training data.

[0138] Further optionally, in one embodiment of the present disclosure, the verification unit 6032 is executed to:

[0139] For each piece of the training data, obtaining a status code returned by the plug-in after being called in the step of plug-in orchestration track;

[0140] Based on the status code, detecting whether the plug-in is called successfully;

[0141] In response to the plug-in call failure, filtering the corresponding training data.

[0142] Further optionally, in one embodiment of the present disclosure, the semantic verification unit 6033 is used to:

[0143] For each piece of the training data, detecting whether a plug-in in the plug-in arrangement track is related to the problem;

[0144] In response to a plug-in in the plug-in orchestration trace being irrelevant to the problem, filtering the corresponding training data.

[0145] Further optionally, in one embodiment of the present disclosure, the semantic verification unit 6033 is used to:

[0146] For each piece of the training data, detecting whether the target result obtained after calling the plug-in of all steps in the plug-in orchestration trajectory can solve the problem;

[0147] In response to the target result being unable to solve the problem, filtering the corresponding training data.

[0148] The device 600 for generating training data for the plug-in orchestration task of this embodiment, by adopting the above-mentioned module to implement the implementation principle and technical effect of generating training data for the plug-in orchestration task, is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0149] Figure 7 is a schematic diagram according to the seventh embodiment of the present disclosure; Figure 7 As shown, this embodiment provides a training device 700 for a plug-in orchestration model, including:

[0150] Acquisition module 701, used to obtain the above Figure 5 or Figure 6 The training data generated by the training data generating device of the plug-in arrangement task;

[0151] The training module 702 is used to train the plug-in orchestration model based on the training data.

[0152] The training device 700 of the plug-in orchestration model of this embodiment, by adopting the above-mentioned modules to implement the implementation principle and technical effect of the training of the plug-in orchestration model, is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0153] Figure 8 is a schematic diagram according to an eighth embodiment of the present disclosure; Figure 8 As shown, this embodiment provides an agent training device 800, comprising:

[0154] Acquisition module 801, used to obtain the above Figure 5 or Figure 6 The training data generated by the training data generating device of the plug-in arrangement task;

[0155] The training module 802 is used to train the plug-in orchestration agent based on the training data; the plug-in orchestration agent is obtained based on the plug-in orchestration model integration.

[0156] The training device 800 of the intelligent body of this embodiment realizes the implementation principle and technical effect of the training of the plug-in orchestration model by adopting the above-mentioned modules, which is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0157] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0158] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0159] Fig. 9A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0160] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0161] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0162] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the above-mentioned methods of the present disclosure. For example, in some embodiments, the above-mentioned methods of the present disclosure may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the above-mentioned methods of the present disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the above-mentioned methods of the present disclosure in any other appropriate manner (e.g., by means of firmware).

[0163] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0164] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0165] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an 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.

[0166] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0167] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0168] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0169] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0170] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating training data for a plug-in orchestration task, comprising: Get a library of pre-built plugins, multiple sample question-answer pairs, and target prompt word templates; The plug-in library includes a plurality of plug-ins, and the example answers to the example question-answer pairs include a plug-in orchestration process used to solve the example questions; Based on the plug-in library, the multiple example question-answer pairs, and the target prompt word template, a pre-trained question-answer pair generation module is used to generate training data for multiple plug-in arrangement tasks; The training data of each plug-in orchestration task includes: a problem and a plug-in orchestration trajectory used to solve the problem.

2. The method according to claim 1, wherein: After generating training data for multiple plug-in arrangement tasks based on the plug-in library, the multiple example question-answer pairs, and the target prompt word template using a pre-trained question-answer pair generation module, the method further includes: The training data of the plurality of plug-in orchestration tasks are verified.

3. The method according to claim 2, wherein: The verifying of the training data of the plurality of plug-in orchestration tasks includes at least one of the following: Performing trajectory verification on the training data of the plurality of plug-in orchestration tasks; Performing execution verification on the training data of the plurality of plug-in orchestration tasks; Semantic verification is performed on the training data of the multiple plug-in orchestration tasks.

4. The method according to claim 3, wherein: The performing trajectory verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that the format of the plug-in arrangement track is inconsistent with the output format defined by the target prompt word template, the corresponding training data is filtered.

5. The method according to claim 3, wherein: The performing trajectory verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that the plug-in in the plug-in arrangement track is not in the sample plug-in provided by the target prompt word template, the corresponding training data is filtered.

6. The method according to claim 3, wherein: The performing trajectory verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that the plug-in call parameter in the plug-in orchestration trace is illegal, filtering the corresponding training data.

7. The method according to claim 3, wherein: The performing execution verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that the plug-in in the step of arranging the plug-in track cannot be called, filtering the corresponding training data.

8. The method according to claim 3, wherein: The performing execution verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, obtaining a status code returned by the plug-in after being called in the step of plug-in orchestration track; In response to determining, based on the status code, that the plug-in fails to be called, filtering the corresponding training data.

9. The method according to claim 3, wherein: The performing semantic verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that a plug-in in the plug-in orchestration trace is not relevant to the problem, the corresponding training data is filtered.

10. The method according to claim 3, wherein: The performing semantic verification on the training data of the plurality of plug-in orchestration tasks includes: For each piece of the training data, in response to determining that the target result cannot solve the problem, the corresponding training data is filtered.

11. A training method for a plug-in orchestration model, comprising: Obtain training data generated by any of the methods described in claims 1 to 10 above; The plug-in orchestration model is trained based on the training data.

12. A method for training an intelligent agent, comprising: Obtain training data generated by any of the methods described in claims 1 to 10 above; Based on the training data, training the plug-in orchestration agent; The plug-in orchestration agent is integrated based on the plug-in orchestration model.

13. A device for generating training data for a plug-in scheduling task, comprising: An acquisition module is used to acquire a pre-created plug-in library, multiple sample question-answer pairs, and a target prompt word template; The plug-in library includes a plurality of plug-ins, and the example answers to the example question-answer pairs include a plug-in orchestration process used to solve the example questions; A generation module, configured to generate training data for a plurality of plug-in arrangement tasks based on the plug-in library, the plurality of example question-answer pairs, and the target prompt word template using a pre-trained question-answer pair generation module; The training data of each plug-in orchestration task includes: a problem and a plug-in orchestration trajectory used to solve the problem.

14. The device according to claim 13, wherein: The device also includes: The verification module is used to verify the training data of the plurality of plug-in orchestration tasks.

15. The method according to claim 14, wherein: The verification module includes at least one of the following: A trajectory verification unit, used to perform trajectory verification on the training data of the plurality of plug-in orchestration tasks; An execution verification unit, configured to execute and verify the training data of the plurality of plug-in orchestration tasks; The semantic verification unit is used to perform semantic verification on the training data of the plurality of plug-in orchestration tasks.

16. The device according to claim 15, wherein: The trajectory verification unit is used to: For each piece of training data, In response to determining that the format of the plug-in arrangement track is inconsistent with the output format defined by the target prompt word template, the corresponding training data is filtered.

17. The device according to claim 15, wherein: The trajectory verification unit is used to: For each piece of the training data, in response to determining that the plug-in in the plug-in arrangement track is not in the sample plug-in provided by the target prompt word template, the corresponding training data is filtered.

18. The device according to claim 15, wherein: The trajectory verification unit is used to: For each piece of the training data, in response to determining that the plug-in call parameter in the plug-in orchestration trace is illegal, filtering the corresponding training data.

19. The device according to claim 15, wherein: The execution verification unit is used to: For each piece of the training data, in response to determining that the plug-in in the step of arranging the plug-in track cannot be called, filtering the corresponding training data.

20. The device according to claim 15, wherein: The execution verification unit is used to: For each piece of the training data, obtaining a status code returned by the plug-in after being called in the step of plug-in orchestration track; In response to determining, based on the status code, that the plug-in fails to be called, filtering the corresponding training data.

21. The device according to claim 15, wherein: The semantic verification unit is used to: For each piece of the training data, in response to determining that a plug-in in the plug-in orchestration trace is not relevant to the problem, the corresponding training data is filtered.

22. The device according to claim 15, wherein: The semantic verification unit is used to: For each piece of training data, In response to determining that the target result cannot solve the problem, the corresponding training data is filtered.

23. A training device for a plug-in orchestration model, comprising: An acquisition module, used to acquire training data generated by the device as described in any one of claims 13 to 22 above; The training module is used to train the plug-in orchestration model based on the training data.

24. A training device for an intelligent agent, comprising: An acquisition module, used to acquire training data generated by the device as described in any one of claims 13 to 22 above; A training module, used for training the plug-in orchestration agent based on the training data; The plug-in orchestration agent is integrated based on the plug-in orchestration model.

25. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.

26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.

27. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 12.