Prompt word processing method, electronic equipment and storage medium
By identifying user-marked erroneous results and their causes, the generated prompts are optimized, resolving the issue of inaccurate prompts in existing technologies and improving the accuracy and rationality of the model's output.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the prompts generated by the system are inaccurate and unreasonable, which affects the accuracy of the model output, especially when performing complex and personalized tasks.
The first model is invoked based on the first prompt word to execute the target task and generate the first output result; in response to user operation, the erroneous result item is marked and the description information of the reason for the marking is obtained; using the first description information and the first prompt word, the second prompt word is generated in an optimized manner, and the user's manual marking step is introduced to improve accuracy.
The optimized prompts can improve the accuracy of the model's output when performing complex and personalized tasks, ensuring the reasonableness and precision of the output results.
Smart Images

Figure CN121808112A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a prompt word processing method, electronic device, and storage medium. Background Technology
[0002] Currently, prompt words serve as input to large model tools, guiding and controlling the large model to perform corresponding functions. The accuracy of prompt words can directly affect the output performance of the large model.
[0003] In existing technologies, some large model tools can optimize the prompts input by the user, and then input the optimized prompt text into the corresponding large model for processing to obtain the corresponding output results.
[0004] However, existing solutions suffer from inaccurate or unreasonable prompts for system optimization, which affects the accuracy of model output. Summary of the Invention
[0005] This disclosure provides a prompt word processing method, electronic device, and storage medium to overcome the problems of inaccurate and unreasonable prompt words generated by the system, which affect the accuracy of model output.
[0006] In a first aspect, embodiments of this disclosure provide a method for processing prompt words, including:
[0007] Based on the first prompt word, the first model is invoked to execute the target task and generate a first output result; in response to the first operation, erroneous result items in the first output result are marked, and first description information for the erroneous result items is obtained, wherein the first description information represents the user's reason for marking the erroneous result items; based on the first description information and the first prompt word, a second prompt word is obtained.
[0008] Secondly, embodiments of this disclosure provide a prompt word optimization device, comprising:
[0009] The execution module is used to call the first model to execute the target task based on the first prompt word and generate the first output result;
[0010] An interaction module is configured to respond to a first operation, mark erroneous result items in the first output result, and obtain first descriptive information for the erroneous result items, wherein the first descriptive information characterizes the user's reason for marking the erroneous result items;
[0011] The optimization module is used to obtain a second prompt word based on the first description information and the first prompt word.
[0012] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0013] The memory stores computer-executed instructions;
[0014] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the prompt word processing method as described in the first aspect and various possible designs of the first aspect.
[0015] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the prompt word processing method described in the first aspect and various possible designs of the first aspect.
[0016] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the prompt word processing method as described in the first aspect and various possible designs of the first aspect.
[0017] The prompt word processing method, electronic device, and storage medium provided in this embodiment generate a first output result by calling a first model to execute a target task based on a first prompt word; in response to a first operation, erroneous result items in the first output result are marked, and first descriptive information for the erroneous result items is obtained, wherein the first descriptive information represents the user's reason for marking the erroneous result items; and a second prompt word is obtained based on the first descriptive information and the first prompt word. By responding to the user's first operation, the first output result generated by the first model based on the first prompt word is marked, erroneous result items and corresponding reasons for marking are indicated, i.e., the first descriptive information, and then the second prompt word is obtained based on the first descriptive information, thereby optimizing the first prompt word. Because a user-manual marking step is introduced, the optimized second prompt word can improve the accuracy of the model output result when performing complex and personalized target tasks. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is an application scenario diagram of the prompt word processing method provided in the embodiments of this disclosure;
[0020] Figure 2 Flowchart of the prompt word processing method provided in the embodiments of this disclosure Figure 1 ;
[0021] Figure 3 A schematic diagram illustrating a labeled error result item provided in an embodiment of this disclosure;
[0022] Figure 4 A schematic diagram illustrating the differences provided in this embodiment of the disclosure;
[0023] Figure 5 A flowchart illustrating the specific implementation of step S1032-1;
[0024] Figure 6 Flowchart of the prompt word processing method provided in the embodiments of this disclosure Figure 2 ;
[0025] Figure 7 for Figure 6 A flowchart illustrating the specific implementation of step S205 in the illustrated embodiment;
[0026] Figure 8 This is a schematic diagram illustrating a process for generating a second prompt word, provided in an embodiment of the present disclosure.
[0027] Figure 9 A structural block diagram of the prompt word optimization device provided in the embodiments of this disclosure;
[0028] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0029] Figure 11 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0031] It should be noted that 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, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0032] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0033] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0034] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0036] The application scenarios of the embodiments of this disclosure are explained below:
[0037] The prompt word processing method provided in this disclosure can be applied to applications (APPs) with prompt word-based model processing capabilities, such as data search and content moderation applications. The executing entity in this embodiment can be a terminal device running the aforementioned application with prompt word-based model processing capabilities, a server deploying the server-side component corresponding to the aforementioned application, or other electronic devices performing similar functions. Specifically, when the executing entity is a terminal device, the terminal device executes the method provided in this embodiment by running the aforementioned application; when the executing entity is a server, the server-side component of the aforementioned application with prompt word-based model processing capabilities can run partially or entirely on the server, executing the method provided in this embodiment on the server side, while the terminal device runs the application's client. Communication between the server and the terminal device is based on server-client communication, enabling the terminal device to obtain the execution result of the method provided in this embodiment and display it as needed.
[0038] In some embodiments, the terminal device or server can implement the prompt word processing method provided in this disclosure by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be program-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be local applications, i.e., programs that need to be installed in the operating system to run, or mini-programs embedded in any APP, i.e., programs that run in a browser environment. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin; the specific implementation can be configured as needed. Furthermore, in implementing the prompt word processing method provided in this disclosure, the terminal device can execute the method by running computer-executable instructions or computer programs set locally, or by calling computer-executable instructions or computer programs set in an external server. In some embodiments, the server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud communication, cloud database, cloud computing, cloud functions, network services, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. Among these, cloud services may be interactive processing services that can be invoked by terminal devices.
[0039] Figure 1 This is an application scenario diagram of the prompt word processing method provided in the embodiments of this disclosure, with reference to... Figure 1 As shown in the diagram, taking a terminal device as an example, a target application with content search capabilities utilizing an intelligent agent runs within the terminal device. After a user creates and triggers a content search task through this target application, the terminal device invokes an intelligent agent based on a large model to search for specific content in an internal database or on an external network. Specifically, as shown in the diagram, the user inputs the search query "search for news related to event A" into the intelligent agent. Based on this search query, the intelligent agent generates corresponding recommended keywords. These recommended keywords are then input into the corresponding task model, and guided by these keywords, the agent searches for and generates relevant content (e.g., result items R_1, R_2, and R_3 as shown in the diagram) which is displayed on the interactive interface. This relevant content includes various media such as web pages, text, images, and videos. This completes the search task for the specific content "news related to event A".
[0040] In existing technologies, intelligent agents typically provide the ability to automatically generate prompts, that is, to convert the user's input request text into corresponding recommended prompts, and then input them into a large model for processing to obtain output results that match the user's needs. However, in existing solutions, when performing complex and personalized tasks, the system-generated recommended prompts are inaccurate or unreasonable, thus affecting the accuracy of the large model's output results.
[0041] This disclosure provides a prompt word processing method to solve the above-mentioned problems.
[0042] refer to Figure 2 , Figure 2 Flowchart of the prompt word processing method provided in the embodiments of this disclosure Figure 1 The method of this embodiment can be applied to a terminal device or a server. In one possible implementation, for a terminal device executing the method provided in this embodiment, the terminal device can execute program code deployed locally and / or externally to implement the prompt word processing method provided in this embodiment. In another possible implementation, a server can be used to deploy functional services implemented based on the prompt word processing method provided in this embodiment, and the terminal device can access the server and call the corresponding functional services to implement the prompt word processing method provided in this embodiment. For example, the prompt word processing method provided in this embodiment includes:
[0043] Step S101: Based on the first prompt word, call the first model to execute the target task and generate the first output result.
[0044] Step S102: In response to the first operation, mark the erroneous result item in the first output result and obtain the first description information for the erroneous result item, the first description information representing the user's reason for marking the erroneous result item.
[0045] Step S103: Based on the first description information and the first prompt word, obtain the second prompt word.
[0046] refer to Figure 1The illustrated application scenario diagram illustrates the method for processing prompt words using a terminal device as the execution subject. For example, the terminal device runs a target application and utilizes the agent function. The user interacts with the agent through an interface, inputting a request text. The agent then uses a large language model to understand the content of the request text and converts it into a corresponding recommended prompt word, i.e., the first prompt word. Next, using the first prompt word as input, the corresponding task model (i.e., the first model) is invoked to execute the target task indicated by the first prompt word, generating a corresponding first output result, which is displayed in the target application's interface. The steps of determining the corresponding first model based on the first prompt word and invoking the first model are implemented by the capabilities provided by the agent and will not be elaborated further here.
[0047] Then, in response to the first output result presented in the interactive interface, the user performs a first operation, selects the erroneous result item that the user considers problematic, marks it, and inputs the reason for the user's marking of the erroneous result item, i.e., the first descriptive information. Figure 3 This is a schematic diagram illustrating a labeled error result item provided in an embodiment of the present disclosure, such as... Figure 3 As shown, the target application's interactive interface presents multiple output results, such as result items R_1, R_2, and R_3. The user then clicks the marking control corresponding to result item R_2 (shown as the "Feedback" button in the figure) to mark it, and enters the reason for marking it in the subsequent input box, i.e., the first description information. The content of the first description information is, for example, "Relevant only to the P model; I need overall data for both the P and S models." This content can be summarized as the error reason and the user's requirement; that is, the first description information represents the error reason and user requirement for the erroneous result item. The user then clicks the submit button, and the terminal device obtains the aforementioned erroneous result item (result item R_2) and its corresponding marking reason, i.e., the first description information.
[0048] Following this, in one possible implementation, the user-selected incorrect result item and its corresponding first description information can be processed using a pre-trained model. The first prompt word is then optimized based on the labeling reason represented by the first description information to obtain the second prompt word. This can be implemented using a pre-trained large language model or a pre-defined [description information - prompt word] mapping logic, which can be configured as needed. In another possible implementation, step S103 specifically includes:
[0049] Step S1031: Using the first model, output second descriptive information associated with the erroneous result item. The second descriptive information characterizes the reason for the generation of the erroneous result item.
[0050] Step S1032: Process the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word.
[0051] For example, by inputting the identifier (e.g., title name) corresponding to the erroneous result item back into the first model, and combining it with the corresponding prompt word, the first model explains the reason for generating the erroneous result item, i.e., the second descriptive information. Then, the first descriptive information, the second descriptive information, and the first prompt word generated through the above steps are input into a pre-trained optimized large model, i.e., the second model. Utilizing the capabilities of the second model, the cause of the aforementioned erroneous result item in the first prompt word is predicted, and by correcting the cause, the second prompt word is generated.
[0052] In one possible implementation, after step S103, the following is also included:
[0053] Step S104: Generate a second output result based on the second prompt word.
[0054] Step S105: Present the differences between the second output result and the first output result, and / or present the differences between the first descriptive information and the second descriptive information.
[0055] The second output result is generated by calling the first model to execute the target task again using the optimized second prompt word. The specific execution process is similar to that of generating the first output result. Then, the differences between the second output result and the first output result are displayed in the interactive interface to inform the user of the effect of the optimization. Figure 4 A schematic diagram illustrating the differences provided in this embodiment of the disclosure, such as... Figure 4 As shown, after generating the second output result based on the second descriptive information, the left side of the interactive interface displays the first descriptive information and the first output result generated based on the first descriptive information, including multiple result items, such as result items R_1, R_2, and R_3 shown in the figure. The right side of the interactive interface displays the second descriptive information and the second output result generated based on the second descriptive information. For example, as shown in the figure, the second descriptive information contains the [new content] shown in the figure relative to the first descriptive information. The first output result includes result items R_1, R_3, and R_4, etc. Result item R_2 is shown in shaded mode to indicate that it (relative to the first output result) has been deleted. That is, in the second output result generated by the optimized second descriptive information, unreasonable output results (i.e., result item R_2) have been removed. Afterwards, the user can click the "OK" button configured in the interactive interface to confirm the above optimization of the prompt words. In the subsequent execution of the target task, the optimized second prompt words will be used to perform the corresponding processing, thereby obtaining a more reasonable and accurate model output result.
[0056] Furthermore, in one possible implementation, step S1032 is specifically implemented as follows:
[0057] Step S1032-1: Call the second model to determine the problem segment in the first prompt word based on the first description information and the second description information, and generate the corrected segment corresponding to the problem segment.
[0058] Step S1032-2: Replace the problematic word segment in the first prompt word based on the corrected word segment to generate the second prompt word.
[0059] For example, after receiving the first and second description information, the second model understands and infers from their content to identify the problematic segment in the first prompt word. For instance, the first prompt word might include three statements: statement A, statement B, and statement C. The second model, through reasoning, identifies the problematic segment that previously caused the problematic result, such as statement B. It then modifies and replaces only statement B to generate the second prompt word. Because it references the explanation of the cause of the erroneous result (the second description information) provided by the first model (task model), the evaluation difficulty is reduced. This allows the second model (optimization model) to refer to the task model's explanation of the cause, compare it with the original prompt word (the first prompt word), locate the problematic segment, and generate the corresponding corrected segment. By fine-tuning the prompt word in this way, a large-scale overall change to the first prompt word is avoided, thus maintaining the stability of the output results.
[0060] Furthermore, in one possible implementation, such as Figure 5 As shown, the specific implementation of step S1032-1 includes:
[0061] Step S1032-1A: Determine the problem type using the second model based on the first and second description information.
[0062] Step S1032-1B: Based on the question type, determine the question segment in the first prompt word.
[0063] Step S1032-1C: Generate a corrected segment based on the problem segment, its corresponding context, problem type, and first description information.
[0064] For example, firstly, the first and second descriptive information are analyzed by calling a second model to determine the problem type. Problem types include, for example, ambiguous prompts, incorrect instructions, uncovered instructions, and instruction / data conflicts. Then, based on the problem type, problematic word segments within the first prompt that lead to the aforementioned problem type are identified; these problematic word segments may include one or more. Next, based on the problem type, and considering the problematic word segments, their corresponding context, and the overall content of the first descriptive information, the problematic word segments are optimized to generate corresponding corrected word segments that avoid causing the aforementioned problem types.
[0065] Furthermore, in one possible implementation, this embodiment further includes the following step before step S1032:
[0066] Step S100: Obtain reference prompt words for the second model. The reference prompt words are used to instruct the second model to adjust the local content of the first prompt word that causes the erroneous result item, and / or the adjustment method for the first prompt word is applicable to other prompt words that cause the erroneous result item of the same error type.
[0067] Accordingly, the specific implementation of step S1032 includes:
[0068] Step S1032A: Based on the reference prompt word, call the second model, process the first description information, the second description information and the first prompt word to obtain the second prompt word.
[0069] For example, during the second model's prompt word optimization process, it needs to acquire corresponding prompt words to guide the optimization process. In this embodiment, the terminal device acquires reference prompt words for the second model. These reference prompt words are specifically optimized for the scenario in which the second model performs prompt word optimization, thereby improving the performance of the second model. The reference prompt words instruct the second model to adjust the local content of the first prompt word that causes the erroneous result item, preventing the first prompt word from being modified or regenerated on a large scale. The reference prompt words can also instruct the second model that the adjustment method for the first prompt word is applicable to other prompt words that cause the same type of erroneous result item. That is, the modification method for the first prompt word has generalization, thereby preventing the introduction of new problems when performing other similar tasks based on the modified second prompt word.
[0070] Subsequently, during the process of optimizing the first prompt word using the second model, the reference prompt word is input into the second model. The second model then processes the first description information, the second description information, and the first prompt word based on this reference prompt word to obtain the second prompt word. Below is a possible implementation of the reference prompt word for the second model, including the following:
[0071] #Role: You are a prompt word optimization expert for a large model. You are given a prompt word to be optimized, multiple similar or scenario-based tasks, the execution results of other models (student models) on the tasks, the explanations provided by the student models for their results (incorrect results), and the correct results of the tasks or human feedback on the student models' results. You need to combine the above information to optimize the prompt word so that the output of the student models is close to the correct result.
[0072] #Workflow:
[0073] First, carefully evaluate the difference between the student model's output and the correct result for each task, or the human feedback on the student model's output. When the student model's output and the correct result are basically consistent, or when there is no human feedback, it means that the student model's output is correct, and there is no need to adjust the prompt words.
[0074] Second, when the student model outputs an error, carefully evaluate the explanation for the student model's output result, strictly refer to the prompt words to be optimized, see which part of the prompt words indicates that the student model's output error, and locate the specific prompt word that caused the error.
[0075] Third, summarize the commonalities of all error cases and extract local adjustment strategies for the prompt words that can resolve all error cases. Strictly adhere to the following standards:
[0076] A. The overall structure of the prompt words cannot be changed; only partial adjustments can be made.
[0077] # Output: The output is JSON and contains two fields:
[0078] old_prompt_part: The original local prompt word to be modified, which needs to be uniquely located through string matching.
[0079] In the original prompt word's location, new_prompt_part: the modified local prompt word.
[0080] B. Changes must be commonalities, aiming to resolve all cases of the same type. It is strictly forbidden to modify prompts based on the specific details of a single task, as this lacks universality.
[0081] In this embodiment, a first model is invoked based on a first prompt word to execute a target task and generate a first output result. In response to a first operation, erroneous result items in the first output result are marked, and first descriptive information for the erroneous result items is obtained. The first descriptive information represents the user's reason for marking the erroneous result items. The first model outputs second descriptive information associated with the erroneous result items, representing the reason for the generation of the erroneous result items. The second model processes the first descriptive information, the second descriptive information, and the first prompt word to obtain a second prompt word. By responding to the user's first operation, the first output result generated by the first model based on the first prompt word is labeled, marking erroneous result items and their corresponding marking reasons. Then, the reason for the generation of the erroneous result items output by the first model is obtained. The second model processes the marked reasons and the generation reasons to predict the position and adjustment method of the erroneous result items in the first prompt word, thus obtaining the second prompt word. This optimizes the first prompt word. Because a user-manual marking step is introduced, the optimized second prompt word can improve the accuracy of the model's output results when performing complex and personalized target tasks.
[0082] refer to Figure 6 , Figure 6 Flowchart of the prompt word processing method provided in the embodiments of this disclosure Figure 2 This embodiment is in Figure 2 Based on the illustrated embodiment, step S104 is further refined. This prompt word processing method includes:
[0083] Step S201: Based on the first prompt word, call the first model to execute the target task and generate the first output result.
[0084] Step S202: In response to the first operation, mark the erroneous result item in the first output result and obtain the first description information for the erroneous result item, the first description information including the error type.
[0085] Step S203: Using the first model, output the second descriptive information associated with the erroneous result item. The second descriptive information characterizes the reason for the generation of the erroneous result item.
[0086] Step S204: Generate first task data based on the first prompt word, the first output result, the first description information, and the second description information.
[0087] Step S205: Obtain at least one second task data and merge the second task data and the first task data into a task data group. The second task data is task data with the same error type generated during the execution of a non-target task.
[0088] Step S206: Call the second model to process the task data group to adjust the local problem word segment of the first prompt word and generate the second prompt word.
[0089] For example, in this embodiment, in response to the first operation, after obtaining the first description information representing the error type and the second description information representing the reason for the generation of the error result item by calling the first model, the first prompt word, the first output result, the first description information, and the second description information generated in the above steps can be further combined into a set of task data, namely, the first task data. Then, task data of the same type, namely, the second task data, is obtained. The so-called task data of the same type refers to task data generated during the execution of other tasks (non-target tasks) that corresponds to the same error type. The generation method of the second task data is the same as that of the first task data, and can be understood as the first task data generated during the previous execution of other tasks using the method provided in this embodiment. Then, the first task data and the previously generated second task data are combined to obtain a task data group. For example, based on the first description information in the first task data, it is determined that the problem type corresponding to the first prompt word in the current target task is "ambiguous prompt word instruction." Then, one or more second task data points generated previously, which also have the problem type of "ambiguous prompt word instruction," are combined with the first task data and the aforementioned one or more second task data points to form a task data group. Subsequently, the second model is invoked to process the aforementioned task data set, extract the common features of multiple task data sets in the task data set, identify the local problem segments in the first prompt word that cause the aforementioned error type, modify them, and generate the second prompt word.
[0090] In one possible implementation, such as Figure 7 As shown, the specific implementation of step S205 includes:
[0091] Step S2051: Call the second model to extract the common features of each task data in the task data group. The common features represent the prompt word features in the first prompt word of each task data that lead to the appearance of the wrong result item in the corresponding first output result.
[0092] Step S2052: Based on common features, determine the local problem word segments in the first prompt words of the first task data;
[0093] Step S2053: Generate a second prompt word by adjusting the local problem word segment of the first prompt word.
[0094] For example, firstly, the second model is invoked to extract the common features of each task data in the task data group. Specifically, this process includes, for example, characterizing each task data, then performing feature clustering on the characterized task data to determine the common features belonging to the same feature category. Then, reasoning is performed based on the common features to determine the word segment that best matches the common features in the first prompt word, that is, the word segment that triggers the question corresponding to the common features, i.e., the local question segment. At the same time, the adjustment method for the local question segment is determined based on the content in the task data, thereby realizing the adjustment of the local question field and generating the second prompt word. The second model, after a certain training period, has the ability to process the task data set described above and optimize the first prompt word in the first task data into the second prompt word. The specific training process will not be elaborated here. The input of the second model is the task data set described above, and the output is a structured and locatable change description, such as: {old_prompt_part, new_prompt_part}, where old_prompt_part is the local problem word segment in the first prompt word; new_prompt_part is the adjustment result for the local problem word segment, i.e., the corrected word segment.
[0095] Figure 8 This is a schematic diagram illustrating a process for generating a second prompt word according to an embodiment of the present disclosure. The following is in conjunction with... Figure 8 To further explain the above process, such as... Figure 8As shown, exemplarily, firstly, the first prompt word to be optimized is input into the first model to obtain the execution result, i.e., the first execution result. Then, in response to the user's first operation, manually labeled data is obtained, i.e., error result items and corresponding first description information. Then, the manually labeled data (error result items or corresponding location identifiers) is input into the first model, and the first model outputs the explanation of the cause, i.e., the second description information. Then, the above-mentioned manually labeled data, second description information, first prompt word, first execution result, etc. are combined into first task data. Then, multiple second task data of the same error type are obtained, combined into task data group, and the task data group is input into the second model. Then, the second model extracts common features based on the content in the above-mentioned task data group, and generates local optimization suggestions for the first prompt word based on the common features, including the location of local problem words and the modification method of local problem words. Next, based on the aforementioned local optimization suggestions, the first prompt word is adjusted to generate a second prompt word. The first model is then called again based on the second prompt word to generate the corresponding second execution result. The first and second prompt words, along with the first and second execution results, are presented in a comparative manner on the interactive interface. Finally, the user manually confirms the above presentation. If the user approves (shown as path Y in the diagram) of the optimization method for the first prompt word, the first prompt word is changed to the second prompt word. Subsequent executions of the target task will be based on the optimized second prompt word. Conversely, if the user does not approve of the optimization method for the first prompt word (shown as path N in the diagram), the user can continue with the first operation, marking new error items and the first description information, and repeating the above steps until a satisfactory prompt word is obtained.
[0096] In this embodiment, the implementation of steps S201-S203 is the same as that in this disclosure. Figure 2 The implementation methods of steps S101-S103 in the illustrated embodiment are the same, and will not be described in detail here.
[0097] Corresponding to the prompt word processing method in the above embodiment, Figure 9 This is a structural block diagram of the prompt word optimization device provided in the embodiments of this disclosure. The method described in the above embodiments can be executed by this prompt word optimization device, which can be implemented by software and / or hardware, and can be integrated into an electronic device with certain data processing capabilities. The electronic device may include, but is not limited to, mobile terminals with big data processing capabilities, as well as fixed terminals with big data processing capabilities such as desktop computers and supercomputers.
[0098] For ease of explanation, only the parts relevant to embodiments of this disclosure are shown. (Refer to...) Figure 9 The prompt word optimization device 3 includes:
[0099] Execution module 31 is used to call the first model to execute the target task based on the first prompt word and generate the first output result;
[0100] The interaction module 32 is used to respond to the first operation, mark the erroneous result item in the first output result, and obtain the first description information for the erroneous result item, wherein the first description information represents the reason for the user to mark the erroneous result item;
[0101] The optimization module 33 is used to obtain the second prompt word based on the first description information and the first prompt word.
[0102] According to one or more embodiments of this disclosure, the interaction module 32 is further configured to: generate a second output result based on a second prompt word, and further include at least one of the following: presenting the difference between the second output result and the first output result; presenting the difference between the first description information and the second description information.
[0103] According to one or more embodiments of this disclosure, the execution module 31 is further configured to: output second description information associated with the error result item through the first model, the second description information characterizing the reason for the generation of the error result item; the optimization module 33 is further configured to: process the first description information, the second description information and the first prompt word through the second model to obtain the second prompt word.
[0104] According to one or more embodiments of this disclosure, when the optimization module 33 processes the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word, it is specifically used to: call the second model to determine the problematic word segment in the first prompt word based on the first description information and the second description information, and generate the corrected word segment corresponding to the problematic word segment; replace the problematic word segment in the first prompt word based on the corrected word segment to generate the second prompt word.
[0105] According to one or more embodiments of this disclosure, when the optimization module 33 calls the second model to determine the problem segment in the first prompt word based on the first description information and the second description information, and generates the correction segment corresponding to the problem segment, it is specifically used to: determine the problem type through the second model based on the first description information and the second description information; determine the problem segment in the first prompt word based on the problem type; and generate the correction segment based on the problem segment and the corresponding context, problem type and first description information.
[0106] According to one or more embodiments of this disclosure, the optimization module 33 is further configured to: obtain a reference prompt word for the second model, the reference prompt word being used to instruct the second model to adjust the local content of the first prompt word that causes the erroneous result item, and / or the adjustment method for the first prompt word is applicable to other prompt words that cause erroneous result items of the same error type. When the optimization module 33 calls the second model, processes the first description information, the second description information, and the first prompt word to obtain the second prompt word, it is specifically configured to: call the second model based on the reference prompt word, process the first description information, the second description information, and the first prompt word to obtain the second prompt word.
[0107] According to one or more embodiments of this disclosure, the first description information includes an error type; the optimization module 33 is further configured to: generate first task data based on the first prompt word, the first output result, the first description information, and the second description information; obtain at least one second task data, and merge the second task data and the first task data into a task data group, wherein the second task data is task data generated during the execution of a non-target task and corresponding to the same error type; when the optimization module 33 processes the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word, it is specifically configured to: call the second model to process the task data group to adjust the local problem segments of the first prompt word and generate the second prompt word.
[0108] According to one or more embodiments of this disclosure, when the optimization module 33 calls the second model to process the task data group to adjust the local problem segments of the first prompt word and generate the second prompt word, it is specifically used to: call the second model to extract the common features of each task data in the task data group, the common features representing the prompt word features in the first prompt word of each task data that lead to the occurrence of the error result item in the corresponding first output result; determine the local problem segments in the first prompt word of the first task data according to the common features; and generate the second prompt word by adjusting the local problem segments of the first prompt word.
[0109] The execution module 31, interaction module 32, and execution module 33 are connected sequentially. The prompt word optimization device 3 provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0110] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 10 As shown, the electronic device 4 includes:
[0111] Processor 41, and memory 42 communicatively connected to processor 41;
[0112] Memory 42 stores instructions executed by the computer;
[0113] The processor 41 executes computer execution instructions stored in the memory 42 to achieve, for example, Figures 2-8 The prompt word processing method in the illustrated embodiment.
[0114] Optionally, the processor 41 and the memory 42 are connected via a bus 43.
[0115] For relevant instructions, please refer to the corresponding text. Figures 2-8 The relevant descriptions and effects of the steps in the corresponding embodiments are understood, and will not be elaborated on here.
[0116] This disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement this disclosure. Figures 2-8 The prompt word processing method provided in any of the corresponding embodiments.
[0117] This disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements this disclosure. Figures 2-8 The prompt word processing method provided in any of the corresponding embodiments.
[0118] To implement the above embodiments, this disclosure also provides an electronic device.
[0119] refer to Figure 11 The diagram illustrates a structural schematic of an electronic device 900 suitable for implementing embodiments of the present disclosure. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0120] like Figure 11As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0121] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0122] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this 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 via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.
[0123] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a 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, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0124] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0125] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0126] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0128] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units or modules do not necessarily limit the specific unit itself.
[0129] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0130] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0131] In a first aspect, according to one or more embodiments of this disclosure, a prompt word processing method is provided, comprising:
[0132] Based on the first prompt word, the first model is invoked to execute the target task and generate the first output result; in response to the first operation, the erroneous result items in the first output result are marked, and the first description information for the erroneous result items is obtained, the first description information representing the user's reason for marking the erroneous result items; based on the first description information and the first prompt word, the second prompt word is obtained.
[0133] According to one or more embodiments of this disclosure, the method further includes: generating a second output result based on a second prompt word, and further includes at least one of the following: presenting the difference between the second output result and the first output result; presenting the difference between the first description information and the second description information.
[0134] According to one or more embodiments of this disclosure, obtaining a second prompt word based on first description information and a first prompt word includes: outputting second description information associated with an erroneous result item through a first model, the second description information characterizing the reason for the generation of the erroneous result item; and processing the first description information, the second description information, and the first prompt word through a second model to obtain the second prompt word.
[0135] According to one or more embodiments of this disclosure, a second prompt word is obtained by processing the first description information, the second description information, and the first prompt word through a second model, including: calling the second model to determine the problematic word segment in the first prompt word based on the first description information and the second description information, and generating a corrected word segment corresponding to the problematic word segment; replacing the problematic word segment in the first prompt word based on the corrected word segment to generate the second prompt word.
[0136] According to one or more embodiments of this disclosure, calling a second model to determine the problem segment in the first prompt word based on the first description information and the second description information, and generating a corrected segment corresponding to the problem segment, includes: determining the problem type through the second model based on the first description information and the second description information; determining the problem segment in the first prompt word based on the problem type; and generating a corrected segment based on the problem segment and its corresponding context, problem type, and first description information.
[0137] According to one or more embodiments of this disclosure, the method further includes: obtaining a reference prompt word for the second model, the reference prompt word being used to instruct the second model to adjust the partial content of the first prompt word that causes the erroneous result item, and / or the adjustment method for the first prompt word being applicable to other prompt words that cause the same type of erroneous result item; invoking the second model, processing the first description information, the second description information, and the first prompt word to obtain the second prompt word, including: invoking the second model based on the reference prompt word, processing the first description information, the second description information, and the first prompt word to obtain the second prompt word.
[0138] According to one or more embodiments of this disclosure, the first description information includes an error type; the method further includes: generating first task data based on a first prompt word, a first output result, the first description information, and the second description information; obtaining at least one second task data and merging the second task data and the first task data into a task data group, wherein the second task data is task data generated during the execution of a non-target task and corresponding to the same error type; and processing the first description information, the second description information, and the first prompt word through a second model to obtain a second prompt word, including: calling the second model to process the task data group to adjust the local problem segments of the first prompt word and generate the second prompt word.
[0139] According to one or more embodiments of this disclosure, a second model is invoked to process a task data group to adjust local problem segments of the first prompt word and generate a second prompt word. This includes: invoking the second model to extract common features of each task data in the task data group, wherein the common features characterize the prompt word features in the first prompt word of each task data that lead to the occurrence of an error result item in the corresponding first output result; determining local problem segments in the first prompt word of the first task data based on the common features; and generating a second prompt word by adjusting the local problem segments of the first prompt word.
[0140] Secondly, according to one or more embodiments of this disclosure, a prompt word optimization device is provided, comprising:
[0141] The execution module is used to call the first model to execute the target task based on the first prompt word and generate the first output result;
[0142] An interaction module is used to respond to a first operation, mark erroneous result items in the first output result, and obtain first descriptive information for the erroneous result items, wherein the first descriptive information represents the reason for the user's marking of the erroneous result items;
[0143] The optimization module is used to obtain the second prompt word based on the first description information and the first prompt word.
[0144] According to one or more embodiments of this disclosure, the interaction module is further configured to: generate a second output result based on a second prompt word, and further include at least one of the following: presenting the difference between the second output result and the first output result; presenting the difference between the first description information and the second description information.
[0145] According to one or more embodiments of this disclosure, the execution module is further configured to: output second descriptive information associated with the erroneous result item through a first model, the second descriptive information representing the reason for the generation of the erroneous result item; the optimization module is further configured to: process the first descriptive information, the second descriptive information and the first prompt word through a second model to obtain the second prompt word.
[0146] According to one or more embodiments of this disclosure, when the optimization module processes the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word, it is specifically used to: call the second model to determine the problematic word segment in the first prompt word based on the first description information and the second description information, and generate the corrected word segment corresponding to the problematic word segment; replace the problematic word segment in the first prompt word based on the corrected word segment to generate the second prompt word.
[0147] According to one or more embodiments of this disclosure, when the optimization module calls the second model to determine the problem segment in the first prompt word based on the first description information and the second description information, and generates the corrected segment corresponding to the problem segment, it is specifically used to: determine the problem type through the second model based on the first description information and the second description information; determine the problem segment in the first prompt word based on the problem type; and generate the corrected segment based on the problem segment and the corresponding context, problem type and first description information.
[0148] According to one or more embodiments of this disclosure, the optimization module is further configured to: obtain a reference prompt word for the second model, the reference prompt word being used to instruct the second model to adjust the local content of the first prompt word that causes the erroneous result item, and / or the adjustment method for the first prompt word is applicable to other prompt words that cause erroneous result items of the same error type. When the optimization module calls the second model, processes the first description information, the second description information, and the first prompt word to obtain the second prompt word, it is specifically configured to: call the second model based on the reference prompt word, process the first description information, the second description information, and the first prompt word to obtain the second prompt word.
[0149] According to one or more embodiments of this disclosure, the first description information includes an error type; the optimization module is further configured to: generate first task data based on the first prompt word, the first output result, the first description information, and the second description information; obtain at least one second task data, and merge the second task data and the first task data into a task data group, wherein the second task data is task data generated during the execution of a non-target task and corresponding to the same error type; when the optimization module processes the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word, it is specifically configured to: call the second model to process the task data group to adjust the local problem segments of the first prompt word and generate the second prompt word.
[0150] According to one or more embodiments of this disclosure, when the optimization module calls the second model to process the task data group to adjust the local problem segments of the first prompt word and generate the second prompt word, it is specifically used to: call the second model to extract the common features of each task data in the task data group, the common features representing the prompt word features in the first prompt word of each task data that lead to the occurrence of the error result item in the corresponding first output result; determine the local problem segments in the first prompt word of the first task data according to the common features; and generate the second prompt word by adjusting the local problem segments of the first prompt word.
[0151] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0152] The memory stores the instructions that the computer executes;
[0153] At least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the prompt word processing method as described in the first aspect above and various possible designs of the first aspect.
[0154] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, which stores computer-executable instructions that, when executed by a processor, implement the prompt word processing method described in the first aspect and various possible designs of the first aspect.
[0155] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the prompt word processing method as described in the first aspect above and various possible designs of the first aspect.
[0156] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0157] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0158] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for processing prompt words, characterized in that, include: Based on the first prompt word, the first model is invoked to execute the target task and generate the first output result; In response to the first operation, erroneous result items in the first output result are marked, and first descriptive information for the erroneous result items is obtained, wherein the first descriptive information characterizes the reason for the user's marking of the erroneous result items; Based on the first description information and the first prompt word, the second prompt word is obtained.
2. The method according to claim 1, characterized in that, The method further includes: Based on the second prompt word, a second output result is generated, and, It also includes at least one of the following: Present the differences between the second output and the first output; The differences between the first and second description information are presented, whereby the second description information characterizes the reason for the generation of the erroneous result item.
3. The method according to claim 1, characterized in that, The step of obtaining the second prompt word based on the first description information and the first prompt word includes: The first model outputs second descriptive information associated with the erroneous result item, the second descriptive information representing the reason for the generation of the erroneous result item; The second prompt word is obtained by processing the first description information, the second description information, and the first prompt word through the second model.
4. The method according to claim 3, characterized in that, The step of processing the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word includes: The second model is invoked to determine the problematic word segment in the first prompt word based on the first description information and the second description information, and to generate the corrected word segment corresponding to the problematic word segment; The problematic word segment in the first prompt word is replaced based on the corrected word segment to generate the second prompt word.
5. The method according to claim 4, characterized in that, The step of calling the second model, based on the first description information and the second description information, to determine the problematic word segment in the first prompt word, and to generate the corrected word segment corresponding to the problematic word segment, includes: The problem type is determined using the second model based on the first and second description information. Based on the question type, determine the question segment in the first prompt word; The corrected phrase is generated based on the question phrase, its corresponding context, the question type, and the first description information.
6. The method according to claim 3, characterized in that, Also includes: Obtain reference prompt words for the second model, the reference prompt words being used to instruct the second model to adjust the local content of the first prompt word that causes the erroneous result item, and / or the adjustment method for the first prompt word is applicable to other prompt words that cause the same type of erroneous result item; The step of processing the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word includes: Based on the reference prompt word, the second model is invoked to process the first description information, the second description information, and the first prompt word to obtain the second prompt word.
7. The method according to claim 3, characterized in that, The first descriptive information includes an error type; the method further includes: First task data is generated based on the first prompt word, the first output result, the first description information, and the second description information. Acquire at least one second task data, and merge the second task data and the first task data into a task data group, wherein the second task data is task data with the same error type generated during the execution of a non-target task; The step of processing the first description information, the second description information, and the first prompt word through the second model to obtain the second prompt word includes: The second model is invoked to process the task data group, so as to adjust the local problem segments of the first prompt word and generate the second prompt word.
8. The method according to claim 7, characterized in that, The step of calling the second model to process the task data group, adjusting the local problem segments of the first prompt word, and generating the second prompt word includes: The second model is invoked to extract the common features of each task data in the task data group. The common features represent the prompt word features in the first prompt word of each task data that lead to the occurrence of the error result item in the corresponding first output result. Based on the common features, identify local problem word segments in the first prompt words of the first task data; A second prompt word is generated by adjusting a portion of the problem word segment of the first prompt word.
9. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the prompt word processing method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the prompt word processing method as described in any one of claims 1 to 8.