Prompt word processing method and device
Patent Information
- Application Number
- CN202611140226.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]然而,每个工程师在同一份提示词文档中编写各自负责的提示词,均有可能会因为误触而改动其他工程师编写的提示词,导致各工程师在编辑提示词的过程中相互干扰,从而无法保证编写完成后的完整提示词的准确性
[0054]综上,在本说明书一个或多个实施例提供的一种提示词的处理方法中,在编辑界面中包括多个编辑区域,每个编辑区域对应一个消息角色标识,消息角色标识用于指示编辑区域归属的工程师,每个工程师可以在各自对应的编辑区域内独立的编辑提示词片段,从而在物理层面将不同工程师的编辑范围隔离开,可以避免多个工程师在编辑提示词片段的过程中相互干扰。由于目标提示词是由多个提示词片段构成的,只要各个工程师编辑的提示词片段是准确的,那么便可保证基于多个提示词片段生成的目标提示词的准确性。因此,本说明书一个或多个实施例提供的提示词的处理方法,可以保证编写完成后的目标提示词的准确性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computer technology, and more particularly to methods and apparatus for processing prompt words. Background Technology
[0002] With the rapid development of large-scale model technology, user interfaces generated from large-scale models based on prompts are gradually moving from the technology verification stage to real-world scenarios.
[0003] Currently, writing a complete tooltip typically requires multiple engineers, including product engineers, design engineers, and front-end engineers, to write their respective tooltip segments within the same tooltip document. Once all the engineers have completed their work, a complete tooltip is obtained.
[0004] However, each engineer writes their own prompts in the same prompt document, and there is a possibility that they may accidentally modify the prompts written by other engineers. This can cause interference between engineers during the prompt editing process, making it impossible to guarantee the accuracy of the completed prompts.
[0005] Therefore, ensuring the accuracy of the completed prompts after they are written has become a pressing technical problem that needs to be solved. Summary of the Invention
[0006] This specification provides one or more embodiments of a method and apparatus for processing prompt words, ensuring the accuracy of the completed prompt words.
[0007] In a first aspect, one or more embodiments of this specification provide a method for processing prompt words. The method includes: displaying multiple editing areas in an editing interface, each of the multiple editing areas corresponding to a message role identifier, the message role identifier being used to indicate the engineer to whom the editing area belongs, and the editing area being used to receive and store prompt word fragments input by the engineer corresponding to the message role identifier; upon receiving a trigger instruction, acquiring multiple prompt word fragments within the multiple editing areas; and generating a target prompt word based on the multiple prompt word fragments, the target prompt word being used to generate a target interface.
[0008] In one possible implementation, generating a target prompt word based on multiple prompt word fragments may specifically include the following steps: merging multiple prompt word fragments to obtain an initial prompt word, wherein at least one of the multiple prompt word fragments contains a data placeholder, and the initial prompt word contains a data placeholder; obtaining target data associated with the data placeholder; generating the target prompt word based on the target data and the initial prompt word, wherein the target data is used to replace the data placeholder in the initial prompt word.
[0009] By retaining data placeholders in the merged initial prompts, the subsequent process of replacing the placeholders with target data can accurately locate the positions that need to be replaced, thus avoiding the loss or misalignment of placeholders caused by splicing. Furthermore, the data placeholders can replace multiple different sets of target data, resulting in different target interfaces, thereby improving the reusability of the target prompts.
[0010] In one possible implementation, multiple prompt word fragments are merged to obtain an initial prompt word. Specifically, this may include the following: arranging multiple prompt word fragments sequentially according to a target order, where the target order is the arrangement order of multiple editing areas in the editing interface; obtaining the message role identifier corresponding to each prompt word fragment; concatenating at least two adjacent prompt word fragments with the same message role identifier among the arranged multiple prompt word fragments to obtain multiple message blocks; and merging the multiple message blocks to obtain the initial prompt word.
[0011] Upon receiving a prompt word generation instruction or interface generation instruction, multiple prompt word fragments are arranged sequentially according to the target order, resulting in multiple arranged prompt word fragments. Among these arranged prompt word fragments, at least two adjacent fragments with the same message role identifier are concatenated to form multiple message blocks. This preserves the clear partitioning of different responsibility modules during prompt word editing and avoids a large number of fragmented message structures when calling the large language model, thereby improving the efficiency of the large language model in understanding prompt words.
[0012] One possible implementation may also include the following steps: calling a large language model to generate a target interface based on the target prompt words.
[0013] In this way, engineers do not need to manually write the code to generate the target interface. The large language model automatically generates the code based on the target prompt words, which can significantly reduce the technical threshold of interface development and realize the automatic generation of the target interface from multiple prompt word fragments.
[0014] In one possible implementation, after generating the target interface based on the target prompt word by calling the large language model, the following steps may also be included: obtaining the review rule set associated with the target prompt word in the review rule base; and identifying the target interface based on the review rule set to obtain the review result.
[0015] The review rule set includes three categories: Category 1 review rules, Category 2 review rules, and Category 3 review rules. Category 1 review rules are used to detect general defects in the target interface, Category 2 review rules are used to detect major defects in the target interface, and Category 3 review rules are used to detect suspected violations with insufficient confidence.
[0016] The review results include first review information, second review information, or third review information. The first review information indicates that there are no non-compliant items in the target interface. The second review information includes non-compliant items in the target interface and evaluation details. The third review information indicates that there are suspected non-compliant items in the target interface with insufficient confidence.
[0017] In the above embodiments, by refining the review rule set into three categories, interface defects are categorized according to severity, achieving hierarchical detection of the target interface. Furthermore, the third category of review rules is used to detect suspected violations with insufficient confidence, enabling the large language model to mark issues as suspected violations when it cannot make precise quantitative judgments, rather than arbitrarily determining them as acceptable or unacceptable, thus ensuring the credibility and reliability of the review conclusions. In addition, the three review results clearly define three different situations: no violation, violation, and suspected violation, providing a clear and accurate basis for subsequent decision-making and manual review.
[0018] In one possible implementation, after identifying the target interface based on the review rule set and obtaining the review result, the following steps may be included: if the review result includes first review information or third review information, or if the review result includes second review information and the violation item is a general defect, determine that the target interface passes the machine review; if the review result includes second review information and the violation item is a major defect, determine that the target interface fails the machine review.
[0019] Among these features, the system can automatically determine whether a target interface has passed machine review based on the review results, eliminating the need for manual review of each page and significantly improving review efficiency.
[0020] In one possible implementation, after determining that the target interface has passed machine review, the following steps may also be included: displaying the target interface; upon receiving a selection instruction for the target interface input by the reviewer, displaying a labeling bar, the labeling bar being used to receive and store the labeling information input by the reviewer; and storing the labeling information in the labeling bar.
[0021] This allows users to not only circle and mark problematic areas on the target interface, but also input annotations in the annotation bar to explain the cause of the problem and its solution. Furthermore, the annotation information can serve as a data source for subsequent optimization review rule bases and prompts.
[0022] In one possible implementation, after storing the annotation information in the annotation column, the following steps may also be included: obtaining the annotation information; calling the large language model to generate target review rules based on the annotation information; and storing the target review rules in the review rule set.
[0023] Based on the annotation information written by reviewers, new target review rules can be automatically generated, allowing the accumulated experience of human reviewers to be directly transformed into the capabilities of machine reviewers. Moreover, the set of review rules is continuously expanded and optimized as human review annotations accumulate, and the detection capabilities of machine reviewers are also continuously improved.
[0024] In one possible implementation, after storing the annotation information in the annotation bar, the following steps may also be included: obtaining the annotation information; generating a first prompt word based on the annotation information; determining a first editing area corresponding to the first prompt word based on the content type of the first prompt word, wherein multiple editing areas include the first editing area; and adding the first prompt word to the first editing area.
[0025] Based on the annotations provided by reviewers, new primary prompts can be automatically generated and added to the corresponding editing area. This allows for the automatic optimization of prompts for issues identified during the human review process. Furthermore, by identifying the primary editing area corresponding to the primary prompt, it ensures that the generated primary prompt is added to the correct editing area and confirmed by the corresponding engineer, thereby completing the optimization and expansion of the prompts.
[0026] In one possible implementation, after storing the annotation information in the annotation bar, the following steps may also be included: obtaining the annotation information; generating a second prompt word based on the annotation information; and adding the second prompt word to the target prompt word.
[0027] Based on the annotation information written by the reviewers, new secondary prompt words can be automatically generated and added to the target prompt words, so that problems found during the human review process can be automatically optimized for the target prompt words.
[0028] One possible implementation may also include the following steps: upon receiving a version save instruction, generating a first version identifier; and storing the mapping relationship between the first version identifier and multiple prompt word fragments.
[0029] By generating a first version identifier and storing the mapping relationship between the first version identifier and multiple prompt word fragments, multiple prompt word fragments of all editing areas at a certain point in time can be stored for subsequent tracing and comparison.
[0030] One possible implementation may further include the following steps: upon receiving a comparison instruction based on a first version identifier and a second version identifier, obtaining multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; determining the difference information between the multiple prompt word fragments corresponding to the first version identifier and the multiple prompt word fragments corresponding to the second version identifier; and displaying the multiple prompt word fragments corresponding to the first version identifier, the multiple prompt word fragments corresponding to the second version identifier, and the difference information.
[0031] By displaying two versions of the prompt word fragments and their differences, engineers can intuitively see what specific changes have been made to one prompt word version compared to the other, making it easier to quickly pinpoint the source of the problem.
[0032] In one possible implementation, the triggering instruction is a prompt word generation instruction, which instructs the generation of a target prompt word; or, the triggering instruction is an interface generation instruction, which instructs the generation of a target interface.
[0033] Secondly, one or more embodiments of this specification also provide a prompt word processing device, the device comprising: a display module for displaying multiple editing areas in an editing interface, each editing area corresponding to a message role identifier, the message role identifier indicating the engineer to whom the editing area belongs, and the editing area for receiving and storing prompt word fragments input by the engineer corresponding to the message role identifier; an acquisition module for acquiring multiple prompt word fragments from the multiple editing areas upon receiving a trigger instruction; and a generation module for generating a target prompt word based on the multiple prompt word fragments, the target prompt word being used to generate a target interface.
[0034] In one possible implementation, the generation module is specifically used to merge multiple prompt word fragments to obtain an initial prompt word, wherein at least one of the multiple prompt word fragments contains a data placeholder, and the initial prompt word contains a data placeholder; to obtain target data associated with the data placeholder; and to generate a target prompt word based on the target data and the initial prompt word, wherein the target data is used to replace the data placeholder in the initial prompt word.
[0035] In one possible implementation, the generation module is specifically used to arrange multiple prompt word fragments sequentially according to a target order to obtain multiple arranged prompt word fragments, where the target order is the arrangement order of multiple editing areas in the editing interface; obtain the message role identifier corresponding to each prompt word fragment in the multiple prompt word fragments; in the arranged multiple prompt word fragments, at least two adjacent prompt word fragments with the same message role identifier are concatenated to obtain multiple message blocks; and the multiple message blocks are merged to obtain the initial prompt word.
[0036] In one possible implementation, the generation module is also used to call a large language model to generate the target interface based on the target prompt words.
[0037] In one possible implementation, the device for processing prompt words also includes a review module.
[0038] The acquisition module is specifically used to acquire the set of review rules associated with the target prompt words in the review rule base. The set of review rules includes the first type of review rules, the second type of review rules, and the third type of review rules. The first type of review rules is used to detect general defects in the target interface, the second type of review rules is used to detect major defects in the target interface, and the third type of review rules is used to detect suspected violations with insufficient confidence.
[0039] The review module is used to identify the target interface based on the review rule set and obtain the review results. The review results include first review information, second review information or third review information. The first review information is used to indicate that there are no violations in the target interface. The second review information includes the violations in the target interface and the evaluation details. The third review information is used to indicate that there are suspected violations in the target interface with insufficient confidence.
[0040] In one possible implementation, the device for processing the prompt word further includes a determination module.
[0041] The determination module is used to determine whether the target interface passes the machine review if the review result includes first or third review information, or if the review result includes second review information and the violation is a general defect; and to determine whether the target interface fails the machine review if the review result includes second review information and the violation is a major defect.
[0042] In one possible implementation, the device for processing prompt words also includes a labeling module.
[0043] The annotation module is used to display the target interface. When a selection instruction for the target interface is received from the reviewer, the annotation bar is displayed. The annotation bar is used to receive and store the annotation information entered by the reviewer. The annotation information in the annotation bar is stored.
[0044] In one possible implementation, the device for processing the prompt words also includes a feedback module.
[0045] The feedback module is used to obtain annotation information; call the large language model to generate target review rules based on the annotation information; and store the target review rules into the review rule set.
[0046] The feedback module is also used to obtain annotation information; generate a first prompt word based on the annotation information; determine the first editing area corresponding to the first prompt word based on the content type of the first prompt word, including the first editing area among multiple editing areas; and add the first prompt word to the first editing area.
[0047] The feedback module is also used to obtain annotation information; generate a second prompt word based on the annotation information; and add the second prompt word to the target prompt word.
[0048] In one possible implementation, the device for processing prompt words also includes a version control module.
[0049] The version control module is used to generate a first version identifier upon receiving a version save instruction; and to store the mapping relationship between the first version identifier and multiple prompt word fragments.
[0050] The version control module is also used to, upon receiving a comparison instruction based on a first version identifier and a second version identifier, obtain multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; determine the difference information between the multiple prompt word fragments corresponding to the first version identifier and the multiple prompt word fragments corresponding to the second version identifier; and display the multiple prompt word fragments corresponding to the first version identifier, the multiple prompt word fragments corresponding to the second version identifier, and the difference information.
[0051] In one possible implementation, the triggering instruction is a prompt word generation instruction, which instructs the generation of a target prompt word; or, the triggering instruction is an interface generation instruction, which instructs the generation of a target interface.
[0052] Thirdly, one or more embodiments of this specification also provide an electronic device, which includes a memory and a processor; the memory is used to store a computer program product; the processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, it implements the method of the first aspect described above.
[0053] Fourthly, one or more embodiments of this specification also provide a computer-readable storage medium storing computer program instructions that, when executed, implement the method described in the first aspect.
[0054] In summary, in the prompt word processing method provided in one or more embodiments of this specification, the editing interface includes multiple editing areas, each corresponding to a message role identifier. The message role identifier indicates the engineer to whom the editing area belongs. Each engineer can independently edit prompt word fragments within their respective editing area, thereby physically isolating the editing scope of different engineers and preventing interference between multiple engineers during the editing process. Since the target prompt word is composed of multiple prompt word fragments, as long as the prompt word fragments edited by each engineer are accurate, the accuracy of the target prompt word generated based on the multiple prompt word fragments can be guaranteed. Therefore, the prompt word processing method provided in one or more embodiments of this specification can guarantee the accuracy of the target prompt word after it has been written. Attached Figure Description
[0055] To more clearly illustrate the technical solutions of one or more embodiments of this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of one or more embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 A schematic diagram of the interface of a prompt word editing system 100 provided for one or more embodiments of this specification; Figure 2 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 3 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 4 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 5 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 6 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 7 A schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification; Figure 8 A schematic diagram illustrating the interaction between a prompt word editing system 100, a machine review system 200, a review rule base 300, and a human review and annotation system 400, provided for one or more embodiments of this specification; Figure 9 A flowchart illustrating a method for processing prompt words provided in one or more embodiments of this specification; Figure 10 A structural block diagram of a prompt word processing device provided for one or more embodiments of this specification; Figure 11 This is a structural block diagram of an electronic device provided for one or more embodiments of this specification. Detailed Implementation
[0057] The present specification describes one or more embodiments in further detail below with reference to the accompanying drawings and examples. Through these descriptions, the features and advantages of one or more embodiments of the present specification will become clearer and more apparent.
[0058] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments. Although various aspects of embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated otherwise.
[0059] Furthermore, the technical features described below in one or more embodiments of this specification may be combined with each other as long as they do not conflict with each other.
[0060] The data acquisition and collection actions involved in one or more embodiments of this specification are all performed after authorization by the user, the object, or after full authorization by all parties.
[0061] To facilitate understanding, the application scenarios of the technical solutions provided in one or more embodiments of this specification will be described below.
[0062] With the rapid development of large-scale model technology, user interfaces generated from large-scale models based on prompts are gradually moving from the technology verification stage to real-world scenarios.
[0063] In related technologies, writing a complete tooltip typically requires multiple engineers, including product engineers, design engineers, and front-end engineers, to write their respective tooltip segments within the same tooltip document. Once all the engineers have completed their work, a complete tooltip is obtained.
[0064] However, each engineer writes their own prompts in the same prompt document, and there is a possibility that they may accidentally modify the prompts written by other engineers. This can cause interference between engineers during the prompt editing process, making it impossible to guarantee the accuracy of the completed prompts.
[0065] Therefore, ensuring the accuracy of the completed prompts after they are written has become a pressing technical problem that needs to be solved.
[0066] To address the aforementioned technical problems, one or more embodiments of this specification provide a method for processing prompt words. In this method, firstly, multiple editing areas are displayed in an editing interface. Each editing area corresponds to a message role identifier, which indicates the engineer to whom the editing area belongs. The editing area is used to receive and store prompt word fragments input by the engineer corresponding to the message role identifier. Secondly, upon receiving a trigger command, multiple prompt word fragments from the multiple editing areas are acquired. Finally, a target prompt word is generated based on the multiple prompt word fragments, and the target prompt word is used to generate a target interface.
[0067] In the prompt word processing method provided in one or more embodiments of this specification, the editing interface includes multiple editing areas, each corresponding to a message role identifier. The message role identifier indicates the engineer to whom the editing area belongs. Each engineer can independently edit prompt word fragments within their respective editing areas, thereby physically isolating the editing scope of different engineers and preventing mutual interference among multiple engineers during the editing of prompt word fragments. Since the target prompt word is composed of multiple prompt word fragments, as long as the prompt word fragments edited by each engineer are accurate, the accuracy of the target prompt word generated based on multiple prompt word fragments can be guaranteed. Therefore, the prompt word processing method provided in one or more embodiments of this specification can guarantee the accuracy of the target prompt word after it is written.
[0068] For ease of understanding, the following detailed description, in conjunction with the accompanying drawings, illustrates the methods for processing prompt words provided in one or more embodiments of this specification.
[0069] Please see Figure 1 As shown, Figure 1 This is a schematic diagram of the interface of a prompt word editing system 100 provided for one or more embodiments of this specification.
[0070] exist Figure 1 In the example shown, a prompt editing system 100 runs on an electronic device, which can be a computer, server, or server cluster, etc. The prompt editing system 100 includes an editing interface 101, a management interface 102, and a preview interface 103.
[0071] For example, suppose a project team consists of a project manager and three engineers: a product engineer, a design engineer, and a front-end engineer. This project team plans to generate a monthly billing interface for users, displaying their monthly spending overview. The product engineer, design engineer, and front-end engineer collaborate, using a prompt word editing system to write the prompt words.
[0072] Before writing the prompts, the project manager will assign a corresponding editing area to each engineer in the editing interface 101 of the prompt editing system 100.
[0073] First, the project manager assigned editing area 1011 to the product engineer, editing area 1012 to the design engineer, and editing area 1013 to the front-end engineer.
[0074] Then, the project manager changed the name of editing area 1011 to Product Logic Module, the name of editing area 1012 to Visual Specification Module, and the name of editing area 1013 to Component Constraint Module.
[0075] Secondly, the project manager changed the message role identifier in editing area 1011 to user role, the message role identifier in editing area 1012 to system role, and the message role identifier in editing area 1013 to assistant role.
[0076] Please see Figure 2 As shown, Figure 2 This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0077] Figure 2 The diagram shown is an illustration of the interface after the project manager has assigned a corresponding editing area to each engineer. The area names and message role identifiers of editing areas 1011, 1012, and 1013 have all been modified.
[0078] Please refer to Table 1, which shows the editing areas assigned by the project manager, the order of the editing areas, the area names, message role identifiers, and the mapping relationship between engineers.
[0079]
[0080] Table 1 Please combine Figure 2 As shown in Table 1, in the editing interface 101, in order from top to bottom, editing area 1011 is in the first position, editing area 1012 is in the second position, and editing area 1013 is in the third position.
[0081] After the project manager completes the modification of the area names and message role identifiers of editing areas 1011, 1012 and 1013, product engineers, design engineers or front-end engineers can clearly see which editing area belongs to them in the editing interface 101.
[0082] In practice, if additional editing areas need to be added to allocate to product engineers, design engineers, or front-end engineers, the project manager can click [here]. Figure 2 Using button control 1014 in the middle, a new editing area can be generated.
[0083] Please see Figure 3 As shown, Figure 3 This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0084] Combination Figure 3As shown, after the product engineer logs into the prompt word editing system 100, if the product engineer clicks the editing area 1011, the editing area 1011 will display the input control 10111, which is used to receive and store the prompt word fragments entered by the product engineer.
[0085] For example, suppose the product engineer enters a prompt word fragment A in input control 10111 that includes the following: Please generate a monthly billing interface.
[0086] The following information should be displayed on the monthly statement interface: Username $(userName); This month's spending amount: $ (amount) yuan; The number of expense categories this month is $(categoryCount).
[0087] At the bottom of the monthly billing interface, generate a personalized message based on the user's spending habits.
[0088] The copy was automatically generated by the large model, featuring a warm style and encouraging users to consume responsibly. Please see Figure 4 As shown, Figure 4 This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0089] Combination Figure 4 As shown, after the design engineer logs into the prompt word editing system 100, if the design engineer clicks on the editing area 1012, the editing area 1012 will display the input control 10121, which is used to receive and store the prompt word fragments entered by the design engineer.
[0090] For example, suppose the prompt word fragment B entered by the design engineer in input control 10121 includes the following: "The card has rounded corners of 16 pixels, a white background, and a blue gradient banner at the top."
[0091] The title font size is 20 pixels, the font is bold, and the color is dark blue.
[0092] The amount numerals are 28 pixels in size, bold, and in the brand's blue color.
[0093] The category number is 16 pixels in size and gray in color.
[0094] The card's overall width is adapted for mobile devices, with 16 pixels on the left and right margins. Please see Figure 5 As shown, Figure 5This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0095] Combination Figure 5 As shown, after the front-end engineer logs into the prompt word editing system 100, if the front-end engineer clicks the editing area 1013, the editing area 1013 will display the input control 10131, which is used to receive and store the prompt word fragments entered by the front-end engineer.
[0096] For example, suppose the prompt word fragment C entered by the front-end engineer in input control 10131 includes the following: "The generated code must be a complete HTML file, using Flexbox layout."
[0097] The card is 100% wide on mobile devices, with a maximum width of 400 pixels, and is centered.
[0098] The amount is displayed in currency format (e.g., ¥1,280.50).
[0099] The personalized text area uses 14-pixel font, is gray in color, and is 16 pixels spaced from the content above. pass Figures 1 to 5 As shown in the example, in the editing interface 101 of the prompt editing system 100, the project manager can set the required editing areas. In this example, the project manager sets three editing areas and assigns these three editing areas to the product engineer, design engineer, and front-end engineer. In the editing interface 101, the product engineer, design engineer, and front-end engineer can all clearly see their own editing area.
[0100] Combination Figure 2 and Figure 3 As shown, when a product engineer sees the area name "Product Logic Module" in editing area 1011, the product engineer knows that editing area 1011 belongs to their own editing area. If the product engineer needs to edit a prompt word fragment, they can click on editing area 1011, and input control 10111 will be displayed in editing area 10111, where the product engineer can enter the prompt word fragment.
[0101] Combination Figure 2 and Figure 4As shown, when a design engineer sees the area name "Visual Specification Module" in editing area 1012, the designer can know that editing area 1012 belongs to their own editing area. If the design engineer needs to edit the prompt word fragment, they can click on editing area 1012, and input control 10121 will be displayed in editing area 1012, where the designer can enter the prompt word fragment.
[0102] Combination Figure 2 and Figure 5 As shown, when a front-end engineer sees the area name "Component Constraint Module" in editing area 1013, the engineer knows that editing area 1013 belongs to their own editing area. If the front-end engineer needs to edit the prompt word fragment, they can click on editing area 1013, and input control 10131 will be displayed, allowing the engineer to enter the prompt word fragment.
[0103] Based on the above, each editing area in the editing interface 101 corresponds to one engineer. Each engineer can independently edit the prompt word fragment within their respective editing area, thereby physically separating the editing scope of different engineers and preventing interference between multiple engineers during the editing of prompt word fragments.
[0104] Please see Figure 3 As shown, in the input control 10111 of the editing area 1011, the prompt word fragment includes 3 data placeholders, which are $(userName), $(amount) and $(categoryCount).
[0105] Please combine Figure 3 As shown, these three data placeholders are used to declare three variables. The data placeholder $(userName) is used to declare the variable as the username, the data placeholder $(amount) is used to declare the variable as the amount spent this month, and the data placeholder $(categoryCount) is used to declare the variable as the number of expenditure categories this month.
[0106] Please combine Figure 3 As shown, in the input control 1024 of the management interface 102, product engineers can fill in the generation rules for the above three variables (username, monthly consumption amount, and monthly expenditure category number).
[0107] For example, suppose the product engineer enters the following generation rules into input control 1024: The generation rules for $(userName) are: the username should be 2-4 Chinese characters in a casual style.
[0108] The $(amount) is generated as a number between 0 and 10000, representing the actual monthly spending amount.
[0109] The generation rule for $(categoryCount) is: an integer between 1 and 8 representing the number of spending categories for the user this month. After the product engineer fills in the above information in the input control 1024, they can click the button control 1023. At this time, the prompt word editing system 100 will generate simulated data based on the requirements in the input control 1024. The simulated data is generated in one go by calling the large language model based on the above generation rules.
[0110] For example, the prompt word editing system 100 generated the following simulated data: "$(userName) = Wang Xiaoming, $(amount) = 1500 yuan, $(categoryCount) = 5." based on Figure 3 As the example shown illustrates, even without real data, the prompt word editing system 100 can automatically generate simulated data that meets the user's requirements.
[0111] Of course, product engineers can also click button control 1022 in management interface 102, and then select a pre-prepared dataset to support the three variables (username, monthly consumption amount and monthly expenditure category number) in prompt word fragment A.
[0112] Product engineers can also click button control 1021 in the management interface 102, and then select the large language model to be used from multiple large language models, so that they can determine in advance which large language model to call in the subsequent process of generating prompt words or generating interfaces.
[0113] Please combine Figures 2 to 5 As shown, assuming the product engineer, design engineer, and front-end engineer have all completed editing the prompt word fragment, if the product engineer wants to save the current version of the prompt word fragment, they can click button control 1031 in the preview interface 103. The prompt word editing system 100 will use the current time as the version number. For example, if the product engineer clicks button control 1031 at 10:40:14 on March 20, 2026, then the version number = V2026-03-20_10:40:14. Of course, the product engineer can also modify the version number according to their own preferences.
[0114] After the prompt editing system 100 generates the version number "V2026-03-20_10:40:14", the prompt editing system 100 will obtain prompt fragment A in editing area 1011, prompt fragment B in editing area 1012, and prompt fragment C in editing area 1013 respectively, and store the mapping relationship between the version number "V2026-03-20_10:40:14" and prompt fragments A, B, and C.
[0115] After the prompt editing system 100 stores the mapping relationship between version number "V2026-03-20_10:40:14" and prompt fragments A, B, and C, if several more versions are subsequently generated, but the product engineer still wants to use prompt fragments A, B, and C corresponding to version number "V2026-03-20_10:40:14", the product engineer can click button control 1033 in the preview interface 103 and select version number "V2026-03-20_10:40:14" from multiple version numbers. Then, the prompt editing system 100 will fill prompt fragments A, B, and C into the input controls 10111 of editing area 1011, 10121 of editing area 1012, and 10131 of editing area 1013, respectively.
[0116] At this point, product engineers can edit prompt word fragment A in the input control 10111 of editing area 1011, design engineers can edit prompt word fragment B in the input control 10121 of editing area 1012, and edit prompt word fragment C in the input control 10131 of editing area 1013.
[0117] If a product engineer modifies version number "V2026-03-20_10:40:14" and generates a new version, with version number "V2026-04-15_15:15:20", and wants to compare the prompt word fragments of version number "V2026-03-20_10:40:14" and version number "V2026-04-15_15:15:20", the product engineer can click button control 1032 in preview interface 103 and select the version number "V2026-03-20_10:40:14" and version number "V2026-04-15_15:15:20" to be compared. The prompt word editing system 100 will then display the prompt word fragments of both versions, along with the differences between them, in the display control 1036 of preview interface 103.
[0118] If the product engineer, design engineer, and front-end engineer have all completed the editing of the prompt fragment, then they can all generate the complete prompt on the prompt editing system 100, or generate it based on the complete prompt generation interface.
[0119] Please see Figure 6 As shown, Figure 6 This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0120] exist Figure 6 In the example shown, after the product engineer, design engineer, and front-end engineer have all completed the editing of the prompt word fragment, if the product engineer wants to see the complete prompt word K1 written by the three engineers, the product engineer can click the button control 1034 in the preview interface 103, and the prompt word editing system 100 will receive the trigger instruction to generate the complete prompt word K1.
[0121] When the prompt editing system 100 receives a trigger instruction to generate a complete prompt K1, the prompt editing system 100 will acquire prompt fragment A in editing area 1011, prompt fragment B in editing area 1012, and prompt fragment C in editing area 1013.
[0122] Among them, prompt word fragment A refers to the prompt word fragment entered by the product engineer in the input control 10111 of the editing area 1011, prompt word fragment B refers to the prompt word fragment entered by the design engineer in the input control 10121 of the editing area 1012, and prompt word fragment C refers to the prompt word fragment entered by the front-end engineer in the input control 10131 of the editing area 1013.
[0123] After the prompt word editing system 100 obtains prompt word fragment A in editing area 1011, prompt word fragment B in editing area 1012, and prompt word fragment C in editing area 1013, the prompt word editing system 100 will generate a complete prompt word K1 based on prompt word fragment A, prompt word fragment B, and prompt word fragment C, and display the complete prompt word K1 in the display control 1036 of the preview interface 103.
[0124] At this point, the product engineer can see the complete prompt word K1 in the display control 1036 of the preview interface 103. Based on the complete prompt word K1, the product engineer can consider how to modify and adjust the prompt word fragment.
[0125] Of course, design engineers and front-end engineers can also perform the above process to see the complete prompt word K1 in the display control 1036 of the preview interface 103.
[0126] Please see Figure 7 As shown, Figure 7 This is a schematic diagram of the interface of another prompt word editing system 100 provided for one or more embodiments of this specification.
[0127] exist Figure 7 In the example shown, after the product engineer, design engineer, and front-end engineer have all completed the editing of the prompt word fragment, if the product engineer generates an interface based on the complete prompt word K1, the product engineer can click the button control 1035 in the preview interface 103, and the prompt word editing system 100 will receive the trigger instruction to generate the interface.
[0128] When the prompt editing system 100 receives a trigger command from the generation interface, the prompt editing system 100 will acquire prompt fragment A in the editing area 1011, prompt fragment B in the editing area 1012, and prompt fragment C in the editing area 1013.
[0129] Among them, prompt word fragment A refers to the prompt word fragment entered by the product engineer in the input control 10111 of the editing area 1011, prompt word fragment B refers to the prompt word fragment entered by the design engineer in the input control 10121 of the editing area 1012, and prompt word fragment C refers to the prompt word fragment entered by the front-end engineer in the input control 10131 of the editing area 1013.
[0130] After the prompt word editing system 100 obtains prompt word fragment A in editing area 1011, prompt word fragment B in editing area 1012, and prompt word fragment C in editing area 1013, the prompt word editing system 100 will generate a complete prompt word K1 based on prompt word fragment A, prompt word fragment B, and prompt word fragment C, and call the large language model to generate interface U1 based on the complete prompt word K1, and display interface U1 in the display control 1036 of the preview interface 103.
[0131] At this point, the product engineer can see the generated interface U1 in the display control 1036 of the preview interface 103. The product engineer can then consider how to modify and adjust the prompt word fragments based on the interface U1.
[0132] Of course, design engineers and front-end engineers can also perform the above process to see the generated interface U1 in the display control 1036 of the preview interface 103.
[0133] Please see Figure 8 As shown, Figure 8 This diagram illustrates the interaction between a prompt word editing system 100, a machine review system 200, a review rule base 300, and a human review and annotation system 400, provided for one or more embodiments of this specification.
[0134] Please combine Figure 7 and Figure 8 As shown, after the prompt word editing system 100 calls the large language model to generate interface U1 based on the complete prompt word K1, the prompt word editing system 100 will send interface U1 to the machine review system 200.
[0135] The machine review system 200 selects the review rule set Q1 associated with the complete prompt word K1 from the review rule base 300. The machine review system 200 then uses the review rule set Q1 to identify the interface U1 and obtain the review results and evaluation information. The review rule set Q1 contains a large number of pre-defined review rules for reviewing the interface U1.
[0136] If the review results indicate that interface U1 has passed the machine review, the machine review system 200 will send interface U1 and the evaluation information to the human review and annotation system 400 so that the human review and annotation system 400 can continue to review interface U1.
[0137] If the review result indicates that interface U1 has failed the machine review, the machine review system 200 will send the identifier and evaluation information of interface U1 to the prompt word editing system 100 so that the prompt word editing system 100 can regenerate interface U1.
[0138] After the human review annotation system 400 receives the interface U1 and evaluation information sent by the machine review system 200, the human review annotation system 400 will display the interface U1 and evaluation information on the review interface so that the reviewers can see the interface U1 and evaluation information on the review interface.
[0139] Auditors can select the target area of interface U1 on the review interface to generate a selection instruction. When the human review annotation system 400 receives the selection instruction, it will display an annotation column on the review interface so that auditors can fill in annotation information T1 in the annotation column. Annotation information T1 is about the problems and improvement suggestions of the target area of interface U1.
[0140] After the reviewer fills in the annotation information T1 in the annotation column, the human review annotation system 400 can obtain the annotation information T1 in the annotation column and call the large language model to generate review rule P1 and prompt word C1 based on the annotation information T1.
[0141] The human review and annotation system 400 will send review rule P1 to the review rule set Q1 of the review rule base 300 to expand and improve the review rule set Q1.
[0142] The human review and annotation system 400 will also send the prompt word C1 to the prompt word editing system 100 to optimize the complete prompt word K1 or the prompt word fragment.
[0143] After the prompt word editing system 100 receives the prompt word C1, the prompt word editing system 100 can add the prompt word C1 to the complete prompt word K1 to automatically optimize the complete prompt word K1.
[0144] After the prompt word editing system 100 receives the prompt word C1, it can also add the prompt word C1 to the corresponding editing area in the editing interface 101 based on the type of the prompt word C1, and remind the corresponding engineer to notice the newly added prompt word C1, so that the engineer can add the prompt word C1 to the editing area more reasonably, thereby optimizing the prompt word fragment.
[0145] In summary, through Figures 1 to 8 As shown in the example, the prompt editing system 100 can ensure the accuracy of the complete prompt generated based on multiple prompt fragments, and can also realize many functions to optimize prompts.
[0146] The machine review system 200 can automatically review the interface U1 based on the review rule set Q1 provided by the review rule base 300. If the interface U1 does not meet the review standards, the machine review system 200 will notify the prompt word editing system 100 to regenerate it. This process does not require the participation of reviewers, thus saving human resources. If the interface U1 meets the review standards, the machine review system 200 will send the interface U1 and evaluation information to the human review and annotation system 400 for further review by reviewers to ultimately determine whether there are any problems with the interface U1.
[0147] After the human review annotation system 400 receives the interface U1 and evaluation information sent by the machine review system 200, it displays the interface U1 and evaluation information so that reviewers can select on the interface U1 and fill in the annotation information T1 in the annotation column. The human review annotation system 400 can generate evaluation rule P1 and prompt word C1 based on the annotation information T1, and send evaluation rule P1 to the review rule set Q1 of the review rule base 300, and send prompt word C1 to the prompt word editing system 100 to expand and feed back into the review rule set Q1, and to optimize the complete prompt word K1 or prompt word fragments.
[0148] Therefore, one or more embodiments of this specification provide a method and apparatus for processing prompt words, which can ensure the accuracy of the complete prompt words after they are written.
[0149] The following describes embodiments of the prompt word processing method provided in one or more embodiments of this specification.
[0150] See Figure 9 , Figure 9 This is a flowchart illustrating a method for processing prompt words according to one or more embodiments of this specification. This method can be applied to electronic devices, such as computers, servers, or server clusters. Figure 9 As shown, the method may include the following steps.
[0151] Step S102: Display multiple editing areas in the editing interface.
[0152] Each of the multiple editing areas corresponds to a message role identifier. The message role identifier is used to indicate the engineer to whom the editing area belongs. The editing area is used to receive and store the prompt word fragments entered by the engineer corresponding to the message role identifier.
[0153] For example, please refer to... Figure 2 As shown, the electronic device runs a prompt word editing system 100, which includes an editing interface 101, a management interface 102, and a preview interface 103. The editing interface 101 displays editing areas 1011, 1012, and 1013.
[0154] Before writing the prompts, the project manager assigned editing area 1011 to the product engineer, editing area 1012 to the design engineer, and editing area 1013 to the front-end engineer.
[0155] Editing area 1011 corresponds to product engineers, editing area 1012 corresponds to design engineers, and editing area 1013 corresponds to front-end engineers.
[0156] Editing area 1011 is used to receive and store prompt word fragment A input by product engineer, editing area 1012 is used to receive and store prompt word fragment B input by design engineer, and editing area 1013 is used to receive and store prompt word fragment C input by front-end engineer.
[0157] Step S104: Upon receiving a trigger command, acquire multiple prompt word fragments within multiple editing areas.
[0158] The trigger command is either a prompt word generation command, which instructs the generation of a target prompt word; or an interface generation command, which instructs the generation of a target interface.
[0159] For example, please refer to... Figure 6As shown, after the engineer clicks the button control 1034, a prompt word generation instruction will be generated. At this time, the prompt word editing system 100 will receive the prompt word generation instruction. The prompt word editing system 100 will obtain the prompt word fragment A in the editing area 1011, the prompt word fragment B in the editing area 1012, and the prompt word fragment C in the editing area 1013, and generate the complete prompt word K1 based on the prompt word fragment A, prompt word fragment B, and prompt word fragment C. Finally, the complete prompt word K1 will be displayed in the display control 1036.
[0160] in, Figure 6 The complete prompt word K1 mentioned in the example shown is the target prompt word involved in step S104.
[0161] For example, please refer to... Figure 7 As shown, after the engineer clicks the button control 1035, an interface generation instruction will be generated. At this time, the prompt word editing system 100 will receive the interface generation instruction. The prompt word editing system 100 will obtain the prompt word fragment A in the editing area 1011, the prompt word fragment B in the editing area 1012, and the prompt word fragment C in the editing area 1013, and generate a complete prompt word K1 based on the prompt word fragment A, prompt word fragment B, and prompt word fragment C. Then, it will call the large language model to generate the interface U1 based on the complete prompt word K1. Finally, the interface U1 will be displayed in the display control 1036.
[0162] in, Figure 7 The interface U1 mentioned in the example shown is the target interface involved in step S104.
[0163] Step S106: Generate target prompt words based on multiple prompt word fragments.
[0164] Among them, the target prompt words are used to generate the target interface.
[0165] In one or more embodiments of this specification, a prompt word processing method includes multiple editing areas in the editing interface. Each editing area corresponds to a message role identifier, which indicates the engineer to whom the editing area belongs. Each engineer can independently edit prompt word fragments within their respective editing areas, thereby physically isolating the editing scope of different engineers and preventing interference between multiple engineers during the editing process. Since the target prompt word is composed of multiple prompt word fragments, as long as the prompt word fragments edited by each engineer are accurate, the accuracy of the target prompt word generated based on the multiple prompt word fragments can be guaranteed. Therefore, the prompt word processing method provided in one or more embodiments of this specification can guarantee the accuracy of the target prompt word after it is written.
[0166] In some embodiments, step S106, generating a target prompt word based on multiple prompt word fragments, may specifically include the following steps: merging multiple prompt word fragments to obtain an initial prompt word, wherein at least one of the multiple prompt word fragments contains a data placeholder, and the initial prompt word contains a data placeholder; obtaining target data associated with the data placeholder; generating a target prompt word based on the target data and the initial prompt word, wherein the target data is used to replace the data placeholder in the initial prompt word.
[0167] By retaining data placeholders in the merged initial prompts, the subsequent process of replacing the placeholders with target data can accurately locate the positions that need to be replaced, thus avoiding the loss or misalignment of placeholders caused by splicing. Furthermore, the data placeholders can replace multiple different sets of target data, resulting in different target interfaces, thereby improving the reusability of the target prompts.
[0168] For an example of data placeholders, please see Figure 3 The example shown.
[0169] In some embodiments, merging multiple prompt word fragments to obtain an initial prompt word may specifically include the following: arranging multiple prompt word fragments sequentially according to a target order to obtain multiple arranged prompt word fragments, where the target order is the arrangement order of multiple editing areas in the editing interface; obtaining the message role identifier corresponding to each prompt word fragment in the multiple prompt word fragments; concatenating at least two adjacent prompt word fragments with the same message role identifier in the arranged multiple prompt word fragments to obtain multiple message blocks; and merging the multiple message blocks to obtain the initial prompt word.
[0170] Upon receiving a prompt word generation instruction or interface generation instruction, multiple prompt word fragments are arranged sequentially according to the target order, resulting in multiple arranged prompt word fragments. Among these arranged prompt word fragments, at least two adjacent fragments with the same message role identifier are concatenated to form multiple message blocks. This preserves the clear partitioning of different responsibility modules during prompt word editing and avoids a large number of fragmented message structures when calling the large language model, thereby improving the efficiency of the large language model in understanding prompt words.
[0171] In some embodiments, after step S106, the following step may be included: calling a large language model to generate a target interface based on the target prompt words.
[0172] In this way, engineers do not need to manually write the code to generate the target interface. The large language model automatically generates the code based on the target prompt words, which can significantly reduce the technical threshold of interface development and realize the automatic generation of the target interface from multiple prompt word fragments.
[0173] In some embodiments, after generating the target interface based on the target prompt word by calling the large language model, the following steps may also be included: obtaining the review rule set associated with the target prompt word in the review rule base; and identifying the target interface based on the review rule set to obtain the review result.
[0174] The review rule set includes three categories: Category 1 review rules, Category 2 review rules, and Category 3 review rules. Category 1 review rules are used to detect general defects in the target interface, Category 2 review rules are used to detect major defects in the target interface, and Category 3 review rules are used to detect suspected violations with insufficient confidence.
[0175] The review results include first review information, second review information, or third review information. The first review information indicates that there are no non-compliant items in the target interface. The second review information includes non-compliant items in the target interface and evaluation details. The third review information indicates that there are suspected non-compliant items in the target interface with insufficient confidence.
[0176] In the above embodiments, by refining the review rule set into three categories, interface defects are categorized according to severity, achieving hierarchical detection of the target interface. Furthermore, the third category of review rules is used to detect suspected violations with insufficient confidence, enabling the large language model to mark issues as suspected violations when it cannot make precise quantitative judgments, rather than arbitrarily determining them as acceptable or unacceptable, thus ensuring the credibility and reliability of the review conclusions. In addition, the three review results clearly define three different situations: no violation, violation, and suspected violation, providing a clear and accurate basis for subsequent decision-making and manual review.
[0177] In some embodiments, after identifying the target interface based on the review rule set to obtain the review result, the following steps may be included: if the review result includes first review information or third review information, or if the review result includes second review information and the violation item is a general defect, determine that the target interface passes the machine review; if the review result includes second review information and the violation item is a major defect, determine that the target interface fails the machine review.
[0178] Among these features, the system can automatically determine whether a target interface has passed machine review based on the review results, eliminating the need for manual review of each page and significantly improving review efficiency.
[0179] In some embodiments, after determining that the target interface has passed machine review, the following steps may be included: displaying the target interface; upon receiving a selection instruction for the target interface input by the reviewer, displaying a labeling bar, the labeling bar being used to receive and store the labeling information input by the reviewer; and storing the labeling information in the labeling bar.
[0180] This allows users to not only circle and mark problematic areas on the target interface, but also input annotations in the annotation bar to explain the cause of the problem and its solution. Furthermore, the annotation information can serve as a data source for subsequent optimization review rule bases and prompts.
[0181] In some embodiments, after storing the annotation information in the annotation column, the following steps may be included: obtaining the annotation information; calling the large language model to generate target review rules based on the annotation information; and storing the target review rules in the review rule set.
[0182] Based on the annotation information written by reviewers, new target review rules can be automatically generated, allowing the accumulated experience of human reviewers to be directly transformed into the capabilities of machine reviewers. Moreover, the set of review rules is continuously expanded and optimized as human review annotations accumulate, and the detection capabilities of machine reviewers are also continuously improved.
[0183] In some embodiments, after storing the annotation information in the annotation bar, the method may further include the following steps: obtaining the annotation information; generating a first prompt word based on the annotation information; determining a first editing area corresponding to the first prompt word based on the content type of the first prompt word, wherein multiple editing areas include the first editing area; and adding the first prompt word to the first editing area.
[0184] Based on the annotations provided by reviewers, new primary prompts can be automatically generated and added to the corresponding editing area. This allows for the automatic optimization of prompts for issues identified during the human review process. Furthermore, by identifying the primary editing area corresponding to the primary prompt, it ensures that the generated primary prompt is added to the correct editing area and confirmed by the corresponding engineer, thereby completing the optimization and expansion of the prompts.
[0185] In some embodiments, after storing the annotation information in the annotation bar, the method may further include the following steps: obtaining the annotation information; generating a second prompt word based on the annotation information; and adding the second prompt word to the target prompt word.
[0186] Based on the annotation information written by the reviewers, new secondary prompt words can be automatically generated and added to the target prompt words, so that problems found during the human review process can be automatically optimized for the target prompt words.
[0187] In some embodiments, the method may further include the following steps: upon receiving a version save instruction, generating a first version identifier; and storing the mapping relationship between the first version identifier and multiple prompt word fragments.
[0188] By generating a first version identifier and storing the mapping relationship between the first version identifier and multiple prompt word fragments, multiple prompt word fragments of all editing areas at a certain point in time can be stored for subsequent tracing and comparison.
[0189] In some embodiments, the method may further include the following steps: upon receiving a comparison instruction based on a first version identifier and a second version identifier, obtaining multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; determining the difference information between the multiple prompt word fragments corresponding to the first version identifier and the multiple prompt word fragments corresponding to the second version identifier; and displaying the multiple prompt word fragments corresponding to the first version identifier, the multiple prompt word fragments corresponding to the second version identifier, and the difference information.
[0190] By displaying two versions of the prompt word fragments and their differences, engineers can intuitively see what specific changes have been made to one prompt word version compared to the other, making it easier to quickly pinpoint the source of the problem.
[0191] It is understood that the above embodiments are merely examples, and modifications can be made to the above embodiments in actual implementation. Those skilled in the art will understand that any modifications to the above embodiments that do not require creative effort fall within the protection scope of one or more embodiments of this specification, and will not be described again in the embodiments.
[0192] Based on the same inventive concept, one or more embodiments of this specification also provide a prompt word processing device. Since the principle of the prompt word processing device in solving the problem is similar to that of the aforementioned prompt word processing method, the implementation of the prompt word processing device can refer to the implementation of the aforementioned prompt word processing method, and repeated details will not be described again.
[0193] See Figure 10 , Figure 10 This is a structural block diagram of a prompt word processing device provided for one or more embodiments of this specification. Figure 10 As shown, the device 700 for processing the prompt word may include: a display module 701, an acquisition module 702, and a generation module 703.
[0194] The display module 701 is used to display multiple editing areas in the editing interface. Each editing area corresponds to a message role identifier. The message role identifier is used to indicate the engineer to whom the editing area belongs. The editing area is used to receive and store the prompt word fragments entered by the engineer corresponding to the message role identifier.
[0195] The acquisition module 702 is used to acquire multiple prompt word fragments in multiple editing areas when a trigger command is received.
[0196] The generation module 703 is used to generate target prompt words based on multiple prompt word fragments, and the target prompt words are used to generate the target interface.
[0197] In some embodiments, the generation module 703 is specifically used to merge multiple prompt word fragments to obtain an initial prompt word, wherein at least one of the multiple prompt word fragments contains a data placeholder, and the initial prompt word contains a data placeholder; to obtain target data associated with the data placeholder; and to generate a target prompt word based on the target data and the initial prompt word, wherein the target data is used to replace the data placeholder in the initial prompt word.
[0198] In some embodiments, the generation module 703 is specifically used to arrange multiple prompt word fragments sequentially according to a target order to obtain multiple arranged prompt word fragments, wherein the target order is the arrangement order of multiple editing areas in the editing interface; obtain the message role identifier corresponding to each prompt word fragment in the multiple prompt word fragments; in the multiple arranged prompt word fragments, at least two adjacent prompt word fragments with the same message role identifier are spliced together to obtain multiple message blocks; and the multiple message blocks are merged to obtain the initial prompt word.
[0199] In some embodiments, the generation module 703 is further configured to call a large language model to generate a target interface based on the target prompt words.
[0200] In some embodiments, the prompt word processing device 700 further includes a review module 704.
[0201] The acquisition module 702 is specifically used to acquire the set of review rules associated with the target prompt words in the review rule base. The set of review rules includes a first type of review rule, a second type of review rule, and a third type of review rule. The first type of review rule is used to detect general defects in the target interface, the second type of review rule is used to detect major defects in the target interface, and the third type of review rule is used to detect suspected violations with insufficient confidence.
[0202] The review module 704 is used to identify the target interface based on the review rule set and obtain the review results. The review results include first review information, second review information or third review information. The first review information is used to indicate that there are no violations in the target interface. The second review information includes the violations in the target interface and the evaluation details. The third review information is used to indicate that there are suspected violations in the target interface with insufficient confidence.
[0203] In some embodiments, the prompt word processing device 700 further includes a determination module 705.
[0204] The determination module 705 is used to determine whether the target interface passes the machine review if the review result includes first review information or third review information, or if the review result includes second review information and the violation item is a general defect; and to determine whether the target interface fails the machine review if the review result includes second review information and the violation item is a major defect.
[0205] In some embodiments, the prompt word processing device 700 further includes a labeling module 706.
[0206] The annotation module 706 is used to display the target interface; when it receives a selection instruction for the target interface input by the reviewer, it displays the annotation bar, which is used to receive and store the annotation information input by the reviewer; and stores the annotation information in the annotation bar.
[0207] In some embodiments, the prompt word processing device 700 further includes a feedback module 707.
[0208] Feedback module 707 is used to obtain annotation information; call the large language model to generate target review rules based on the annotation information; and store the target review rules in the review rule set.
[0209] The feedback module 707 is also used to obtain annotation information; generate a first prompt word based on the annotation information; determine a first editing area corresponding to the first prompt word based on the content type of the first prompt word, including the first editing area among multiple editing areas; and add the first prompt word to the first editing area.
[0210] The feedback module 707 is also used to obtain annotation information; generate a second prompt word based on the annotation information; and add the second prompt word to the target prompt word.
[0211] In some embodiments, the prompt word processing device 700 further includes a version control module 708.
[0212] The version control module 708 is used to generate a first version identifier upon receiving a version save instruction; and to store the mapping relationship between the first version identifier and multiple prompt word fragments.
[0213] The version control module 708 is further configured to, upon receiving a comparison instruction based on a first version identifier and a second version identifier, acquire multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; determine the difference information between the multiple prompt word fragments corresponding to the first version identifier and the multiple prompt word fragments corresponding to the second version identifier; and display the multiple prompt word fragments corresponding to the first version identifier, the multiple prompt word fragments corresponding to the second version identifier, and the difference information.
[0214] In some embodiments, the triggering instruction is a prompt word generation instruction, which is used to instruct the generation of a target prompt word; or, the triggering instruction is an interface generation instruction, which is used to instruct the generation of a target interface.
[0215] See Figure 11 , Figure 11 This is a structural block diagram of an electronic device provided for one or more embodiments of this specification. Figure 11 As shown, the electronic device 800 may include a processor 801 and a memory 802; the memory 802 may be coupled to the processor 801. It is worth noting that... Figure 11 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.
[0216] In one possible implementation, the functionality of the prompt word processing device 700 can be integrated into the processor 801. The processor 801 can be configured to perform the following operations: display multiple editing areas in the editing interface, each editing area corresponding to a message role identifier, the message role identifier indicating the engineer to whom the editing area belongs, and the editing area receiving and storing prompt word fragments input by the engineer corresponding to the message role identifier; upon receiving a trigger instruction, acquiring multiple prompt word fragments from the multiple editing areas; and generating a target prompt word based on the multiple prompt word fragments, the target prompt word being used to generate the target interface.
[0217] In another possible implementation, the prompt processing device 700 can be configured separately from the processor 801, for example, the prompt processing device 700 can be configured as a chip connected to the processor 801.
[0218] Furthermore, in some alternative implementations, the electronic device 800 may also include: a communication module, an input unit, an audio processor, a display, a power supply, etc. It is worth noting that the electronic device 800 is not necessarily required to include these components. Figure 11 All components shown; in addition, the electronic device 800 may also include Figure 11 For components not shown, please refer to existing technologies.
[0219] In some alternative implementations, the processor 801, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 800.
[0220] The memory 802 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the information related to the prompt processing device 700, and may also store a program for executing that information. The processor 801 may execute the program stored in the memory 802 to perform information storage or processing, etc.
[0221] An input unit can provide input to the processor 801. This input unit may be, for example, a button or touch input device. A power supply can be used to provide power to the electronic device 800. A display can be used to display images and text, etc. This display may be, for example, an LCD display, but is not limited to this.
[0222] Memory 802 can be a solid-state memory, such as read-only memory (ROM), random access memory (RAM), SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROM, etc. Memory 802 can also be some other type of device. Memory 802 includes buffer memory (sometimes referred to as a buffer). Memory 802 may include an application / function storage unit for storing application programs and function programs or processes for executing the operation of electronic device 800 via processor 801.
[0223] The memory 802 may also include a data storage section for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage section of the memory 802 may include various drivers for the computer device for communication functions and / or for performing other functions of the computer device (such as messaging applications, address book applications, etc.).
[0224] The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor 801 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.
[0225] Based on different communication technologies, multiple communication modules can be configured in the same computer device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) is also coupled to a speaker and microphone via an audio processor to provide audio output through the speaker and receive audio input from the microphone, thereby enabling typical telecommunications functions. The audio processor can include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor is coupled to processor 801, enabling on-device recording via the microphone and on-device playback of stored sound via the speaker.
[0226] One or more embodiments of this specification also provide a computer-readable storage medium capable of implementing all steps of the prompt word processing method in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the prompt word processing method in the above embodiments. For example, when the processor executes the computer program, it implements the following steps: displaying multiple editing areas in an editing interface, each of the multiple editing areas corresponding to a message role identifier, the message role identifier indicating the engineer to whom the editing area belongs, and the editing area receiving and storing prompt word fragments input by the engineer corresponding to the message role identifier; upon receiving a trigger instruction, acquiring multiple prompt word fragments from the multiple editing areas; and generating a target prompt word based on the multiple prompt word fragments, the target prompt word being used to generate a target interface.
[0227] While this specification provides method operation steps as shown in the embodiments or flowcharts through one or more embodiments, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual device or client product execution, the method may be executed sequentially as shown in the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0228] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, apparatus (systems), or computer program products. Therefore, the embodiments of this specification can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, one or more embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0229] This specification describes one or more embodiments of a method, apparatus (system), and computer program product according to one or more embodiments of this specification with reference to flowchart illustrations and / or block diagrams. It will 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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0230] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0231] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0232] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and system embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0233] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Those skilled in the art will understand the specific meaning of the above terms in one or more embodiments of this specification, depending on the specific circumstances.
[0234] It should be noted that, unless otherwise specified, one or more embodiments and features thereof in this specification can be combined with each other. This specification is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or substitution of such aspects and / or embodiments. Furthermore, each aspect and / or embodiment of one or more embodiments of this specification can be used alone or in combination with one or more other aspects and / or embodiments thereof.
[0235] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of one or more embodiments of this specification, and are not intended to limit them. Although one or more embodiments of this specification have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of one or more embodiments of this specification, and they should all be covered within the scope of the claims and the specification of one or more embodiments of this specification.
[0236] The foregoing description of one or more embodiments of this specification has been provided in conjunction with optional implementation methods. However, these embodiments are merely exemplary and serve only an illustrative purpose. Based on this, various substitutions and modifications can be made to one or more embodiments of this specification, all of which fall within the protection scope of one or more embodiments of this specification.
Claims
1. A method for processing prompt words, characterized in that, The method includes: The display editing interface has multiple editing areas, each of which corresponds to a message role identifier. The message role identifier is used to indicate the engineer to whom the editing area belongs. The editing area is used to receive and store the prompt word fragments entered by the engineer corresponding to the message role identifier. Upon receiving a trigger command, acquire multiple prompt word fragments within the multiple editing areas; Target prompt words are generated based on the multiple prompt word fragments, and the target prompt words are used to generate the target interface.
2. The method as described in claim 1, characterized in that, Generate target prompt words based on the multiple prompt word fragments, including: The multiple prompt word fragments are merged to obtain an initial prompt word, wherein at least one of the multiple prompt word fragments contains a data placeholder, and the initial prompt word contains the data placeholder; Obtain the target data associated with the data placeholder; The target prompt word is generated based on the target data and the initial prompt word, and the target data is used to replace the data placeholder in the initial prompt word.
3. The method as described in claim 2, characterized in that, The multiple prompt word fragments are merged to obtain the initial prompt word, including: The multiple prompt word fragments are arranged sequentially according to the target order to obtain multiple arranged prompt word fragments, wherein the target order is the arrangement order of the multiple editing areas in the editing interface; Obtain the message role identifier corresponding to each of the multiple prompt word fragments; In the arranged plurality of prompt word fragments, at least two adjacent prompt word fragments with the same message role identifier are spliced together to obtain a plurality of message blocks; The initial prompt word is obtained by merging the multiple message blocks.
4. The method as described in claim 1, characterized in that, After generating the target prompt word based on the multiple prompt word fragments, the method further includes: The target interface is generated by calling a large language model based on the target prompt words.
5. The method as described in claim 4, characterized in that, After generating the target interface based on the target prompt words using a large language model, the method further includes: Obtain the set of review rules associated with the target prompt word from the review rule base. The set of review rules includes a first type of review rule, a second type of review rule, and a third type of review rule. The first type of review rule is used to detect general defects in the target interface. The second type of review rule is used to detect major defects in the target interface. The third type of review rule is used to detect suspected violations with insufficient confidence. The target interface is identified based on the evaluation rule set to obtain the evaluation result. The evaluation result includes first evaluation information, second evaluation information, or third evaluation information. The first evaluation information is used to indicate that there are no violations in the target interface. The second evaluation information includes the violations and evaluation details in the target interface. The third evaluation information is used to indicate that there are suspected violations in the target interface with insufficient confidence.
6. The method as described in claim 5, characterized in that, After obtaining the review result by identifying the target interface based on the review rule set, the method further includes: If the review result includes the first review information or the third review information, or if the review result includes the second review information and the violation item is a general defect, the target interface is determined to pass the machine review. If the review result includes the second review information and the violation item is a major defect, it is determined that the target interface has failed the machine review.
7. The method as described in claim 6, characterized in that, After determining that the target interface has passed machine review, the method further includes: Display the target interface; Upon receiving a selection instruction for the target interface input by the reviewer, a labeling bar is displayed, which is used to receive and store the labeling information input by the reviewer. Store the annotation information in the annotation column.
8. The method as described in claim 7, characterized in that, After storing the annotation information in the annotation column, the method further includes: Obtain the annotation information; The large language model is invoked to generate target review rules based on the annotation information; The target review rules are stored in the review rule set.
9. The method as described in claim 7, characterized in that, After storing the annotation information in the annotation column, the method further includes: Obtain the annotation information; A first prompt word is generated based on the annotation information; Based on the content type of the first prompt word, a first editing area corresponding to the first prompt word is determined, and the plurality of editing areas include the first editing area; Add the first prompt word to the first editing area.
10. The method as described in claim 7, characterized in that, After storing the annotation information in the annotation column, the method further includes: Obtain the annotation information; A second prompt word is generated based on the annotation information; Add the second prompt word to the target prompt word.
11. The method as described in claim 1, characterized in that, The method further includes: Upon receiving a version save instruction, a first version identifier is generated; Store the mapping relationship between the first version identifier and the plurality of prompt word fragments.
12. The method as described in claim 11, characterized in that, The method further includes: Upon receiving a comparison instruction based on the first version identifier and the second version identifier, obtain multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; Determine the differences between multiple prompt word fragments corresponding to the first version identifier and multiple prompt word fragments corresponding to the second version identifier; Displays multiple prompt word fragments corresponding to the first version identifier, multiple prompt word fragments corresponding to the second version identifier, and the difference information.
13. The method according to any one of claims 1 to 12, characterized in that: The triggering instruction is a prompt word generation instruction, which is used to instruct the generation of the target prompt word; or, The triggering instruction is an interface generation instruction, which is used to instruct the generation of the target interface.
14. A device for processing prompt words, characterized in that, The device includes: The display module is used to display multiple editing areas in the editing interface. Each editing area corresponds to a message role identifier. The message role identifier is used to indicate the engineer to whom the editing area belongs. The editing area is used to receive and store the prompt word fragments input by the engineer corresponding to the message role identifier. The acquisition module is used to acquire multiple prompt word fragments within the multiple editing areas upon receiving a trigger instruction; The generation module is used to generate target prompt words based on the multiple prompt word fragments, and the target prompt words are used to generate the target interface.
15. An electronic device, characterized in that, The electronic device includes: Memory, used to store computer program products; A processor is configured to execute a computer program product stored in the memory, wherein, when the computer program product is executed, it implements the method described in any one of claims 1-13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed, implement the method described in any one of claims 1-13.