Non-instantaneous computer readable storage medium and prompt information generation method

By automatically generating prompts, the problem of manually designing prompts for large language models has been solved, achieving efficient generation without human intervention and improving application development efficiency and user experience.

CN121145883APending Publication Date: 2025-12-16DELTA ELECTRONICS INC(CN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410758338.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, prompts for large language models require manual design and are difficult to update, leading to mismatches between application requirements and low development efficiency.

Method used

Computer programs can be stored on non-transitory computer-readable storage media and prompts can be automatically generated using predefined rules, including the synthesis of task prompts and task examples, reducing human intervention.

Benefits of technology

It enables the generation of prompts without human intervention, reduces the frequency of application fine-tuning, accelerates the development process of large-scale language model-related applications, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145883A_ABST
    Figure CN121145883A_ABST
Patent Text Reader

Abstract

A non-transitory computer-readable storage medium is disclosed. The non-instantaneous computer readable storage medium is used for executing the prompt information generation method. The prompt information generation method comprises the following steps: obtaining at least one piece of key information based on input content information and a predefined rule, and generating at least one task prompt according to the at least one piece of key information; obtaining format demand information according to a predefined rule, and analyzing the input content information to obtain semantic demand information; obtaining at least one paradigm data from the text instance database according to the semantic demand information, and processing the at least one paradigm data according to the format demand information to generate at least one task paradigm; and synthesizing the input content information, the at least one task prompt and the at least one task example to generate prompt information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a non-transitory computer-readable storage medium and a method for generating prompt messages. Specifically, this invention relates to a non-transitory computer-readable storage medium for automatically generating prompt messages and a method for generating prompt messages. Background Technology

[0002] When the number of parameters in a language model reaches billions, it can be called a large language model (LLM). Compared with traditional pre-trained models (e.g., BERT), large language models output more diverse content, often requiring the addition of "prompts" to guide the model to produce output results that better meet the requirements.

[0003] In the practical integration of large language models (LLMs) into applications, appropriate prompts need to be customized to meet the specific application requirements. Traditionally, prompts are designed manually; however, it is difficult to find the optimal prompts manually. Furthermore, once the prompts are set up, they are often not changed. When the core large language model of the application is updated, the performance of all prompts needs to be re-evaluated, and if the performance is unsatisfactory, further manual fine-tuning is required.

[0004] Therefore, providing a technology that can automatically generate prompts is a goal that the industry urgently needs to strive for. Summary of the Invention

[0005] One object of the present invention is to provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to perform a prompt information generation method, wherein the prompt information generation method includes: obtaining at least one key piece of information based on input content information and predefined rules, and generating at least one task prompt based on the at least one key piece of information; obtaining format requirement information based on predefined rules, and parsing the input content information to obtain semantic requirement information; obtaining at least one example data from a text instance database based on the semantic requirement information, and processing the at least one example data based on the format requirement information to generate at least one task example; and synthesizing the input content information, at least one task prompt, and at least one task example to generate prompt information.

[0006] Another objective of this invention is to provide a method for generating prompt information, comprising: obtaining at least one key piece of information based on input content information and predefined rules, and generating at least one task prompt based on the at least one key piece of information; obtaining format requirement information based on predefined rules, and parsing the input content information to obtain semantic requirement information; obtaining at least one example data from a text instance database based on the semantic requirement information, and processing the at least one example data based on the format requirement information to generate at least one task example; and synthesizing the input content information, at least one task prompt, and at least one task example to generate prompt information.

[0007] The prompt information generation technology provided by this invention (including at least a non-transitory computer-readable storage medium and method) automatically generates prompt information for large language models based on input content information and predefined rules. This eliminates the need for manual intervention in constructing prompt information or selecting prompt examples, reducing the frequency of application-based fine-tuning of prompt information and thus accelerating the development of text-related applications. Furthermore, the implementation of this invention can be applied to any text-related application project with a large language model as its core engine, accelerating application development timelines. For advanced text-based applications, such as intelligent question answering and chatbots, the automatically generated prompt information allows users to experience a more engaging and interactive chat experience, rather than following a rigid, rule-based robot, and enhances the user experience.

[0008] The following detailed description of the technology and embodiments of the present invention, in conjunction with the accompanying drawings, enables those skilled in the art to understand the technical features of the claimed invention. Attached Figure Description

[0009] Figure 1 A schematic diagram of a prompt message generation device according to some embodiments of the present invention;

[0010] Figure 2 A flowchart illustrating a method for generating prompt information according to some embodiments of the present invention;

[0011] Figure 3 According to some embodiments of the present invention Figure 2 An embodiment of one of the steps in;

[0012] Figure 4 According to some embodiments of the present invention Figure 2 An embodiment of two of the steps in the process;

[0013] Figure 5 According to some embodiments of the present invention Figure 2 An embodiment of one of the steps in;

[0014] Figure 6Application embodiments of the prompt message generation device shown in some embodiments of the present invention; and

[0015] Figure 7 A schematic diagram of a prompt message generation device shown in some embodiments of the present invention.

[0016] Explanation of icon numbers

[0017] 100: Prompt Message Generation Device

[0018] 132: Task Prompt Generation Module

[0019] 132a: Text Analysis Module

[0020] 132b: Prompt Generation Module

[0021] 134: Task Example Generation Module

[0022] 134a: Semantic and Format Analysis Module

[0023] 134b: Semantic Requirement Processing Module

[0024] 134c: Format Conversion Module

[0025] 136: Output Synthesis Module

[0026] 136a: Inspection Module

[0027] 136b: Synthesis Module

[0028] DB: Database

[0029] CS: Cloud Server

[0030] INT: Network

[0031] UI: User Device

[0032] 200: Method for generating prompt messages

[0033] S210, S220, S230, S240: Steps

[0034] IM: Input content information

[0035] S31, S32: Steps

[0036] PR: Predefined rules

[0037] K: Key Information

[0038] TP: Mission Prompt

[0039] TE: Task Example

[0040] ED: Text instance data

[0041] TM: Prompt Message

[0042] L: Large language model

[0043] AO: Application Output

[0044] 702: Processor

[0045] 704: Random Access Memory Error

[0046] 722: Network Interface Component

[0047] 710: Monitor

[0048] 712: Text Numeric Input Device

[0049] 714: Cursor Controller

[0050] 718: Data storage device

[0051] 724: Non-transitory computer-readable storage media

[0052] 726: Computer Programs

[0053] 720: Signal Generator

[0054] 708: Bus Detailed Implementation

[0055] The following description, through embodiments, explains the method and apparatus for generating prompt messages provided by the present invention, as well as a non-transitory computer-readable storage medium. However, these embodiments are not intended to limit the implementation of the invention to any environment, application, or manner described herein. Therefore, the description of the embodiments is merely illustrative and not intended to limit the scope of the invention. It should be understood that in the following embodiments and drawings, components not directly related to the present invention have been omitted and are not shown, and the dimensions of each component and the dimensional proportions between components are merely illustrative and not intended to limit the scope of the invention.

[0056] Please see Figure 1 . Figure 1 A schematic diagram of a prompt message generation device 100 according to some embodiments of the present invention is shown. A detailed description of the structure of the prompt message generation device 100 will be provided in the accompanying drawings. Figure 7 Please provide an explanation.

[0057] The prompt information generation device 100 can be used to execute the task prompt generation module 132, the task example generation module 134, and the output synthesis module 136. The output of the task prompt generation module 132 serves as part of the input to the output synthesis module 136, and the output of the task example generation module 134 serves as part of the input to the output synthesis module 136. Here, a "module" refers to one or more computer programs stored in a computer-readable storage medium, loadable into random access memory, and executed by a processor.

[0058] The task prompt generation module 132 includes a text analysis module 132a and a prompt generation module 132b. The output of the text analysis module 132a serves as the input of the prompt generation module 132b.

[0059] The task example generation module 134 includes a semantic and format analysis module 134a, a semantic requirement processing module 134b, and a format requirement conversion module 134c. The output of the semantic and format analysis module 134a serves as the input of the semantic requirement processing module 134b, and the output of the semantic requirement processing module 134b serves as the input of the format requirement conversion module 134c.

[0060] The output synthesis module 136 includes a check module 136a and a synthesis module 136b. The output of the check module 136a serves as the input of the synthesis module 136b.

[0061] It should be noted that, Figure 1 The embodiments shown are for illustrative purposes only, and the implementation methods disclosed herein are not intended to be limiting.

[0062] like Figure 1 As shown, in some embodiments, the prompt message generation device 100 is connected to the user device UI, the cloud server CS, and the database DB via a network INT. In some embodiments, the database DB stores predefined rules PR and text instance data ED. In some embodiments, the cloud server CS may contain a large language model.

[0063] Please see Figure 2 To better understand this invention, it will be combined with... Figure 2 The detailed steps of the prompt message generation device 100 are discussed using the illustrated embodiment. Figure 2 A flowchart of a prompt message generation method 200 according to some embodiments of the present invention is shown. It should be noted that the prompt message generation method 200 can be applied to... Figure 1 The prompt message generation device 100 shown is an electronic device with the same or similar structure. For the sake of simplicity in the following description, it will be referred to as... Figure 1 The illustrated embodiments are used as examples to describe some embodiments of the prompt message generation method 200 of this disclosure. However, this disclosure is not limited to applications... Figure 1 The embodiment shown is as follows. Figure 2 As shown, the prompt message generation method 200 includes steps S210 to S240.

[0064] In step S210, key information is obtained based on the input content information and predefined rules, and task prompts are generated based on the key information.

[0065] In some embodiments, step S210 is performed by Figure 1 The task prompt generation module 132 in the middle is executed. In some embodiments, Figure 1 The prompt information generation device 100 receives input content information transmitted by the user device UI. The text analysis module 132a of the task prompt generation module 132 analyzes the input content information and obtains key information based on the input content information and predefined rules. Then, the prompt generation module 132b generates at least one task prompt based on the key information.

[0066] Please refer to the following: Figure 3 . Figure 3 According to some embodiments of the present invention Figure 2 An embodiment of step S210 in [the text]. For example... Figure 3 As shown in the diagram, after the task prompt generation module 132 receives the input content information IM, it executes step S31 (analyzes the input content) to analyze the input content information IM and obtain key information K based on the input content information IM and predefined rules PR. Next, the task prompt generation module 132 executes step S32 (generates a task prompt) to generate a task prompt TP based on the key information K.

[0067] In some embodiments, predefined rules (PRs) include, but are not limited to, basic principles, application task types, application characteristics, and data formatting.

[0068] For example, when the usage scenario of the prompt information generation device 100 is "a user using an academic English translation system with a large language model as its core engine", the predefined rule PR may include: 1. Basic principle: Includes "source language" and "target language", with the target language being English. 2. Application task type: Machine translation. 3. Application characteristics: Academic English. 4. Data formatting: None.

[0069] The predefined rule PR described above is for illustrative purposes only, and the implementation method in this case is not limited to the above.

[0070] In some embodiments, when analyzing the input content information IM, the text analysis module 132a performs at least one of a plurality of semantic analysis tasks to obtain key information K. In some embodiments, the semantic analysis tasks include, but are not limited to, emotion recognition, keyword acquisition, intent detection, named entity recognition, and language detection.

[0071] For example, in one embodiment, based on the input content information IM "Please help me with the following academic translation: Utilize Fourier Transform", the key information K generated by the text analysis module 132a includes: 1. Emotion recognition: No emotion. 2. Keyword acquisition: Fourier Transform. 3. Intent detection: Translation. 4. Named entity recognition: None. 5. Language detection: English.

[0072] In some embodiments, the text analysis module 132a is further used to analyze the input content information IM according to predefined rules PR to obtain key information K. For example, in one embodiment, when the scenario is a listener chatbot, the predefined rules PR include emotion recognition and role recognition. Suppose the input content information IM contains "I'm so bored, my boss scolded me." The text analysis module 132a can obtain the following key information K based on the predefined rules PR analysis of the input content information IM: emotion recognition [negative], role [boss]. Based on the above key information K, the task prompt TP generated by the prompt generation module 132b can be: Please answer in Chinese and show empathy.

[0073] For example, in another embodiment, when the context is an English translation system, the predefined rule PR includes language recognition. Suppose the input content information IM contains "I'm so bored, my boss scolded me." The text analysis module 132a analyzes the input content information IM based on the predefined rule PR and obtains the following key information K: language recognition [Traditional Chinese]. Based on the above key information K, the task prompt TP generated by the prompt generation module 132b can be: translate from Traditional Chinese to English.

[0074] In some embodiments, the text analysis module 132a of the task prompt generation module 132 analyzes the input content information IM to obtain key information K, and then the prompt generation module 132b generates at least one task prompt TP based on the key information K and predefined rules PR. Two different scenarios will be described below.

[0075] In one embodiment, assuming the scenario is an academic English translation system, and the input content information IM contains "The weather is very nice today". Based on the predefined rule PR, the text analysis module 132a can obtain key information K, which includes: the application is academic English translation, and the target language is English. The text analysis module 132a obtains key information K based on the input content information IM, which includes that the user input language is Traditional Chinese. Based on the above key information K, the task prompt TP generated by the prompt generation module 132b includes "Translate from Traditional Chinese to English" and "The English terminology is academic terminology".

[0076] In another embodiment, assuming the scenario is a listening chatbot, and the input content information IM contains "Ugh, I'm so annoyed, I have to work overtime again." Based on predefined rules PR, the text analysis module 132a can obtain key information K, including: the application is a multi-turn dialogue and it demonstrates empathy. The text analysis module 132a obtains key information K based on the input content information IM, including the emotion being irritable and the event being overtime. Based on the above key information K, the prompt generation module 132b generates task prompt TP, including "the task is a multi-turn dialogue," "the reply is empathetic," "it comforts the user's irritability," "it asks why the user is working overtime," and "the output cannot contain discriminatory words."

[0077] In some embodiments, when the prompt generation module 132b generates a task prompt TP based on key information K and predefined rules PR, the prompt generation module 132b is further used to generate a confidence score corresponding to the task prompt TP. For example, in one embodiment, the prompt generation module 132b generates a first task prompt and a second task prompt based on key information K and predefined rules PR, and generates a first confidence score for the first task prompt and a second confidence score for the second task prompt.

[0078] In some embodiments, the text analysis module 132a can be parsed using a large language model, implemented using analysis methods commonly found in the field of traditional natural language processing (such as keyword extraction, named entity recognition), or any text processing method. In some embodiments, the prompt generation module 132b can be implemented using any text generation method (such as: large language model, slot filling, rule generation).

[0079] Please refer back to this. Figure 2 In step S220, format requirement information is obtained according to predefined rules, and input content information is parsed to obtain semantic requirement information.

[0080] In some embodiments, step S220 is performed by Figure 1The semantic and format analysis module 134a of the task example generation module 134 is executed. In some embodiments, the semantic and format analysis module 134a can be parsed by a large language model, implemented using analysis methods commonly found in the field of traditional natural language processing (such as keyword extraction, named entity recognition), or any text processing method.

[0081] Please refer to the following: Figure 4 . Figure 4 According to some embodiments of the present invention Figure 2 Examples of steps S220 and S230 in the process. For example... Figure 4 The semantic and format analysis module 134a obtains format requirement information based on predefined rules PR and parses the input content information IM to obtain semantic requirement information.

[0082] For example, in one embodiment, the input content information IM contains "Please translate into business English", and the semantic and format analysis module 134a obtains the semantic requirement information as "translation action and conforms to business English standards" based on the input content information IM.

[0083] In another embodiment, the input content information IM includes "Please explain the butterfly effect in bullet points and answer in Traditional Chinese". The semantic and format analysis module 134a obtains the semantic requirement information "question and answer action, answer conforms to bullet points format, answer conforms to Traditional Chinese" based on the input content information IM.

[0084] In another embodiment, the predefined rule PR includes "data formatting", and the semantic and format analysis module 134a obtains the format requirement information as "json format" based on the predefined rule PR.

[0085] In step S230, example data is obtained from the text instance database according to the semantic requirements information, and the example data is processed according to the format requirements information to generate task examples.

[0086] In some embodiments, step S230 is performed by Figure 1 This is executed by the semantic and format analysis module 134a of the task example generation module 134. Please refer to the following: Figure 4 .like Figure 4 In the above-described format, the semantic requirement processing module 134b obtains at least one example data from the text instance database ED based on the semantic requirement information, and then the format requirement conversion module 134c processes the at least one example data based on the format requirement information to generate at least one task example TE.

[0087] In some embodiments, the semantic requirement processing module 134b is further used to obtain at least one example data through similarity calculation.

[0088] In some embodiments, based on the input content information, the semantic requirement processing module 134b obtains the application task type corresponding to the input content information IM by applying a classification method. When the application task type corresponding to the input content information IM matches or is the same as the application task type in the predefined rule PR, the semantic requirement processing module 134b obtains example data belonging to the application task type corresponding to the input content information IM from the text instance database ED.

[0089] In some embodiments, the semantic requirement processing module 134b further filters the example data. For example, the semantic requirement processing module 134b calculates the similarity between the example data and the input content information IM, filters out and retains those with high similarity (e.g., similarity higher than a preset similarity threshold), and filters out those with low similarity.

[0090] In some embodiments, the text instance database ED includes: 1. Open-source data publicly available on the internet. 2. Data built based on proprietary corpora. 3. Authorized or purchased text data. 4. Organized and verified historical data.

[0091] In some embodiments, the text instance database ED will tag the application type and features (format, purpose, etc.) corresponding to the example. Application types include, but are not limited to, question-and-answer, dialogue, translation, and analysis. For example, for an example, its corresponding tags include application (dialogue), format (sentence), language (Chinese), purpose (care), and purpose (chat).

[0092] In some embodiments, for the example data obtained by the semantic requirement processing module 134b, the format requirement conversion module 134c performs format conversion processing based on the format requirements obtained by the semantic and format analysis module 134a to generate the task example TE.

[0093] For example, the format requirement in the predefined rule PR is "the application output format is JSON". The task example TE obtained by the semantic requirement processing module 134b is:

[0094] Q: Please explain photosynthesis. A: Plants use light energy to convert carbon dioxide and water into oxygen. Photosynthesis is the most important chemical reaction in the biological world, and the three most important elements are light energy, water, and carbon dioxide. Based on format requirements, the format conversion module 134c needs to convert the output format to a specified format, such as from a plain sentence format to JSON format. After conversion by the format conversion module 134c, the generated task example TE is:

[0095] Q: Please explain photosynthesis. A: {"text":"Plants use light energy to convert carbon dioxide and water into oxygen. Photosynthesis is the most important chemical reaction in the biological world. The three most important elements are light energy, water, and carbon dioxide."}".

[0096] Please refer back to this. Figure 2 In step S240, the input content information, task prompts, and task examples are synthesized to generate prompt information. In some embodiments, step S240 is performed by... Figure 1 The output synthesis module 136 in the middle is executed.

[0097] Please refer to the following: Figure 5 . Figure 5 According to some embodiments of the present invention Figure 2 An embodiment of step S240 in [the text]. For example... Figure 5 As shown. Inspection module 136a inspection. Figure 1 The task prompt TP generated by the task prompt generation module 132 in the middle and Figure 1 After the task example generation module 134 generates the task example TE, the inspection module 136a will send the inspected task prompt TP and task example TE to the relevant department. Figure 1 The synthesis module 136b then synthesizes the input content information IM, task prompt TP, and task example TE to generate prompt information TM.

[0098] In some embodiments, the checking module 136a checks whether there are conflicting or contradictory task prompts in the task prompt TP generated by the task prompt generation module 132.

[0099] In some embodiments, when there are conflicts among multiple task prompts (TPs), the checking module 136a retains task prompts that originate from or conform to predefined rules (PRs). If multiple conflicting task prompts (TPs) do not originate from predefined rules (PRs) or all originate from predefined rules (PRs), the checking module 136a sequentially checks the confidence scores of the multiple conflicting task prompts (TPs) and retains the task prompt (TP) with the highest confidence score.

[0100] For example, if the task prompt TP generated by the task prompt generation module 132 contains a first task prompt (please translate into English) and a second task prompt (please answer in Chinese), the checking module 136a retains the first task prompt or the second task prompt that conforms to the predefined rules, and deletes the first task prompt or the second task prompt that does not conform to the predefined rules.

[0101] If both the first task prompt and the second task prompt meet the predefined rule PR, or if neither of them meets the predefined rule PR, the inspection module 136a retains the one with the higher confidence score between the first task prompt and the second task prompt.

[0102] In some embodiments, the checking module 136a is further configured to check whether the task prompt TP and the task example TE are inconsistent. For example, when the task prompt is "Output Traditional Chinese" and the task example TE is "This is an example…", the checking module 136a determines that the task prompt TP and the task example TE are inconsistent. In some embodiments, the checking module 136a deletes this task example TE; in other embodiments, the checking module translates the task example TE into Traditional Chinese.

[0103] In some embodiments, the inspection module 136a is further configured to inspect whether the task prompt TP and task example TE contain biased or discriminatory content. If the inspection module 136a detects that the task prompt TP or task example TE contains inappropriate content, the inspection module 136a removes the task prompt TP or task example TE containing inappropriate content.

[0104] In some embodiments, the inspection module 136a can be parsed by a large language model, implemented using semantic analysis methods commonly found in the field of traditional natural language processing (such as keyword extraction and named entity recognition), or any text processing method.

[0105] In some embodiments, the synthesis module 136b combines the input content information IM with the task prompt TP and task example TE that have been checked and filtered by the inspection module 136a to generate prompt information TM, and then outputs the prompt information TM.

[0106] In some embodiments, the prompt information TM includes any combination of the following three: 1. Input content information IM, task prompt TP, and task example TE. 2. Input content information IM and task prompt TP. 3. Input content information IM and task example TE.

[0107] Please refer to the following: Figure 6 . Figure 6 According to some embodiments of the present invention Figure 1 This is an application embodiment of the prompt information generation device 100. In some embodiments, the prompt information TM is the output of the prompt information generation device 100. The prompt information TM can be used as the actual output data generated based on the input content information IM and input into the large language model L. The large language model L then generates the corresponding application output AO based on the prompt information TM.

[0108] Please see Figure 7 . Figure 7 A schematic diagram of a prompt message generation device 100 according to some embodiments of the present invention. In some embodiments, the prompt message generation device 100 includes a processor 702, random access memory 704, network interface component 722, display 710, alphanumeric input device 712, cursor controller 714, data storage device 718, non-transitory computer-readable storage medium 724, signal generator 720, and bus 708. The processor 702, random access memory 704, network interface component 722, display 710, alphanumeric input device 712, cursor controller 714, data storage device 718, non-transitory computer-readable storage medium 724, and signal generator 720 transmit information, signals, or data via bus 708.

[0109] In some embodiments, the network interface component 722 is connected to, via a network INT, such as Figure 1 The user interface (UI), large language model (L), and database (DB) are shown. In some embodiments, the non-transitory computer-readable storage medium (NCR) 724 in the data storage device 718 stores a computer program 726. The computer program 726 includes a task prompt generation module 132, a task example generation module 134, and an output synthesis module 136. The computer program 726 (and its included task prompt generation module 132, task example generation module 134, and output synthesis module 136) can be loaded into random access memory 704 and read and executed by processor 702 to perform actions such as... Figure 2 The prompt message generation method 200 is shown.

[0110] In some embodiments, the processor 702 may be implemented by one or more processing circuits, such as a central processing unit and / or a microprocessor, but the embodiments disclosed herein are not limited thereto. In some embodiments, the random access memory 704 may be dynamic random access memory (DRAM) or static random access memory (SRAM). The data storage device 718 may include one or more non-transitory computer-readable storage media 724. The non-transitory computer-readable storage media 724 may be read-only memory (ROM), flash memory, disk drive, hard disk, optical disk, USB flash drive, portable drive, magnetic tape, database accessible from a network, and / or any storage media with the same function that can be conceived by one of ordinary skill in the art to which this disclosure pertains.

[0111] In summary, the non-transient computer-readable storage medium and prompt information generation method provided by this invention automatically generates prompt information for large language models based on input content information and predefined rules. This eliminates the need for manual intervention in constructing prompt information or selecting prompt examples, reducing the frequency of application-based fine-tuning of prompt information and thus accelerating the development of text-related applications. Furthermore, the implementation method of this invention can be applied to any text-related application project with a large language model as its core engine, accelerating application development timelines. For advanced text-based applications, such as intelligent question answering and chatbots, the automatically generated prompt information allows users to experience a more engaging and interactive chat experience, rather than following a rigid, rule-based robot, and enhances the user experience.

[0112] It should be noted that, unless otherwise specified, there is no specific order in the steps of the above-described prompt message generation method 200. Furthermore, the steps can be executed simultaneously, or their execution times can at least partially overlap.

[0113] Furthermore, according to the various embodiments disclosed herein, steps of the prompt message generation method 200 may be appropriately added, replaced, and / or eliminated.

[0114] This document has described various functional modules, components, or blocks. As those skilled in the art will understand, modules or functional blocks will preferably be implemented by circuitry (whether dedicated or general-purpose, operating under the control of one or more processing circuits and coded instructions), which typically includes transistors or other circuit components configured to control the circuitry according to the functions and procedures described herein.

[0115] The above embodiments are merely illustrative of some implementations of the present invention and to explain the technical features of the present invention, and are not intended to limit the scope and range of protection of the present invention. Any changes or equivalent arrangements that can be easily made by those skilled in the art to which this invention pertains are within the scope of the present invention, and the scope of protection of the present invention is determined by the scope of the claims.

Claims

1. A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to perform a prompt message generation method, wherein the prompt message generation method includes: Based on the input content information and predefined rules, at least one key piece of information is obtained, and at least one task prompt is generated based on the at least one key piece of information. The format requirement information is obtained according to the predefined rules, and the input content information is parsed to obtain the semantic requirement information; Based on the semantic requirements information, at least one example data is obtained from the text instance database, and the at least one example data is processed according to the format requirements information to generate at least one task example; and The input content information, the at least one task prompt, and the at least one task example are combined to generate a prompt message.

2. The non-transitory computer-readable storage medium according to claim 1, wherein the predefined rules include basic principles, application task types, application characteristics, and data formatting.

3. The non-transitory computer-readable storage medium according to claim 1, wherein analyzing the input content information includes performing at least one of a plurality of semantic analysis tasks, wherein the plurality of semantic analysis tasks include emotion recognition, keyword acquisition, intent detection, named entity recognition, and language detection.

4. The non-transitory computer-readable storage medium according to claim 1, wherein the at least one task prompt includes a first task prompt and a second task prompt, and wherein the prompt information generation method further includes: A first confidence score is generated for the first task prompt, and a second confidence score is generated for the second task prompt.

5. The non-transitory computer-readable storage medium according to claim 4, wherein the prompt information generation method further comprises: When the first task prompt and the second task prompt conflict, the first task prompt or the second task prompt that conforms to the predefined rules shall be retained.

6. The non-transitory computer-readable storage medium according to claim 4, wherein the prompt information generation method further comprises: If the first task prompt and the second task prompt conflict and the first confidence score is higher than the second confidence score, the first task prompt shall be retained.

7. The non-transitory computer-readable storage medium according to claim 1, wherein the prompt information generation method further comprises: The at least one example data is obtained by similarity calculation.

8. The non-transitory computer-readable storage medium of claim 1, wherein the prompt information includes the input content information, the at least one task prompt, and at least two of the at least one task example.

9. A method for generating a prompt message, comprising: Based on the input content information and predefined rules, at least one key piece of information is obtained, and at least one task prompt is generated based on the at least one key piece of information. The format requirement information is obtained according to the predefined rules, and the input content information is parsed to obtain the semantic requirement information; Based on the semantic requirements information, at least one example data is obtained from the text instance database, and the at least one example data is processed according to the format requirements information to generate at least one task example; and The input content information, the at least one task prompt, and the at least one task example are combined to generate prompt information.

10. The prompt information generation method according to claim 9, wherein the predefined rules include basic principles, application task types, application characteristics, and data formatting.

11. The prompt information generation method according to claim 9, wherein analyzing the input content information includes performing at least one of a plurality of semantic analysis tasks, wherein the plurality of semantic analysis tasks include emotion recognition, keyword acquisition, intent detection, named entity recognition, and language detection.

12. The prompt information generation method according to claim 9, wherein the at least one task prompt includes a first task prompt and a second task prompt, and wherein the prompt information generation method further includes: A first confidence score is generated for the first task prompt, and a second confidence score is generated for the second task prompt.

13. The prompt message generation method according to claim 12, further comprising: When the first task prompt and the second task prompt conflict, the first task prompt or the second task prompt that conforms to the predefined rules shall be retained.

14. The prompt message generation method according to claim 12, further comprising: If the first task prompt and the second task prompt conflict and the first confidence score is higher than the second confidence score, the first task prompt shall be retained.

15. The prompt message generation method according to claim 9, further comprising: The at least one example data is obtained by similarity calculation.

16. The prompt information generation method according to claim 9, wherein the prompt information includes the input content information, the at least one task prompt, and at least two of the at least one task example.