Model-based task execution method, device, equipment and readable storage medium
By determining the error factors of task execution in the smart cockpit system and adjusting the prompt words, the problem of inaccurate adjustment of prompt words in the smart cockpit system when task execution is reported is solved, and the success rate and adaptability of task execution are improved.
Patent Information
- Application Number
- CN202411272624.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-11
AI Technical Summary
When the smart cockpit system reports an error in the task execution, the lack of guidance information leads to inaccurate adjustment of prompt words, which in turn affects the adaptability and success rate of the task.
By obtaining user requests and subtask sequences, determine the task execution error factors, and adjust the prompt words based on these factors to generate a new subtask sequence and re-execute the task. The method includes using classification model and task orchestration model for logical reasoning and fine-tuning training, and optimizing the parameters and content of prompt words.
The accuracy of prompt word adjustment and the success rate of task execution are improved. By adjusting prompt words in a targeted manner, the response ability of the smart cockpit system to user requests is improved.
Smart Images

Figure CN118796479B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a model-based task execution method, device, equipment and readable storage medium. Background Art
[0002] The smart cockpit system refers to an integrated digital platform in the car that can integrate multiple IT and artificial intelligence technologies, provide drivers with an intelligent experience and promote driving safety.
[0003] In current technology, for user requests initiated by users to the smart cockpit system, the task corresponding to the request can usually be processed based on the model. When a task execution error occurs, the user request and the output results of the model can usually be analyzed, and the prompt words of the model can be adjusted based on the analysis results, and the task can be reprocessed based on the adjusted prompt words and user request.
[0004] Due to the lack of guiding information in the above analysis process, the accuracy of the adjustment of the prompt words is not high, which leads to the low adaptability of the output results of the large model to the task, and then the low success rate of the task. Summary of the invention
[0005] The present application provides a model-based task execution method, the method comprising:
[0006] In response to a target task execution error reported for a target user request, obtaining a prompt word corresponding to the target user request and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word;
[0007] Based on the target user request and the subtask sequence, determining a target factor corresponding to the target task from preset task execution error reporting factors;
[0008] According to the target adjustment strategy corresponding to the target factor, the prompt word is adjusted to obtain an adjusted new prompt word;
[0009] A new subtask sequence is obtained by the task scheduling model based on the new prompt word and generated by performing logical reasoning on the target task, and the target task is re-executed based on the new subtask sequence.
[0010] Optionally, based on the target user request and the subtask sequence, determining a target factor corresponding to the target task from preset task execution error reporting factors includes:
[0011] The target user request and the subtask sequence are input into a classification model so that the classification model performs classification calculations to generate a category text corresponding to the target factor of the target task execution error; wherein the classification model is obtained through supervised learning training based on historical user requests and historical subtask sequences corresponding to the historical user requests as training data, and preset task execution error factors as labels.
[0012] Optionally, the task execution error reporting factor includes at least one of the following factors:
[0013] The user request content is incorrect; the parameter setting in the prompt word is incorrect; the interface call is incorrect; the task execution result does not meet the user's expectations.
[0014] Optionally, the adjustment strategy corresponding to the task execution error factor includes at least one of the following strategies:
[0015] Verify the content of the text corresponding to the user request and adjust the prompt word based on the verification result;
[0016] Adjusting at least some parameters of the prompt word;
[0017] adding example guidance information to the prompt word, and / or adjusting parameters of the prompt word according to the intent information corresponding to the user request;
[0018] Intention information corresponding to the user request is added to the prompt word, and / or parameters of the prompt word are adjusted according to the intention information.
[0019] Optionally, the task scheduling model is an LLM model; the LLM model includes a Function Calling model.
[0020] Optionally, the task scheduling model is a model obtained by supervised fine-tuning training of a pre-trained task scheduling model, which takes a preset user request and a prompt word sample corresponding to the preset user request as input variables and a preset sub-task sequence corresponding to the preset user request as a label; wherein the preset user request includes a request initiated for a service provided by the smart cockpit system; and the preset sub-task sequence includes at least one subtask for calling the service provided by the smart cockpit system.
[0021] Optionally, before reporting an error in response to the target task execution for the target user request, the method further includes:
[0022] During the execution of the target task requested by the target user, obtaining feedback information corresponding to the target task;
[0023] Determining whether the feedback information includes indication information indicating that the task execution has reported an error;
[0024] If the feedback information includes indication information indicating that a task execution error is reported, it is determined that the target task execution error is reported.
[0025] The present application also provides a model-based task execution device, the device comprising:
[0026] An acquisition unit, configured to, in response to a target task execution error reported for a target user request, acquire a prompt word corresponding to the target user request, and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word;
[0027] A determination unit, configured to determine a target factor corresponding to the target task from preset task execution error reporting factors based on the target user request and the subtask sequence;
[0028] an adjusting unit, configured to adjust the prompt word according to a target adjustment strategy corresponding to the target factor to obtain an adjusted new prompt word;
[0029] The execution unit is used to obtain a new subtask sequence generated by the task scheduling model through logical reasoning on the target task based on the new prompt word, and re-execute the target task based on the new subtask sequence.
[0030] The present application also provides an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;
[0031] The memory stores machine-readable instructions, and the processor executes the model-based task execution method by calling the machine-readable instructions.
[0032] The present application also provides a machine-readable storage medium, which stores machine-readable instructions. When the machine-readable instructions are called and executed by a processor, the model-based task execution method is implemented.
[0033] The technical solution provided by this application may at least include the following beneficial effects:
[0034] Through the above embodiments, the intelligent cockpit system can respond to the target task execution error report for the target user request, obtain the prompt word corresponding to the target user request, and the task scheduling model can logically infer the target task based on the prompt word to generate a subtask sequence; based on the target user request and the subtask sequence, determine the target factor corresponding to the target task from the preset task execution error report factors; adjust the prompt word according to the target adjustment strategy corresponding to the target factor to obtain the adjusted new prompt word; obtain the new subtask sequence generated by the task scheduling model logically inferring the target task based on the new prompt word, and re-execute the target task based on the new subtask sequence. Since the target factor indicates the influencing factor of the task execution error report, the prompt word can be adjusted in a targeted manner based on the target adjustment strategy corresponding to the influencing factor, thereby improving the accuracy of the prompt word adjustment and thus improving the success rate of task execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flowchart showing a model-based task execution method according to an exemplary embodiment.
[0036] Figure 2 is a flowchart showing another model-based task execution method according to an exemplary embodiment.
[0037] Figure 3 It is a schematic diagram of fine-tuning training of a task scheduling model according to an exemplary embodiment.
[0038] Figure 4 It is a hardware structure diagram of an electronic device in which a model-based task execution device is located according to an exemplary embodiment.
[0039] Figure 5 It is a block diagram of a model-based task execution device according to an exemplary embodiment. DETAILED DESCRIPTION
[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0041] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0042] In view of this, the present application aims to propose a model-based task execution method. The method first determines the factors causing the target task execution error, and then makes targeted adjustments to some of the prompt words based on the adjustment strategy corresponding to the factors, thereby improving the accuracy of the prompt word adjustment.
[0043] In implementation, in response to a target task execution error reported for a target user request, a prompt word corresponding to the target user request and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word can be obtained;
[0044] Based on the target user request and the subtask sequence, determining a target factor corresponding to the target task from preset task execution error reporting factors;
[0045] According to the target adjustment strategy corresponding to the target factor, the prompt word is adjusted to obtain an adjusted new prompt word;
[0046] A new subtask sequence is obtained by the task scheduling model based on the new prompt word and generated by performing logical reasoning on the target task, and the target task is re-executed based on the new subtask sequence.
[0047] Through the above embodiments, the intelligent cockpit system can respond to the target task execution error report for the target user request, obtain the prompt word corresponding to the target user request, and the subtask sequence generated by the task scheduling model based on the prompt word through logical reasoning of the target task; can determine the target factor corresponding to the target task from the preset task execution error factors based on the target user request and the subtask sequence; adjust the prompt word according to the target adjustment strategy corresponding to the target factor to obtain the adjusted new prompt word; obtain the new subtask sequence generated by the task scheduling model based on the new prompt word through logical reasoning of the target task, and re-execute the target task based on the new subtask sequence. Since the target factor indicates the reason for the task execution error report, the prompt word can be adjusted in a targeted manner based on the target adjustment strategy corresponding to the target factor, thereby improving the accuracy of the prompt word adjustment and thus improving the success rate of task execution.
[0048] The present application is described below through specific embodiments and in combination with specific application scenarios.
[0049] See also Figure 1 , Figure 1 It is a system architecture diagram of a model-based task execution method according to an exemplary embodiment. The smart cockpit system can be equipped with a task scheduling model, and the smart cockpit system can include a reflection subsystem built based on the ReAct framework; the reflection subsystem can be equipped with a classification model; wherein, the ReAct framework is a design framework for enhancing the reflection and self-adjustment capabilities of intelligent agents, combining the two aspects of "react" and "reflection", and can improve the performance of intelligent agents in complex tasks by dynamically adjusting and optimizing their behaviors. In the present application, the framework can be used to optimize the prompt words of the task scheduling model.
[0050] Based on this, when the smart cockpit system receives a target user request, it can identify the intent of the target user request, generate a prompt word corresponding to the target user request, and input the prompt word and the target user request into the task scheduling model, and the task scheduling model performs task scheduling on the target task for the target user request based on the prompt word and the target user request, and generates a subtask sequence. Among them, the subtask sequence can include at least one interface to be called and interface parameters corresponding to the interface, the at least one interface to be called can correspond to at least one subtask in the subtask sequence, and the subtask sequence can indicate the execution order corresponding to the at least one subtask.
[0051] The execution module carried by the smart cockpit system can obtain the subtask sequence, and call the interface corresponding to the at least one subtask in sequence according to the execution order corresponding to the at least one subtask indicated by the subtask sequence to execute the above-mentioned target task.
[0052] If the target task is completed, indication information indicating the task execution result may be generated, and the indication information may be returned to the user.
[0053] The intelligent cockpit system can obtain user feedback information within a preset period of time after the target task is completed. When the user's feedback information indicates that the user is satisfied or no user feedback information is received within the preset period of time, and no feedback information sent by other modules on board indicating an error in the execution of the target task is received, it can be indicated that the target task is successfully executed. If any of the above feedback information indicating an error in the execution of a task is received, it can be indicated that an error has been reported in the execution of the target task.
[0054] During the execution of the target task, when the target task is executed with an error, the intelligent cockpit system can obtain the prompt word corresponding to the target user request and the above-mentioned sub-task sequence; based on the target user request and the sub-task sequence, the target factor corresponding to the target task can be determined from the preset task execution error factors; and the onboard optimization module can adjust the prompt word according to the target adjustment strategy corresponding to the target factor to obtain an adjusted new prompt word; the new prompt word and the above-mentioned target user request can be re-input into the above-mentioned task scheduling model, and the task scheduling model can re-schedule the target task for the target user request based on the new prompt word and the target user request to generate a new sub-task sequence.
[0055] The intelligent cockpit system can obtain the new subtask sequence and re-execute the target task based on the new subtask sequence.
[0056] Among them, the intelligent cockpit system can input the target user request and the sub-task sequence into the above-mentioned classification model, so that the classification model can perform classification calculations and generate category text corresponding to the target factors of the target task execution error; wherein, the classification model can be based on historical user requests and historical sub-task sequences corresponding to the historical user requests as training data, and preset task execution error factors as labels for supervised learning training.
[0057] The target task execution error reporting factor may include at least one of the following factors:
[0058] The user request content is incorrect; the parameter setting in the prompt word is incorrect; the interface call is incorrect; the task execution result does not meet the user's expectations.
[0059] Among them, the adjustment strategy corresponding to the task execution error factor includes at least one of the following strategies: performing content verification on the text corresponding to the user request, and adjusting the prompt word based on the verification result; adjusting at least part of the parameters in the prompt word; adding example guidance information to the prompt word, and / or, adjusting the parameters of the prompt word according to the intent information corresponding to the user request; adding intent information corresponding to the user request to the prompt word, and / or, adjusting the parameters of the prompt word according to the intent information.
[0060] The task scheduling model may be an LLM model, and the LLM model may include a Function Calling model.
[0061] Among them, the task scheduling model can be a model obtained by supervised fine-tuning training on a pre-trained task scheduling model based on a preset user request and a prompt word sample corresponding to the preset user request as an input variable, and a preset sub-task sequence corresponding to the preset user request as a label; wherein the preset user request includes a request initiated for a service provided by the smart cockpit system; and the preset sub-task sequence includes at least one subtask for calling the service provided by the smart cockpit system.
[0062] Among them, the smart cockpit system can also obtain feedback information corresponding to the target task during the execution of the target task requested by the target user before responding to the target task execution error report requested by the target user; determine whether the feedback information contains indication information indicating a task execution error report; if the feedback information contains indication information indicating a task execution error report, it can be determined that the target task execution error report.
[0063] It should be noted that at least some of the above steps can also be executed by the model, which can be set specifically according to actual needs, and this application does not limit this.
[0064] See also Figure 2 , Figure 2 It is a flowchart showing a model-based task execution method according to an exemplary embodiment.
[0065] like Figure 2 As shown, the above-mentioned intelligent cockpit system can perform the following steps:
[0066] Step 202 , in response to a target task execution error reported for a target user request, obtain a prompt word corresponding to the target user request, and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word.
[0067] The smart cockpit system may provide a number of services to the user, the user request may be a request initiated for the service provided by the smart cockpit system, and the target task may refer to a task generated by the smart cockpit system in response to the user request.
[0068] The specific content of the services can be set according to actual needs, and this application does not limit this. For example, the service can refer to entertainment services, communication services, or driving assistance services.
[0069] The task scheduling model may refer to a model that can perform logical reasoning on a target task based on a prompt word, split the target task into at least one subtask, and schedule the at least one subtask to generate a subtask sequence including at least one subtask.
[0070] The intelligent cockpit system can execute the target task for the target user's request based on the task scheduling model. Specifically, the system can perform intent recognition for the target user's request and generate a prompt word corresponding to the target user's request, which can be used to assist in executing the target task. The prompt word and the target user's request can be input into the task scheduling model, which performs logical reasoning to generate a subtask sequence.
[0071] Since the subtask sequence can include at least one interface to be called and interface parameters corresponding to the interface, the subtask sequence can also indicate the execution order corresponding to the at least one subtask. Therefore, the intelligent cockpit system can obtain the subtask sequence and call the interfaces corresponding to the at least one subtask in sequence according to the execution order corresponding to the at least one subtask indicated by the subtask sequence to execute the above-mentioned target task.
[0072] During the task execution process, when an execution error of the target task is detected, the prompt word and subtask sequence can be obtained in response to the target task execution error, so as to adjust the prompt word later.
[0073] The specific form of the model can be set according to actual needs and is not limited in this application.
[0074] In one embodiment shown, the task scheduling model may be an LLM model; the LLM model may include a Function Calling model.
[0075] The LLM model (Large Language Model) is a machine learning model that can process and generate natural language text, usually composed of large-scale neural networks. The LLM basic model has undergone a lot of pre-training and can understand and generate human language text, including grammatical structure, semantic content and contextual relevance. It can accurately simulate human language capabilities and conduct conversations, generate articles, answer questions and other tasks.
[0076] The Function Calling model is a programming model that allows the system to call specific functions or methods at runtime. Function encapsulation and reuse can be achieved by defining function interfaces. This model supports passing parameters, executing function logic, and returning results, making the code more modular and easier to maintain.
[0077] In the present application, the subtask sequence generated by the model may include at least one interface to be called and calling parameters corresponding to the interface, so that the smart cockpit system can directly call the interface to perform the target task.
[0078] In one embodiment shown, the task scheduling model is a model obtained by supervised fine-tuning training of a pre-trained task scheduling model based on a preset user request and a prompt word sample corresponding to the preset user request as an input variable, and a preset sub-task sequence corresponding to the preset user request as a label; wherein the preset user request includes a request initiated for a service provided by the smart cockpit system; and the preset sub-task sequence includes at least one subtask for calling the service provided by the smart cockpit system.
[0079] Since the task orchestration model can be used to process tasks corresponding to the services provided by the intelligent cockpit system, in order to improve the accuracy of logical reasoning of the task orchestration model, the task orchestration model can be fine-tuned and trained in a targeted manner.
[0080] Specifically, based on a preset user request initiated for a service provided by the smart cockpit system and a prompt word sample corresponding to the preset user request as input variables, a preset subtask sequence corresponding to the preset user request and including at least one subtask for calling the service provided by the above-mentioned smart cockpit system is used as a label, and supervised fine-tuning training is performed on the pre-trained task orchestration model.
[0081] For example, see Figure 3 , Figure 3 It is a schematic diagram of fine-tuning training of a task scheduling model according to an exemplary embodiment. The preset user request may include user request_1, user request_2 and user request_3, the prompt word corresponding to the user request_1 may be prompt word_1, and the corresponding subtask sequence may be subtask sequence_1, the prompt word corresponding to the user request_2 may be prompt word_2, and the corresponding subtask sequence may be subtask sequence_2, the prompt word corresponding to the user request_3 may be prompt word_3, and the corresponding subtask sequence may be subtask sequence_3, and the pre-trained task scheduling model may be fine-tuned in a supervised manner based on the three sets of training data and labels.
[0082] For another example, when the user request is "I want to check my vehicle maintenance record", the prompt word corresponding to the user request may be "call getMaintenanceRecords function, parameter: vehicle number = 123ABC, date = 2024", and the corresponding subtask sequence may include "getMaintenanceRecords(vehicleld ='123ABC', date='2024')"; when the user request is "start navigation to the nearest gas station", the prompt word corresponding to the user request may be "call startNavigation function, parameter: destination = nearest gas station", and the corresponding subtask sequence may include "startNavigation(destination='nearest gas station')"; when the user request is "book the first train from Shanghai to Beijing tomorrow", the prompt word corresponding to the user request may be "call bookFirstTrain function, parameter: origin = Shanghai, destination = Beijing, date = 2024-07-03", and the corresponding subtask sequence may include "bookFirstTrain(origin='Shanghai', destination='Beijing', date='2024-07-03')".
[0083] In this way, the accuracy of the task scheduling model's logical reasoning for tasks corresponding to the services provided by the smart cockpit system can be improved.
[0084] In one embodiment shown, before responding to a target task execution error report requested by a target user, during the execution of the target task requested by the target user, the smart cockpit system can obtain feedback information corresponding to the above target task; determine whether the above feedback information includes indication information indicating a task execution error report; if the above feedback information includes indication information indicating a task execution error report, determine that the above target task execution error report.
[0085] The target task execution process refers to the process from receiving the user request to receiving feedback information indicating user satisfaction or not receiving user feedback information within a preset time period after the target task is completed. That is, for the target task requested by the target user, the task is completed only when the execution is successful or the execution time exceeds the preset time.
[0086] For example, when the task is not completed and the target task is being executed, the smart cockpit system can obtain feedback information corresponding to the target task. The feedback information can be feedback information sent by a module carried by the smart cockpit system to indicate an error in the execution of the target task, or feedback information indicating user dissatisfaction, or other feedback information indicating an error in the execution of the task. This application does not limit this. The smart cockpit system can determine whether the feedback information includes indication information indicating an error in the execution of the task. If the feedback information includes indication information indicating an error in the execution of the task, it can be determined that the target task has been executed with an error.
[0087] In this way, subsequent remedial measures can be taken when an error is reported during task execution, thereby improving the success rate of task execution and further improving the user experience.
[0088] Step 204 : Based on the target user request and the subtask sequence, a target factor corresponding to the target task is determined from preset task execution error reporting factors.
[0089] When it is determined that the target task execution error is reported, the target user request and the output result of the model can be analyzed to determine which of the preset task execution error factors the influencing factor of the target task execution error belongs to, so that targeted improvements can be made to the prompt words in the subsequent process.
[0090] The specific method for determining the target factors corresponding to the target tasks can be set according to actual needs, and this application does not limit this.
[0091] In one embodiment shown, the smart cockpit system can input the above-mentioned target user request and the above-mentioned sub-task sequence into a classification model, so that the above-mentioned classification model can perform classification calculations to generate category text corresponding to the target factors of the above-mentioned target task execution error; wherein the above-mentioned classification model is based on historical user requests and historical sub-task sequences corresponding to the above-mentioned historical user requests as training data, and preset task execution error factors as labels for supervised learning training.
[0092] The intelligent cockpit system can determine the target factors corresponding to the target task based on the classification model. The classification model can be obtained by supervised learning training based on historical user requests and historical subtask sequences corresponding to the above historical user requests as training data, and preset task execution error factors as labels, so as to accurately classify and calculate the target factors corresponding to the target task.
[0093] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30", and the subtask sequence corresponding to the user request may include "searchFlights ('Shanghai', 'Beijing', '2024-05-30')". Based on the target user request and the subtask sequence, a category text corresponding to the target factor of the target task execution error may be generated, and the target factor may be "the result does not meet expectations".
[0094] In this way, the accuracy of determining the target factors corresponding to the target tasks can be improved.
[0095] The specific factors included in the above-mentioned preset task execution error factors can be set according to actual needs, and this application does not limit this.
[0096] In one embodiment shown, the task execution error factors may include at least one of the following factors: incorrect user request content; incorrect parameter setting in the prompt word; interface call error; task execution result does not meet user expectations.
[0097] The user request content error may refer to incomplete or inaccurate information in the user request.
[0098] For example, the target user request may be "turn on the air conditioner". In this case, the user request does not include the temperature parameter information of the air conditioner, and the information requested by the target user is incomplete.
[0099] The parameter setting error in the prompt word may refer to inaccurate interface parameter settings of the callable interface included in the prompt word.
[0100] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30". Since the date is set to a specific date, and the user request describes the nearest flight, the setting of the interface parameters is inaccurate.
[0101] The interface calling error may refer to an error occurring in the process of the smart cockpit system calling an interface to be called contained in a subtask sequence based on the subtask sequence.
[0102] For example, the intelligent cockpit system reported an error when searching for flight information based on the output of the task scheduling model.
[0103] Among them, the task execution result does not meet the user's expectations, which may mean that the result output by the smart cockpit system after completing the interface call does not meet expectations.
[0104] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30", and the task execution result may be "unable to find a flight that meets the conditions", which does not meet the user's expectations.
[0105] In this way, the influencing factors of task execution errors can be subdivided, which facilitates subsequent targeted optimization and thus improves the success rate of task execution.
[0106] Step 206: adjusting the prompt word according to the target adjustment strategy corresponding to the target factor to obtain an adjusted new prompt word.
[0107] The intelligent cockpit system determines the influencing factors of the target task execution error, and can make adjustments according to the target adjustment strategy corresponding to the target factors. Furthermore, the prompt words can be adjusted to obtain adjusted new prompt words, so that the task scheduling model can perform logical reasoning based on the new prompt words in the future, thereby improving the success rate of task execution.
[0108] The smart cockpit system may determine part of the prompt words to be optimized in the prompt words based on the target factor, and may adjust the part of the prompt words in the prompt words according to a target adjustment strategy corresponding to the target factor.
[0109] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30". When the target factor is "the result does not meet expectations", it can be determined that the part of the prompt words to be optimized in the prompt words are the setting parameters corresponding to the date, and therefore, the setting parameters for the date can be adjusted.
[0110] In one embodiment shown, the adjustment strategy corresponding to the task execution error factor may include at least one of the following strategies: performing content verification on the text corresponding to the user request, and adjusting the prompt word based on the verification result; adjusting at least part of the parameters in the prompt word; adding example guidance information to the prompt word, and / or, adjusting the parameters of the above prompt word according to the intent information corresponding to the user request; adding intent information corresponding to the user request to the prompt word, and / or, adjusting the parameters of the above prompt word according to the above intent information.
[0111] For example, checking the content of the text corresponding to the user request and adjusting the prompt word based on the check result may mean checking the integrity or accuracy of the target user request, and adding temperature parameter information to the prompt word based on the check result. Adding example guidance information to the prompt word may mean adding example information related to the user request to the prompt word. Adding intent information corresponding to the user request to the prompt word may mean adding information used to describe the intent of the user request in detail to the prompt word.
[0112] It should be noted that, since different task execution error factors correspond to different error causes, a more targeted adjustment strategy can be used to adjust the prompt word for different task execution error factors, thereby improving the accuracy of the prompt word adjustment.
[0113] For example, the adjustment strategy corresponding to the above-mentioned user request content error may be: perform content verification on the text corresponding to the user request, and adjust the prompt word based on the verification result; the adjustment strategy corresponding to the parameter setting error in the above-mentioned prompt word may be: adjust at least part of the parameters in the prompt word; the adjustment strategy corresponding to the above-mentioned interface call error may be: add example guidance information in the prompt word, and / or, adjust the parameters of the above-mentioned prompt word according to the intent information corresponding to the user request; the adjustment strategy corresponding to the above-mentioned task execution result not meeting the user's expectations may be: add the intent information corresponding to the user request in the prompt word, and / or, adjust the parameters of the above-mentioned prompt word according to the above-mentioned intent information.
[0114] Among them, since the user request content error may mean that the information in the user request is incomplete or inaccurate, the text corresponding to the user request may be content verified, and the prompt word may be adjusted based on the verification result.
[0115] For example, the target user request may be "turn on the air conditioner". In this case, the user request does not contain the temperature parameter information of the air conditioner, and the information requested by the target user is incomplete. The target user request may be checked for integrity, and the temperature parameter information may be added to the prompt word based on the check result.
[0116] Among them, since the parameter setting error in the prompt word may refer to the inaccurate setting of the interface parameters of the callable interface contained in the prompt word, at least part of the parameters in the prompt word may be adjusted.
[0117] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30". Since the date is set to a specific date, and the user request expresses the nearest flight, the setting of the interface parameter is inaccurate. In contrast, the setting parameter corresponding to the date can be adjusted to "date = 2024-05-30 to 2024-06-02".
[0118] The interface call error may refer to an error in the process of the smart cockpit system calling the interface to be called contained in the subtask sequence based on the subtask sequence. Therefore, example guidance information may be added to the prompt word, and / or the parameters of the prompt word may be adjusted according to the intention information.
[0119] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30". When the target factor corresponding to the target task is "interface call error", the prompt word can be adjusted to: "Call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30 to 2024-06-02, flight type = direct flight. The user hopes to find the nearest direct flight and can accept any flight within the date range. Example output: 'Flight number CA123, Shanghai-Beijing, 2024-05-30, direct flight'".
[0120] The task execution result does not meet the user's expectations, which may mean that the result output by the smart cockpit system after completing the call of the interface does not meet the expectations. Intention information corresponding to the user's request is added to the prompt word, and / or the parameters of the prompt word are adjusted according to the above intention information.
[0121] For example, the target user request may be "find and book the nearest flight", and the prompt word corresponding to the user request may be "call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30". When the target factor is "the result does not meet expectations", the prompt word can be adjusted to: "Call the searchFlights function, parameters: departure = Shanghai, destination = Beijing, date = 2024-05-30 to 2024-06-02, flight type = direct flight. The user hopes to find the nearest direct flight and can accept any flight within the date range."
[0122] In this way, targeted optimization can be performed based on the influencing factors of task execution errors, thereby improving the success rate of task execution.
[0123] Step 208: Obtain a new subtask sequence generated by the task scheduling model through logical reasoning on the target task based on the new prompt word, and re-execute the target task based on the new subtask sequence.
[0124] The smart cockpit system can input the new prompt word and the target user request into the task scheduling model, and the task scheduling model can generate a new subtask sequence by logically reasoning the target task based on the new prompt word. The smart cockpit system can obtain the new subtask sequence and re-execute the target task based on the new subtask sequence.
[0125] It should be noted that when the smart cockpit system reports an error when executing the target task based on the new sub-task sequence, it can still re-execute steps 202 to 208 and adjust the new prompt words until the task is successfully executed or the task execution time exceeds the preset time, thereby improving the task execution success rate.
[0126] Corresponding to the embodiment of the model-based task execution method, this specification also provides an embodiment of a model-based task execution device.
[0127] See also Figure 4 , Figure 4 It is a hardware structure diagram of an electronic device in which a model-based task execution device is located according to an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0128] See also Figure 5 , Figure 5 is a block diagram of a model-based task execution device according to an exemplary embodiment. The model-based task execution device can be applied to Figure 4 In the electronic device shown in the figure, the technical solution of this specification is implemented. The device may include:
[0129] An acquisition unit 502 is configured to acquire, in response to a target task execution error reported for a target user request, a prompt word corresponding to the target user request and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word;
[0130] A determination unit 504 is configured to determine a target factor corresponding to the target task from preset task execution error reporting factors based on the target user request and the subtask sequence;
[0131] An adjusting unit 506, configured to adjust the prompt word according to a target adjustment strategy corresponding to the target factor to obtain an adjusted new prompt word;
[0132] The execution unit 508 is configured to obtain a new subtask sequence generated by the task scheduling model through logical reasoning on the target task based on the new prompt word, and re-execute the target task based on the new subtask sequence.
[0133] In this embodiment, the determining unit 504 may be specifically used for:
[0134] The target user request and the subtask sequence are input into a classification model, which performs classification calculations and generates category text corresponding to the target factors of the target task execution error. The classification model is obtained through supervised learning training based on historical user requests and historical subtask sequences corresponding to the historical user requests as training data, and preset task execution error factors as labels.
[0135] In this embodiment, the task execution error reporting factor may include at least one of the following factors:
[0136] The user request content is incorrect; the parameter setting in the prompt word is incorrect; the interface call is incorrect; the task execution result does not meet the user's expectations.
[0137] In this embodiment, the adjustment strategy corresponding to the task execution error factor may include at least one of the following strategies:
[0138] Verify the content of the text corresponding to the user request and adjust the prompt word based on the verification result;
[0139] Adjusting at least some parameters of the prompt word;
[0140] Adding example guidance information to the prompt word, and / or adjusting the parameters of the prompt word according to the intention information corresponding to the user request;
[0141] Intention information corresponding to the user request is added to the prompt word, and / or parameters of the prompt word are adjusted according to the intention information.
[0142] In this embodiment, the task scheduling model may be an LLM model; the LLM model may include a Function Calling model.
[0143] In this embodiment, the above-mentioned task scheduling model can be a model obtained by supervised fine-tuning training on the pre-trained task scheduling model, which takes the preset user request and the prompt word sample corresponding to the above-mentioned preset user request as input variables, and takes the preset sub-task sequence corresponding to the above-mentioned preset user request as a label; wherein the above-mentioned preset user request may include a request initiated for the service provided by the smart cockpit system; the above-mentioned preset sub-task sequence may include at least one subtask for calling the service provided by the above-mentioned smart cockpit system.
[0144] In this embodiment, the acquisition unit 502 may also be used for:
[0145] Before responding to an error report of the target task execution for the target user's request, during the execution of the target task for the target user's request, obtaining feedback information corresponding to the target task;
[0146] Determine whether the feedback information includes indication information indicating that the task execution has reported an error;
[0147] If the feedback information includes indication information indicating that the task is executed with an error, it is determined that the target task is executed with an error.
[0148] The implementation process of the functions and effects of each unit in the device is specifically described in the implementation process of the corresponding steps in the method, which will not be repeated here.
[0149] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0150] The systems, devices, modules or units described in the embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0151] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0152] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0153] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0154] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0155] The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0156] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0157] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0158] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
[0159] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A model-based task execution method, It is characterized in that The method comprises: In response to a target task execution error reported for a target user request, obtaining a prompt word corresponding to the target user request and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word; The target user request and the subtask sequence are input into a classification model so that the classification model performs classification calculation and generates a category text corresponding to the target factor of the target task execution error; wherein the classification model is obtained by supervised learning training based on historical user requests and historical subtask sequences corresponding to the historical user requests as training data, and preset task execution error factors as labels; According to the target adjustment strategy corresponding to the target factor, the prompt word is adjusted to obtain an adjusted new prompt word; A new subtask sequence is obtained by the task scheduling model based on the new prompt word and generated by performing logical reasoning on the target task, and the target task is re-executed based on the new subtask sequence.
2. The method according to claim 1, It is characterized in that The task execution error reporting factor includes at least one of the following factors: The user request content is incorrect; the parameter setting in the prompt word is incorrect; the interface call is incorrect; the task execution result does not meet the user's expectations.
3. The method according to claim 2, It is characterized in that The adjustment strategy corresponding to the task execution error factor includes at least one of the following strategies: Verify the content of the text corresponding to the user request, and adjust the prompt word based on the verification result; Adjusting at least some parameters of the prompt word; adding example guidance information to the prompt word, and / or adjusting parameters of the prompt word according to the intent information corresponding to the user request; Intention information corresponding to the user request is added to the prompt word, and / or parameters of the prompt word are adjusted according to the intention information.
4. The method according to claim 1, It is characterized in that The task scheduling model is an LLM model; the LLM model includes a Function Calling model.
5. The method according to claim 1, It is characterized in that The task scheduling model is a model obtained by supervised fine-tuning training of a pre-trained task scheduling model, which takes a preset user request and a prompt word sample corresponding to the preset user request as input variables and a preset subtask sequence corresponding to the preset user request as a label; wherein the preset user request includes a request initiated for a service provided by the smart cockpit system; and the preset subtask sequence includes at least one subtask for calling the service provided by the smart cockpit system.
6. The method according to claim 1, It is characterized in that Before reporting an error in response to the target task execution for the target user request, the method further includes: During the execution of the target task requested by the target user, obtaining feedback information corresponding to the target task; Determining whether the feedback information includes indication information indicating that the task execution has reported an error; If the feedback information includes indication information indicating that a task execution error is reported, it is determined that the target task execution error is reported.
7. A model-based task execution device, It is characterized in that The device comprises: An acquisition unit, configured to, in response to a target task execution error reported for a target user request, acquire a prompt word corresponding to the target user request, and a subtask sequence generated by a task scheduling model through logical reasoning of the target task based on the prompt word; A determination unit, configured to input the target user request and the subtask sequence into a classification model, so that the classification model performs classification calculation and generates a category text corresponding to the target factor of the target task execution error; wherein the classification model is obtained by supervised learning training based on historical user requests and historical subtask sequences corresponding to the historical user requests as training data, and preset task execution error factors as labels; an adjusting unit, configured to adjust the prompt word according to a target adjustment strategy corresponding to the target factor to obtain an adjusted new prompt word; The execution unit is used to obtain a new subtask sequence generated by the task scheduling model through logical reasoning on the target task based on the new prompt word, so as to re-execute the target task based on the new subtask sequence.
8. An electronic device, It is characterized in that It includes a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the model-based task execution method according to any one of claims 1 to 6 by calling the machine-readable instructions.
9. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by the processor, the model-based task execution method according to any one of claims 1 to 6 is implemented.
