Method and apparatus for determining prompt, device and storage medium

By providing prompt word templates and interactive areas in the terminal device, users can customize prompt word attributes, which solves the problem of poor response quality caused by inaccurate user input and achieves higher quality prompt word generation and response.

WO2025222455A1PCT designated stage Publication Date: 2025-10-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/089893
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

In existing technologies, when the terminal device determines the prompt words, inaccurate user input leads to poor quality of the model-generated response, requiring the user to make multiple adjustments to obtain a satisfactory response.

Method used

It provides prompt word templates and interactive areas, allowing users to customize prompt words and generate prompt words that meet their own needs through data input boxes and attribute settings.

Benefits of technology

It simplifies the difficulty of user input prompts and improves the quality of generated prompts, thereby enhancing the accuracy of model responses and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024089893_30102025_PF_FP_ABST
    Figure CN2024089893_30102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a method and apparatus for determining a prompt, a device and a storage medium. The method comprises: in response to receiving a first interaction request for specifying the type of a task to be executed, presenting an interaction area matching the type, wherein the interaction area comprises: a data input field for inputting data to be processed, and a prompt template matching the type, wherein the prompt template specifies a plurality of attributes of a prompt for executing the task; and in response to receiving a second interaction request for the interaction area, generating a prompt for executing the task. In this way, a user can conveniently and quickly customize prompts, so that the difficulty of inputting the prompts by the user is reduced, and the quality of generated prompts is improved, thereby improving the response quality.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, and storage media for determining prompt words Technical Field

[0001] The exemplary embodiments of this disclosure generally relate to prompt word management, and more particularly to methods, apparatus, devices, and computer-readable storage media for determining prompt words. Background Technology

[0002] With the development of information technology, various terminal devices can provide people with various services in work and life. Applications providing these services can be deployed on these terminal devices. The terminal devices present relevant content and interact with users through the application's user interface, meeting various user needs. In some cases, applications can utilize models to perform tasks. For example, based on user interaction, the application can determine prompts to provide to the model. The application can then provide the determined prompts to the model so that the model can output responses to the prompts. The application can then obtain the model's output responses and provide them to the user. The quality of the prompts directly affects the quality of the responses generated by the model. Therefore, how to improve the quality of prompts is a concern.

[0003] Summary of the Invention

[0004] In a first aspect of this disclosure, a method for determining prompt words is provided. The method includes: in response to receiving a first interaction request specifying a type of task to be performed, presenting an interaction area matching the type, the interaction area including: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of the prompt words for performing the task; and in response to receiving a second interaction request for the interaction area, generating prompt words for performing the task.

[0005] In a second aspect of this disclosure, an apparatus for determining prompt words is provided. The apparatus includes: an interactive area presentation module configured to, in response to receiving a first interactive request specifying a type of task to be performed, present an interactive area matching the type, the interactive area including: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of prompt words for performing the task; and a prompt word generation module configured to, in response to receiving a second interactive request for the interactive area, generate prompt words for performing the task.

[0006] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect of this disclosure.

[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect of this disclosure.

[0008] In a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program wherein the computer program, when executed by a processor, implements the method of the first aspect of this disclosure.

[0009] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0012] Figures 2A to 2H illustrate schematic diagrams of example pages according to some embodiments of the present disclosure;

[0013] Figure 3 shows a flowchart of a process for determining prompt words according to some embodiments of the present disclosure;

[0014] Figure 4 shows a block diagram of an apparatus for determining prompt words according to some embodiments of the present disclosure; and

[0015] Figure 5 shows a block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented. Detailed Implementation

[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0018] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.

[0019] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0020] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.

[0021] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information, thereby enabling the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that perform the operation of the technical solution disclosed herein, based on the prompt message.

[0022] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0023] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0024] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.

[0025] A neural network is a machine learning network based on deep learning. A neural network processes input and provides a corresponding output, typically consisting of an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications often include many hidden layers, thus increasing the network's depth. The layers of a neural network are connected sequentially, so that the output of the previous layer is provided as the input to the next layer. The input layer receives the input to the neural network, while the output layer's output serves as the final output. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each node processing the input from the layer above.

[0026] Machine learning typically comprises three phases: training, testing, and application (also known as inference). In the training phase, a given model is trained using a large amount of training data, iteratively updating parameter values ​​until the model can consistently generate inferences that meet the expected goals from the training data. Through training, the model can be considered to have learned the relationship between inputs and outputs (also known as an input-output mapping) from the training data. The parameter values ​​of the trained model are determined. In the testing phase, test inputs are applied to the trained model to test whether it can provide the correct output, thus determining the model's performance. The testing phase can sometimes be integrated into the training phase. In the application or inference phase, the trained model can be used to process actual model inputs based on the trained parameter values ​​to determine the corresponding model output.

[0027] Figure 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Environment 100 relates to a terminal device 110. In this example environment 100, the terminal device 110 has an application 115 installed (it is understood that although only one application 115 is shown in the figure, there may actually be multiple applications 115). Application 115 can be any suitable application that can provide conversational services. User 140 can interact with application 115 via terminal device 110 and / or an attached device of terminal device 110.

[0028] Application 115 can use model 120 to provide conversational services to users. Model 120 can be deployed locally on terminal device 110 or deployed on other electronic devices (e.g., server 130). Model 120 can be a machine learning model, deep learning model, learning model, neural network, etc. In some embodiments, the model can be based on a language model (LM). A language model, by learning from a large corpus, is capable of question-answering. Model 120 can also be based on any other suitable model.

[0029] In environment 100 of Figure 1, if application 115 is active, terminal device 110 can present page 150 of application 115. Terminal device 110 can present page 150 to user 140 based on user 140's actions to output and / or receive information from user 140. Page 150 can be, for example, an interactive page. Terminal device 110 can receive user input from user 140 via page 150 and present the response to the user input determined by model 120 on page 150.

[0030] In some embodiments, terminal device 110 communicates with server 130 to provide services to application 115. Terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry). Server 130 can be various types of computing systems / servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.

[0031] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0032] As mentioned earlier, applications can determine the prompts to provide to the model based on user interactions. The application can then provide these prompts to the model so that the model can output a response to the prompts. The application can then retrieve the model's response and provide it to the user. The quality of the prompts directly affects the quality of the model's generated response. Traditionally, applications often determine prompts directly based on received user input. The quality of the prompts is influenced by the user input. If the user input is inaccurate, the model's response based on the prompts may be inaccurate and may not meet the user's expectations. The user may need to adjust their input multiple times to obtain a satisfactory response.

[0033] In view of this, according to embodiments of the present disclosure, an improved scheme for determining prompt words based on enhanced input is provided. In summary, prompt word templates can be provided to enhance the convenience of prompt words for users, thereby allowing users to refine prompt words from multiple aspects and determine prompt words that better suit their needs. According to this scheme, in response to receiving a first interaction request specifying the type of task to be performed, an interaction area matching the type is presented. The interaction area includes a data input box for inputting data to be processed and a prompt word template matching the type, the prompt word template specifying multiple attributes of the prompt words used to perform the task. In response to receiving a second interaction request for the interaction area, prompt words for performing the task are generated.

[0034] This allows users to easily and quickly customize prompts, reducing the difficulty of inputting prompts, improving the quality of generated prompts, and thus improving response quality. Some exemplary embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0035] Figures 2A to 2H illustrate schematic diagrams of example pages 200A to 200H (also referred to simply as examples 200A to 200H) according to some embodiments of the present disclosure. It should be understood that the pages shown in the figures are merely examples, and various page designs may actually exist. The various graphic elements on the page may have different arrangements and different visual representations, one or more elements may be omitted or replaced, and one or more other elements may also be present. The embodiments of the present disclosure are not limited in this respect.

[0036] The pages shown in Examples 200A to 200H can be presented on terminal device 110. For ease of discussion, Examples 200A to 200H will be described with reference to environment 100 of FIG1. ​​In environment 100, terminal device 110 presents an interactive page (e.g., page 150) of a conversational interactive application (e.g., application 115). Terminal device 110 can receive user input from user 140 via page 150 and provide responses corresponding to the user input to user 140 via page 150.

[0037] In some embodiments, terminal device 110 may present at least one interactive control corresponding to the type of at least one predetermined task in an interactive page. Terminal device 110 may, in response to receiving a trigger operation on a target interactive control, determine that a first interactive request has been received specifying the type of task to be performed. As shown in FIG2A, example 200A illustrates an example of an interactive page. Example 200A includes an input box 207. Terminal device 110 may receive user input via input box 207. User input may be any suitable type of input, such as text, voice, or image. Example 200A includes a send control 208. Terminal device 110 may, in response to receiving a user operation on send control 208 (e.g., a user trigger operation on send control 208), determine that user input has been received and present the received user input as a session message from the user in example 200A.

[0038] Example 200A includes multiple interactive controls (e.g., interactive controls 201, 202, 203, 204, 205, etc.) corresponding to multiple predefined task types, and interactive control 206. Terminal device 110 can, in response to receiving a user action on interactive control 206, present more interactive controls (e.g., if there are 10 predefined task types, terminal device 110 can present 5 interactive controls corresponding to 5 predefined task types in Example 200A, and terminal device 110 can, in response to receiving a user action on interactive control 206, present 5 interactive controls corresponding to the remaining 5 predefined task types). For example, terminal device 110 can, in response to receiving a user action on interactive control 201, determine that it has received a first interactive request specifying the type of task to be performed as "Help me write".

[0039] Terminal device 110 can, in response to receiving a first interaction request specifying the type of task to be performed, present an interaction area matching the type. The interaction area includes a data input field for entering data to be processed and a prompt template matching the type. The prompt template can specify multiple attributes of the prompts used to perform the task. In response to receiving a second interaction request for the interaction area, terminal device 110 generates prompts for performing the task. This allows users to refine multiple attributes of the prompts, thereby obtaining prompts that better match their needs.

[0040] This second interaction request may include an interaction request for a data input field and an interaction request for a target attribute among multiple attributes. If it is determined that the second interaction request is for a data input field, the terminal device 110 can determine the data to be processed based on the second interaction request. If it is determined that the second interaction request is for a target attribute among multiple attributes, the terminal device 110 can set the attribute value of the target attribute based on the second interaction request. The terminal device 110 can generate prompts based on the data and attribute values.

[0041] As shown in Figures 2A and 2B, terminal device 110 can, in response to receiving a user operation on interactive control 201 in example 200A, determine that it has received a first interactive request specifying the type of task to be performed as "help me write," and then present example 200B. Example 200B includes a cancel control 213. Terminal device 110 can, in response to receiving a user operation on cancel control 213, cancel the presentation of interactive area 210. Terminal device 110 can, for example, present example 200B.

[0042] Example 200B includes an interactive area 210 matching the type "Help Me Write". Interactive area 210 includes a data input field 217 for entering data to be processed. Terminal device 110 can determine the data to be processed based on a second interactive request, in response to determining that the second interactive request is for the data input field 217. For example, terminal device 110 can determine the received text based on a text input request, in response to determining that the second interactive request is for text input to the data input field, and identify the received text as the data to be processed.

[0043] The interactive area 210 may also include, for example, controls 214, areas 215, and areas 218. The terminal device 110 may determine the prompt word template based on controls 214, areas 215, and areas 218, that is, determine multiple attributes of the prompt word used to perform the task based on controls 214, areas 215, and areas 218. Control 214 can be used to configure the functional attributes of the prompt word, which may include the options "compose" and "reply," each option corresponding to an attribute value of the functional attribute. Taking the task type "help me write" as an example, the terminal device 110 may, in response to the selection of the option "compose," determine that the attribute value corresponding to the functional attribute is "compose," and the prompt word may instruct the model to actively write an email (and / or other types of documents). The terminal device 110 may, in response to the selection of the option "reply," determine that the attribute value corresponding to the functional attribute is "reply," and the prompt word may instruct the model to write a reply email to other emails.

[0044] Area 215 can be used to configure the category attribute of prompt words. Area 215 can include multiple options such as "copywriting", "idea", "monthly report", "weekly report", "daily report", "outline", and "email", each option corresponding to an attribute value of the category attribute. Area 215 can also include more controls 216, and the terminal device 110 can respond to receiving user operations on more controls 216 to present more options.

[0045] Region 218 can display multiple labels, each label corresponding to an attribute. For example, region 218 may include labels corresponding to tone attributes, labels corresponding to length attributes, labels corresponding to language attributes, etc. Terminal device 110 can, in response to determining that the second interaction request is an interaction request for a target attribute, present multiple candidate attribute values ​​associated with the target attribute, and in response to receiving a third interaction request for a target candidate attribute value among the multiple candidate attribute values, use the target candidate attribute value to set the attribute value.

[0046] For example, terminal device 110 can determine that the second interaction request is for the tone attribute in response to receiving a trigger operation on a tag corresponding to the tone attribute. Terminal device 110 can present Example 200C as shown in FIG2C, which illustrates an example of an interaction area. Example 200C presents a menu 220 that includes multiple candidate attribute values ​​associated with the tone attribute. Terminal device 110 can determine that a third interaction request for the attribute value "formal" has been received in response to receiving a selection operation on the attribute value "formal" among the multiple candidate attribute values, and set the attribute value of the tone attribute to "formal". In this way, the desired candidate can be selected from multiple threshold candidates of the attribute, thereby simplifying the complexity of user input.

[0047] Referring back to Figure 2B, in Example 200B, terminal device 110 can determine the prompt word template based on configuration operations of control 214, area 215, and area 218. For example, if the option "Write" is selected in control 214, the option "Copywriting" is selected in area 218, and the attribute value of tone is "formal," the attribute value of length is "Chinese," and the attribute value of language is "Simplified Chinese," then terminal device 110 can determine that the prompt word template includes text such as "Write," "Copywriting," "Formal," "Chinese," and "Simplified Chinese."

[0048] In some embodiments, the interactive area may further include a specified control for specifying the presentation format of the interactive area. Terminal device 110 may, in response to receiving a user operation on the specified control, determine that a fourth interaction request has been received for the specified control. For example, terminal device 110 may, in response to receiving the fourth interaction request for the specified control, present the interactive area using the presentation format specified by the fourth interaction request. As shown in FIG2B, the interactive area 210 may include specified control 211 and specified control 212. Terminal device 110 may, in response to receiving a user operation on specified control 211, determine that the presentation format of the interactive area 210 is an image format. Terminal device 110 may, in response to receiving a user operation on specified control 212, determine that the presentation format of the interactive area 210 is a text format.

[0049] Terminal device 110, for example, may respond to determining that the presentation format specified by the fourth interaction request is an image format by presenting a data input box in an image format in a first area of ​​the interaction area and a label in an image format in a second area of ​​the interaction area. For example, as shown in FIG2B, the presentation format of the interaction area 210 in example 200B is an image format. Terminal device 110 may present the data input box 217 in the first area of ​​the interaction area 210 (e.g., the area where the data input box 217 is located) and the label in an image format in the second area (e.g., area 218). In this way, users can easily understand the various attributes of the prompt words and their corresponding attribute values ​​in a visual manner, thereby supporting users in judging whether the specified attribute values ​​meet their needs.

[0050] Terminal device 110 may, for example, respond to determining that the presentation format specified by the fourth interaction request is text format, present an initial prompt for performing a task in the interaction area, present a data input box in text format at a first position in the initial prompt, and present a label in text format at a second position in the initial prompt. Exemplarily, as shown in FIG2D, example 200D illustrates an example of presenting the interaction area in text format. Example 200D presents the initial prompt “Reply to work email, [paste email content] in ____ tone. The length of the response is ____. [Topic I want to say]”, and terminal device 110 may present a data input box in text format at a first position in the initial prompt (e.g., at [Topic I want to say]) and present a label in text format at a second position in the initial prompt (e.g., positions 221 and 222).

[0051] Furthermore, users can press the triangle symbol shown at position 221 to display multiple candidate attribute values ​​related to tone (e.g., formal, casual, etc.); users can press the triangle symbol shown at position 222 to display multiple candidate attribute values ​​related to length (e.g., long, medium, short, etc.). In this way, the complete sentence containing the prompt word can be presented in text format, and the specific content of each attribute value can be presented in a highlighted format (e.g., highlighted, bold, italic, underlined) to allow users to further modify or confirm.

[0052] Referring back to Figure 2B, in some embodiments, the interaction area 210 may further include a submission control 219. The terminal device 110, in response to receiving a user operation on the submission control 219, can determine the data to be processed based on the data input box 217, and determine the prompt word template based on the control 214, area 215, and area 218. In some embodiments, the terminal device 110 may, in response to receiving a user operation on the submission control 219, present Example 200E as shown in Figure 2E. Example 200E illustrates an example of an interactive page. As shown in Example 200E, the interaction area 210 may also include multiple candidate layouts (e.g., layouts 1 to 5 shown in the figure), each representing a layout of a response element in response to a prompt word. Response elements may represent various elements that will appear in the response, such as titles, body text, images, etc. In this way, the layout of the response result can be provided in advance in a visual manner, making it easier for the user to select a layout that better suits their needs.

[0053] The interactive area 210 may also include a control 231, and the terminal device 110 may present more candidate layouts in response to receiving a user operation on the control 231. The terminal device 110 may determine that a fifth interaction request for the target candidate layout has been received in response to receiving a user operation on a target candidate layout (which can be any one of the multiple candidate layouts). For example, the terminal device 110 may directly respond to receiving the fifth interaction request for the target candidate layout and generate a prompt based on the target candidate layout.

[0054] For example, after receiving a fifth interaction request for a target candidate layout among multiple candidate layouts, the terminal device 110 may, in response to receiving a user operation on the submission control 219, generate a prompt based on the target candidate layout. In some embodiments, the interaction area 210 may further include an input box 232, through which the terminal device 110 can receive input information from the user regarding the layout, and determine or adjust the target candidate layout based on the received input information. This allows the user to preview the response layout, enhances the user's perception of the response result, and facilitates the user's adjustment of the layout according to their own preferences.

[0055] In some embodiments, terminal device 110 may also provide a prompt to a model (e.g., model 120) in response to receiving a sixth interaction request for a submit control (e.g., receiving a user action on submit control 219). If the model is deployed locally on terminal device 110, terminal device 110 may directly provide the prompt to the model and obtain a response to the prompt from the model. If the model is deployed on a server device (e.g., server 130) associated with a conversational application (e.g., application 115), terminal device 110 may submit the prompt to server 130. Server 130 may provide the prompt to the model and obtain a response to the prompt from the model. Terminal device 110 may then obtain a response to the prompt from server 130 via a communication connection with server 130. Terminal device 110 may present the response to the prompt from server 130.

[0056] As shown in Figures 2E and 2F, where Example 200F illustrates an example of an interactive page. Terminal device 110 may, for example, present Example 200F in response to a user action received on the submit control 219 in Example 200E. Terminal device 110 may present prompts (e.g., conversation message 241) in Example 200F in the form of conversational messages from the user. Conversational message 241 may include prompts and multiple tags associated with multiple attribute values ​​of multiple attributes (e.g., the tags “text,” “formal,” “Chinese,” and “simplified Chinese” shown in the figures). Terminal device 110 may also present responses to prompts (e.g., conversation message 242) in Example 200F in the form of conversational messages.

[0057] In some embodiments, terminal device 110 may, in response to receiving a user action on a target marker (any one of a plurality of markers), determine that a seventh interaction request has been received for the target marker. For example, in response to receiving the seventh interaction request for the target marker, terminal device 110 may present an edit box for editing the target attribute value associated with the target marker, and, in response to receiving the seventh interaction request for the edit box, update the target attribute value based on the seventh interaction request to generate an updated prompt. In this way, even after the user has submitted the prompt, the corresponding attribute value can still be modified by clicking on the aforementioned markers, thereby simplifying the complexity of user operations.

[0058] This edit box can be of any suitable type; for example, it can be an input box. Terminal device 110 can receive user input based on the input box and modify the label based on the received user input. This edit box can also, for example, present multiple attribute values ​​that match the attribute corresponding to the label. Exemplarily, as shown in Figures 2F and 2G, terminal device 110 can, in response to receiving a user operation on the label "Formal," determine that a seventh interaction request for the label "Formal" has been received, and then present edit box 250. Edit box 250 can present multiple attribute values ​​associated with the attribute corresponding to the label "Formal." Terminal device 110 can, in response to receiving a selection operation on one of the multiple attribute values ​​in edit box 250, modify the attribute value of the attribute corresponding to the label "Formal" to the selected attribute value and update the label to the label corresponding to that attribute value.

[0059] As shown in Figures 2G and 2H, if the user selects the attribute value "Enthusiastic" in the edit box 250, the terminal device 110 can update the attribute value corresponding to the "Formal" tag to "Enthusiastic" and update the tag to display "Enthusiastic". The terminal device 110 can update the prompt word based on the updated attribute value "Enthusiastic" and display the session message 243 in example 200H. The session message 243 includes the updated prompt word and the updated tag. In some embodiments, the terminal device 110 can also provide the updated prompt word to the model to obtain a response to the updated prompt word. The terminal device 110 can display a response to the updated prompt word. For example, the terminal device 110 can display a session message 244, which includes a response to the updated prompt word.

[0060] The preceding description illustrates an exemplary embodiment of a task type called "Help me write." It is understood that, if the task type is "Help me write," the terminal device 110 can generate prompts instructing the model to generate text. Besides "Help me write," if the task type is "Image generation," the terminal device 110 can also generate prompts indicating the content, size, style, etc., of an image, and use the model to generate the image based on these prompts. If the task type is "Search," the terminal device 110 can also generate prompts indicating search keywords, search engines, and the number of search results, and obtain search results based on these prompts. In this case, the terminal device 110 can directly provide the prompts to the search engine or provide them to the model. If the task type is "Translation," the terminal device 110 can generate prompts indicating the source language, target language, translation style, etc. The terminal device 110 can use the model to obtain translation results based on the prompts.

[0061] In summary, the embodiments of this disclosure allow users to conveniently and quickly customize prompts, reducing the difficulty for users to input prompts, improving the quality of generated prompts, and thus improving response quality.

[0062] Figure 3 shows a flowchart of a process 300 for determining prompt words according to some embodiments of the present disclosure. Process 300 can be implemented at terminal device 110. Process 300 is described below with reference to Figure 1.

[0063] In box 310, in response to receiving a first interaction request specifying the type of task to be performed, terminal device 110 presents an interaction area matching the type, the interaction area including: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of the prompt word used to perform the task.

[0064] In box 320, terminal device 110, in response to receiving a second interaction request for the interaction area, generates a prompt for performing a task.

[0065] In some embodiments, generating a prompt includes: in response to determining that the second interaction request is an interaction request for a data input field, determining the data to be processed based on the second interaction request; in response to determining that the second interaction request is an interaction request for a target attribute among a plurality of attributes, setting the attribute value of the target attribute based on the second interaction request; and generating a prompt based on the data and the attribute value.

[0066] In some embodiments, the target attribute is represented using a label, and setting the attribute value based on a second interaction request includes: in response to determining that the second interaction request is an interaction request for the target attribute, presenting a plurality of candidate attribute values ​​associated with the target attribute; and in response to receiving a third interaction request for a target candidate attribute value among the plurality of candidate attribute values, setting the attribute value using the target candidate attribute value.

[0067] In some embodiments, the interactive area further includes a specified control for specifying the rendering format of the interactive area, and the process 300 further includes: in response to receiving a fourth interaction request for the specified control, rendering the interactive area using the rendering format specified by the fourth interaction request.

[0068] In some embodiments, presenting an interactive area using a presentation format specified by a fourth interaction request includes: in response to determining that the presentation format specified by the fourth interaction request is an image format, presenting a data input box in an image format in a first area of ​​the interactive area; and presenting a label in an image format in a second area of ​​the interactive area.

[0069] In some embodiments, presenting an interactive area using a presentation format specified by a fourth interaction request includes: in response to determining that the presentation format specified by the fourth interaction request is a text format, presenting an initial prompt for performing a task in the interactive area; presenting a data input box in text format at a first position in the initial prompt; and presenting a label in text format at a second position in the initial prompt.

[0070] In some embodiments, the interaction area further includes a plurality of candidate layouts, each of which represents a layout of a response element in response to a prompt word, and the process 300 further includes: generating a prompt word based on the target candidate layout in response to receiving a fifth interaction request for a target candidate layout among the plurality of candidate layouts.

[0071] In some embodiments, process 300 is implemented in a conversational interactive application, and the interactive area further includes a submission control for submitting a prompt word, and process 300 further includes: submitting a prompt word to a server device associated with the conversational interactive application in response to receiving a sixth interaction request for the submission control; and presenting a response from the server device to the prompt word.

[0072] In some embodiments, process 300 further includes: in response to receiving a sixth interaction request for a submit control, presenting a prompt word and a plurality of tags associated with the plurality of attribute values ​​of the plurality of attributes in a conversational interactive application.

[0073] In some embodiments, process 300 further includes: in response to receiving a seventh interaction request for a target tag among a plurality of tags, presenting an edit box for editing a target attribute value associated with the target tag; and in response to receiving a seventh interaction request for the edit box, updating the target attribute value based on the seventh interaction request to generate an updated prompt word.

[0074] In some embodiments, process 300 further includes: presenting a response from a server device for an update prompt.

[0075] According to some embodiments of this disclosure, an apparatus for determining prompt words is also provided. FIG4 shows a block diagram of an apparatus 400 for determining prompt words according to some embodiments of this disclosure. The apparatus 400 may be implemented as or included in a terminal device 110. The various modules / components in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.

[0076] As shown in Figure 4, the device 400 includes an interactive area presentation module 410, configured to present an interactive area matching the type of the task to be performed in response to receiving a first interactive request specifying the type of the task to be performed. The interactive area includes: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of the prompt words used to perform the task. The device 400 also includes a prompt word generation module 420, configured to generate prompt words for performing the task in response to receiving a second interactive request for the interactive area.

[0077] In some embodiments, the prompt word generation module 420 includes: a data determination module configured to determine the data to be processed based on the second interaction request in response to determining that the second interaction request is an interaction request for a data input box; an attribute value determination module configured to set the attribute value of the target attribute based on the second interaction request in response to determining that the second interaction request is an interaction request for a target attribute among a plurality of attributes; and a first prompt word generation module configured to generate a prompt word based on the data and the attribute value.

[0078] In some embodiments, the target attribute is represented by a label, and the attribute value determination module includes: an attribute value presentation module configured to present a plurality of candidate attribute values ​​associated with the target attribute in response to determining that a second interaction request is an interaction request for the target attribute; and an attribute value setting module configured to set an attribute value using the target candidate attribute value in response to receiving a third interaction request for a target candidate attribute value among the plurality of candidate attribute values.

[0079] In some embodiments, the interactive area further includes a specified control for specifying the presentation format of the interactive area, and the apparatus 400 further includes: a first area presentation module configured to, in response to receiving a fourth interaction request for the specified control, present the interactive area using the presentation format specified by the fourth interaction request.

[0080] In some embodiments, the first region rendering module includes: a first input box rendering module configured to render a data input box in an image format in a first region of the interaction region in response to determining that the rendering format specified by the fourth interaction request is an image format; and a first label rendering module configured to render a label in an image format in a second region of the interaction region.

[0081] In some embodiments, the first region presentation module includes: an initial prompt word presentation module configured to present an initial prompt word for performing a task in an interaction region in response to determining that the presentation format specified by the fourth interaction request is text format; a second input box presentation module configured to present a data input box in text format at a first position in the initial prompt word; and a second label presentation module configured to present a label in text format at a second position in the initial prompt word.

[0082] In some embodiments, the interactive area further includes a plurality of candidate layouts, each candidate layout representing a layout of a response element in response to a prompt word, and the apparatus 400 further includes: a second prompt word generation module configured to generate a prompt word based on the target candidate layout in response to receiving a fifth interactive request for a target candidate layout among the plurality of candidate layouts.

[0083] In some embodiments, the device 400 is implemented in a conversational interactive application, and the interactive area further includes a submission control for submitting a prompt word, and the device 400 further includes: a prompt word submission module configured to submit a prompt word to a server device associated with the conversational interactive application in response to receiving a sixth interactive request for the submission control; and a first response presentation module configured to present a response from the server device to the prompt word.

[0084] In some embodiments, the apparatus 400 further includes: a presentation module configured to, in response to receiving a sixth interaction request for a submit control, present prompts and a plurality of tags, each associated with a plurality of attribute values ​​of a plurality of attributes, in a conversational interactive application.

[0085] In some embodiments, the apparatus 400 further includes: an edit box presentation module configured to present an edit box for editing a target attribute value associated with the target tag in response to receiving a seventh interaction request for a target tag among a plurality of tags; and a prompt word update module configured to update the target attribute value based on the seventh interaction request to generate an updated prompt word in response to receiving a seventh interaction request for the edit box.

[0086] In some embodiments, the apparatus 400 further includes a second response presentation module configured to present a response from a server device to an updated prompt word.

[0087] The units and / or modules included in device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units and / or modules in device 400 can be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0088] It should be understood that one or more steps in the above methods can be performed by suitable electronic devices or combinations of electronic devices. Such electronic devices or combinations of electronic devices may, for example, include the terminal device 110 in FIG1.

[0089] Figure 5 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 500 shown in Figure 5 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 500 shown in Figure 5 can be used to implement the terminal device 110 of Figure 1, and / or the device 400 of Figure 4.

[0090] As shown in Figure 5, the electronic device 500 is in the form of a general-purpose computing device. Components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, memory 520, storage devices 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in the memory 520. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 500.

[0091] Electronic device 500 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data and accessible within electronic device 500.

[0092] Electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 5, disk drives for reading or writing from removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading or writing from removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various implementations of this disclosure.

[0093] The communication unit 540 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the electronic device 500 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0094] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 500 can also communicate with one or more external devices (not shown) via communication unit 540 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 500, or with any device that enables electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0095] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

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

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

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

[0099] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

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

Claims

1. A method for determining cue words, comprising: In response to receiving a first interaction request specifying the type of task to be performed, an interaction area matching the type is presented, the interaction area including: A data input field for entering the data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of the prompt words used to perform the task; and In response to receiving a second interaction request for the interaction area, the prompt word for performing the task is generated.

2. The method according to claim 1, wherein generating the prompt word comprises: In response to determining that the second interaction request is an interaction request for the data input box, the data to be processed is determined based on the second interaction request; In response to determining that the second interaction request is an interaction request for a target attribute among the plurality of attributes, the attribute value of the target attribute is set based on the second interaction request; as well as The prompt word is generated based on the data and the attribute value.

3. The method according to claim 2, wherein the target attribute is represented using a tag, and setting the attribute value based on the second interaction request includes: In response to determining that the second interaction request is an interaction request for the target attribute, a plurality of candidate attribute values ​​associated with the target attribute are presented; as well as In response to receiving a third interaction request for a target candidate attribute value among the plurality of candidate attribute values, the attribute value is set using the target candidate attribute value.

4. The method of claim 3, wherein the interactive area further includes a specified control for specifying the rendering format of the interactive area, and the method further includes: In response to receiving a fourth interaction request for the specified control, the interactive area is presented using the presentation format specified by the fourth interaction request.

5. The method of claim 4, wherein presenting the interactive area using the presentation format specified by the fourth interaction request comprises: In response to determining that the rendering format specified in the fourth interaction request is an image format, The data input box is presented in the image format in the first area of ​​the interactive area; as well as The label is presented in the image format in the second area of ​​the interactive area.

6. The method of claim 4, wherein presenting the interactive area using the presentation format specified by the fourth interaction request comprises: In response to determining that the presentation format specified by the fourth interaction request is text format, An initial prompt for performing the task is displayed in the interactive area; The data input box is presented in the text format at the first position in the initial prompt word; as well as The label is presented in the text format at the second position in the initial prompt word.

7. The method according to claim 1, wherein the interactive area further comprises a plurality of candidate layouts, the plurality of candidate layouts respectively representing the layout of each response element in response to the prompt word, and the method further comprises: In response to receiving a fifth interaction request for a target candidate layout among multiple candidate layouts, the prompt word is generated based on the target candidate layout.

8. The method of claim 1, wherein the method is implemented in a conversational interactive application, and the interactive area further includes a submission control for submitting the prompt word, and the method further includes: In response to receiving a sixth interaction request for the submission control, the prompt word is submitted to the server device associated with the conversational interactive application; as well as The server device then displays a response to the prompt word.

9. The method of claim 8, further comprising: In response to receiving the sixth interaction request for the submit control, the prompt word and multiple markers associated with the multiple attribute values ​​of the plurality of attributes are presented in the conversational interactive application.

10. The method of claim 9, further comprising: In response to receiving a seventh interaction request for a target tag among the plurality of tags, An edit box is displayed for editing the target attribute values ​​associated with the target marker; as well as In response to receiving a seventh interaction request for the edit box, the target attribute value is updated based on the seventh interaction request to generate an updated prompt word.

11. The method of claim 10, further comprising: The server device then displays a response to the updated prompt.

12. An apparatus for determining a prompt word, comprising: An interactive area presentation module is configured to, in response to receiving a first interactive request specifying the type of task to be performed, present an interactive area matching the type, the interactive area including: a data input box for inputting data to be processed; and a prompt word template matching the type, the prompt word template specifying multiple attributes of prompt words for performing the task; and The prompt word generation module is configured to generate the prompt word for performing the task in response to receiving a second interaction request for the interaction area.

13. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Prompt information determination method and device, electronic equipment and readable storage medium

    CN116956858A

  • Human-computer interaction method, device and equipment and storage medium

    CN117032515A

  • Processing method for intelligent customer service dialogue and related product

    CN117312521A

  • Image generation method and device, terminal and storage medium

    CN117392254A

  • Image generation method and device and storage medium

    CN117475031A