Task description optimization method and device, equipment, storage medium and product
By extracting task and agent features in a multi-agent system, dynamically matching optimization strategies, and generating target task descriptions, the problem of insufficient adaptability of task descriptions in existing technologies is solved, and more efficient task execution and consistency optimization effects are achieved.
Patent Information
- Application Number
- CN202510934228.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing technologies have difficulty adapting to the differences in descriptions of different types of tasks in multi-agent systems, resulting in uneven optimization effects and a lack of adaptability and stability.
By obtaining the initial task description and agent combination of the task to be executed, extracting task features and agent features, dynamically matching the task description optimization strategy, and generating the target task description, including selecting a suitable large language model, hyperparameters and model prompt words, multiple optimizations and quality assessments are performed to ensure the adaptability of the strategy to the task and agent.
The adaptability and stability of task description optimization are improved, the generated target task description is more in line with actual needs, and the task execution efficiency and consistency of the multi-agent system are improved.
Smart Images

Figure CN120764579A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task description optimization method and device, equipment, a storage medium and a product. BACKGROUND
[0002] In a multi-agent system, task description optimization is the key to efficient collaboration. The core is to convert a wide range of initial task descriptions into specific and operational versions as the basis for agent collaboration.
[0003] The prior art usually optimizes all types of initial task descriptions according to pre-configured optimization strategies, such as fixed models and prompt words. However, the types of tasks executed by a multi-agent system are diverse, and the initial task descriptions differ significantly. This approach is difficult to adapt to different task requirements and is prone to uneven optimization results. Therefore, there is an urgent need to provide a more adaptive task description optimization method to ensure the optimization effect of different types of task descriptions.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a task description optimization method, device, equipment, storage medium and product, which can improve the adaptability and stability of task description optimization and ensure the optimization effect of different types of task descriptions.
[0006] To achieve the above purpose, the present application provides a task description optimization method, which comprises: obtaining an initial task description of a to-be-executed task and an agent combination for responding to the to-be-executed task; extracting task features from the initial task description and querying agent features corresponding to the agent combination; obtaining a task description optimization strategy matched with the task features and the agent; optimizing the initial task description according to the task description optimization strategy to obtain a target task description, the target task description being used to guide the agent combination to respond to the to-be-executed task.
[0007] Optionally, the obtaining of the task description optimization strategy matched with the task features and the agent comprises: obtaining a plurality of target optimization elements matched with the task features and the agent features; generating the task description optimization strategy based on the obtained plurality of target optimization elements.
[0008] Optionally, the task features include task complexity. The obtaining a plurality of target optimization elements matching the task characteristics and the agent characteristics comprises: Selecting, from a plurality of alternative large language models, an alternative large language model with a parameter scale matching the task complexity as a target large language model for optimizing the initial task description.
[0009] Optionally, the task characteristics comprise task novelty. The obtaining a plurality of target optimization elements matching the task characteristics and the agent characteristics comprises: Setting a hyperparameter of a target large language model based on the task novelty, the task novelty being in a positive correlation with a numerical value of the hyperparameter, the target large language model being a large language model for optimizing the initial task description.
[0010] Optionally, the obtaining a plurality of target optimization elements matching the task characteristics and the agent characteristics comprises: Generating a target model prompt based on the task characteristics and the agent characteristics, the target model prompt being used to instruct a target large language model to optimize the initial task description based on the task characteristics and the agent characteristics, the target large language model being a large language model for optimizing the initial task description.
[0011] Optionally, the generating a target model prompt based on the task characteristics and the agent characteristics comprises: Retrieving a reference case from a case knowledge base based on the task characteristics, the reference case comprising a sample initial task description and a sample target task description corresponding to the sample initial task description. Adding the task characteristics, the agent characteristics and the reference case in a reference model prompt to obtain the target model prompt.
[0012] Optionally, the generating a target model prompt based on the task characteristics and the agent characteristics comprises: Adding the task characteristics and the agent characteristics in a reference model prompt and adjusting optimization requirements in the reference model prompt based on the task characteristics and the agent characteristics to obtain the target model prompt.
[0013] Optionally, the optimizing the initial task description according to the task description optimization strategy to obtain a target task description comprises: Optimizing the initial task description according to the task description optimization strategy for multiple times to obtain a plurality of alternative task descriptions. For any alternative task description, quality evaluation is performed on the alternative task description from multiple evaluation dimensions to obtain a quality evaluation result; Based on the quality evaluation results of the multiple alternative task descriptions, the target task description is selected from the multiple alternative task descriptions.
[0014] Optionally, the quality evaluation result includes a quality score of the alternative task description in the multiple evaluation dimensions; The target task description is selected from the multiple alternative task descriptions based on the quality evaluation results of the multiple alternative task descriptions, comprising: The quality scores of the multiple evaluation dimensions of each alternative task description are weighted and summed to obtain a comprehensive quality score; The alternative task descriptions whose single-dimension quality score is lower than a set threshold and / or whose comprehensive quality score is lower than a set threshold are filtered out from the multiple alternative task descriptions; The target task description is selected from the multiple alternative task descriptions remaining after filtering.
[0015] Optionally, the target task description is selected from the multiple alternative task descriptions remaining after filtering, comprising: The alternative task description with the highest comprehensive quality score is selected as the target task description from the multiple alternative task descriptions remaining after filtering; or, The target task description is determined based on the received task description selection operation, and the target task description is selected from the multiple alternative task descriptions remaining after filtering.
[0016] Optionally, the quality evaluation result includes a quality score of the alternative task description and an existing content defect; The target task description is selected from the multiple alternative task descriptions based on the quality evaluation results of the multiple alternative task descriptions, comprising: Based on the content defects of the multiple alternative task descriptions, a new alternative task description is obtained by iterative optimization until a termination condition is met, and the alternative task description with the highest quality score is selected from all alternative task descriptions as the target task description; Wherein, the single iteration optimization process is: based on the defect content of the currently generated alternative task description, the model prompt word is adjusted, the initial task description is re-optimized based on the adjusted model prompt word through the target large language model, and a new alternative task description is obtained.
[0017] Optionally, the multiple evaluation dimensions of the alternative task description include at least two evaluation dimensions: Specificity: evaluating the sufficiency of details contained in the alternative task description; operability: evaluating the performance of the alternative task description in decomposing the task into executable steps; innovation: evaluating the value of the new elements contained in the alternative task description relative to the initial task description: logical consistency: evaluating the coherence of the logic of the alternative task description, and the degree of fit with the initial task description, the agent combination; feasibility: evaluating the degree of implementation of the execution steps in the alternative task description under the condition of the agent combination; completeness: evaluating the coverage of the core points of the initial task description by the alternative task description; conciseness: evaluating the degree of expression of the alternative task description.
[0018] In addition, in order to achieve the above-mentioned purpose, the application also provides a task description optimization device, the device comprises: a description acquisition module for acquiring an initial task description of a task to be executed and an agent combination for responding to the task to be executed; a feature extraction module for extracting task features from the initial task description and querying corresponding agent features of the agent combination; a strategy acquisition module for acquiring a task description optimization strategy matched with the task features and the agent; a description optimization module for optimizing the initial task description according to the task description optimization strategy to obtain a target task description, the target task description being used to guide the agent combination to respond to the task to be executed.
[0019] Optionally, the strategy acquisition module comprises: an element acquisition unit for acquiring a plurality of target optimization elements matched with the task features and the agent features; a strategy generation unit for generating the task description optimization strategy based on the plurality of acquired target optimization elements.
[0020] Optionally, the task features include task complexity; The element acquisition unit is configured to select, from a plurality of alternative large language models, an alternative large language model whose parameter scale matches the task complexity as a target large language model for optimizing the initial task description.
[0021] Optionally, the task features include task novelty; The element acquisition unit is configured to set a hyperparameter of a target large language model based on the task novelty, the task novelty and the value of the hyperparameter being in a positive correlation relationship, and the target large language model being a large language model for optimizing the initial task description.
[0022] Optionally, the element obtaining unit is configured to generate a target model prompt word based on the task feature and the agent feature, the target model prompt word being used to instruct a target large language model to optimize the initial task description based on the task feature and the agent feature, the target large language model being a large language model used to optimize the initial task description.
[0023] Optionally, the element obtaining unit is configured to retrieve a reference case from a case knowledge base based on the task feature, the reference case including a sample initial task description and a sample target task description corresponding to the sample initial task description; and add the task feature, the agent feature and the reference case in a reference model prompt word to obtain the target model prompt word.
[0024] Optionally, the element obtaining unit is configured to add the task feature and the agent feature in a reference model prompt word, and adjust an optimization requirement in the reference model prompt word based on the task feature and the agent feature to obtain the target model prompt word.
[0025] Optionally, the description optimization module includes: a description optimization unit configured to optimize the initial task description multiple times according to the task description optimization strategy to obtain multiple candidate task descriptions; a quality evaluation unit configured to perform quality evaluation on each candidate task description from multiple evaluation dimensions to obtain a quality evaluation result; a description selection unit configured to select the target task description from the multiple candidate task descriptions based on the quality evaluation results of the multiple candidate task descriptions.
[0026] Optionally, the quality evaluation result includes a quality score of the candidate task description in the multiple evaluation dimensions. The description selection unit is configured to perform weighted summation on the quality scores of the multiple evaluation dimensions of each candidate task description to obtain a comprehensive quality score; filter out the candidate task description whose single-dimension quality score is lower than a set threshold value and / or whose comprehensive quality score is lower than a set threshold value from the multiple candidate task descriptions; and select the target task description from the multiple candidate task descriptions remaining after the filtering.
[0027] Optionally, the description selection unit is configured to select, from the plurality of candidate task descriptions remaining after the filtering, a candidate task description with the highest comprehensive quality score as the target task description; or display a preset number of candidate task descriptions with the highest comprehensive quality scores from the plurality of candidate task descriptions remaining after the filtering, and determine the target task description based on a received task description selection operation.
[0028] Optionally, the quality evaluation result includes a quality score and a content defect of the candidate task description. The description selection unit is configured to obtain a new candidate task description in an iterative optimization manner based on a content defect of the plurality of candidate task descriptions until a termination condition is met, and select a candidate task description with the highest quality score from all candidate task descriptions as the target task description; wherein a single iteration optimization process is as follows: adjusting a model prompt word based on a defect content of a currently generated candidate task description, re-optimizing the initial task description based on the adjusted model prompt word by a target large language model, and obtaining a new candidate task description.
[0029] Optionally, the plurality of evaluation dimensions of the candidate task description include at least two evaluation dimensions as follows: Specificity: evaluating the sufficiency of details contained in the candidate task description; Operability: evaluating the performance of the candidate task description in decomposing the task into executable steps; Innovation: evaluating the value of new elements contained in the candidate task description relative to the initial task description; Logical consistency: evaluating the coherence of the logic of the candidate task description, and the degree of fit with the initial task description and the agent combination; Feasibility: evaluating the degree of realizability of the execution steps in the candidate task description under the condition of the agent combination; Completeness: evaluating the coverage degree of the candidate task description on the core points of the initial task description; Brevity: evaluating the degree of expression simplification of the candidate task description.
[0030] In addition, to achieve the above-mentioned purposes, the present application further provides a task description optimization device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the task description optimization method as described above.
[0031] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the task description optimization method.
[0032] In addition, to achieve the above object, the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the task description optimization method.
[0033] The one or more technical solutions provided by the present application have at least the following technical effects: The task description optimization scheme provided by the present application, after obtaining the initial task description of the task to be executed and the agent combination for responding to the task, extracts the task features from the initial task description, queries the agent features corresponding to the agent combination, and dynamically obtains the task description optimization strategy matched with the task features and the agent. The strategy can be dynamically adjusted according to the changes of the initial task description and the agent combination, so as to ensure the adaptability of the obtained task description optimization strategy to the initial task description. Therefore, according to the task description optimization strategy, the initial task description can be optimized to generate a target task description that is more suitable for actual requirements. The feature-driven optimization strategy selection mechanism proposed in the present application has high flexibility and adaptability, and can improve the stability and consistency of the task description optimization process of different types, so as to ensure that various task descriptions can achieve good optimization effect after optimization. BRIEF DESCRIPTION OF DRAWINGS
[0034] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0036] Figure 1 A schematic diagram of a multi-agent system is provided for the embodiments of the present application. Figure 2 A flowchart is provided for the first embodiment of the task description optimization method of the present application. Figure 3 A flowchart is provided for the second embodiment of the task description optimization method of the present application. Figure 4A flowchart provided by the third embodiment of the task description optimization method of the present application; Figure 5 A schematic diagram of a task description optimization process provided by the embodiment of the present application; Figure 6 A schematic diagram of a quality evaluation process of a task description provided by the embodiment of the present application; Figure 7 A schematic diagram of the module structure of the task description optimization device of the embodiment of the present application; Figure 8 A schematic diagram of the device structure of the hardware running environment involved in the task description optimization method of the embodiment of the present application.
[0037] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0039] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings and specific embodiments of the specification.
[0040] Figure 1 is a schematic diagram of a multi-agent system provided by the embodiment of the present application. Referring to Figure 1 , the implementation environment includes a task description optimization device 101 and a multi-agent collaboration device 102. The task description optimization device 101 and the multi-agent collaboration device 102 are connected through a wireless or wired network. Among them, the task description optimization device 101 is responsible for receiving a relatively broad initial task description provided by a user or automatically generated by a system. And call a large language model (Large Language Model, LLM) to optimize the initial task description by using the ability of the large language model, to obtain a more specific and more operational target task description. The multi-agent collaboration device 102 includes multiple agents, and the functions of these agents are different, which can cooperate to execute tasks according to the target task description.
[0041] Exemplarily, the task description optimization device 101 is configured to receive an initial task description of a task to be executed and an agent combination for responding to the task to be executed, extract task features from the initial task description, and query corresponding agent features of the agent combination. A task description optimization strategy matched with the task features and the agent is acquired, and the initial task description is optimized according to the task description optimization strategy to obtain a target task description. Then, the target task description is sent to the multi-agent cooperation device 102. The multi-agent cooperation device 102 is configured to receive the target task description, and guide the corresponding agent combination in the multi-agent cooperation device 102 to respond to the task to be executed based on the target task description.
[0042] The task description optimization scheme provided in the application can be widely applied to a multi-agent cooperation scene. For example, in an intelligent customer service dialogue system, a customer service system includes a semantic understanding robot, a knowledge base retrieval robot, a work order generation robot, and other multi-agent combinations, which can process complex user inquiries such as “after changing the mobile phone number, the account cannot be logged in”. Assuming that the initial task description is “to solve the account login exception”, the task description optimization device 101 extracts task features such as task target, task field, and task complexity, and queries agent features such as core ability, typical behavior pattern, and knowledge field of each agent in the agent combination. Based on these features, the initial task description is refined into multiple specific steps, for example, “robot A guides the user to submit identity information, robot B retrieves the mobile phone number change log, and robot C resets the login password and sends a verification SMS”. Thus, the multi-agent can complete the task according to the process and improve the problem solving efficiency. Of course, the scheme can also be applied to scenes in which multi-agents cooperate to complete complex product assembly and scenes in which multi-agents cooperate to conduct medical diagnosis, and the embodiments of the application do not limit this.
[0043] Figure 2 A flowchart of a first embodiment of the task description optimization method of the application is shown in FIG. 1. Referring to FIG. 1, Figure 2 The execution subject is a task description optimization device, and the task description optimization method includes the following steps S10-S40: Step S10, acquiring an initial task description of a task to be executed and an agent combination for responding to the task to be executed.
[0044] The task to be executed refers to a specific work target that needs to be cooperatively completed by a multi-agent system, such as completing order sorting, diagnosing patient images, etc.
[0045] The initial task description is a user or system inputted, unoptimized, and original expression of a task, which is the object of task description optimization. The expression is relatively abstract and lacks execution details, and cannot directly guide multi-agent cooperation.
[0046] An agent ensemble is a collection of multiple agents assembled to perform a specific task, each with unique capabilities. An agent is an entity that can autonomously perceive its state, make decisions, and execute actions to achieve its goals within a specific environment. Agents can be physical robots, drones, or software programs or systems. They possess a certain degree of autonomy, responsiveness, communication, and learning capabilities.
[0047] Step S20: extract task features from the initial task description and query the agent features corresponding to the agent combination.
[0048] Task features are key information extracted from the initial task description, used to characterize the specific requirements and nature of the task. For example, task features can include task objectives, task domain, task complexity, task novelty, and core concepts involved in the task.
[0049] For example, a large language model can be used to extract task features from the initial task description. For example, the large language model can be used to perform named entity recognition, topic extraction, and other analytical operations on the initial task description to determine the core concepts, task domain, and task objectives involved in the initial task description. The large language model can also be used to assess the task complexity and task novelty based on the initial task description. Task complexity can be categorized as high, medium, and low. Task novelty can also be categorized as high, medium, and low.
[0050] Agent characteristics are key information that describes an agent’s capabilities, limitations, behavioral preferences, and interaction methods. They can characterize an agent’s suitability for tasks. For example, agent characteristics can include the core capabilities, typical behavioral patterns, and knowledge domains of each agent in the agent portfolio.
[0051] For example, the agent characteristics of each agent in the agent combination can be queried from the agent capability profile knowledge base. Alternatively, detailed information of each agent in the agent combination can be queried and the queried information can be analyzed using a large language model to obtain the agent characteristics of each agent in the agent combination.
[0052] Step S30: Obtain a task description optimization strategy that matches the task characteristics and the agent.
[0053] A task description optimization strategy is a processing system composed of multiple optimization elements. It can include the processing tools used to optimize the initial task description, the processing tool parameter configuration, optimization guidance rules, and historical optimization cases required for reference. It can be understood that the task description optimization strategy determines which processing tools to use, what parameter configuration to apply, and which optimization guidance rules and historical optimization cases to guide the optimization of the initial task description.
[0054] Step S40, according to the task description optimization strategy, the initial task description is optimized to obtain the target task description, and the target task description is used to guide the agent combination to respond to the to-be-executed task.
[0055] For example, the multiple optimization elements in the task description optimization strategy are organized into an optimization process in a preset manner, and the initial task description can be optimized based on the optimization process. For example, the task description optimization strategy includes a processing tool for optimizing the initial task description, parameter configuration of the processing tool, optimization guide rules, and required historical optimization cases. Correspondingly, the optimization process is: configuring the parameters of the processing tool according to the requirements, and then using the processing tool to optimize the initial task description under the guidance of the optimization guide rules and the historical optimization cases.
[0056] The target task description is a task description after optimization, which has higher specificity, operability and agent adaptability. For example, the initial task description "deliver goods to the customer" can be optimized to "pick up goods from point A within 1 hour, check for no errors, and then send to customer B along the planned route, and take a photo and upload to the cloud after delivery". The target task description is the final task instruction issued to the agent combination, guiding it to efficiently and accurately execute the task.
[0057] The task description optimization scheme provided in the present application obtains the initial task description of the to-be-executed task and the agent combination for responding to the task, extracts the task features from the initial task description, queries the corresponding agent features of the agent combination, and dynamically obtains the task description optimization strategy matched with the task features and the agent. The strategy can be dynamically adjusted according to the changes of the initial task description and the agent combination, ensuring the adaptability of the obtained task description optimization strategy to the initial task description. Therefore, the initial task description is optimized according to the task description optimization strategy, and a target task description more suitable for actual needs can be generated. The feature-driven optimization strategy selection mechanism proposed in the present application has high flexibility and adaptability, which can improve the stability and consistency of the optimization process of different types of task descriptions, and ensures that all types of task descriptions can achieve good optimization effect after optimization.
[0058] Based on the above first embodiment, the second embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above introduction, and will not be described in detail hereinafter. Referring to Figure 3 In the second embodiment, the step S30 includes steps S301-S302: Step S301, obtaining multiple target optimization elements matched with the task features and the agent features.
[0059] The target optimization element is a specific optimization component and parameter that can be used to construct the task description optimization strategy and is screened out by feature matching. For example, the target optimization element contained in the task description optimization strategy includes: a target large language model, i.e., a processing tool for optimizing the initial task description, a hyperparameter of the target large language model, a target model prompt word, and a reference case.
[0060] Optionally, the task feature includes task complexity, which is used to measure the complexity of the task in terms of semantic expression, logical structure, execution steps, etc. Correspondingly, obtaining the plurality of target optimization elements matched with the task feature and the agent feature includes: selecting, from the plurality of candidate large language models, a candidate large language model with a parameter scale matched with the task complexity as the target large language model for optimizing the initial task description.
[0061] The parameter scale refers to the number of trainable parameters inside the large language model, which is an important indicator for measuring the model capacity and computing ability. The larger the parameter scale is, the stronger the understanding and generation ability of the model is, and the more resource consumption and the lower the processing efficiency are. The larger the parameter scale of the large language model is, the higher the matched task complexity is.
[0062] The plurality of candidate large language models is a set of large language models that can be used for task description optimization and are pre-configured. Different candidate large language models have different parameter scales and are suitable for different task complexities. For example, for an initial task description with a task complexity of "low", a candidate large language model with a parameter scale of less than 10B (Billion) is selected; for an initial task description with a task complexity of "medium", a candidate large language model with a parameter scale of 10~72B is selected; and for an initial task description with a task complexity of "high", a candidate large language model with a parameter scale of more than 72B and with reasoning, coding, and tool calling capabilities is selected. The target large language model is a model that is most suitable for performing the current task description optimization work and is selected from the plurality of candidate large language models based on the task complexity.
[0063] The embodiments of the present application can select a candidate large language model with a parameter scale matched with the task complexity as the target large language model for optimizing the initial task description, which can avoid using a large-scale model for a simple task and save computing resources. It can also ensure that a high-complexity task is processed by a model with sufficient parameter scale, thereby improving the optimization quality. Therefore, the optimization efficiency and optimization quality of the initial task description are improved as a whole.
[0064] Optionally, the task feature includes a task novelty, which indicates a uniqueness or an innovation degree of a current task to be performed relative to historical tasks, and is used to measure whether the task belongs to a new type or a new scenario beyond existing experience. Correspondingly, the obtaining the plurality of target optimization elements matched with the task feature and the agent feature includes: setting a hyperparameter of a target large language model based on the task novelty, the task novelty and the value of the hyperparameter being in a positive correlation, and the target large language model being a large language model used for optimizing the initial task description.
[0065] The hyperparameter is a parameter artificially set by a user to control the behavior of a model, and is not automatically learned through a training process. The hyperparameter determines the structure, learning process, or reasoning style of the model. For example, the hyperparameter can include a temperature, which is used to control the randomness of the model output. The larger the temperature value, the more diverse the model output; the smaller the temperature value, the more conservative the model output. For example, the hyperparameter can also include a top-k sampling, which is used to limit the number of candidate words. The larger the top-k sampling value, the more diverse and creative the model output; the smaller the top-k sampling value, the more conservative and deterministic the model output.
[0066] In the embodiments of the present application, the hyperparameter of the target large language model is set based on the task novelty, and the task novelty and the value of the hyperparameter are in a positive correlation. Therefore, the higher the task novelty, the larger the value of the hyperparameter, and the more creative the output of the model. This enables the large language model to provide more exploratory and flexible expression methods when facing new tasks, thereby improving the optimization effect of the task description of the new task and enhancing the adaptability of the model to the new task scenario.
[0067] Optionally, the obtaining the plurality of target optimization elements matched with the task feature and the agent feature includes: generating a target model prompt word based on the task feature and the agent feature, the target model prompt word being used to instruct the target large language model to optimize the initial task description based on the task feature and the agent feature, and the target large language model being a large language model used for optimizing the initial task description.
[0068] Exemplarily, the reference model prompt word is obtained, the task feature and the agent feature are added in the reference model prompt word, and a target model prompt word is obtained. The reference model prompt word is a preset prompt word template, which can include instructions for guiding the target large language model to optimize the task description, optimization requirements, and the like. Exemplarily, the target model prompt word has the following effects: first, guiding the optimization direction: according to the task target, the task field and the like, guiding the model to optimize the initial task description to a more specific and more operable direction. For example, requiring the model to clearly specify the key steps, expected results, measurement indicators and the like. Second, injecting agent capability constraints: making the model fully consider the capability range and collaboration mode of the agent combination, and ensuring that the steps in the optimized task description are executable by the agent combination. Third, encouraging or limiting model innovation: by the innovation requirement in the prompt word, the innovation degree of the generated content of the model is controlled, so as to determine the innovation degree of the target task description optimized by the model.
[0069] Exemplarily, the target model prompt word is: "You are a task refinement expert. Now there is an initial task description: {initial task description specific content}, and the executors are {agent A} and {agent B}. Based on the typical capabilities of the two agents: {agent A feature} and {agent B feature}, as well as the task feature {task feature specific content}, please specify the initial task description into a more detailed and more operable task description. Consider the actual application scenario of the task, add necessary details, and make it more innovative and challenging. Ensure that the final task description is clear, explicit, and can guide the subsequent execution of the task by the agent. Please limit the refined task description to {N} words, and be creative and imaginative". The specific content of the target model prompt word can be adjusted according to the business scenario and requirements, and the embodiments of the present application do not limit this.
[0070] In the embodiments of the present application, by dynamically generating the target model prompt word based on the task feature and the agent feature, the model can enhance the understanding of the task and the agent combination through the prompt word. Thus, it is ensured that the optimized task description is more suitable for the actual needs of the task and more consistent with the understanding and execution capabilities of the agent, effectively improving the quality and usability of the optimized task description.
[0071] Optionally, in addition to the task feature and the agent feature, a reference case can also be added in the prompt word, thereby providing the model with optimization ideas. Correspondingly, the target model prompt word is generated based on the task feature and the agent feature, including: based on the task feature, retrieving a reference case from a case knowledge base, the reference case including a sample initial task description and a sample target task description corresponding to the sample initial task description; adding the task feature, the agent feature and the reference case in the reference model prompt word to obtain the target model prompt word.
[0072] The reference case is a historical optimization case related to the current task type retrieved based on the task feature. The case knowledge base is used to store historical optimization cases, each of which is composed of an initial task description and an optimized target task description. Exemplarily, the historical optimization cases include success cases and / or failure cases. The success case refers to a case in which the quality of the target task description meets the requirements. The failure case refers to a case in which the quality of the target task description does not meet the requirements. Both the success case and the failure case can provide optimization ideas for the model. Specifically, the success case can guide the model to imitate its optimization strategy to output a high-quality task description. The failure case can guide the model to avoid using similar optimization strategies to avoid the generation of low-quality content. The reference case can also be referred to as (Few-Shot, few-shot).
[0073] In the embodiments of the present application, the reference case is retrieved based on the task feature, and the task feature and the agent feature are added to the reference model prompt word together to obtain the target model prompt word. This enables the model to understand the nature of the task while making full use of the optimization experience in the historical data to generate a task description that meets the requirements of the current task and is suitable for the execution ability of the agent.
[0074] Optionally, the target model prompt word is generated based on the task feature and the agent feature, including: adding the task feature and the agent feature in the reference model prompt word, and adjusting the optimization requirements in the reference model prompt word based on the task feature and the agent feature to obtain the target model prompt word.
[0075] For example, the task feature includes task complexity, and the optimization requirement in the reference model prompt word includes the degree of creativity of the generated content. Correspondingly, based on the task feature and the agent feature, the optimization requirement in the reference model prompt word is adjusted, including: adjusting the required degree of creativity in the reference model prompt word according to the task complexity, and the task complexity and the degree of creativity have a positive correlation, that is, the higher the task complexity, the higher the required degree of creativity. In this way, for complex tasks, the creativity of the model can be fully utilized to generate diversified and more creative task descriptions, ensuring the task optimization effect.
[0076] For example, the task feature includes task novelty, and the optimization requirement in the reference model prompt word includes the degree of refinement of the generated content. Accordingly, based on the task feature and the agent feature, the optimization requirement in the reference model prompt word is adjusted, including: adjusting the degree of refinement required in the reference model prompt word according to the task novelty, and the task novelty and the degree of refinement are in a positive correlation relationship, that is, the higher the task novelty, the higher the degree of refinement required. In this way, for a novel task lacking historical experience, by increasing the degree of refinement requirement, the optimized task description can be more complete and specific, which facilitates the understanding and execution of the agent, thereby enhancing the adaptability to new scenarios and new tasks.
[0077] In the embodiments of the present application, the task feature and the agent feature are added in the reference model prompt word, and based on the task feature and the agent feature, the optimization requirement in the reference model prompt word is adjusted to obtain the target model prompt word. This personalized customization scheme of the prompt word supports flexible adjustment of the prompt strategy according to different task scenarios and different agent combinations, so that the optimized task description is more targeted and practical.
[0078] Step S302, based on the obtained multiple target optimization elements, a task description optimization strategy is generated.
[0079] The embodiments of the present application obtain multiple target optimization elements matched with the task feature and the agent feature, and based on the obtained multiple target optimization elements, a task description optimization strategy is generated, which ensures the adaptability of the task description optimization strategy to the task type and the agent combination. No matter which task type and agent combination is faced, the task description optimized based on the task description optimization strategy can be ensured to be suitable for the understanding and execution ability of the agent, and the optimization effect of different types of task descriptions is ensured.
[0080] Based on the first embodiment of the present application, the third embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above introduction, and will not be repeated hereinafter. Referring to Figure 4 In the third embodiment, step S40 includes steps S401-S403.
[0081] Step S401, according to the task description optimization strategy, the initial task description is optimized multiple times to obtain multiple candidate task descriptions.
[0082] Exemplarily, the task optimization strategy includes multiple optimization elements, such as a target large language model adopted for optimization, a prompt word of the target large language model, and the like. Correspondingly, according to the task description optimization strategy, the initial task description is optimized multiple times to obtain multiple candidate task descriptions, including: limiting the number of candidate task descriptions optimized by the target large language model in the target model prompt word, so as to drive the target large language model to generate multiple candidate task descriptions. Alternatively, the initial task description is optimized multiple times by using the target large language model to obtain multiple candidate task descriptions.
[0083] In step S402, for any candidate task description, quality evaluation is performed on the candidate task description from multiple evaluation dimensions to obtain a quality evaluation result.
[0084] Optionally, the multiple evaluation dimensions of the candidate task description include at least two evaluation dimensions as follows: Specificity: evaluating the sufficiency of details contained in the candidate task description. Operability: evaluating the performance of the candidate task description in decomposing the task into executable steps.
[0085] Innovation: evaluating the value of new elements contained in the candidate task description relative to the initial task description.
[0086] Logical consistency: evaluating the coherence of the logic of the candidate task description, and the degree of fit with the initial task description and the agent combination.
[0087] Feasibility: evaluating the degree of realizability of the execution steps in the candidate task description under the condition of the agent combination.
[0088] Completeness: evaluating the coverage degree of the candidate task description on the core points of the initial task description.
[0089] Brevity: evaluating the degree of expression simplification of the candidate task description.
[0090] Exemplarily, an evaluation prompt word is constructed based on the multiple evaluation dimensions, the evaluation prompt word is input into an evaluation large model, and the evaluation large model is guided to perform quality evaluation on each candidate task description from the multiple evaluation dimensions to obtain a quality evaluation result of each candidate task description. The evaluation large model can be a target large language model or other large language model, that is, the model is used as a quality evaluator.
[0091] The embodiments of the present application comprehensively evaluate the multiple candidate task descriptions generated from the key dimensions of specificity, operability, innovation, logical consistency, feasibility, completeness, and brevity. The quality of the target task description obtained by optimization can be comprehensively guaranteed, the executability and agent adaptability of the target task description are improved, and the ability of the multi-agent system to adapt to complex tasks is enhanced.
[0092] In step S403, the target task description is selected from the plurality of candidate task descriptions based on the quality evaluation results of the plurality of candidate task descriptions.
[0093] Optionally, the quality evaluation result includes a quality score of the candidate task description in a plurality of evaluation dimensions. Accordingly, the target task description is selected from the plurality of candidate task descriptions based on the quality evaluation results of the plurality of candidate task descriptions, including: performing weighted summation on the quality scores of the plurality of evaluation dimensions of each candidate task description to obtain a comprehensive quality score; filtering out the candidate task descriptions whose single-dimension quality score is lower than a set threshold and / or whose comprehensive quality score is lower than a set threshold from the plurality of candidate task descriptions; and selecting the target task description from the plurality of candidate task descriptions remaining after the filtering. This multi-dimension quality score and threshold filtering mechanism can effectively eliminate candidate task descriptions that do not meet the standard in a single dimension, ensuring that only candidate task descriptions that meet the standard in multiple evaluation dimensions can pass the screening, so that the finally selected target task description is more in line with the actual task requirements and the agent execution capability.
[0094] Optionally, the target task description is selected from the plurality of candidate task descriptions remaining after the filtering, including: selecting the candidate task description with the highest comprehensive quality score from the plurality of candidate task descriptions remaining after the filtering as the target task description. In this way, the target task description can perform best in multiple evaluation dimensions, improving the reliability of the optimized target task description. Alternatively, a preset number of candidate task descriptions with the highest comprehensive quality score from the plurality of candidate task descriptions remaining after the filtering are displayed, and the selected target task description is determined based on a received task description selection operation. Or in the case where no task description selection operation is detected, the candidate task description with the highest comprehensive quality score is selected as the target task description by default. In this way, the advantages of manual judgment and system optimization are taken into account, further enhancing the reliability of the target task description.
[0095] Optionally, the quality evaluation result includes a quality score of the candidate task description and a content defect existing in the candidate task description, such as insufficient content or inconsistency with the capability of the agent B. The target task description is selected from the plurality of candidate task descriptions based on the quality evaluation results of the plurality of candidate task descriptions, including: based on the content defects of the plurality of candidate task descriptions, a new candidate task description is obtained by iterative optimization until a termination condition is met, and the candidate task description with the highest quality score is selected from all candidate task descriptions as the target task description. Wherein, the single iteration optimization process is: adjusting the model prompt word based on the defect content of the currently generated candidate task description, re-optimizing the initial task description based on the adjusted model prompt word through the target large language model to obtain a new candidate task description.
[0096] For example, the first iteration optimization process is to adjust the model prompt based on the content defects of at least one of the plurality of candidate task descriptions generated at present. After the initial task description is re-optimized by the target large language model based on the adjusted model prompt to obtain a new candidate task description, the second iteration optimization process is to adjust the model prompt based on the content defects of the new candidate task description obtained by the first iteration optimization process to re-generate the candidate task description. That is, each iteration optimization process is driven by the content defects of the candidate task description obtained by the previous iteration optimization process.
[0097] For example, adjusting the model prompt based on the defective content of the candidate task description generated at present includes: generating guidance information based on the defective content, and adding the guidance information to the model prompt to guide the model to overcome the same type of defects in the next optimization process.
[0098] For example, the trigger condition for starting the iteration is that none of the generated plurality of candidate task descriptions meets the quality condition. For example, the termination condition of iteration is that the maximum number of iterations is reached, or the new candidate task description obtained in the iteration optimization process meets the quality condition.
[0099] The scheme introduces an iterative optimization mechanism based on quality evaluation feedback in the task description optimization process. By analyzing the content defects of the candidate task description, the model prompt is dynamically adjusted to drive the target large language model to perform multiple rounds of optimization, which can significantly improve the accuracy and adaptability of the task description. Moreover, by taking the content defects as the basis for adjusting the prompt, the optimization process is more targeted, avoiding blind generation of invalid results and improving the optimization efficiency. Finally, the highest quality score is selected from all generated candidate task descriptions as the target task description to ensure that the output result performs best in multiple evaluation dimensions. The scheme realizes closed-loop feedback and continuous improvement of the task description optimization process, effectively improving the quality stability and practicality of the target task description.
[0100] In the embodiments of the present application, multiple candidate task descriptions are generated through multiple optimizations, which can cover more potential optimization directions and improve the adaptability and optimization stability of complex tasks. Then, the target task description is selected based on the multi-dimensional quality evaluation results of the candidate task descriptions, which is beneficial to comprehensively filter the optimal target task description in multiple evaluation dimensions and improve the overall quality of the finally selected target task description.
[0101] Figure 5 is a schematic diagram of a task description optimization process provided by an embodiment of the present application. Referring to Figure 5The task description optimization device obtains an initial task description and an agent combination, and then performs feature extraction, including extracting task features from the initial task description and querying agent features from an agent capability portrait knowledge base. Then, based on the task features and the agent features, a large language model is selected, the hyperparameters of the large language model are set, model prompt words are constructed, and relevant reference cases are selected from a case knowledge base and added to the model prompt words. Subsequently, the initial task description is optimized based on the constructed model prompt words by using the selected large language model to generate multiple candidate task descriptions. Then, the candidate task descriptions are evaluated in multiple dimensions to obtain quality evaluation results of the candidate task descriptions. Based on the quality evaluation results of the multiple candidate task descriptions, a target task description is selected from the multiple candidate task descriptions. Alternatively, in the case where none of the multiple candidate task descriptions meets the quality condition, an iterative optimization method is used to obtain new candidate task descriptions until a termination condition of iteration is met, and the candidate task description with the highest quality score is selected from all the candidate task descriptions as the target task description. Subsequently, the selected target task description is input into the multi-agent collaboration device to guide the corresponding agent combination to respond to the to-be-executed task. In addition, the initial task description and the target task description can also constitute a successful case and be collected into the case knowledge base for subsequent use.
[0102] Figure 6 is a schematic diagram of a quality evaluation process of a task description provided by an embodiment of the present application. Referring to Figure 6 , the candidate task description is input into the evaluation large model. The evaluation large model performs multi-dimensional quality evaluation on the candidate task description based on the evaluation prompt words that have been configured with evaluation dimensions, and outputs the dimension quality scores of the candidate task description and the content defects of the candidate task description. For each dimension quality score, a weighted sum is performed based on the configured dimension weights to obtain a comprehensive quality score. Subsequently, the final target task description can be selected based on the comprehensive quality score, the dimension quality scores, and the content defects of the candidate task description.
[0103] The present scheme solves several key problems in the task description optimization process in the prior art by introducing mechanisms such as model selection based on task features and agent features, dynamic prompt word generation, multi-dimensional quality evaluation, and iterative optimization mechanisms, and has the following beneficial effects: Firstly, the present scheme no longer relies on statically configured large language models and fixed prompt words, but dynamically selects models and constructs model prompt words according to the features of the current task and agent combination, thereby significantly improving the adaptability and quality stability of the optimization results.
[0104] Secondly, the scheme combines task features and agent features to customize prompt words, select models, and set parameters, has a deep understanding of the connotation, complexity, novelty of the task, and the ability to adapt to the individual ability and cooperation mode of the agent. The optimized task description is more targeted, executable, and can fully match the ability and cooperation mode of the agent.
[0105] Moreover, the scheme establishes a perfect multi-dimensional quality evaluation system, quantitatively scores multiple candidate refined results from multiple dimensions such as concreteness, innovation, feasibility, and logical consistency, and ensures the output of the optimal task description through filtering and optimization mechanism to avoid low-quality descriptions flowing into the downstream process.
[0106] In addition, the iterative optimization mechanism and historical case collection mechanism provided by the scheme are helpful for the continuous evolution of the multi-agent system capability.
[0107] Finally, the scheme effectively guarantees the efficiency and success rate of subsequent agent task execution. High-quality, clear, and adaptive task descriptions help agents accurately understand task intent, reasonably plan paths, and efficiently collaborate, significantly reducing execution failure rates and resource waste, and improving the intelligence level and operational efficiency of the overall system.
[0108] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the task description optimization method of the present application. Further simple transformations based on this technical concept are within the scope of protection of the present application.
[0109] The present application also provides a task description optimization device, please refer to Figure 7 The task description optimization device comprises: A description acquisition module 10 is configured to acquire an initial task description of a to-be-executed task and an agent combination for responding to the to-be-executed task. A feature extraction module 20 is configured to extract task features from the initial task description and query corresponding agent features of the agent combination. A strategy acquisition module 30 is configured to acquire a task description optimization strategy matched with the task features and the agent. A description optimization module 40 is configured to optimize the initial task description according to the task description optimization strategy to obtain a target task description, and the target task description is used to guide the agent combination to respond to the to-be-executed task.
[0110] Optionally, the strategy acquisition module 30 comprises: An element acquisition unit is configured to acquire a plurality of target optimization elements matched with the task features and the agent features. A strategy generation unit is configured to generate a task description optimization strategy based on the plurality of acquired target optimization elements.
[0111] Optionally, the task feature comprises a task complexity. The element obtaining unit is configured to select, from the plurality of candidate large language models, a candidate large language model whose parameter scale matches the task complexity as a target large language model for optimizing the initial task description.
[0112] Optionally, the task feature comprises a task novelty. The element obtaining unit is configured to set a hyperparameter of the target large language model based on the task novelty, the task novelty being in a positive correlation with a numerical value of the hyperparameter, and the target large language model being a large language model for optimizing the initial task description.
[0113] Optionally, the element obtaining unit is configured to generate a target model prompt based on the task feature and the agent feature, the target model prompt being used to instruct the target large language model to optimize the initial task description based on the task feature and the agent feature, and the target large language model being a large language model for optimizing the initial task description.
[0114] Optionally, the element obtaining unit is configured to retrieve a reference case from a case knowledge base based on the task feature, the reference case comprising a sample initial task description and a sample target task description corresponding to the sample initial task description; and add the task feature, the agent feature, and the reference case in the reference model prompt to obtain the target model prompt.
[0115] Optionally, the element obtaining unit is configured to add the task feature and the agent feature in the reference model prompt, and adjust an optimization requirement in the reference model prompt based on the task feature and the agent feature to obtain the target model prompt.
[0116] Optionally, the description optimization module 40 comprises: The description optimization unit is configured to optimize the initial task description multiple times according to a task description optimization strategy to obtain a plurality of candidate task descriptions. The quality evaluation unit is configured to perform quality evaluation on the candidate task description from a plurality of evaluation dimensions to obtain a quality evaluation result. The description selecting unit is configured to select the target task description from the plurality of candidate task descriptions based on the quality evaluation result of the plurality of candidate task descriptions.
[0117] Optionally, the quality evaluation result comprises a quality score of the candidate task description in the plurality of evaluation dimensions. The description selection unit is configured to perform weighted summation on the quality scores of the plurality of evaluation dimensions of each candidate task description to obtain a comprehensive quality score, filter out the candidate task descriptions whose single-dimension quality score is lower than a set threshold and / or whose comprehensive quality score is lower than a set threshold from the plurality of candidate task descriptions, and select a target task description from the plurality of candidate task descriptions after the filtering.
[0118] Optionally, the description selection unit is configured to select, as the target task description, the candidate task description with the highest comprehensive quality score from the plurality of candidate task descriptions after the filtering, or display a preset number of candidate task descriptions with the highest comprehensive quality score from the plurality of candidate task descriptions after the filtering, and determine the selected target task description based on a received task description selection operation.
[0119] Optionally, the quality evaluation result includes the quality score of the candidate task description and the existing content defects. The description selection unit is configured to obtain a new candidate task description in an iterative optimization manner based on the content defects of the plurality of candidate task descriptions until a termination condition is met, and select, as the target task description, the candidate task description with the highest quality score from all the candidate task descriptions; wherein a single iteration optimization process is as follows: adjusting the model prompt words based on the defective content of the currently generated candidate task description, re-optimizing the initial task description based on the adjusted model prompt words by using the target large language model, and obtaining a new candidate task description.
[0120] Optionally, the plurality of evaluation dimensions of the candidate task description include at least two evaluation dimensions as follows: Specificity: evaluating the sufficiency of details contained in the candidate task description; Operability: evaluating the performance of the candidate task description in decomposing the task into executable steps; Innovation: evaluating the value of the newly added elements contained in the candidate task description relative to the initial task description; Logical consistency: evaluating the coherence of the logic of the candidate task description and the degree of fit with the initial task description and the agent combination; Feasibility: evaluating the degree of realizability of the execution steps in the candidate task description under the condition of the agent combination; Completeness: evaluating the coverage degree of the candidate task description on the core points of the initial task description; Brevity: evaluating the degree of expression simplification of the candidate task description.
[0121] The task description optimization apparatus provided in the present application adopts the task description optimization method in the above embodiments, and can solve the technical problem that the related art is difficult to adapt to different task requirements, the optimization effect is uneven, and the adaptability and stability are poor. Compared with the prior art, the task description optimization apparatus provided in the present application has the same beneficial effects as the task description optimization method provided in the above embodiments, and other technical features in the task description optimization apparatus are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0122] The present application provides a task description optimization device, which comprises at least one processor and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable 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 task description optimization method in the above embodiments.
[0123] Reference will be made to the accompanying drawings Figure 8 which shows a structural diagram of a task description optimization device suitable for implementing the embodiments of the present application. The task description optimization device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 8 The task description optimization device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0124] As Figure 8As shown, the task description optimization device can include a processing apparatus 1001 (e.g., a central processor, a graphics processor, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or programs loaded from a storage apparatus 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for operation of the task description optimization device are also stored. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the task description optimization device to communicate with other devices wirelessly or by wire to exchange data. Although the task description optimization device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0125] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0126] The task description optimization device provided by the present disclosure adopts the task description optimization method in the above-mentioned embodiments, and can solve the technical problems that the related art is difficult to adapt to different task requirements, the optimization effect is uneven, and the adaptability and stability are poor. Compared with the prior art, the task description optimization device provided by the present disclosure has the same beneficial effects as the task description optimization method provided by the above-mentioned embodiments, and other technical features in the task description optimization device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0127] It should be understood that various aspects of the disclosure can be implemented in hardware, software, firmware, or combinations thereof, to achieve the described functionality. In the description above, specific features, structures, materials or characteristics can be combined in any suitable manner without necessarily being limited to one or more embodiments or examples.
[0128] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any modifications or equivalents of the application should be construed as falling within the scope of the application. The scope of the application should be determined by the appended claims.
[0129] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., computer programs) for performing the task description optimization method in the above-described embodiments.
[0130] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, 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 thereof. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination thereof.
[0131] The above computer readable storage medium can be included in the task description optimization device, or can exist separately without being assembled into the task description optimization device.
[0132] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the task description optimization device, cause the task description optimization device to: acquire an initial task description of a to-be-executed task and an agent combination for responding to the to-be-executed task; extract a task feature from the initial task description, and query an agent feature corresponding to the agent combination; acquire a task description optimization strategy matched with the task feature and the agent; and optimize the initial task description according to the task description optimization strategy to obtain a target task description, the target task description being used to guide the agent combination to respond to the to-be-executed task.
[0133] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0134] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the task description optimization device, cause the task description optimization device to: acquire an initial task description of a to-be-executed task and an agent combination for responding to the to-be-executed task; extract a task feature from the initial task description, and query an agent feature corresponding to the agent combination; acquire a task description optimization strategy matched with the task feature and the agent; and optimize the initial task description according to the task description optimization strategy to obtain a target task description, the target task description being used to guide the agent combination to respond to the to-be-executed task.
[0135] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0136] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the task description optimization method described above, and can solve the technical problems that the related art is difficult to adapt to different task requirements, the optimization effect is uneven, and the adaptability and stability are poor. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the task description optimization method provided by the above embodiments, and will not be described here.
[0137] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the task description optimization method as described above.
[0138] The computer program product provided by the present application can solve the technical problems that the related art is difficult to adapt to different task requirements, the optimization effect is uneven, and the adaptability and stability are poor. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the task description optimization method provided by the above embodiments, and will not be described here.
[0139] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structural transformation made by using the content of the present application specification and drawings, or directly / indirectly applied to other related technical fields is included in the patent protection scope of the present application.
Claims
1. A task description optimization method, characterized in that: The method comprises: Obtaining an initial task description of a task to be performed and an agent combination for responding to the task to be performed; Extracting task features from the initial task description and querying agent features corresponding to the agent combination; Obtaining a task description optimization strategy that matches the task characteristics and the agent; According to the task description optimization strategy, the initial task description is optimized to obtain a target task description, and the target task description is used to guide the agent combination to respond to the task to be performed.
2. The method according to claim 1, wherein The obtaining of a task description optimization strategy that matches the task characteristics and the agent includes: Acquire a plurality of target optimization elements that match the task characteristics and the agent characteristics; Based on the obtained multiple target optimization elements, the task description optimization strategy is generated.
3. The method according to claim 2, wherein The task characteristics include task complexity; The obtaining of a plurality of target optimization elements that match the task characteristics and the agent characteristics includes: A candidate large language model whose parameter scale matches the complexity of the task is selected from multiple candidate large language models as a target large language model for optimizing the initial task description.
4. The method according to claim 2, wherein The task characteristics include task novelty; The obtaining of a plurality of target optimization elements that match the task characteristics and the agent characteristics includes: The hyperparameters of the target large language model are set based on the task novelty, wherein the task novelty is positively correlated with the numerical values of the hyperparameters. The target large language model is a large language model used to optimize the initial task description.
5. The method according to claim 2, wherein The obtaining of a plurality of target optimization elements that match the task characteristics and the agent characteristics includes: Based on the task features and the agent features, a target model prompt word is generated, and the target model prompt word is used to instruct a target large language model to optimize the initial task description based on the task features and the agent features. The target large language model is a large language model used to optimize the initial task description.
6. The method according to claim 5, wherein The generating of target model prompt words based on the task characteristics and the agent characteristics includes: Retrieving a reference case from a case knowledge base based on the task characteristics, the reference case including a sample initial task description and a sample target task description corresponding to the sample initial task description; The task features, the agent features, and the reference case are added to the reference model prompt words to obtain the target model prompt words.
7. A task description optimization device, characterized in that: The device comprises: A description acquisition module, used to obtain an initial task description of a task to be performed and an agent combination for responding to the task to be performed; A feature extraction module, configured to extract task features from the initial task description and query agent features corresponding to the agent combination; A strategy acquisition module, configured to acquire a task description optimization strategy that matches the task characteristics and the agent; A description optimization module is used to optimize the initial task description according to the task description optimization strategy to obtain a target task description, and the target task description is used to guide the intelligent agent combination to respond to the task to be performed.
8. A task description optimization device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the task description optimization method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the task description optimization method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the task description optimization method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Large language model agent-oriented experience extraction and task planning method
CN118193160A
Prompt word template generation method and device, electronic equipment and storage medium
CN119443094A
Intelligent agent framework based on large language model
CN119476505A
Optimization method for artificial intelligence task execution
CN119721192A
Code generation method and device based on AI agent, equipment and medium
CN120066477A
Cited By
Intelligent agent system generation method and device, equipment, storage medium and product
CN121724053A