Prompt word generation method, reply generation method and computing equipment

By analyzing the current task of the target subject to obtain identity and supplementary information, we generate prompt words that are more in line with the current task, solving the problem of unstable quality of prompt words in the existing technology, and achieving higher quality and efficient prompt word generation.

CN120257980APending Publication Date: 2025-07-04XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510114130.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The quality of prompt words generated by the prior art is unstable, and there are problems such that the results do not match the input information, unclear semantics or grammatical errors.

Method used

By analyzing the current task of the target subject, obtaining identity, task description and supplementary information, generating prompt words including task background, task steps, reply style, reply tone, target group and reply format, and using a large language model to improve the accuracy and richness of the generation.

Benefits of technology

It improves the quality and efficiency of generating prompt words, ensures that prompt words are more in line with the needs of the current task, and improves the accuracy of user experience and task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257980A_ABST
    Figure CN120257980A_ABST
Patent Text Reader

Abstract

The invention provides a cue word generation method, a reply generation method and computing equipment, and relates to the field of artificial intelligence. Based on the cue word generation method, when a current task of a target subject is obtained, the current task can be analyzed to obtain reference information including identity, task description and supplementary information of the target subject; therefore, the current task can be understood more accurately, and a foundation is laid for subsequent generation of cue words more conforming to the current task. Subsequently, the cue word including the task background, the task steps, the reply style, the reply tone, the target group and the reply format can be generated based on the obtained reference information, so that the generated cue word is more comprehensive and richer, and the quality of the generated cue word is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and particularly to a prompt generation method, a response generation method, and a computing device. Background Art

[0002] Automatically generating task-related prompts based on the current task of a target entity (such as a user or a classifier, etc.) is an important research direction in the field of artificial intelligence, which can guide relevant users or systems to understand and execute tasks more accurately. However, the prompts generated based on traditional technologies have unstable quality, such as problems like the generated results not matching the input information, unclear semantics, or grammatical errors.

[0003] Therefore, how to improve the quality of the generated prompts is an urgent problem to be solved currently. Summary of the Invention

[0004] This application provides a prompt generation method, a response generation method, and a computing device, which can improve the quality of generated prompts.

[0005] In a first aspect, an embodiment of this application provides a prompt generation method, which can be applied to a prompt generation module. The method includes: obtaining the current task of a target entity; analyzing the current task to obtain reference information, where the reference information includes the identity of the target entity, the task description, and supplementary information; generating multiple prompts for the current task according to the reference information, and the multiple prompts include task background, task steps, response style, response tone, target group, and response format.

[0006] This application proposes that when obtaining the current task of a target entity, the current task can be analyzed first to obtain reference information including the identity of the target entity, the task description, and supplementary information, so as to be able to understand the current task more precisely, laying a foundation for generating more suitable prompts for the current task subsequently; subsequently, prompts including task background, task steps, response style, response tone, target group, and response format can be generated based on the obtained reference information, making the generated prompts more comprehensive and rich, thereby effectively improving the quality of the generated prompts.

[0007] In combination with the above first aspect, in some implementation manners of the first aspect, the task steps are generated based on the following method: generating at least one example task similar to the current task based on the task description; scoring the relevance between each example task and the current task; retaining the example tasks with a score greater than or equal to a first threshold; generating solutions for each retained example task based on the chain-of-thought paradigm; scoring the accuracy of each solution; retaining the solutions with a score greater than or equal to a second threshold; generating the task steps based on the retained solutions and the corresponding example tasks.

[0008] Among them, the chain of thought paradigm is a method for understanding and generating task steps. Its core lies in simulating the human thinking process and generating task steps in a certain logical order.

[0009] This application proposes that the chain of thought paradigm can be used to generate answers to example tasks, then score and screen the answers to the example tasks, and finally generate task steps based on the screened answers and the corresponding example tasks, so as to ensure the accuracy of the generated prompts and the diversity of the generated results.

[0010] Combined with the above first aspect, in some implementation manners of the first aspect, the example tasks with a retention score greater than or equal to the first threshold include: if there are no example tasks with a score greater than or equal to the first threshold, at least one example task similar to the current task is regenerated based on the task description. In this way, it can be ensured that there are always example tasks that meet the requirements.

[0011] Combined with the above first aspect, in some implementation manners of the first aspect, the answers with a retention score greater than or equal to the second threshold include: if there are no answers with a score greater than or equal to the second threshold, the answers to each retained example task are regenerated based on the chain of thought paradigm. In this way, it can be ensured that the example tasks always have answers that meet the requirements.

[0012] Combined with the above first aspect, in some implementation manners of the first aspect, the first threshold and / or the second threshold corresponding to different target subjects are different.

[0013] That is to say, different first thresholds and / or second thresholds can be set in advance for different target subjects (such as different users, classifiers or other devices) to meet the needs of different target subjects. In this way, the flexibility of the application of the prompt generation module can be improved.

[0014] Combined with the above first aspect, in some implementation manners of the first aspect, the target subject is a user or a classifier; when the target subject is the classifier, the current task of the classifier includes determining the category to which the current task of the user belongs.

[0015] Combined with the above first aspect, in some implementation manners of the first aspect, the category is asking for product information, asking for information about a person or an organization, asking for information about a service, or none of the above.

[0016] Combined with the above first aspect, in some implementation manners of the first aspect, the prompt generation module includes a large language model. Implementing the generation of prompts through a large language model can improve the efficiency and accuracy of prompt generation.

[0017] Second aspect, an embodiment of the present application provides a classification method, which is applied to a computing device. The method includes: obtaining the user's current task; determining the current task of the classifier based on the user's current task, where the current task of the classifier includes determining the category to which the user's current task belongs; inputting the current task of the classifier into a prompt word generation module, which is used to analyze the current task of the classifier to obtain reference information, where the reference information includes the identity, task description, and supplementary information of the classifier; the prompt word generation module is further used to generate multiple prompt words for the current task of the classifier according to the reference information, where the multiple prompt words include task background, task steps, response style, response tone, target group, and response format; obtaining the multiple prompt words generated by the prompt word generation module; inputting the multiple prompt words into the classifier, and based on the classifier, obtaining the category to which the user's current task belongs.

[0018] The present application proposes that for the user's current task, the current task of the classifier can be determined first based on the user's current task, and then the current task of the classifier can be input into the prompt word generation module to generate multiple prompt words for the current task of the classifier based on the prompt word generation module, and then the multiple prompt words can be input into the classifier to obtain the category to which the user's current task belongs based on the classifier. In this way, the accuracy of task classification can be effectively improved.

[0019] In addition, in the process of generating prompt words based on the prompt word generation module, the current task of the classifier can be analyzed first to obtain reference information including the identity, task description, and supplementary information of the classifier, so as to be able to more accurately understand the current task of the classifier and lay a foundation for generating more prompt words that conform to the current task subsequently; then, prompt words including task background, task steps, response style, response tone, target group, and response format can be generated based on the obtained reference information, making the generated prompt words more comprehensive and rich, thereby effectively improving the quality of the generated prompt words.

[0020] In a third aspect, an embodiment of the present application provides a response generation method, which is applied to a computing device. The method includes: obtaining the user's current task; determining the current task of the classifier based on the user's current task, where the current task of the classifier includes determining the category to which the user's current task belongs; inputting the current task of the classifier into a prompt word generation module, which is used to analyze the current task of the classifier to obtain reference information, and the reference information includes the identity, task description, and supplementary information of the classifier; the prompt word generation module is further used to generate multiple prompt words for the current task of the classifier according to the reference information, and the multiple prompt words include task background, task steps, response style, response tone, target group, and response format; obtaining the multiple prompt words generated by the prompt word generation module; inputting the multiple prompt words into the classifier, and obtaining the category to which the user's current task belongs based on the classifier; generating a response to the user's current task based on the category to which the user's current task belongs.

[0021] The present application proposes that for the user's current task, the current task of the classifier can be first determined based on the user's current task, and then the current task of the classifier is input into the prompt word generation module to generate multiple prompt words for the current task of the classifier based on the prompt word generation module, and then the multiple prompt words are input into the classifier to obtain the category to which the user's current task belongs based on the classifier, and finally a response to the user's current task is generated based on the category to which the user's current task belongs. In this way, the quality and accuracy of the response can be effectively improved.

[0022] In addition, during the process of generating prompt words based on the prompt word generation module, the current task of the classifier can be first analyzed to obtain reference information including the identity, task description, and supplementary information of the classifier, so as to more accurately understand the current task of the classifier and lay a foundation for generating more prompt words that conform to the current task subsequently; subsequently, prompt words including task background, task steps, response style, response tone, target group, and response format can be generated based on the obtained reference information, making the generated prompt words more comprehensive and rich, thus effectively improving the quality of the generated prompt words.

[0023] Fourthly, an embodiment of the present application provides a response generation method, which is applied to a computing device. The method includes: obtaining the user's current task; inputting the user's current task into a prompt word generation module, which is used to analyze the user's current task to obtain reference information, including user identity, task description, and supplementary information; the prompt word generation module is further used to generate multiple prompt words for the user's current task according to the reference information, and the multiple prompt words include task background, task steps, response style, response tone, target group, and response format; obtaining the multiple prompt words generated by the prompt word generation module; generating a response for the user's current task based on the multiple prompt words.

[0024] The present application proposes that for the user's current task, the user's current task can be first input into the prompt word generation module to generate multiple prompt words for the user's current task based on the prompt word generation module, and then a response for the user's current task can be generated based on the multiple prompt words. In this way, the quality and accuracy of the response can be effectively improved.

[0025] In addition, in the process of generating prompt words based on the prompt word generation module, the user's current task can be first analyzed to obtain reference information including user identity, task description, and supplementary information, so as to be able to more accurately understand the user's current task and lay a foundation for generating more prompt words that conform to the current task subsequently; then, prompt words including task background, task steps, response style, response tone, target group, and response format can be generated based on the obtained reference information, making the generated prompt words more comprehensive and rich, thus effectively improving the quality of the generated prompt words.

[0026] Fifthly, an embodiment of the present application provides a prompt word generation device, which includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the device to implement any possible method in the first aspect as described above.

[0027] Sixthly, an embodiment of the present application provides a computing device, which includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the computing device to implement any possible method in the first aspect as described above; or, implement the method in the second aspect as described above; or, implement the method in the third aspect as described above; or, implement the method in the fourth aspect as described above.

[0028] Seventh aspect, an embodiment of the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, the computer is caused to execute any possible method in the first aspect above; or, execute the method in the second aspect above; or, execute the method in the third aspect above; or, execute the method in the fourth aspect above.

[0029] Eighth aspect, an embodiment of the present application provides a computer program product containing instructions. When the computer program product is run on a computer, the computer is caused to execute any possible method in the first aspect above; or, execute the method in the second aspect above; or, execute the method in the third aspect above; or, execute the method in the fourth aspect above.

[0030] The technical effects obtained in the fifth to eighth aspects above are similar to the technical effects obtained by the corresponding technical means in the first to fourth aspects above, and will not be elaborated here. Description of the Drawings

[0031] Figure 1 is a schematic diagram of a prompt word generation module provided by an embodiment of the present application;

[0032] Figure 2 is a schematic diagram of a prompt word generation method provided by an embodiment of the present application;

[0033] Figure 3 is a schematic diagram of a task step generation method provided by an embodiment of the present application;

[0034] Figure 4 is a schematic diagram of a classification method provided by an embodiment of the present application;

[0035] Figure 5 is a schematic diagram of a response generation method provided by an embodiment of the present application;

[0036] Figure 6 is a schematic diagram of another response generation method provided by an embodiment of the present application;

[0037] Figure 7 is a schematic diagram of a prompt word generation device provided by an embodiment of the present application;

[0038] Figure 8 is a schematic diagram of the structure of a chip provided by an embodiment of the present application. Detailed Embodiments

[0039] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. For example, the first chip and the second chip are only used to distinguish different chips, and do not limit their sequence. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily mean different.

[0040] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.

[0041] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (s) or plural item (s). For example, at least one (item) of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.

[0042] The following details the solutions of the present application with reference to the accompanying drawings.

[0043] With the development of artificial intelligence technology, automatically generating prompt words related to the current task based on the target subject (such as a user or a classifier, etc.) has become an important research direction, which can guide relevant users or systems to understand and execute tasks more accurately, thereby improving the accuracy of current task processing and enhancing the user experience. For example, when generating prompt words related to the user's question based on the user's question, the prompt words can be used to guide the user to solve the problem or guide the question - answering module to generate an answer to the user's question; when generating prompt words related to the classification task based on the classifier's classification task, the prompt words can be used to guide the classifier to generate corresponding categories.

[0044] Traditional solutions mainly rely on the following three methods to generate prompting words: First, the rule-based method, which usually relies on predefined rules and templates to generate prompting words by filling in specific keywords or phrases; Second, the statistics-based method, which usually uses statistical machine learning algorithms to analyze a large amount of data to discover the potential rules for generating prompting words; Third, the deep learning-based method, which usually uses deep neural networks such as recurrent neural networks and convolutional neural networks to learn the potential rules for generating prompting words. However, the above methods may all have unstable quality when generating prompting words, such as problems where the generated results do not match the input information, the semantics are unclear, or there are grammar errors, etc.

[0045] Based on this, the present application proposes a prompting word generation method. Based on this method, when obtaining the current task of the target subject, the current task can be analyzed first to obtain reference information including the identity of the target subject, task description, and supplementary information, so as to be able to understand the current task more accurately and lay a foundation for generating more suitable prompting words for the current task subsequently; Subsequently, prompting words including task background, task steps, reply style, reply tone, target group, and reply format can be generated based on the obtained reference information, making the generated prompting words more comprehensive and rich, thereby effectively improving the quality of the generated prompting words.

[0046] The application scenarios of the prompting word generation method are introduced exemplarily below. It should be noted that the following scenarios are only examples, and the actual application scenarios may not be limited to this.

[0047] Example scenario 1: The solution of the present application can be applied to the artificial intelligence assistant scenario. For example, intelligent assistants such as Siri and Alexa can analyze the tasks proposed by users based on the solution of the present application and generate more accurate and rich prompting words based on the analysis results to guide task execution, so as to improve the interactivity and user experience of the assistant.

[0048] Example scenario 2: The solution of the present application can be applied to the online education scenario. For example, during the teaching process, teachers can use the technology of the present application to generate prompting words for different disciplines and different difficulty levels according to the learning tasks of students to assist teaching and improve the teaching effect.

[0049] Example scenario 3: The solution of the present application can be applied to the content creation scenario. For example, during the creation process such as writing and design, creators can use the technology of the present application to generate prompting words related to the creation task to inspire inspiration and improve the creation efficiency and quality.

[0050] Example scenario 4: The solution of the present application can be applied to the customer service scenario. For example, when answering customer questions or handling customer requests, customer service staff can generate prompt words for answering customer questions according to the customer's questions and needs, so as to improve service quality and efficiency.

[0051] Example scenario 5: The solution of the present application can be applied to the software development scenario. For example, during the software development process, developers can use the technology provided by the present application to obtain programming prompt words to assist in programming.

[0052] In addition, optionally, the prompt word generation method provided by the present application can be applied to Figure 1 the prompt word generation module shown in Figure 1 As shown, the input of this module is the current task of the target subject, and the output is multiple prompt words. This module is mainly used to analyze the current task of the target subject to obtain reference information, and the reference information includes the identity, task description and supplementary information of the target subject; this module is also used to generate multiple prompt words for the current task of the target subject according to the obtained reference information, and the multiple prompt words include task background, task steps, reply style, reply tone, target group and reply format.

[0053] In a possible implementation manner, the prompt word generation module may include a large language model, and the functions of analyzing the current task of the target subject and generating prompt words may be implemented based on this large language model.

[0054] It should be understood that a large language model refers to a natural language processing model with very large-scale parameters, which has powerful language understanding and generation capabilities. At present, it has achieved remarkable applications in many fields such as text generation, machine translation, automatic question answering, sentiment analysis, and programming assistance. Common large language models include models such as GPT-3 and GPT-4. The core technology of large language models is the Transformer architecture. Based on this architecture, large language models can efficiently process data in parallel, reduce training time, and at the same time improve the model's ability to process long texts and complex semantics.

[0055] The training of large language models usually includes two processes: pre-training and fine-tuning. Among them, pre-training is the first step in the development of large language models. The goal of this stage is to let the model learn the basic structure, vocabulary, grammar rules and certain world knowledge of the language based on a large amount of unlabeled text data; fine-tuning is the second stage after pre-training, and the purpose is to make the model perform better on specific tasks. Fine-tuning is usually carried out on a labeled data set to optimize the model's ability on certain specific tasks, such as sentiment analysis, question answering, text generation, etc.

[0056] Figure 2It is a schematic diagram of a prompt generation method provided by an embodiment of the present application. This method 200 can be applied to Figure 1 the prompt generation module shown in Figure 2 As shown, this method 200 may include steps S210 to S230, which will be introduced in detail below.

[0057] S210, obtain the current task of the target entity.

[0058] Among them, the target entity can be a user, a classifier or other devices, that is, the input of this prompt generation module can be the current task of the user, the current task of the classifier, or the current task of other devices.

[0059] Taking the target entity as a user as an example, obtaining the current task of the user can be understood as obtaining the user's needs. For example, the current task of the user can be "How to squeeze orange juice without a juicer?", "How to make a project plan?", "I need to write an article on how to teach".

[0060] Taking the target entity as a classifier as an example, obtaining the current task of the classifier can be understood as obtaining the needs of the classifier. For example, the current task of the classifier can be: "Determine the category to which the user's current task (for example, 'How to squeeze orange juice without a juicer?') belongs".

[0061] In a possible implementation, the above category can be asking for product information, asking for information about a person or organization, asking for information about a service, or none of the above. Based on the above categories, the classifier can be used to identify the user's intention. For example, when the user's current task is asking "Where is the chairman's office?", the current task of the classifier can be: "Determine which of the following intentions 'Where is the chairman's office?' belongs to: asking for product information, asking for information about a person or organization, asking for information about a service, and none of the above".

[0062] S220, analyze the current task to obtain reference information. The reference information includes user identity, task description, and supplementary information.

[0063] Exemplarily, when the target entity is a user, the user identity can be, for example, a student, an engineer, a designer, a chef, etc.; the task description can be, for example, writing a report, designing a UI, developing software, etc.; the supplementary information can be, for example, specific requirements and limitations of the task, and the present application does not limit this.

[0064] Exemplarily, when the target entity is a classifier, the identity of the classifier can be, for example, a query classifier; the task description can be, for example, query classification; the supplementary information can be, for example, specific categories, etc.

[0065] S230. Generate multiple prompt words for the current task based on reference information. Among them, the multiple prompt words include task background, task steps, response style, response tone, target audience, response format, etc.

[0066] Among them, the task background can be, for example, the purpose and importance of the task; the task steps can be a detailed description of the steps or processes to be followed to complete the task; the response style can be, for example, formal, informal or friendly, etc.; the response tone can be, for example, affirmative, interrogative or suggestive, etc.; the target audience can be, for example, professionals, beginners or the public, etc.; the response format can be, for example, a report, an email or a speech draft, etc.

[0067] The above solution will be introduced exemplarily below in combination with Example 1 and Example 2.

[0068] Example 1: Take the user's current task as: "How to squeeze orange juice without a juicer?" as an example.

[0069] First, the prompt word generation module obtains the user's current task: "How to squeeze orange juice without a juicer?".

[0070] Secondly, the prompt word generation module analyzes the current task to obtain the following reference information: the user identity is a chef, the task description is to squeeze orange juice, and the supplementary information is that using a juicer is not allowed.

[0071] Finally, the prompt word generation module generates the following multiple prompt words based on the above reference information:

[0072] Task background: You are a <chef>, your task is to <squeeze orange juice>, and you need to consider <not allowing the use of a juicer>.

[0073] Task steps: You are a <chef>, your task is to <squeeze orange juice>, and you need to consider <not allowing the use of a juicer>. Please perform the <squeeze orange juice> task according to the following examples and solutions.

[0074] Example 1: Making soy milk: [1. Soak the beans in cold water overnight; 2. Grind the beans with a blender; 3. Pour the obtained liquid into a pot, bring to a boil and skim off the foam; 4. Filter the liquid and skim off the solid impurities to obtain soy milk];

[0075] Example 2: Squeezing grape juice: [1. Peel the grapes; 2. Mash the grapes with a blender; 3. Add a certain amount of water to the mashed grapes and bring to a boil; 4. Filter the liquid to obtain grape juice];

[0076] Example 3: Squeezing apple juice: [1. Peel the apples; 2. Put the peeled apples into a blender and break them; 3. Add water to the broken apples and bring to a boil; 4. Filter the mixture to obtain apple juice].

[0077] Reply Style: Use precise language and maintain a professional tone.

[0078] Reply Tone: Suggestion.

[0079] Target Audience: Professional chefs and cooking enthusiasts.

[0080] Reply Format: A list of steps, with each step detailing the operation method and precautions.

[0081] It should be understood that the multiple prompt words generated in Example 1 can be directly used to guide the user to squeeze orange juice; or they can be used to guide the relevant question and answer generation module to generate answers on how to squeeze orange juice.

[0082] Example 2: Take the current task of the classifier as: "Determine which of the following intents the user's 'Where is the chairman's office?' belongs to: asking for product information, asking for information about a person or organization, asking for information about a service, and none of the above."

[0083] First, the prompt word generation module obtains the current task of the classifier: "Determine which of the following intents the user's 'Where is the chairman's office?' belongs to: asking for product information, asking for information about a person or organization, asking for information about a service, and none of the above."

[0084] Secondly, the prompt word generation module analyzes the current task to obtain the following reference information: The identity of the target entity is the query classifier, the task description is to classify the query into one of four different categories, and the supplementary information is that these four categories are: 1. Asking for product information; 2. Asking for information about a person or organization; 3. Asking for information about a service; 4. None of the above.

[0085] Finally, the prompt word generation module generates the following multiple prompt words based on the above reference information:

[0086] Task Background: You are a query classifier and you want to classify the current task query into one of four different categories. You know that these four categories are: 1. Asking for product information; 2. Asking for information about a person or organization; 3. Asking for information about a service; 4. None of the above.

[0087] Task Steps: You are a query classifier and you need to classify the query into one of four different categories. Consider the following categories: 1. Asking for product information; 2. Asking for information about a person or organization; 3. Asking for information about a service; 4. None of the above. When performing the query classification, please refer to the following examples:

[0088] Example: The query is "Where is the CEO's office?": [1. Find product-related keywords to classify it into Category 1 (in this case, there are no relevant words); 2. Find terms indicating interest in an individual or entity to classify it into Category 2 (in this case, it is "CEO"); 3. Identify phrases requesting action or help (in this case, there is no relevant content); 4. If the query does not fit the above categories, classify it as 4 "None of the above" (in this case, the query has been classified into Category 2); 5. Ensure the consistency of classification by referring to the predefined list of category examples (in this case, the query belongs to Category 2: Information about a person or organization)].

[0089] Response style: Analyze the semantics of the query; classify it as product, person / organization, service, or none; communicate clearly with the professional audience using precise language and maintaining a professional tone.

[0090] Response tone: For queries asking for product information: Use an informative and helpful tone, ensuring clarity and accuracy; for queries asking for information about a person or organization: Adopt a respectful and professional tone, maintaining confidentiality and integrity; for queries asking for a certain service: Use an inclusive and problem-solving tone, showing a willingness to help; for queries that do not fit the above categories: Use a polite and neutral tone, providing guidance or direction.

[0091] Target group: For queries asking for product information: Marketing and sales teams; for queries asking for information about a person or organization: Human resources and public relations teams; for queries asking for a certain service: Customer service and technical support teams; for queries belonging to the "None of the above" category: R & D teams for further analysis and classification.

[0092] Response format: The answer should be the number of the category to which the query belongs. It can only be <1>, <2>, <3>, or <4>.

[0093] It should be understood that the multiple prompt words generated in Example 2 can be used to guide the query classifier to accurately classify the user's query into one of the four intent categories.

[0094] The following combines Figure 3 to introduce the generation method of the task steps, Figure 3 which is a schematic diagram of a task step generation method provided by an embodiment of the present application. As Figure 3 shown, the process of generating task steps may include:

[0095] S310, generating at least one example task similar to the current task based on the task description;

[0096] S320, scoring the relevance between each example task and the current task;

[0097] S330, retain the example tasks with scores greater than or equal to the first threshold;

[0098] It should be noted that if there are example tasks with scores greater than or equal to the first threshold, then proceed to step S340; if there are no example tasks with scores greater than or equal to the first threshold, then regenerate at least one example task similar to the current task based on the task description. In this way, it can be ensured that there are always example tasks that meet the requirements.

[0099] It should be understood that when regenerating at least one example task similar to the current task based on the task description, it is still necessary to score the relevance between the regenerated example task and the current task, and retain the example tasks with scores greater than or equal to the first threshold. If there are still no example tasks with scores greater than or equal to the first threshold, then continue to repeat the above operations until there are example tasks that meet the requirements.

[0100] In addition, considering that when regenerating example tasks similar to the current task, there may be a situation where the regenerated example tasks are the same as the previously generated example tasks, and the example task itself does not meet the requirements, resulting in repeated scoring, judgment, and generation operations. To avoid this phenomenon, the present application proposes the following example strategies:

[0101] Example 1: During the task generation process, strategies of introducing randomness or diversification can be adopted to ensure that the example tasks generated each time have sufficient differences.

[0102] Example 2: Example tasks can be generated through a natural language model. Since the generation process of the natural language model has a certain degree of randomness, the model will start from multiple different perspectives each time it generates, so that there are certain differences between the example tasks generated each time.

[0103] Example 3: When generating a new example task each time, a deduplication mechanism can be adopted to avoid generating duplicate tasks. Specifically, the similarity between the tasks that have been generated and the newly generated tasks can be compared to determine whether they are similar enough. If the generated task has a high similarity with the existing tasks, then this task can be skipped and automatically regenerated.

[0104] Based on the above example strategies, the probability of generating duplicate example tasks can be effectively reduced. It should be understood that the above strategies are only examples, and other strategies can also be selected in actual operations. The present application does not make any limitations in this regard.

[0105] S340, generate the solutions for each retained example task based on the chain of thought paradigm;

[0106] Among them, the chain of thought paradigm is a method for understanding and generating task steps. Its core lies in simulating the human thinking process and generating task steps in a certain logical order.

[0107] S350, score the accuracy of each answer;

[0108] S360, retain the answers with scores greater than or equal to the second threshold;

[0109] It should be noted that if there are answers with scores greater than or equal to the second threshold, then continue to execute step S370; if there are no answers with scores greater than or equal to the second threshold, then regenerate the answers to each retained example task based on the chain of thought paradigm. In this way, it can be ensured that there are always answers that meet the requirements for the example tasks.

[0110] It should be understood that when regenerating the answers to each retained example task based on the chain of thought paradigm, it is still necessary to score the accuracy of each answer and retain the answers with scores greater than or equal to the second threshold. If there are still no answers with scores greater than or equal to the second threshold, then continue to repeat the above operations until there are answers that meet the requirements.

[0111] In addition, considering that when regenerating the answers to each retained example task based on the chain of thought paradigm, there may be a situation where the answers are the same as those generated previously, and the answers themselves do not meet the requirements, resulting in repeated scoring, judgment, and generation operations. To avoid this phenomenon, the strategies of Example 1 to Example 3 mentioned above can also be adopted, which will not be elaborated here.

[0112] Optionally, for different target entities, the corresponding first threshold and / or second threshold can be the same.

[0113] Optionally, for different target entities, the corresponding first threshold and / or second threshold can be different. In this case, different first thresholds and / or second thresholds can be set in advance for different target entities (such as different users, classifiers, or other devices) to meet the needs of different target entities. In this way, the flexibility of the application of the prompt generation module can be improved. For example, when the prompt generation module identifies that the identity of the target entity is a chef, the thresholds can be switched to the first threshold and the second threshold corresponding to the chef to guide the generation of task steps based on the switched first threshold and second threshold; when the prompt generation module identifies that the identity of the target entity is a query classifier, the thresholds can be switched to the first threshold and the second threshold corresponding to the query classifier to guide the generation of task steps based on the switched first threshold and second threshold.

[0114] S370, generate task steps based on the retained answers and the corresponding example tasks.

[0115] The above process generates solutions to example tasks using the chain-of-thought paradigm, then scores and filters the solutions to the example tasks, and finally generates task steps based on the filtered solutions and the corresponding example tasks, thereby ensuring the accuracy of the generated prompts and the diversity of the generated results.

[0116] As an example, taking the current task of the target entity as "how to extract orange juice without a juicer", the reference information is: the user identity is a chef, the task description is to extract orange juice, and the supplementary information is that using a juicer is not allowed. Combining steps S1 to S7, it is explained how to generate task steps:

[0117] S1 (corresponding to step S310 above), with the current task of extracting orange juice, generate the following 5 task descriptions that belong to the same category as this task.

[0118] For example, 1. Stew spare ribs; 2. Make soy milk; 3. Extract grape juice; 4. Extract apple juice; 5. Sweep the floor

[0119] S2 (corresponding to step S320 above), with the current task of extracting orange juice, score the relevance between each example task and the current task, with 5 points being the most relevant and 1 point being the least relevant.

[0120] For example, 1. Stew spare ribs: 3 points; 2. Make soy milk: 4 points; 3. Extract grape juice: 5 points; 4. Extract apple juice: 5 points; 5. Sweep the floor: 1 point.

[0121] S3 (corresponding to step S330 above), retain the example tasks with a score greater than or equal to 4 points.

[0122] For example, delete the two example tasks of "stew spare ribs" and "sweep the floor", and retain the three example tasks of "make soy milk", "extract grape juice", and "extract apple juice".

[0123] S4 (corresponding to step S340 above), for the following example tasks <1. Make soy milk; 2. Extract grape juice; 3. Extract apple juice>, generate solutions to each example task according to the chain-of-thought paradigm, and specifically consider <using a juicer is not allowed>.

[0124] For example, make soy milk: [1. Soak the beans in cold water overnight; 2. Grind the beans with a blender; 3. Pour the resulting liquid into a pot, bring to a boil and skim off the foam; 4. Filter the liquid and skim off the solid impurities to obtain soy milk];

[0125] Extract grape juice: [1. Peel the grapes; 2. Mash the grapes with a blender; 3. Add a certain amount of water to the mashed grapes and bring to a boil; 4. Filter the liquid to obtain grape juice];

[0126] Extract apple juice: [1. Peel the apples; 2. Put the peeled apples into a juicer to obtain apple juice].

[0127] S5 (corresponding to step S350 above), score the accuracy of each answer, with 5 being the most correct and 1 being the least correct.

[0128] For example, making soymilk: [1. Soak the beans in cold water overnight; 2. Grind the beans in a blender; 3. Pour the resulting liquid into a pot, bring to a boil and skim off the foam; 4. Filter the liquid to remove solid impurities to obtain soymilk] -> 5 points;

[0129] Making grape juice: [1. Peel the grapes; 2. Mash the grapes in a blender; 3. Add a certain amount of water to the mashed grapes and bring to a boil; 4. Filter the liquid to obtain grape juice] -> 5 points;

[0130] Making apple juice: [1. Peel the apples; 2. Put the peeled apples into a juicer to get apple juice]>, considering <using a juicer is not allowed> -> 1 point.

[0131] S6 (corresponding to step S360 above), retain the answers with a score greater than or equal to 4 points.

[0132] For example, delete the answer to the example task of "making apple juice" and retain the answers to the example tasks of "making soymilk" and "making grape juice".

[0133] Or, retain the answers to the example tasks of "making soymilk" and "making grape juice" and regenerate the answer to the example task of "making apple juice". For example, considering <using a juicer is not allowed>, making apple juice: [1. Peel the apples; 2. Put the peeled apples into a blender and crush them; 3. Add water to the crushed apples and bring to a boil; 4. Filter the mixture to obtain apple juice], and re - score the answer to this example task -> 5 points -> passed.

[0134] S7 (corresponding to step S370 above), generate task steps based on the retained answers and the corresponding example tasks.

[0135] For example, you are a <chef>, and your task is to <make orange juice>. You need to consider <using a juicer is not allowed>. Please perform the <make orange juice> task according to the following examples and solutions.

[0136] Example 1: Making soymilk: [1. Soak the beans in cold water overnight; 2. Grind the beans in a blender; 3. Pour the resulting liquid into a pot, bring to a boil and skim off the foam; 4. Filter the liquid to remove solid impurities to obtain soymilk];

[0137] Example 2: Making grape juice: [1. Peel the grapes; 2. Mash the grapes in a blender; 3. Add a certain amount of water to the mashed grapes and bring to a boil; 4. Filter the liquid to obtain grape juice];

[0138] Example 3: Extracting apple juice: [1. Peel the apples; 2. Put the peeled apples into a blender and crush them; 3. Add water to the crushed apples and boil; 4. Filter the mixture to obtain apple juice].

[0139] The following combines the attached Figures 4 to 6 An exemplary introduction to the application of the prompt generation method in the classification and response generation scenarios is given.

[0140] Figure 4 It is a schematic diagram of a classification method provided by an embodiment of the present application. This method can be applied to a computing device. Optionally, the computing device can be a user terminal or a cloud computing platform. Among them, the user terminal can be, for example, a tablet computer, a laptop computer, a smart phone or other intelligent devices.

[0141] In the case where the computing device is a user terminal, the user can input the current task based on the browser or related application on the user terminal. For input, the user terminal starts to execute the following method 400, and after the execution is completed, the obtained category is output to the user through the browser or related application on the user terminal.

[0142] In the case where the computing device is a cloud computing platform, the user can input the current task based on the browser or related application on the user terminal. Subsequently, the user terminal sends the user's current task to the cloud computing platform. The cloud computing platform starts to execute the following method 400, and after the execution is completed, the obtained category is sent to the user terminal to be output to the user through the browser or related application on the user terminal.

[0143] As Figure 4 shown, method 400 includes:

[0144] S410, obtaining the user's current task.

[0145] S420, determining the current task of the classifier based on the user's current task. Among them, the current task of the classifier includes determining the category to which the user's current task belongs.

[0146] S430, inputting the current task of the classifier into the prompt generation module.

[0147] Among them, the prompt generation module is used to analyze the current task of the classifier to obtain reference information, and the reference information includes the identity, task description and supplementary information of the classifier; the prompt generation module is also used to generate multiple prompts for the current task of the classifier according to the reference information, and the multiple prompts include task background, task steps, reply style, reply tone, target group and reply format.

[0148] S440. Obtain multiple prompting words generated by the prompting word generation module.

[0149] S450. Input the multiple prompting words into a classifier, and based on the classifier, obtain the category to which the user's current task belongs.

[0150] For the relevant introductions in the above steps S410 to S450, please refer to the above text and will not be elaborated here.

[0151] This embodiment proposes that for the user's current task, the current task of the classifier can be determined first based on the user's current task, and then the current task of the classifier is input into the prompting word generation module to generate multiple prompting words for the current task of the classifier based on the prompting word generation module, and then the multiple prompting words are input into the classifier to obtain the category to which the user's current task belongs based on the classifier. In this way, the accuracy of task classification can be effectively improved.

[0152] In addition, in the process of generating prompting words based on the prompting word generation module, the current task of the classifier can be analyzed first to obtain reference information including the identity of the classifier, task description, and supplementary information, so as to more accurately understand the current task of the classifier and lay a foundation for generating more appropriate prompting words for the current task subsequently; then, prompting words including task background, task steps, reply style, reply tone, target group, and reply format can be generated based on the obtained reference information, making the generated prompting words more comprehensive and rich, thus effectively improving the quality of the generated prompting words.

[0153] Figure 5 It is a schematic diagram of a reply generation method provided by an embodiment of the present application. This method can be applied to a computing device. Optionally, the computing device can be a user terminal or a cloud computing platform. Among them, the user terminal can be, for example, a tablet computer, a notebook computer, a smart phone, or other intelligent devices.

[0154] When the computing device is a user terminal, the user can input the current task based on a browser or a relevant application program on the user terminal. Based on the input, the user terminal starts to execute the following method 500, and after the execution is completed, the obtained reply is output to the user through the browser or the relevant application program on the user terminal.

[0155] When the computing device is a cloud computing platform, the user can input the current task based on a browser or a relevant application program on the user terminal. Subsequently, the user terminal sends the user's current task to the cloud computing platform. The cloud computing platform starts to execute the following method 500, and after the execution is completed, the obtained reply is sent to the user terminal to be output to the user through the browser or the relevant application program on the user terminal.

[0156] Such as Figure 5As shown, method 500 includes:

[0157] S510, obtaining the user's current task.

[0158] S520, determining the current task of the classifier based on the user's current task.

[0159] Among them, the current task of the classifier includes determining the category to which the user's current task belongs.

[0160] S530, inputting the current task of the classifier into the prompt word generation module.

[0161] Among them, the prompt word generation module is used to analyze the current task of the classifier to obtain reference information, which includes the identity, task description, and supplementary information of the classifier; the prompt word generation module is also used to generate multiple prompt words for the current task of the classifier according to the reference information, and the multiple prompt words include task background, task steps, reply style, reply tone, target group, and reply format.

[0162] S540, obtaining the multiple prompt words generated by the prompt word generation module.

[0163] S550, inputting the multiple prompt words into the classifier to obtain the category to which the user's current task belongs based on the classifier.

[0164] S560, generating a reply for the user's current task based on the category to which the user's current task belongs.

[0165] For example, the corresponding database can be determined first based on the category to which the user's current task belongs, and then the reply can be generated according to the corresponding database. For example, if the user's current task is a math problem, the system will classify this task as the "math" category. Then, the system will select the corresponding database according to this category, and this database contains a large number of answers to math problems. Next, the system will retrieve the corresponding answer from the corresponding database according to this math problem and generate the final reply.

[0166] For the relevant introductions in the above steps S510 to S560, please refer to the above text and will not be elaborated here.

[0167] This embodiment proposes that for the user's current task, the current task of the classifier can be determined first based on the user's current task, and then the current task of the classifier can be input into the prompt word generation module to generate multiple prompt words for the current task of the classifier based on the prompt word generation module, and then the multiple prompt words can be input into the classifier to obtain the category to which the user's current task belongs based on the classifier, and finally a reply for the user's current task can be generated based on the category to which the user's current task belongs. In this way, the quality and accuracy of the reply can be effectively improved.

[0168] In addition, during the process of generating a prompt by the prompt generation module, the current task of the classifier can be analyzed first to obtain reference information including the identity of the classifier, the task description, and supplementary information, so as to more precisely understand the current task of the classifier and lay a foundation for generating more task-compliant prompts subsequently. Subsequently, based on the obtained reference information, prompts including task background, task steps, response style, response tone, target group, and response format can be generated, making the generated prompts more comprehensive and rich, thereby effectively improving the quality of the generated prompts.

[0169] Figure 6 FIG. 5 is a schematic diagram of another response generation method provided by an embodiment of the present application, and this method can be applied to a computing device. Optionally, the computing device can be a user terminal or a cloud computing platform. Among them, the user terminal can be, for example, a tablet computer, a notebook computer, a smart phone, or other intelligent devices.

[0170] When the computing device is a user terminal, the user can input the current task based on a browser or a related application on the user terminal. Based on the input, the user terminal starts to execute the following method 600, and after the execution is completed, the obtained response is output to the user through the browser or the related application on the user terminal.

[0171] When the computing device is a cloud computing platform, the user can input the current task based on a browser or a related application on the user terminal. Subsequently, the user terminal sends the user's current task to the cloud computing platform, and the cloud computing platform starts to execute the following method 600. After the execution is completed, the obtained response is sent to the user terminal to be output to the user through the browser or the related application on the user terminal.

[0172] As Figure 6 shown, method 600 includes:

[0173] S610, obtaining the user's current task.

[0174] S620, inputting the user's current task into the prompt generation module.

[0175] Wherein, the prompt generation module is used to analyze the user's current task to obtain reference information, and the reference information includes user identity, task description, and supplementary information; the prompt generation module is also used to generate multiple prompts for the user's current task according to the reference information, and the multiple prompts include task background, task steps, response style, response tone, target group, and response format.

[0176] S630, obtaining the multiple prompts generated by the prompt generation module.

[0177] S640. Generate a response to the user's current task based on multiple prompting words.

[0178] For the relevant introductions in the above steps S610 to S640, please refer to the above text and will not be elaborated here.

[0179] In this embodiment, for the user's current task, the user's current task can be input into the prompting word generation module first to generate multiple prompting words for the user's current task based on the prompting word generation module, and then a response to the user's current task can be generated based on the multiple prompting words. In this way, the quality and accuracy of the response can be effectively improved.

[0180] In addition, during the process of generating prompting words based on the prompting word generation module, the user's current task can be analyzed first to obtain reference information including the user's identity, task description, and supplementary information, so as to more accurately understand the user's current task and lay a foundation for generating more appropriate prompting words for the subsequent current task; subsequently, prompting words including task background, task steps, response style, response tone, target group, and response format can be generated based on the obtained reference information, making the generated prompting words more comprehensive and rich, thus effectively improving the quality of the generated prompting words.

[0181] Next, in combination with Figure 7 Describe the prompting word generation device 700 provided in the embodiment of the present application. As Figure 7 shown, the device 700 includes an acquisition module 710, an analysis module 720, and a generation module 730.

[0182] Among them, the acquisition module 710, the analysis module 720, and the generation module 730 are used for the device 700 to execute the corresponding processing steps in the above method embodiment. For example, the acquisition module 710 is used to acquire the current task of the target subject; the analysis module 720 is used to analyze the current task to obtain reference information, and the reference information includes the identity, task description, and supplementary information of the target subject; the generation module 730 is used to generate multiple prompting words for the current task according to the reference information, and the multiple prompting words include task background, task steps, response style, response tone, target group, and response format.

[0183] It should be understood that for other relevant steps executed by the acquisition module 710, the analysis module 720, and the generation module 730, please refer to the introduction in the above method embodiment and will not be elaborated here.

[0184] In a possible implementation, the apparatus 700 may further include a storage module. The storage module is connected to the acquisition module 710, the analysis module 720, and the generation module 730 through lines. The storage module may include one or more memories, and the memory may be one or more devices or components in a circuit for storing programs or data. The storage module may exist independently and be connected to the acquisition module 710, the analysis module 720, and the generation module 730 through a communication bus. The storage module may also be integrated with the acquisition module 710, the analysis module 720, and the generation module 730.

[0185] The storage module may store computer-executable instructions for the methods in the apparatus 700, enabling the apparatus 700 to execute the methods in the above embodiments. The storage module may be a register, a cache memory, or a random access memory (RAM), etc. The storage module may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions.

[0186] Figure 8 It is a schematic structural diagram of a chip 800 provided by an embodiment of the present application. As Figure 8 shown, the chip 800 includes one or more than two (including two) processors 801, communication lines 802, and a communication interface 803. Optionally, the chip 800 further includes a memory 804.

[0187] In some embodiments, the memory 804 stores the following elements: executable modules or data structures, or subsets thereof, or extended sets thereof.

[0188] The methods described in the above embodiments of the present application may be applied to the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above methods may be completed through the integrated logic circuit in the hardware of the processor 801 or instructions in software form. The above-mentioned processor 801 may be a general-purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate, transistor logic devices, or discrete hardware components.

[0189] The steps of the method disclosed in the embodiments of the present application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the art such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read-only memory (EEPROM). This storage medium is located in the memory 804, and the processor 801 reads the information in the memory 804 and combines its hardware to complete the steps of the above method.

[0190] Communication can be carried out between the processor 801, the memory 804, and the communication interface 803 through the communication line 802.

[0191] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. Among them, the computer program product can be pre-written in the memory in advance, or downloaded and installed in the memory in the form of software.

[0192] The embodiments of the present application also provide a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center to another website, a computer, a server, or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a server or a data center that includes one or more integrated available media. For example, the available medium can include magnetic media (such as floppy disks, hard disks, or magnetic tapes), optical media (such as digital versatile discs (DVDs)), or semiconductor media (such as solid state disks (SSDs)).

[0193] The embodiments of the present application provide a chip. The chip includes a processor, and the processor is used to call the computer program in the memory to execute the technical solutions in the above embodiments. The implementation principle and technical effects are similar to those of the above related embodiments, and will not be described in detail here.

[0194] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program or instructions. When the computer program or instructions are executed by a processor, the above-mentioned method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted over a computer-readable medium. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0195] As a possible design, the computer-readable medium can include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; the computer-readable medium can include a magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line can also be appropriately referred to as a computer-readable medium. For example, if software is transmitted using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave from a website, server, or other remote source, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs (CDs), laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where magnetic disks usually reproduce data magnetically, while optical discs utilize lasers to optically reproduce data. The above combinations should also be included within the scope of the computer-readable medium.

[0196] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing device generate a means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0197] In the above specific embodiments, the purpose, technical solutions, and beneficial effects of the present application have been further described in detail. It should be understood that the above are only specific embodiments of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating prompt words, characterized in that, The method includes: Obtain the current task of the target entity. Analyze the current task to obtain reference information, where the reference information includes the identity of the target entity, task description, and supplementary information. Generate multiple prompt words for the current task based on the reference information, where the multiple prompt words include task background, task steps, response style, response tone, target audience, and response format.

2. The method according to claim 1, wherein The task steps are generated based on the following method: Generate at least one example task similar to the current task based on the task description. Score the relevance between each example task and the current task. Retain the example tasks with a score greater than or equal to the first threshold. Generate solutions for each retained example task based on the chain-of-thought paradigm. Score the accuracy of each solution. Retain the solutions with a score greater than or equal to the second threshold. Generate the task steps based on the retained solutions and the corresponding example tasks.

3. The method according to claim 2, wherein The example tasks with a score greater than or equal to the first threshold include: If there are no example tasks with a score greater than or equal to the first threshold, regenerate at least one example task similar to the current task based on the task description.

4. The method according to claim 2, wherein The solutions with a score greater than or equal to the second threshold include: If there are no solutions with a score greater than or equal to the second threshold, regenerate the solutions for each retained example task based on the chain-of-thought paradigm.

5. The method according to claim 2, wherein The first threshold and / or the second threshold are different for different target entities.

6. The method according to any one of claims 1 to 5, characterized in that, The target entity is a user or a classifier; when the target entity is the classifier, the current task of the classifier includes determining the category to which the user's current task belongs.

7. The method according to claim 6, wherein The category is asking for product information, asking for information about a person or organization, asking for information about a service, or none of the above.

8. A response generation method, characterized in that, The method includes: Obtain the current task of the user. Input the current task of the user into a prompt-word generation module, where the prompt-word generation module is used to analyze the current task of the user to obtain reference information, and the reference information includes user identity, task description, and supplementary information; the prompt-word generation module is also used to generate multiple prompt words for the current task of the user based on the reference information, and the multiple prompt words include task background, task steps, response style, response tone, target audience, and response format. Obtain the multiple prompt words generated by the prompt-word generation module. Generate a response to the user's current task based on the multiple prompt words.

9. A computing device, characterized in that, Includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the computing device to implement the method according to any one of claims 1 to 7; or, to implement the method according to claim 8.