Prompt generation method and device

CN122965648APending Publication Date: 2026-10-23YOUKU CULTURE TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510487477.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

相关技术中,编写有效的提示主要依赖于人工试错和专家经验,这一过程不仅耗时费力,而且难以保证最佳效果

Benefits of technology

[0037]本公开实施例提供的提示生成方法及装置,能够自动生成针对各类任务对应的提示,动态地基于任务进行规则生成和定制,实现自适应的场景化的评估能力生成。且生成提示的效率高、速度快,所需人工干预少,所生成的提示更为精准、质量更高、更利于模型的优化和改进。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965648A_ABST
    Figure CN122965648A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a prompt generation method and device. The method comprises: configuring an agent according to a plurality of context information matched with a target task, a real feedback result corresponding to each context information, and a dialogue strategy corresponding to the target task; controlling the agent to perform dialogue with a large language model based on the dialogue strategy and the real feedback result corresponding to each context information, to obtain a target prompt for the target task output by the large language model, so as to judge the performance of the target task by using a target prompt evaluation model. The prompt corresponding to each type of task can be automatically generated, and the rule generation and customization can be dynamically performed based on the task, so as to realize the adaptive and scene-based evaluation ability generation. The efficiency and speed of generating the prompt are high, the manual intervention is less, and the generated prompt is more accurate, higher in quality, and more beneficial to the optimization and improvement of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of large language model technology, and in particular to a prompt generation method and apparatus. Background Technology

[0002] Large Language Models (LLMs) have demonstrated remarkable performance in Natural Language Processing (NLP). These models are capable of handling a variety of complex language tasks, such as text generation, sentiment analysis, and machine translation. However, the performance of LLMs largely depends on the input prompts—the natural language instructions used to guide the model in generating specific outputs. In related technologies, writing effective prompts primarily relies on human trial and error and expert experience, a process that is not only time-consuming and labor-intensive but also difficult to guarantee optimal results. Summary of the Invention

[0003] In view of this, the present disclosure proposes a prompt generation method and apparatus.

[0004] According to one aspect of this disclosure, a prompt generation method is provided, the method comprising:

[0005] The agent is configured based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. The dialogue strategy includes preset prompt words matching the target task for each dialogue stage in each round of dialogue. The dialogue stages include result generation stage, comparative analysis stage, reflection stage, and summary and refinement stage.

[0006] The agent is controlled to engage in dialogue with the large language model based on the dialogue strategy and the actual feedback results corresponding to each context information, thereby obtaining the target prompts output by the large language model for the target task, and using the target prompts to evaluate the performance of the model in performing the target task.

[0007] In one possible implementation, the agent is controlled to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain target prompts for the target task output by the large language model, including:

[0008] For each context information, a dialogue is conducted with a large language model that has the latest feedback criteria based on the dialogue strategy and the actual feedback result corresponding to the context information, to obtain the pending feedback criteria output by the large language model. The latest feedback criteria is the initial feedback criteria or the pending feedback criteria output by the large language model in the dialogue for the previous context information.

[0009] If it is determined that the dialogue with all contextual information has been completed, then the pending feedback criterion output by the large language model in the dialogue with the last contextual information is determined as the target prompt for the target task.

[0010] In one possible implementation, for each piece of context information, a dialogue is conducted with a large language model possessing the latest feedback criteria, based on the dialogue strategy and the actual feedback result corresponding to that context information, to obtain the undetermined feedback criteria output by the large language model, including:

[0011] The task expectation description generated based on the preset prompt words in the result generation stage and the current context information is input into the large language model to obtain the prediction feedback result of the large language model based on the latest feedback criteria for the context information.

[0012] The comparative analysis description generated based on the preset prompt words in the comparative analysis stage, the predicted feedback result, and the actual feedback result corresponding to the current context information is input into the large language model to obtain the comparative analysis result output by the large language model. The comparative analysis result is used to indicate the reason for the difference between the predicted feedback result and the corresponding actual feedback result.

[0013] The reflection description generated based on the preset prompts in the reflection phase and the comparative analysis results is input into the large language model to obtain the reflection results output by the large language model. The reflection results include solutions to reduce the difference between the predicted feedback results and the corresponding actual feedback results.

[0014] In response to the reflection results, the summary description generated based on the preset prompts in the summary and refinement stage is input into the large language model to obtain the pending feedback criteria output by the large language model.

[0015] In one possible implementation, the task expectation description includes contextual information and descriptive information about the results that the large language model needs to provide in response to the contextual information;

[0016] The comparative analysis description includes actual feedback results and guidance information for conducting comparative analysis based on the actual feedback results;

[0017] The reflection description is used to indicate how reflection is needed on the results of the comparative analysis.

[0018] In one possible implementation, the target cue is used to indicate the standards and rules that the model needs to follow to perform the target task.

[0019] According to another aspect of this disclosure, a prompt generation apparatus is provided, the apparatus comprising:

[0020] The configuration module is used to configure the intelligent agent based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. The dialogue strategy includes preset prompt words matching the target task for each dialogue stage in each round of dialogue. The dialogue stages include result generation stage, comparative analysis stage, reflection stage, and summary and refinement stage.

[0021] An intelligent agent is used to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain the target prompts output by the large language model for the target task, and to use the target prompts to evaluate the performance of the model in performing the target task.

[0022] In one possible implementation, the agent is controlled to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain target prompts for the target task output by the large language model, including:

[0023] For each context information, a dialogue is conducted with a large language model that has the latest feedback criteria based on the dialogue strategy and the actual feedback result corresponding to the context information, to obtain the pending feedback criteria output by the large language model. The latest feedback criteria is the initial feedback criteria or the pending feedback criteria output by the large language model in the dialogue for the previous context information.

[0024] If it is determined that the dialogue with all contextual information has been completed, then the pending feedback criterion output by the large language model in the dialogue with the last contextual information is determined as the target prompt for the target task.

[0025] In one possible implementation, for each piece of context information, a dialogue is conducted with a large language model possessing the latest feedback criteria, based on the dialogue strategy and the actual feedback result corresponding to that context information, to obtain the undetermined feedback criteria output by the large language model, including:

[0026] The task expectation description generated based on the preset prompt words in the result generation stage and the current context information is input into the large language model to obtain the prediction feedback result of the large language model based on the latest feedback criteria for the context information.

[0027] The comparative analysis description generated based on the preset prompt words in the comparative analysis stage, the predicted feedback result, and the actual feedback result corresponding to the current context information is input into the large language model to obtain the comparative analysis result output by the large language model. The comparative analysis result is used to indicate the reason for the difference between the predicted feedback result and the corresponding actual feedback result.

[0028] The reflection description generated based on the preset prompts in the reflection phase and the comparative analysis results is input into the large language model to obtain the reflection results output by the large language model. The reflection results include solutions to reduce the difference between the predicted feedback results and the corresponding actual feedback results.

[0029] In response to the reflection results, the summary description generated based on the preset prompts in the summary and refinement stage is input into the large language model to obtain the pending feedback criteria output by the large language model.

[0030] In one possible implementation, the task expectation description includes contextual information and descriptive information about the results that the large language model needs to provide in response to the contextual information;

[0031] The comparative analysis description includes actual feedback results and guidance information for conducting comparative analysis based on the actual feedback results;

[0032] The reflection description is used to indicate how reflection is needed on the results of the comparative analysis.

[0033] In one possible implementation, the target cue is used to indicate the standards and rules that the model needs to follow to perform the target task.

[0034] According to another aspect of this disclosure, a prompt generation apparatus is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.

[0035] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.

[0036] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.

[0037] The prompt generation method and apparatus provided in this disclosure can automatically generate prompts corresponding to various tasks, dynamically generate and customize rules based on tasks, and achieve adaptive, scenario-based evaluation capability generation. Furthermore, the prompt generation is efficient and fast, requires minimal human intervention, and produces more accurate, higher-quality prompts that are more conducive to model optimization and improvement.

[0038] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0039] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0040] Figure 1 A flowchart illustrating a prompt generation method according to an embodiment of the present disclosure is shown.

[0041] Figure 2 The diagram illustrates a dialogue process of Example 1 in a prompt generation method according to an embodiment of the present disclosure.

[0042] Figure 3 A schematic diagram illustrating the implementation principle of a prompt generation method according to an embodiment of the present disclosure is shown.

[0043] Figure 4 This is a block diagram illustrating a prompt generation device 1900 according to an exemplary embodiment. Detailed Implementation

[0044] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0045] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.

[0046] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.

[0047] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.

[0048] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0049] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0050] Large Language Model as a Judge (LLM-as-a-Judge) refers to an application approach that uses a large language model (LLM) as a judge or evaluator. In this model, a specifically trained and optimized large language model can evaluate, score, or provide feedback on certain input content, much like a human judge. In LLM-as-a-Judge applications, prompts play a crucial role. A prompt is an input instruction or question provided by the user or system to the large language model; it not only guides the model to understand the task requirements but also significantly influences the model's output and the quality of its evaluation. A Prompt Engineer (PE) is a specialist role focused on designing and optimizing input prompts to guide the large language model in generating specific outputs. Their main task is to maximize the potential of the language model through the design and optimization of prompts, improving its performance across various tasks, thereby driving the development and application of natural language processing technology. However, the optimized design of PromptEngineer for providing prompts is inefficient, slow, and has poor prompting effects, and it requires a high level of professional skills. Therefore, how to provide a method for automatically generating prompts is an urgent technical problem to be solved.

[0051] To address the aforementioned technical problems, this disclosure provides a prompt generation method and apparatus that can automatically generate prompts for various tasks, dynamically generate and customize rules based on the task, and achieve adaptive, scenario-based evaluation capability generation. Furthermore, the prompt generation is efficient and fast, requires minimal human intervention, and produces more accurate, higher-quality prompts that are more conducive to model optimization and improvement.

[0052] like Figure 1 As shown, the prompt generation method provided in this embodiment includes steps S101-S102.

[0053] In step S101, an agent is configured based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task.

[0054] In this embodiment, an agent can be constructed based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. This agent is then used to perform step S102 to automate the evaluation and writing of prompts. The agent can be constructed based on algorithms such as Natural Language Processing (NLP) and reinforcement learning; this disclosure does not limit its use. The agent can be trained using relevant technologies to enable it to engage in dialogue with a large language model according to the steps of this embodiment, providing the large language model with the input required for each step. For example, the agent can be trained based on sample data to enable it to generate task expectation descriptions, comparative analysis descriptions, reflective descriptions, and summary descriptions.

[0055] In this embodiment, for various target tasks, a small number of context information matching the target task and the real feedback results responding to each context information can be obtained as samples. Here, "small number" can refer to the fact that in few-shot learning, the number of samples (context information and its real feedback results) is only a few or a dozen. The types of target tasks are diverse, including language understanding tasks such as sentiment analysis, named entity recognition (NER), text classification, relation extraction, and semantic role labeling (SRL); language generation tasks such as text generation, machine translation, text summarization, dialog systems, and question answering systems; information extraction and retrieval tasks such as keyword extraction, text retrieval, and information extraction; and speech recognition, text-to-speech (TTS), grammar checking, text alignment, style transfer, etc., and this disclosure does not limit these.

[0056] The contextual information matching the target task can be background information matching the task type and / or information describing task requirements, etc. The actual feedback result to the contextual information can be the result that should be fed back in response to that contextual information, as annotated by humans or experts; this is closer to normal human reaction habits and more consistent with objective facts. In some embodiments, in target tasks that analyze and process contextual information, such as text classification, machine translation, text summarization, keyword extraction, speech recognition, and grammar checking, the contextual information can also be referred to as the execution object of the target task. For example, if the target task is to evaluate the quality of the plot of a script outline, then the plot is both contextual information and the execution object.

[0057] For example, assuming the objective in Example 1 is to evaluate the quality of the plot in a script outline, 10-15 plot points could be obtained as contextual information. The plot content could originate from various literary works, film and television scripts, or game storylines. For instance, 10-15 plot fragments could be selected from classic novels; these fragments should be representative and cover different plot types, such as conflict plots, emotional entanglements, and adventure plots. Then, experts would be invited to conduct a detailed evaluation of each plot point and provide a score from 0 to 100 as the actual feedback for each plot. During sample collection, it's crucial to ensure consistent expert evaluation standards. Detailed evaluation criteria can be developed in advance, including considerations such as plot rationality, coherence, and appeal. To ensure data accuracy and validity, a preliminary review can be conducted after collecting the plot points and their evaluation scores. If a plot's evaluation score deviates significantly from other similar plots, further communication with experts can be conducted to confirm and avoid noise in the data affecting the subsequent learning process. This provides a relatively accurate foundation for subsequent prompt generation. Because the plot content is rich and diverse, and the evaluation scores have a certain degree of authority, the model has a reliable reference during the learning process, which helps to better understand the standards and elements of plot quality evaluation.

[0058] For example, if the target task is to evaluate the adaptability of a text to an audience, the contextual information can include the text segments to be evaluated, and the specific type of readers suitable for each text segment as the corresponding real feedback results. The specific type of readers can be divided based on age, education level, cultural background, etc.

[0059] In this embodiment, the dialogue strategy may include preset prompts that match the target task for each dialogue stage in each round of dialogue. The dialogue stages may include a result generation stage, a comparative analysis stage, a reflection stage, and a summary and refinement stage.

[0060] In this embodiment, different dialogue strategies need to be set for different target tasks to better guide the large language model in generating target prompts for the target task during subsequent dialogues based on this strategy. Users can pre-construct a thought framework for executing the target task according to the principles of structured PE (Programmatical Object Model) writing, and then set preset prompts for different dialogue stages based on this framework. At least one round of dialogue with the large language model is conducted for each context, and each round includes four stages: result generation, comparative analysis, reflection, and summary / refinement. The result generation stage generates a predicted output based on the latest feedback criteria (task skills) for the current context. The comparative analysis stage compares the predicted output with the corresponding actual output to determine the reasons for the discrepancy. The reflection stage further reflects on the comparative analysis results to find solutions to reduce the discrepancy between the predicted and actual outputs. The summary and refinement stage is used to update the existing feedback criteria based on the reflection results (Policy update) and output the pending feedback criteria. The following will illustrate each stage with relevant examples.

[0061] For example, continuing with Example 1 above, after obtaining the plot and its evaluation score, since the goal is to enable the large language model to accurately evaluate the plot, we can set up a framework for the large language model to perform the task in Example 1, including: setting the role as a plot quality evaluator. This role is like a professional literary critic or film and television plot analyst, possessing keen insight and professional judgment. Then, a role profile is created: A plot quality evaluator is a professional specializing in evaluating the quality of plot content. They have extensive knowledge in literature, film, drama, and other fields, and can analyze plots from multiple perspectives. Further, the role's skills are determined: possessing plot structure analysis ability, able to quickly identify the beginning, development, climax, and ending of a plot, and judge whether its structure is complete and reasonable; possessing emotion analysis ability, able to perceive various emotions contained in the plot, such as joy, sadness, and anger, and judge whether the expression of emotions is subtle and natural; and possessing logical analysis ability, ensuring that the development of events in the plot is logical and free of logical loopholes. Then, further establish the rules that the role must follow: always evaluate based on the plot content itself, without being influenced by personal preferences or external factors; judge each plot element fairly and impartially according to the pre-set evaluation criteria; if uncertainties arise during the evaluation process, refer to existing evaluation cases or communicate with other evaluators. Next, based on the above settings, plan the workflow for the role that meets the above conditions: First, carefully read the plot content, marking key plot elements such as changes in character relationships and turning points in events. Then, analyze the plot structure, emotional expression, and logical relationships, comparing the analysis results with the pre-set standards. Next, synthesize the analysis results from all aspects and give a preliminary evaluation score. Finally, review the entire plot again to check if the evaluation score is reasonable, and make minor adjustments if necessary. Finally, conduct initialization preparations for formally starting work: before starting the plot evaluation, review the standards and guidelines for plot quality evaluation to ensure the accuracy of your judgment criteria; prepare recording tools to record key information and analysis results during the evaluation process. Ultimately, this allows evaluators to assess each plot point according to the aforementioned process during actual plot quality assessments. This structured, multi-turn cue writing method provides the model with a clear thought framework, enabling it to proceed systematically during plot quality assessment tasks. By clearly defining roles, skills, rules, and processes, the model can more accurately simulate the thought process of human evaluators, thereby improving the accuracy and reliability of plot quality assessments.

[0062] Then, based on the above thinking framework, the preset prompts for different dialogue stages can be further determined. These preset prompts can describe what information the large language model needs to output for its corresponding dialogue stage, and how to obtain this information. There are differences in the preset prompts for different dialogue stages for different target tasks. For example, the preset prompts for the result generation stage in Example 1 above may include evaluation criteria (i.e., feedback criteria, which are the standards or rules that need to be followed when the target task is executed; for example, if the target task is a scoring task, then the feedback criteria are the scoring standards or scoring rules) and scoring; the preset prompts for the comparative analysis stage may include differences and analysis of reasons; the preset prompts for the reflection stage may include reasons for mistakes, scoring details, and deduction items; the preset prompts for the summary and refinement stage may include organizing evaluation strategies and outputting complete evaluation criteria (i.e., target prompts and pending feedback criteria mentioned below).

[0063] In this embodiment, before step S101, the method may further include: issuing a configuration prompt, which reminds the user to input a target task, multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. Then, the agent determines the target task, the multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task based on the detected user input operation in response to the configuration prompt.

[0064] In step S102, the intelligent agent is controlled to engage in dialogue with the large language model based on the dialogue strategy and the actual feedback results corresponding to each context information, obtaining target prompts for the target task output by the large language model. These target prompts are then used to evaluate the model's performance in executing the target task. The target prompts can be used to indicate the standards and rules that the model needs to follow when executing the target task. Target prompts can be used to evaluate the model's performance in executing the target task because they set specific and clear task requirements for the model, helping it focus on the core objective. The performance of the model can then be directly measured by the completion of the target task. Furthermore, target prompts clarify the expected form and content of the output and provide quantifiable standards and rules. The performance of the model can be evaluated by checking whether its output meets these requirements. For example, during the model debugging phase, when evaluating model performance, target prompts can be input along with context information into the model, and then the performance of the model in executing the target task can be judged based on the degree of matching between the feedback results output by the model and the actual feedback results. In addition, once the model has been debugged and is put into use, target cues can also serve as prompts to guide the model in its operation.

[0065] In this way, after configuring the agent, it can automatically engage in dialogue with the large language model, continuously optimizing prompts and searching for the optimal solution during the dialogue. The entire dialogue process requires no human intervention, making it significantly faster and more efficient than manually designing prompts based on experience. Furthermore, since manually designing prompts relies on the developer's own technical expertise, it requires developers to possess extremely high levels of expertise to design effective prompts for various tasks. In contrast, this embodiment utilizes the rich natural language processing knowledge and experience of the large language model to automatically generate target prompts, requiring less expertise from developers and reducing the manual cost of prompt design. Moreover, the characteristics of the large language model mean it possesses a higher level of expertise than developers, resulting in higher quality and accuracy of the generated target prompts. Furthermore, since the above method can be used to generate prompts for various tasks, it has stronger transfer and generalization capabilities, making it widely applicable to various prompt generation scenarios and no longer limited by specific scenarios.

[0066] In one possible implementation, step S102 may include:

[0067] For each context information, a dialogue is conducted with a large language model that has the latest feedback criteria based on the dialogue strategy and the actual feedback result corresponding to the context information, to obtain the pending feedback criteria output by the large language model. The latest feedback criteria is the initial feedback criteria or the pending feedback criteria output by the large language model in the dialogue for the previous context information.

[0068] If it is determined that the dialogue with all contextual information has been completed, then the pending feedback criterion output by the large language model in the dialogue with the last contextual information is determined as the target prompt for the target task.

[0069] In this system, during the dialogue between the agent and the large language model regarding the first contextual information, the large language model uses the initial feedback criterion as the latest feedback criterion. In subsequent dialogues regarding the second and subsequent contextual information, the large language model uses the pending feedback criterion output from the previous contextual information dialogue as the latest feedback criterion. This mechanism helps improve the accuracy and adaptability of the large language model in multi-turn dialogues. Specifically, in the first contextual information dialogue, the large language model uses the initial feedback criterion as the latest feedback criterion. The initial feedback criterion can be a basic standard or rule, either already possessed by the large language model or newly constructed for the first contextual information. For example, the initial feedback criterion might include basic semantic understanding rules, factual accuracy judgment standards, logical reasoning rules, and evaluation requirements. When entering the second and subsequent contextual information dialogues, the large language model, under the agent's control, uses the pending feedback criterion output from the previous round as the latest feedback criterion, allowing the model to dynamically adjust according to the progress of the dialogue. For example, if the previous dialogue involved understanding terminology in a specific domain, the pending feedback criterion could add a requirement for accurate explanation of that domain's terminology.

[0070] In this way, large language models can better align with the rhythm and needs of dialogue. In practice, this reduces the inaccurate understanding of complex and dynamic dialogue scenarios caused by fixed criteria. For example, in a dialogue involving multiple rounds of technical discussion, the initial feedback criteria might only be some general technical concept judgments. However, as the dialogue delves into the details of specific technologies and introduces new technical concepts, using the pending feedback criteria from the previous round allows the model to understand and respond more accurately. This helps to continuously improve the accuracy of the output pending feedback criteria through rounds of dialogue, thereby enhancing the deep understanding of the dialogue content in the dialogue interaction between the large language model and the agent, enhancing the coherence and effectiveness of the dialogue, and further improving the accuracy of the pending feedback criteria.

[0071] In one possible implementation, for each piece of contextual information, a dialogue is conducted with a large language model possessing the latest feedback criteria, based on the dialogue strategy and the corresponding real feedback result. This yields the pending feedback criteria output by the large language model, which can include a round of dialogue consisting of a result generation phase, a comparative analysis phase, a reflection phase, and a summary and refinement phase. The following illustrative explanation illustrates the implementation of the result generation phase, comparative analysis phase, reflection phase, and summary and refinement phase within a round of dialogue for a single piece of contextual information.

[0072] In the result generation phase dialogue, the agent inputs the task expectation description generated based on the preset prompts and current context information of the result generation phase into the large language model, and obtains the prediction feedback result of the large language model based on the latest feedback criteria for the context information.

[0073] The task expectation description may include contextual information and descriptive information about the results that the large language model needs to provide feedback on in response to the contextual information. The results that the large language model needs to provide feedback on may be indicated by preset prompts in the result generation stage. For example, it may be the preset prompts themselves, or it may be obtained by adjusting the preset prompts based on the current execution progress, so that the large language model can output the expected prediction feedback results based on the latest matching feedback criteria based on the task expectation description.

[0074] In some embodiments, the agent can automatically generate a task expectation description based on preset prompts from the result generation phase and current context information after the dialogue begins.

[0075] Taking Example 1 as an example, such as Figure 2 As shown, for the target task in Example 1, in the dialogue based on the first context information, the expected description of the task may include:

[0076] Description: The input is scored based on the known "evaluation criteria (i.e., the latest feedback criteria)".

[0077] Input content: First context information.

[0078] Since the task expectation description at this time corresponds to the first context information, the large language model will predict the generation of feedback results based on the initial feedback criteria that match the task expectation description (that is, the known evaluation criteria mentioned in the description information).

[0079] For dialogues not beginning with the first round (i.e., dialogues involving the second and subsequent contextual information), the task expectation description can also include specifying the pending feedback criteria from the previous round's large language model output as the latest feedback criteria for responding to contextual information in the current round of dialogue. Taking Example 1 as an example again, such as... Figure 2 As shown, for the target task in Example 1, in the dialogue targeting the second contextual information, the expected description of the task may include:

[0080] Description: Please rate the following content according to your latest "Evaluation Criteria (i.e., the latest Feedback Criteria)".

[0081] Input content: Second context information.

[0082] In the example above, the agent adjusts the preset prompt based on the current execution progress (e.g., for the first context information or for the second context information) to obtain descriptive information. For example, the preset prompt is "Please score the following content according to the evaluation criteria (i.e., the latest feedback criteria)". When targeting the first context information, the evaluation criteria are limited to "existing" and when targeting the second context information, the evaluation criteria are limited to "latest" to help the large language model understand the task to be performed more accurately.

[0083] In some embodiments, after receiving a task expectation description, the large language model first determines whether it has a matching feedback criterion. If not, it can create a feedback criterion for the task expectation description and use it as the latest feedback criterion. If a matching feedback criterion exists, it uses that feedback criterion as the latest feedback criterion. The large language model can use a preset initial feedback criterion corresponding to the task expectation description (this initial feedback criterion is either already possessed by the large language model or newly constructed based on the first context information) as the latest feedback criterion, or it can use the pending feedback criterion output by the large language model in the previous round of dialogue as the latest feedback criterion.

[0084] The predictive feedback results can include the thought process by which the large language model analyzes and processes contextual information, as described by the model, and the results obtained after analyzing and processing the contextual information. The predictive feedback results are the output of the large language model based on the latest feedback criteria, reflecting the feedback to the contextual information. For example, Figure 2 As shown, in the dialogue of Example 1, after receiving the task expectation description, the large language model will score the first context information and output the scoring process and the specific score result as the prediction feedback result.

[0085] In the comparative analysis phase, the comparative analysis description generated based on the preset prompts, the predicted feedback results, and the actual feedback results corresponding to the current context information is input into the large language model to obtain the comparative analysis results output by the large language model. The comparative analysis results are used to indicate the reasons for the difference between the predicted feedback results and the corresponding actual feedback results.

[0086] The comparative analysis description may include actual feedback results and guidance information for conducting comparative analysis based on those results. The comparative analysis description may be the preset prompts themselves, or adjusted based on preset prompts. The guidance information for comparative analysis based on actual feedback results should be clear and logically sound, specifying which objects are being compared and logically describing the aspects from which the comparative analysis is conducted. This allows the large language model to deeply analyze the differences between the predicted feedback results and the actual feedback results, and the possible causes of these differences, etc.

[0087] In some embodiments, after receiving the prediction feedback result output by the large language model, the agent can automatically generate a comparative analysis description based on the preset prompt words in the comparative analysis stage, the prediction feedback result, and the actual feedback result corresponding to the current context information.

[0088] For example, Figure 2 In Example 1 shown, in a dialogue targeting the first contextual information, the contrastive analysis description may include:

[0089] The expert rating is 4 out of 10. Experts believe that the plot and methods are not specific enough and there are many logical errors... (Real feedback)

[0090] Your score differs significantly from the expert judges' scores. Compare the score differences and analyze the reasons (guidance information).

[0091] After receiving the above comparative analysis description, the large language model will combine the expert's scoring method to analyze the reasons for the scoring difference and obtain the comparative analysis result "Okay, first, let's analyze why the judge only gave 4 points while I got 6 points. There are several logical problems that were not found, and my requirements for specific lines were not strict enough, which led to..." and output it.

[0092] In the example above, if the preset prompt is "compare the score differences and analyze the reasons", the agent can adjust the preset prompt based on the relative difference between the predicted feedback and the actual feedback (your score is very different from the expert judge's score) to generate a comparative analysis description, so as to guide the large language model to perform the task more accurately.

[0093] The reflection phase dialogue inputs the reflection description generated based on the preset prompts of the reflection phase and the comparative analysis results into the large language model to obtain the reflection results output by the large language model. The reflection results include solutions to reduce the difference between the predicted feedback results and the corresponding actual feedback results.

[0094] The reflection description indicates the manner in which reflection is needed regarding the comparative analysis results. The reflection description can be a preset prompt word itself, or an adjustment based on a preset prompt word. The manner of reflection can include aspects such as improving the accuracy of the feedback results and the purpose of the reflection, enabling the large language model to conduct comprehensive and multi-faceted reflection, determine solutions to reduce the discrepancy between the predicted feedback results and the corresponding actual feedback results, and thus form a reflection result.

[0095] In some embodiments, after receiving the comparative analysis results output by the large language model, the agent can automatically generate a task expectation description based on the preset prompts from the reflection phase and the comparative analysis results.

[0096] For example, Figure 2 In Example 1 shown, in a dialogue based on the first contextual information, the reflective description may include:

[0097] 1. Based on the above comparative analysis results, reflect on the reasons for making mistakes.

[0098] 2. You can summarize your reflections into "scoring details" and "deduction items" to remind yourself and ensure that your scores match those of the experts next time.

[0099] After receiving the above reflection description, the large language model will reflect and output the reflection result "Added deduction item: 1. "credibility of technical means" *If the plot involves professional operation or complex technical means, but lacks specific process → "serious logical break", deduct 1 to 2 points;"

[0100] In the example above, the reflection description can be the preset prompt word itself.

[0101] In response to the reflection results of the dialogue during the summary and refinement stage, the summary description generated based on the preset prompts of the summary and refinement stage is input into the large language model to obtain the pending feedback criteria output by the large language model.

[0102] The summary description instructs the large language model to formulate and output a pending feedback criterion based on the aforementioned result generation, comparative analysis, and reflection phases. The summary description can be the preset prompt words themselves, or an adjustment based on preset prompt words. This pending feedback criterion is essentially a prompt generated by the large language model for the target task after completing the dialogue based on the current context information in this round.

[0103] In some embodiments, after receiving the reflection results output by the large language model, the agent can automatically generate a summary description based on preset prompts from the summary and refinement stage.

[0104] For example, Figure 2In Example 1 shown, in a dialogue based on the first contextual information, the summary description may include:

[0105] Based on the reflection results from the previous round, please organize and generate a new evaluation strategy. Requirements: Be sure to output complete "evaluation criteria (i.e., pending feedback criteria)".

[0106] After receiving the above summary description, the large language model will organize and summarize the information to obtain the pending feedback criteria: "Okay, here are the revised scoring criteria based on my reflection: This revision emphasizes the logicality of the content and imposes strict requirements on the 'feasibility / credibility' dimension to better align with expert preferences..." and output it.

[0107] In the examples above, the summary description can be the preset prompt word itself.

[0108] After completing the summary and refinement stage of the dialogue, it can be determined that a round of dialogue for a certain contextual information has been completed. The next contextual information can be identified, and a new round of dialogue from the result generation stage to the summary and refinement stage can be initiated for the next contextual information.

[0109] Through the methods described above, such as Figure 3As shown, the learning process of a conventional algorithm model includes four stages: The first stage involves creating an initial model and determining its parameters (Model Parameters). Input is sent to the model to obtain its predicted output (Predict Output). The second stage involves obtaining the loss function of the current model based on the predicted output and the actual output (Real Output). The third stage involves optimizing the model using the loss function parameters through an optimizer. Finally, the fourth stage involves updating the weights based on the optimization results to obtain a model with new parameters. This process is repeated until the obtained model meets the requirements, completing model training. Compared to the iterative process of generating prompts using the prompt generation method of this disclosure, the four stages of the conventional algorithm model's learning process correspond to the four dialogue stages: "Result Generation Stage, Comparative Analysis Stage, Reflection Stage, and Summary and Refinement Stage." Therefore, the method provided in this disclosure actually abstracts and redefines the prompt generation process using the capabilities of a large language model, enabling the prompt generation method to continuously learn new samples by leveraging the multi-turn dialogue of the large language model combined with the memory capacity of long memory, thus achieving autonomous updating of feedback criteria. Among these features, multi-turn dialogues enable LLM to continuously delve deeper into the problem, with each round allowing for further reflection and adjustments based on the results of the previous round. Meanwhile, the long memory capability ensures that LLM does not forget previous knowledge and experience during the learning process, allowing newly learned samples to be combined with historical data. This constructs a more complete and intelligent learning system, continuously driving the model's autonomous learning and updates to adapt to ever-changing task requirements.

[0110] Thus, the prompt generation method provided in this embodiment of the disclosure has the following advantages:

[0111] 1. Through the above multi-round iterative update scheme, specific target prompts can be generated automatically, greatly improving the efficiency of manually writing prompts.

[0112] 2. This method makes it easier for large language models to understand complex scenarios. Compared with manually written descriptions, the description text generated by this method (describing task expectations, reflections, etc., input into the large language model at different stages of the dialogue) can more accurately reach the semantic space of the LLM, achieving precise output control of the LLM.

[0113] 3. Through the case studies presented, leverage the advantages of LLM in summarizing and refining data to accurately grasp the characteristics of the data, abstract the key points of concern for judges / experts, and form a unique method for automatically generating prompts using LLM.

[0114] 4. This method is based on the modeling process and references the learning process of stochastic gradient descent. By combining multi-turn dialogues and prompt writing, the method can achieve autonomous generation of prompts.

[0115] 5. The suggestion generation process is applicable to various suggestion writing scenarios. It provides an efficient and high-quality solution for automatic suggestion generation.

[0116] This disclosure also provides a prompt generation device, the device comprising:

[0117] The configuration module is used to configure the intelligent agent based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. The dialogue strategy includes preset prompt words matching the target task for each dialogue stage in each round of dialogue. The dialogue stages include result generation stage, comparative analysis stage, reflection stage, and summary and refinement stage.

[0118] An intelligent agent is used to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain the target prompts output by the large language model for the target task, and to use the target prompts to evaluate the performance of the model in performing the target task.

[0119] In one possible implementation, the agent is controlled to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain target prompts for the target task output by the large language model, including:

[0120] For each context information, a dialogue is conducted with a large language model that has the latest feedback criteria based on the dialogue strategy and the actual feedback result corresponding to the context information, to obtain the pending feedback criteria output by the large language model. The latest feedback criteria is the initial feedback criteria or the pending feedback criteria output by the large language model in the dialogue for the previous context information.

[0121] If it is determined that the dialogue with all contextual information has been completed, then the pending feedback criterion output by the large language model in the dialogue with the last contextual information is determined as the target prompt for the target task.

[0122] In one possible implementation, for each piece of context information, a dialogue is conducted with a large language model possessing the latest feedback criteria, based on the dialogue strategy and the actual feedback result corresponding to that context information, to obtain the undetermined feedback criteria output by the large language model, including:

[0123] The task expectation description generated based on the preset prompt words in the result generation stage and the current context information is input into the large language model to obtain the prediction feedback result of the large language model based on the latest feedback criteria for the context information.

[0124] The comparative analysis description generated based on the preset prompt words in the comparative analysis stage, the predicted feedback result, and the actual feedback result corresponding to the current context information is input into the large language model to obtain the comparative analysis result output by the large language model. The comparative analysis result is used to indicate the reason for the difference between the predicted feedback result and the corresponding actual feedback result.

[0125] The reflection description generated based on the preset prompts in the reflection phase and the comparative analysis results is input into the large language model to obtain the reflection results output by the large language model. The reflection results include solutions to reduce the difference between the predicted feedback results and the corresponding actual feedback results.

[0126] In response to the reflection results, the summary description generated based on the preset prompts in the summary and refinement stage is input into the large language model to obtain the pending feedback criteria output by the large language model.

[0127] In one possible implementation, the task expectation description includes contextual information and descriptive information about the results that the large language model needs to provide in response to the contextual information;

[0128] The comparative analysis description includes actual feedback results and guidance information for conducting comparative analysis based on the actual feedback results;

[0129] The reflection description is used to indicate how reflection is needed on the results of the comparative analysis.

[0130] In one possible implementation, the target cue is used to indicate the standards and rules that the model needs to follow to perform the target task.

[0131] It should be noted that although the above embodiments have been used as examples to illustrate the prompt generation method and apparatus, those skilled in the art will understand that this disclosure is not limited thereto. In fact, users can flexibly set each step and module according to their personal preferences and / or actual application scenarios, as long as it conforms to the technical solution of this disclosure.

[0132] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0133] This disclosure also provides a prompt generation apparatus, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.

[0134] This disclosure also provides a non-volatile computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.

[0135] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.

[0136] Figure 4 This is a block diagram illustrating a prompt generation device 1900 according to an exemplary embodiment. For example, device 1900 may be provided as a server or terminal device. (Refer to...) Figure 4 The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0137] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output interface 1958 (I / O interface). Device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM macOS X TM Unix TM Linux TM FreeBSD TM Or similar.

[0138] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of the device 1900 to perform the above-described method.

[0139] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0140] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.

[0141] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute 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 may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information of computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this disclosure.

[0142] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0143] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0144] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0145] 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 the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive 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, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0146] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for generating prompts, characterized in that, The method includes: The agent is configured based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. The dialogue strategy includes preset prompt words matching the target task for each dialogue stage in each round of dialogue. The dialogue stages include result generation stage, comparative analysis stage, reflection stage, and summary and refinement stage. The agent is controlled to engage in dialogue with the large language model based on the dialogue strategy and the actual feedback results corresponding to each context information, thereby obtaining the target prompts output by the large language model for the target task, and using the target prompts to evaluate the performance of the model in performing the target task.

2. The method according to claim 1, characterized in that, The intelligent agent is controlled to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain target prompts for the target task output by the large language model, including: For each context information, a dialogue is conducted with a large language model that has the latest feedback criteria based on the dialogue strategy and the actual feedback result corresponding to the context information, to obtain the pending feedback criteria output by the large language model. The latest feedback criteria is the initial feedback criteria or the pending feedback criteria output by the large language model in the dialogue for the previous context information. If it is determined that the dialogue with all contextual information has been completed, then the pending feedback criterion output by the large language model in the dialogue with the last contextual information is determined as the target prompt for the target task.

3. The method according to claim 2, characterized in that, For each piece of contextual information, a dialogue is conducted with a large language model that has the latest feedback criteria, based on the dialogue strategy and the actual feedback result corresponding to that contextual information, to obtain the undetermined feedback criteria output by the large language model, including: The task expectation description generated based on the preset prompt words in the result generation stage and the current context information is input into the large language model to obtain the prediction feedback result of the large language model based on the latest feedback criteria for the context information. The comparative analysis description generated based on the preset prompt words in the comparative analysis stage, the predicted feedback result, and the actual feedback result corresponding to the current context information is input into the large language model to obtain the comparative analysis result output by the large language model. The comparative analysis result is used to indicate the reason for the difference between the predicted feedback result and the corresponding actual feedback result. The reflection description generated based on the preset prompts in the reflection phase and the comparative analysis results is input into the large language model to obtain the reflection results output by the large language model. The reflection results include solutions to reduce the difference between the predicted feedback results and the corresponding actual feedback results. In response to the reflection results, the summary description generated based on the preset prompts in the summary and refinement stage is input into the large language model to obtain the pending feedback criteria output by the large language model.

4. The method according to claim 3, characterized in that, The task expectation description includes contextual information and a description of the results that the large language model needs to provide in response to the contextual information; The comparative analysis description includes actual feedback results and guidance information for conducting comparative analysis based on the actual feedback results; The reflection description is used to indicate how reflection is needed on the results of the comparative analysis.

5. The method according to claim 1, characterized in that, The target cues are used to indicate the standards and rules that the model needs to follow to perform the target task.

6. A prompt generation device, characterized in that, The device includes: The configuration module is used to configure the intelligent agent based on multiple contextual information matching the target task, the actual feedback results for each contextual information, and the dialogue strategy corresponding to the target task. The dialogue strategy includes preset prompt words matching the target task for each dialogue stage in each round of dialogue. The dialogue stages include result generation stage, comparative analysis stage, reflection stage, and summary and refinement stage. An intelligent agent is used to engage in dialogue with a large language model based on the dialogue strategy and the actual feedback results corresponding to each of the context information, to obtain the target prompts output by the large language model for the target task, and to use the target prompts to evaluate the performance of the model in performing the target task.

7. A prompt generation apparatus, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.

8. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product comprising a computer program, or a non-volatile computer-readable storage medium carrying a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.