CN-122018747-A - Method, apparatus, device, storage medium and program product for prompt word editing
Abstract
According to embodiments of the present disclosure, methods, apparatuses, devices, storage media, and program products for hint word editing are provided. At the client, the method includes receiving a task execution instruction corresponding to the task request from the server device for execution in response to sending the task request to the server device, receiving prediction information for the task request from the server device, the prediction information indicating at least one predicted execution result of the task execution instruction and a predicted response corresponding to the at least one predicted execution result, respectively, and providing a response for the task request based on a match between a target execution result of the task execution instruction and the at least one predicted execution result after execution of the task execution instruction is completed. This helps to improve the efficiency of the prompt word editing.
Inventors
- YAO HUI
- CHEN QINGHONG
- PENG YIRAN
- Hao Zhenfei
- LI CHENGWU
Assignees
- 北京字跳网络技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241111
Claims (16)
- 1. A method of prompting word editing, comprising: presenting an editing interface for editing the prompt, wherein the edited prompt is input to a machine learning model for the machine learning model determination model output; Configuring an editing block at a selected location of the editing interface in response to triggering of an editing block function, wherein content can be populated in the editing block and the populated content is editable, and In response to a confirmation of editing of the cue word, content populated in the editing block is determined to be part of the cue word.
- 2. The method of claim 1, wherein the visual style of the editing block or content in the editing block is distinguished from the visual style of content of non-editing blocks in the hint word.
- 3. The method of claim 1, wherein configuring an edit block at a selected location of the hint word comprises: in response to detecting a trigger to a text editing block function when at least a portion of text of the prompt is selected, a first text editing block is configured based on the at least a portion of text at a location of the at least a portion of text selected, wherein the first text editing block is populated with the at least a portion of text.
- 4. The method of claim 1, wherein configuring an edit block at a selected location of the hint word comprises: In response to detecting a trigger for a text editing block function when at least a portion of text of the prompt is not selected, inserting a second text editing block at an input cursor of the editing interface, wherein a filler guide text is displayed in association with the second text editing block.
- 5. The method of claim 3 or 4, further comprising, for a given text editing block of the first text editing block or the second text editing block, Presenting a text input interface for the given text editing block, the text input interface including at least one of a first input area and a second input area; in response to receiving a specified text in the first input area, replacing the filled text in the given text editing block with the specified text, and And receiving stuffing guide text for the given text editing block in the second input area, wherein the stuffing guide text is displayed when the text editing block is not stuffed with the stuffing text.
- 6. The method of claim 1, wherein configuring an edit block at a selected location of the hint word comprises: In response to detecting a trigger to an Application Program Interface (API) edit block function, inserting a first API edit block in a selected location of the hint word, wherein the first API edit block is capable of being populated with identifying information for a predefined API.
- 7. The method of claim 6, wherein the editing interface comprises an editing interface for a target function that operates based on a target machine learning model, and the method further comprises: In response to detecting the trigger for the first API edit block, presenting at least one API that is fillable, wherein the at least one API is associated with the target function, and In response to detecting a selection of a first API of the at least one API, populating the first API editing block with identification information of the first API.
- 8. The method of claim 1, wherein the editing interface comprises an editing interface for a target function that operates based on a target machine learning model, and wherein the hint word comprises a second API editing block that is populated with identifying information of a second API, the method further comprising: In response to the second API not being associated with the target function, presenting the identification information of the second API as a visual style corresponding to a disabled state; in response to detecting a trigger for the second API edit block, rendering the second API fillable, and In response to detecting selection of the second API, the identification information of the second API is presented as a visual style corresponding to an enabled state.
- 9. The method of claim 1, further comprising: in response to detecting selection of a predetermined control, determining that triggering of the edit block function is detected, or In response to detecting the input of the predetermined symbol in the editing interface, it is determined that a trigger for the editing block function is detected.
- 10. The method of claim 1, wherein the editing interface comprises an editing interface for a target function that operates based on a target machine learning model, and wherein validating content populated in the editing block as part of the hint word comprises: And responding to the creation confirmation of the target function, and confirming the content filled in the editing block as a part of the prompt word.
- 11. The method of claim 1, wherein the editing interface comprises an editing interface for creating a hint word for a hint word library, the method further comprising: in response to a confirmation of editing of the hint word, the edited hint word is added to the hint word library.
- 12. The method of claim 1, further comprising: In response to determining that a portion of the content entered in the editing interface is annotated as annotated content, presenting the annotated content in a first visual style in which the annotated content is not to be entered into the machine learning model, and In response to determining that the portion of the content entered in the editing interface is code in a computer language, at least a portion of the predetermined symbols in the code are presented in a second visual pattern.
- 13. An apparatus for prompting word editing, comprising: An editing interface presentation module configured to present an editing interface for editing the prompt word, wherein the edited prompt word is input to a machine learning model for the machine learning model determination model output; an editing block configuration module configured to configure editing blocks in selected locations of the editing interface in response to a trigger to an editing block function, wherein content can be filled in the editing blocks and the filled content is editable, and And a prompt word determining module configured to determine content filled in the editing block as a part of the prompt word in response to confirmation of editing of the prompt word.
- 14. An electronic device, comprising: 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, which when executed by the at least one processing unit, cause the electronic device to perform the method of any one of claims 1 to 12.
- 15. A computer readable storage medium having stored thereon a computer program executable by a processor to implement the method of any of claims 1 to 12.
- 16. 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 12.
Description
Method, apparatus, device, storage medium and program product for prompt word editing Technical Field Example embodiments of the present disclosure relate generally to the field of computers and, more particularly, relate to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for prompting word editing. Background With the development of information technology, various terminal devices can provide various services to people in terms of work and life, etc. For example, applications that can provide different services may be deployed in a terminal device, and a digital assistant. Digital assistants are provided to assist users in handling various types of task processing needs in different applications, scenarios. Digital assistants typically have intelligent dialog and task processing capabilities. In general, digital assistants are capable of supporting users to enter questions in natural language, and to perform tasks and provide replies based on understanding and logical reasoning capabilities of natural language inputs. Disclosure of Invention In a first aspect of the present disclosure, a method of hint word editing is provided. The method is implemented at a client device and includes, in response to sending a task request to a server device, receiving a task execution instruction corresponding to the task request from the server device for execution, receiving prediction information for the task request from the server device, the prediction information indicating at least one predicted execution result of the task execution instruction and a predicted response corresponding to the at least one predicted execution result, respectively, and providing a response for the task request based on a match between a target execution result of the task execution instruction and the at least one predicted execution result after execution of the task execution instruction is completed. In a second aspect of the present disclosure, an apparatus for prompting word editing is provided. The apparatus is implemented at a client device, the apparatus including a task request transmitting module configured to receive a task execution instruction corresponding to a task request from the server device for execution in response to transmitting the task request to the server device, a prediction information receiving module configured to receive prediction information for the task request from the server device, the prediction information indicating at least one predicted execution result of the task execution instruction and a predicted response corresponding to the at least one predicted execution result, respectively, and a response providing module configured to provide a response for the task request based on a match between a target execution result of the task execution instruction and the at least one predicted execution result after execution of the task execution instruction is completed. In a third aspect of the present disclosure, an electronic device is provided. The apparatus 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. The instructions, when executed by at least one processing unit, cause the electronic device to perform the method of the first aspect. In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The medium has stored thereon a computer program which, when executed by a processor, implements the method of the first aspect. In a fifth aspect of the present disclosure, a computer program product is provided. The article of manufacture comprises a computer program, wherein the computer program when executed by a processor implements a method according to the first aspect of the present disclosure. It should be understood that what is described in this section of the disclosure is not intended to limit key features or essential features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description. Drawings The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which: FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure may be implemented; FIGS. 2A and 2B illustrate example interfaces according to some embodiments of the present disclosure; 3A-3E illustrate examples of editing interfaces for creating hint words for a hint word library according to some embodiments of the present disclosure; FIGS. 4A and 4B illustrate examples of conf