A prompt word recommendation method and device, electronic equipment and storage medium

By acquiring users' original questions and multi-dimensional related information in real time, identifying needs and matching candidate prompt word templates, the problem of low quality of prompt words written by users is solved, the accuracy and efficiency of intelligent agent interaction are improved, and personalized adjustment and seamless integration of prompt words are realized.

CN122112331APending Publication Date: 2026-05-29BEIJING TEAMSUN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING TEAMSUN TECH
Filing Date
2026-03-12
Publication Date
2026-05-29

Smart Images

  • Figure CN122112331A_ABST
    Figure CN122112331A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a prompt word recommendation method and device, electronic equipment and a storage medium, wherein the method comprises: in the process that a user inputs an original question in an intelligent agent interaction interface, acquiring multi-dimensional association information of the original question and the user in real time; identifying a current question demand of the user based on the original question and the multi-dimensional association information; matching at least one candidate prompt word template from a preset prompt word template library according to the current question demand, and showing the candidate prompt word template to the user; receiving a selection operation of one of the candidate prompt word templates and revision input of the user, generating a target prompt word according to the selection operation and the revision input, and applying the target prompt word to the intelligent agent. The technical scheme provided by the embodiments of the present application can be applied to intelligent agent interaction scenes in e-commerce, medical treatment, education and other industries, and can solve the problem that the quality of the question is low and the response effect of the intelligent agent is not satisfactory due to the user's unfamiliarity with prompt word writing in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for recommending prompt words. Background Technology

[0002] Intelligent agents (such as large language models, intelligent customer service, and conversational AI assistants) serve as the core interface for human-computer interaction, and their applications have penetrated into numerous fields, including e-commerce, healthcare, education, and office work. In such interactions, users express their questions or instructions to the intelligent agent by inputting prompts, and the agent generates responses based on its understanding of the prompts. Therefore, the quality of the prompts directly determines the accuracy, relevance, and usability of the intelligent agent's response, becoming a key bottleneck affecting the interaction's effectiveness.

[0003] However, in real-world business scenarios, especially in industries requiring rapid and accurate processing of standardized tasks (such as e-commerce customer service, medical record summarization, and teaching Q&A), most frontline users (such as customer service specialists, primary care physicians, and administrative staff) are not experts in prompt word engineering. These users often face the following dilemma when using AI agents: due to unfamiliarity with effectively organizing instructions, they can only input vague and simplified natural language expressions (e.g., "Reply to customer complaints," "Summarize medical records"). This low-quality questioning method prevents the AI ​​agent from accurately understanding the user's deeper intentions and specific scenario constraints. The generated responses are often generalized, detached from actual business needs, and fail to meet the need for immediate use. This not only severely reduces the assistance efficiency of the AI ​​agent, forcing users to spend extra time clarifying or manually modifying responses, but also significantly diminishes the potential effectiveness of AI agent technology, resulting in limited improvements in user experience and business efficiency. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a prompt word recommendation method, apparatus, electronic device, and storage medium to solve the problems in the prior art where users are unfamiliar with prompt word writing, resulting in low question quality and unsatisfactory agent response.

[0005] In a first aspect, embodiments of the present invention provide a method for recommending prompt words, including:

[0006] During the process of the user inputting the original question on the intelligent agent interaction interface, multi-dimensional correlation information between the original question and the user is acquired in real time.

[0007] Based on the original question and the multidimensional correlation information, identify the user's current questioning needs;

[0008] Based on the current question requirement, at least one candidate prompt word template is matched from the preset prompt word template library and displayed to the user;

[0009] The system receives the user's selection of one of the candidate prompt word templates and revision input, generates a target prompt word accordingly, and applies the target prompt word to the agent.

[0010] Furthermore, the step of acquiring the multidimensional correlation information between the original question and the user in real time is performed when the following conditions are met:

[0011] When the user's initial question input action is detected on the intelligent agent interaction interface, and the subsequent period without initial question input reaches a preset time threshold.

[0012] Furthermore, identifying the user's current questioning needs based on the original question and the multidimensional association information includes:

[0013] Based on the original question, the user's historical interaction records, and identity tags, the demand characteristics are analyzed and extracted.

[0014] Based on the extracted demand characteristics, the user's industry and the user's current question scenario are determined.

[0015] Furthermore, the step of matching at least one candidate prompt word template from a preset prompt word template library based on the current question requirement includes:

[0016] Transform the original query into one or more query features;

[0017] The determined industry and the current question scenario are used as classification dimensions for matching the prompt word template library;

[0018] In the set of prompt word templates selected based on the classification dimensions, the fit score between each template and the original question is calculated;

[0019] Based on the fit score from high to low, one or more templates with the highest ranking are selected as candidate prompt word templates.

[0020] Furthermore, the step of calculating the fitness score includes at least one of the following:

[0021] Calculate the matching degree between the query features and the core keywords of the template, and use it as the first scoring factor;

[0022] The historical frequency of template usage by user groups with the same or similar identity tags as the user is used as a second scoring factor.

[0023] The historical satisfaction feedback of the user group on the agent's responses after using the template is obtained and used as a third scoring factor.

[0024] Furthermore, the method also includes:

[0025] Acquire standard question tasks in various industry scenarios;

[0026] For each standard question task, they are categorized according to industry, user question scenario, and question task type, and prompt word templates containing core objectives, background supplements, output requirements, and example references are constructed.

[0027] The categorized and constructed prompt word templates are stored in a database to form the prompt word template library.

[0028] Furthermore, receiving revision input includes:

[0029] Configure at least one variable item in the candidate prompt word template selected by the user as a human-computer interactive revision component;

[0030] The revision component receives the revision content input by the user;

[0031] The variable items are updated according to the revisions to generate the target prompt words.

[0032] Secondly, embodiments of the present invention provide a prompt word recommendation device, comprising:

[0033] The question information acquisition unit is used to acquire the original question and its multidimensional related information in real time during the process of the user inputting the original question on the intelligent agent interaction interface;

[0034] The question requirement identification unit is used to identify the user's current question requirement based on the original question and its multidimensional related information;

[0035] The prompt word template matching unit is used to match at least one candidate prompt word template from a preset prompt word template library according to the current question requirement, and display it to the user;

[0036] The prompt word generation unit is used to receive the user's selection operation and revision input for one of the candidate prompt word templates, generate a target prompt word accordingly, and apply the target prompt word to the agent.

[0037] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed within the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the prompt word recommendation method described in the first aspect above.

[0038] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs that can be executed by one or more central processing units to implement the prompt word recommendation method described in the first aspect.

[0039] The technical solution provided by this invention acquires the user's original question and multi-dimensional related information in real time during the questioning process. Based on the multi-dimensional information, it accurately identifies the user's current questioning needs and matches candidate prompt word templates for the user to select and revise. Finally, it generates target prompt words that can be directly applied to the intelligent agent. This solution seamlessly integrates prompt word assistance into the user's natural questioning behavior, solving the problem of process fragmentation caused by the user having to actively interrupt the interaction to find templates in the prior art. At the same time, by integrating the user's multi-dimensional related information for demand identification, it overcomes the shortcomings of single matching dimensions and large deviations in recommendation results. Furthermore, the template revision interaction allows users to personalize the template in a lightweight way, effectively reducing the threshold for writing prompt words and significantly improving the accuracy and efficiency of intelligent agent interaction. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart of a suggestion word recommendation method provided in Embodiment 1 of the present invention;

[0042] Figure 2 This is a flowchart of a suggestion word recommendation method provided in Embodiment 2 of the present invention;

[0043] Figure 3 This is a flowchart of constructing a prompt word template library according to Embodiment 2 of the present invention;

[0044] Figure 4This is a schematic diagram of the structure of a prompt word recommendation device provided in Embodiment 3 of the present invention;

[0045] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0046] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0047] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0048] First, let's introduce the technical terms used in the embodiments of this invention.

[0049] Intelligent agents refer to computer programs that can understand natural language and generate responses, especially artificial intelligence applications such as dialogue systems, intelligent customer service, and copywriting assistants built on large language models.

[0050] The original question refers to the initial natural language expression that the user directly inputs in the intelligent agent's interactive interface without any structured processing.

[0051] Cue words are structured text instructions designed to guide an agent in generating specific, high-quality responses. They typically include clear context, task, and formatting requirements.

[0052] The following detailed descriptions are provided through various embodiments.

[0053] Example 1

[0054] This embodiment provides a prompt word recommendation method, which can be applied to human-computer interaction systems integrated with intelligent agents. Specifically, it is executed by a prompt word recommendation device deployed within the system, and is suitable for scenarios such as e-commerce customer service, medical consultation, and educational Q&A, where users need to interact efficiently and accurately with intelligent agents through natural language. See also... Figure 1 The method includes the following steps 101-104.

[0055] Step 101: During the process of the user inputting the original question on the intelligent agent interaction interface, obtain multi-dimensional correlation information between the original question and the user in real time.

[0056] During user interaction with the agent, accurately understanding the user's true intent relies not only on the literal content of the current input but also on a rich context. Therefore, in step 101, while the user inputs their original question into the agent's interface (such as a chat box or voice input interface), two types of key data are simultaneously captured: first, the user's original question; and second, multi-dimensional relational information deeply related to the user and their interaction context. These two types of data together form the basis for subsequent intent recognition and intelligent response.

[0057] First, the original question, as the initial request submitted by the user to the intelligent agent for processing, can take the form of direct text input or text content generated through speech recognition. By monitoring input events at the interactive interface (such as keyboard keystrokes, voice activity signals, etc.), the content the user is typing or speaking can be captured in real time, character by character, or segment by segment. For example, in an e-commerce customer service scenario, when a user types "What should I do if the shoes I bought rub against my feet?", this statement is collected as the original question and used for subsequent analysis.

[0058] However, relying solely on the initial question often fails to fully grasp the user's true needs. Therefore, this embodiment further acquires multi-dimensional related information simultaneously to provide necessary contextual support, thereby achieving a more accurate understanding of intent than a single-turn statement. Multi-dimensional related information refers to structured background data that characterizes the user's identity, behavior, and context from multiple dimensions, specifically including but not limited to the following two categories:

[0059] Firstly, the user's historical interaction records are derived from the user's past conversation history with the intelligent agent, covering the topics of their questions, high-frequency concerns, feedback behaviors, and the solutions ultimately adopted. By querying the user behavior database, it can be determined whether the current question belongs to a certain continuous business process (such as after-sales follow-up, medical follow-up, etc.) or reflects a specific preference, thereby improving the coherence and accuracy of intent recognition.

[0060] Secondly, user profile data typically exists in the form of pre-set or dynamically generated tags, used to characterize users' professional attributes and typical behavioral patterns. For example, in enterprise-level application scenarios, profile tags may include the user's job role (such as "after-sales customer service" or "internal medicine doctor"), industry (such as "e-commerce retail" or "online education"), and scenario-based characteristics derived from historical behavior analysis (such as "skilled in handling logistics disputes" or "frequently summarizes medical conditions").

[0061] To further optimize resource utilization and response efficiency, step 101 employs an intelligent triggering mechanism to perform the aforementioned data acquisition in a preferred embodiment. Specifically, the step of acquiring the original question and the user's multidimensional association information in real time is executed when the following conditions are met: when the user's original question input action on the intelligent agent interaction interface is detected, and the subsequent period without original question input reaches a preset time threshold. In this example, data is not continuously captured, but the timing of acquisition is dynamically determined based on the user's input behavior: when the user starts input (such as the first keyboard event or voice activity), and the subsequent period without new input reaches the preset threshold (e.g., 2 seconds), it is determined that the user has completed the input of a semantic group and entered a brief thinking state. At this time, step 101 is immediately triggered, and the current complete original question and its associated multidimensional information are collected simultaneously. This design effectively balances the immediacy of the response and the accuracy of the analysis: on the one hand, it avoids frequently starting the analysis process during continuous user input, reducing unnecessary computational overhead; on the other hand, it ensures timely capture of context at key nodes where the intent expression is relatively complete, providing high-quality and timely data input for subsequent deep semantic parsing, intent classification, and personalized recommendations.

[0062] It's important to note that in the triggering mechanism described above, the original question retrieved each time refers to the total accumulated content of the user's input from the start of the current input session to the current trigger moment, not just newly added input fragments since the last trigger. For example, if the user first inputs "shoes," pauses for 2 seconds, and triggers the first data collection, the system retrieves the original question as "shoes." Then, if the user continues to input "What to do if my shoes rub my feet?", pauses again for 2 seconds, and triggers the second data collection, the original question retrieved this time is "What to do if my shoes rub my feet?"—that is, the complete concatenation of the previous and subsequent inputs. Through this cumulative data collection method, the system can always analyze based on the user's complete current input intent, avoiding semantic understanding biases caused by fragmented input.

[0063] Step 102: Based on the original question and multidimensional related information, identify the user's current question requirement.

[0064] This step combines the original question obtained in step 101 with the multidimensional related information as an organic whole for joint analysis, to determine "the background, purpose, and circumstances under which the user raised this question".

[0065] In practice, the original question can first undergo natural language processing, such as word segmentation, part-of-speech tagging, entity recognition, and intent classification, to extract semantic elements that can represent the user's core needs. These semantic elements may include: the subject of the user's interest (e.g., "customer" or "product"), the state or problem of the object (e.g., "foot rubbing" or "charging failure"), and the type of action the user expects the agent to perform (e.g., "generate a reply" or "write a summary").

[0066] Simultaneously, the current question is placed within a contextualized framework of multi-dimensional related information for comprehensive analysis. By analyzing the user behavior patterns, task inertia, and role attributes implied in the related information, it is possible to determine the business domain (e.g., e-commerce, healthcare, education), the specific problem type (e.g., after-sales disputes, medical information disclosure, courseware summaries), and the user's role in the interaction (e.g., customer service personnel, doctors, teachers). For example, if the related information indicates that the user has a long history of handling after-sales consultation tasks, even if the current question does not explicitly mention the word "after-sales," it can be inferred that the current question belongs to an after-sales scenario; conversely, if the related information indicates that the user is a product operations personnel, the same original question can be understood as a product feedback analysis request.

[0067] Through the above joint analysis, several key dimensions that accurately characterize the user's current questioning needs can be output. In a specific example, the output may include: the user's industry and the user's current questioning scenario. "Industry" defines the domain of the question, providing a macro-level filtering boundary for subsequent matching; "Scenario" further clarifies the specific business context within that domain, providing precise navigation coordinates for subsequent matching. The combination of these two elements constitutes a complete portrayal of the user's core need: "In what industry context and what type of task are they handling?"

[0068] Understandably, the above recognition process is completed in real time and dynamically, ensuring that the user's intent can be quickly captured during brief pauses in input, and making full preparations for subsequent suggestion word template recommendations. Simultaneously, the "industry" and "scenario" information output by this recognition process can be passed as core parameters to the next step to drive accurate matching in the suggestion word template library.

[0069] In a preferred embodiment, step 102 includes:

[0070] Based on the original question, the user's historical interaction records, and identity tags, the demand characteristics are analyzed and extracted.

[0071] Based on the extracted demand characteristics, determine the user's industry and the user's current questioning scenario.

[0072] In practice, the system can collect the original questions generated by the user during the input process, query and retrieve the user's historical interaction records from the user behavior database, and read pre-set identity tags associated with the user from the user configuration file. These identity tags include user job information and frequently asked question scenario information, which can be generated through the following steps: in response to user registration or configuration operations, obtain the user's job attributes and assign job information tags based on these attributes; analyze the user's historical interaction records, statistically analyze the frequently occurring question scenarios, and assign frequently asked question scenario information tags to the user based on the statistical results.

[0073] After obtaining the user's original question, historical interaction records, and identity tags, a joint analysis is performed to extract demand characteristics. Specifically, the original question is first subjected to natural language processing to extract semantic elements that represent the user's core needs. Simultaneously, historical interaction records are analyzed to identify the distribution of frequently occurring topics and scenario preferences in the user's past questions, extracting feature information reflecting their behavioral patterns. Furthermore, the pre-defined job information and commonly asked question scenarios from the identity tags are read to obtain the user's role type and their usual task scope.

[0074] Based on this, the features extracted from the three sources mentioned above are fused and analyzed. Through cross-validation and comprehensive inference, the user's industry category and current question scenario are ultimately determined. For example, if the original question involves "charging malfunction," and the history shows that the user frequently handles after-sales issues, with the identity tag being "after-sales customer service," then it can be comprehensively inferred that their industry is "e-commerce," and the current question scenario is "after-sales issue handling." If the original question involves "hypertension," and the history mainly consists of medical record summaries, with the identity tag being "internal medicine doctor," then it can be inferred that the industry is "medical," and the scenario is "informing the user of their medical condition." Through the above multi-dimensional joint analysis, the vague original question can be transformed into structured industry and scenario information, providing a clear basis for subsequent accurate matching.

[0075] Step 103: Based on the current question requirements, match at least one candidate prompt word template from the preset prompt word template library and display it to the user.

[0076] In this embodiment, a prompt word template library can be pre-configured to store multiple prompt word templates. Each prompt word template may contain the following core elements:

[0077] Core objective: To clearly define the main task that this template aims to accomplish;

[0078] Additional background information: Variable fields left blank in the template that users need to fill in based on their actual situation;

[0079] Output requirements: Specific requirements for the format, style, and content elements of the results generated by the intelligent agent;

[0080] Example Reference: This example shows the complete effect of the template after it is filled, providing users with an intuitive reference.

[0081] After identifying the user's current question requirement in step 102, this requirement, along with the user's original question, is used as the matching basis to retrieve and filter candidate prompt word templates from a pre-set prompt word template library. Specifically, the identified current question requirement (e.g., the user's industry and current question scenario) can be used as a classification dimension to quickly locate the corresponding prompt word template set in the prompt word template library. Based on this, prompt word templates matching the user's original question are further filtered from the located prompt word template set as candidate prompt word templates. For example, query features are extracted from the user's original question, and these features are comprehensively compared with each prompt word template in the located prompt word template set. Combined with factors such as the user group's historical usage data, the fit between the two is calculated, and one or more templates that meet the preset fit standard (e.g., high rating ranking) are selected as candidate prompt word templates. Subsequently, these candidate prompt word templates are displayed to the user in a list or other visual format for browsing and selection. This hierarchical matching strategy of first locating the classification area and then finely calculating the rating ensures both retrieval efficiency and the accuracy of the recommendation results.

[0082] As another approach, the user's original question can be integrated into the current question requirement, forming a composite requirement representation that includes industry, scenario, and semantic information of the original question. Then, based on this composite requirement, matching prompt word templates are directly selected from a pre-built prompt word template library as candidates. In this approach, the two stages of localization and precise calculation are no longer explicitly distinguished. Instead, a unified matching model or algorithm is used to comprehensively evaluate and rank all prompt word templates in the library at once, considering both the macro-level adaptability of the industry scenario and the micro-level semantic features of the original question. Finally, one or more prompt word templates that best match the overall requirement are selected. This implementation is suitable for scenarios where the matching model can handle both structured tags and unstructured text simultaneously. For example, a deep learning-based cross-modal retrieval model can be used to map industry scenario tags and original question text to the same vector space, achieving end-to-end matching by calculating the similarity with the prompt word template vectors.

[0083] The two implementation methods described above can be flexibly selected according to the actual application scenario and technical architecture, and both fall within the protection scope of this invention.

[0084] Step 104: Receive the user's selection operation and revision input for one of the candidate prompt word templates, generate the target prompt word accordingly, and apply the target prompt word to the agent.

[0085] After presenting the candidate suggestion templates to the user, the user can select the one that best suits their current question intent from multiple options. Specifically, the selection can be received in real time by listening for clicks or selections on the user interface, thus clarifying which suggestion template the user has chosen as the basis for subsequent revisions.

[0086] Building upon this, to enable users to personalize prompt word templates with minimal operational effort, a lightweight revision mechanism is automatically triggered after the user selects a prompt word template. For example, at least one variable item within the user-selected candidate prompt word template is configured as an interactive revision component; the revision component receives revision content input by the user; and the variable item is updated based on the revision content to generate the target prompt word.

[0087] The revision component can be an input box for users to freely fill in, or a drop-down menu providing preset options for users to choose from; its specific form can be flexibly determined according to the nature of the variable items. Optionally, a real-time preview function can be provided during this process, synchronously displaying the revised complete prompt word in the user interface, allowing users to instantly confirm the generated effect. Once the user is satisfied with the revision result, no further action is required to generate the target prompt word based on the final revised content.

[0088] Finally, the generated target prompts are automatically submitted to the agent, serving as the direct basis for the agent to generate responses. Based on these high-quality, structured prompts, the agent can more accurately understand user intent and output responses that better meet actual business needs. Through this process, a complete closed loop is achieved, from template recommendation to personalized revision and then to agent application, greatly reducing the writing threshold and operational costs for users while ensuring the quality of prompts.

[0089] Example 2

[0090] This embodiment, based on Embodiment 1 above, adds a step of constructing a prompt word template library and optimizes step 103 accordingly. See [link to previous embodiment]. Figure 2 One method for recommending prompt words includes the following steps 200-208.

[0091] Step 200: Build a prompt word template library.

[0092] For details, see Figure 3 This step 200 may include the following sub-steps 2001-2003.

[0093] Sub-step 2001: Obtain standard question tasks for various industry scenarios.

[0094] Specifically, it can collect a large number of frequently asked questions from users interacting with intelligent agents across various industries. For example, by analyzing historical data of user interactions with intelligent customer service, medical assistants, and educational robots in e-commerce, healthcare, education, and other industry scenarios, the most frequent and representative user questions can be selected as the basic source of material for constructing prompt word templates, ensuring that the constructed templates can realistically cover users' common needs.

[0095] Sub-step 2002: For each standard question task, classify them according to industry dimension, user question scenario dimension and question task type dimension, and construct a prompt word template that includes core objectives, background supplements, output requirements and example references.

[0096] The industry dimension defines the domain to which the task belongs (e.g., e-commerce, healthcare, education); the user question scenario dimension clarifies the specific business context within that domain (e.g., after-sales disputes, medical condition disclosure, courseware summarization); and the question task type dimension corresponds to the nature of the task the user expects to complete (e.g., copywriting, information extraction, question answering). Based on this, standardized prompt word templates are constructed for each categorized task.

[0097] Sub-step 2003: Store the categorized and constructed prompt word templates in the database to form a prompt word template library.

[0098] After completing the above classification and construction, all prompt word templates are indexed according to their respective industries, scenarios, and task types, and stored in the database, ultimately forming a prompt word template library that can be used for subsequent matching and supports efficient retrieval. This library can be dynamically updated and maintained as needed, for example, by adding new templates or optimizing the content of existing templates based on new business needs or user feedback, to ensure that it always covers the latest question scenarios of users.

[0099] Step 201: During the process of the user entering the original question on the intelligent agent interaction interface, the original question, the user's historical interaction records, and identity tags are obtained in real time.

[0100] Step 202: Based on the original question, the user's historical interaction records, and identity tags, analyze and extract the demand features.

[0101] Step 203: Based on the extracted demand characteristics, determine the user's industry and the user's current question scenario.

[0102] Step 204: Transform the original query into one or more query features.

[0103] The original questions entered by users are unstructured text in natural language form. While this type of text expresses the user's intent, it cannot be directly compared quantitatively with the prompt word template. Therefore, it needs to be transformed into a standardized feature form that can be recognized and calculated by computers in order to perform matching operations with core keywords and other elements in the template.

[0104] For example, the original query can be segmented into several independent lexical units. Further, part-of-speech tagging can be used to identify the grammatical components of each word, and stop word filtering techniques can be employed to remove words without actual semantic meaning, such as modal particles and auxiliary words, retaining keywords that represent the user's core intent. For instance, for the original query "How to reply when shoes rub against your feet," the extracted keywords might include "shoes," "rubs against feet," and "reply"; for "What to do when my phone won't charge?", keywords like "phone," "won't charge," and "what to do" could be extracted. These keywords constitute the most basic query features.

[0105] In a more preferred embodiment, more advanced natural language processing techniques such as entity recognition and intent classification can be employed to extract deeper semantic features from the original query. For example, "shoes" and "phone" can be identified as "product name" entities, "blisters" and "cannot charge" as "problem description" entities, and "how to reply" and "what to do" as "expected action" categories. Through these techniques, one or more query features with clear semantic orientation can be extracted from the original query, providing richer information dimensions for subsequent accurate matching.

[0106] Understandably, the above query feature extraction process is completed in real time, ensuring rapid parsing and transformation of the original query during the brief pause in user input. The extracted query features will serve as an important basis for subsequent calculation of the suitability score, working in conjunction with pre-determined industry classification dimensions and user scenario classification dimensions to jointly drive the efficient and accurate execution of the template matching process.

[0107] Step 205: Use the determined industry and the current question scenario as the classification dimensions for the matching prompt word template library.

[0108] This step aims to perform preliminary screening of the pre-built prompt word template library using the user's industry and current question scenario identified in step 203. Specifically, the industry information output in step 203 (e.g., e-commerce, healthcare, education) and the current question scenario information (e.g., after-sales dispute handling, medical condition disclosure, courseware summary) are used as two core classification dimensions to quickly locate the set of prompt word templates matching the industry and scenario in the prompt word template library. Since the prompt word template library has been pre-structured and stored according to dimensions such as industry, scenario, and task type, all templates that simultaneously meet the industry and scenario conditions can be directly filtered out through the indexing mechanism. This significantly narrows the subsequent fine-grained matching scope from the entire template library to a local subset of templates directly related to the user's current context. This process effectively avoids blind searching across the entire library and significantly improves matching efficiency.

[0109] Step 206: Calculate the fit score between each template and the query feature in the set of prompt word templates selected based on the classification dimension.

[0110] After the initial screening in step 205, a set of candidate templates highly relevant to the current user's industry and question scenario is obtained. Step 206 involves a refined suitability evaluation of each prompt word template within this partial set. Specifically, using the query features (such as keywords and semantic entities) extracted from the original question in step 204 as the basis for calculation, the degree of matching between each prompt word template and the user's current specific question is measured one by one, and a quantitative suitability score is calculated for each prompt word template. This score aims to objectively reflect the degree to which the prompt word template meets the current user's needs; the higher the score, the more suitable the template is to be recommended to the user. Through the above two-level matching strategy of first locating the classification area and then finely calculating the score, both retrieval efficiency and the accuracy of the final recommendation results are ensured, laying a solid foundation for subsequently displaying highly suitable templates to the user.

[0111] For example, the steps for calculating the fitness score include at least one of the following:

[0112] Calculate the matching degree between the query features and the core keywords of the prompt word template, and use it as the first scoring factor;

[0113] The historical frequency of use of prompt word templates by user groups with the same or similar identity tags as the user is used as a second scoring factor.

[0114] The historical satisfaction feedback of the user group with the agent's response after using the prompt word template is obtained and used as the third scoring factor.

[0115] When constructing prompt word templates, keywords that best represent the template's purpose can be extracted based on its core objective and applicable scenarios. For example, for the "e-commerce - after-sales inquiry - negative review reply" template, "negative review," "reply," "appease," and "compensation" can be set as its core keywords. These keywords are stored together with the prompt word template in the prompt word template library. When calculating the first scoring factor, the query features extracted in step 204 (such as "shoes," "rubs feet," and "reply") are compared with the core keywords of the current prompt word template. The matching degree score between the query features and the template is obtained by calculating the amount of overlap, semantic similarity, or distance based on word vectors. The more overlap or semantic similarity between the query features and the template's core keywords, the higher the matching degree score.

[0116] Building upon query feature-based matching, user group behavioral data can be incorporated as an evaluation criterion to further improve recommendation accuracy. "Same or similar identity tags" refer to user identifiers that are consistent or similar to the current user in terms of job attributes, frequently asked questions, etc. Specifically, if two users have the same job information or their frequently asked questions highly overlap, they can be determined to have the same or similar identity tags. The frequency of use of each prompt word template within the user group can be calculated by statistically analyzing the historical usage frequency of all users with the same or similar identity tags. A higher frequency of use indicates greater acceptance of the prompt word template within that user group, resulting in a higher score for the second rating factor.

[0117] Besides usage frequency, the actual application effect on user groups is also valuable for reference. Therefore, it's possible to record the satisfaction ratings of user groups with the same or similar identity tags as the current user after historically using various prompt word templates, and their feedback on the responses generated by the agent based on those templates. This satisfaction feedback can be expressed as ratings (e.g., 1-5 star ratings), binary feedback such as likes / dislikes, or other forms of user evaluation data. The average satisfaction rating, positive review rate (e.g., the percentage of ratings ≥ 4 stars), or other quantitative indicators of this user group for each prompt word template can be used as the score for the third rating factor. Higher satisfaction feedback indicates a better actual application effect of the prompt word template within that user group, and correspondingly, a higher score for the third rating factor.

[0118] It should be noted that when calculating the fit score, any one, two, or all of the above three factors can be combined, and corresponding weight coefficients can be assigned to each factor according to the actual application scenario. Finally, the comprehensive fit score between each prompt word template and the current user needs is obtained, which serves as the basis for sorting and filtering prompt word templates.

[0119] As a preferred implementation, after calculating the three scoring factors, they can be weighted and fused to obtain a comprehensive fit score that fully reflects the degree of matching between the template and the user's needs. Specifically, corresponding weight coefficients are assigned to the first, second, and third scoring factors, and then the three factors are weighted and summed to calculate the comprehensive fit score between each prompt word template and the current user's question.

[0120] The weight coefficients can be configured either pre-set or dynamically adjusted. In the pre-set method, the weight coefficients are stored as configurable parameters in a configuration file or database and are normalized so that the sum of the weight coefficients for each factor is 1, ensuring a stable numerical range for the overall score. The initial values ​​of the weight coefficients can be determined based on various strategies, such as setting them manually based on experience, for example, assigning weight coefficients of 0.5, 0.3, and 0.2 to the first, second, and third scoring factors respectively; or they can be obtained through machine learning methods, training on historical data to obtain the optimal weight combination.

[0121] In dynamic adjustment mode, real-time updates of weight coefficients are supported. On one hand, manual input of weight coefficient adjustment commands can be received through the management interface, and the configuration can be updated in real time and persistently stored. On the other hand, weight coefficients can be automatically optimized through runtime data analysis. For example, the correlation between each rating factor and user satisfaction can be periodically analyzed. If it is found that the influence of a certain rating factor on the final effect changes, its weight ratio can be automatically adjusted, and the updated weight coefficient can be rewritten into the configuration for subsequent calculations. Dynamic adjustment of weight coefficients allows the system to adapt to the needs of different application scenarios. For example, in scenarios that emphasize immediate semantic matching, the weight coefficient of the first rating factor can be appropriately increased; while in scenarios that focus more on group experience and historical effects, the weight coefficients of the second and third rating factors can be increased.

[0122] Through the weighted fusion calculation described above, the semantic features of the user's current question and the historical behavioral data of similar user groups can be comprehensively considered to achieve more accurate and personalized prompt word template recommendations, thereby further improving the user experience and the interaction effect of the intelligent agent.

[0123] Step 207: Based on the fit score from high to low, select one or more of the top-ranked templates as candidate prompt word templates.

[0124] After obtaining the suitability scores of the relevant prompt word templates, the prompt templates are sorted from highest to lowest score. Based on a preset number of recommendations (e.g., the top 3) or a score threshold, one or more of the top-ranked templates are selected as candidate prompt word templates. These candidate templates are considered to be the most suitable for the current industry, scenario, and specific user question, and will be displayed to the user for selection and revision, thus completing the core process from demand identification to template recommendation.

[0125] Step 208: Receive the user's selection operation and revision input for one of the candidate prompt word templates, generate the target prompt word accordingly, and apply the target prompt word to the agent.

[0126] Example 3

[0127] This embodiment provides a prompt word recommendation device, which can be deployed in a human-computer interaction system integrated with an intelligent agent. It is implemented by software and / or hardware and is used to execute the prompt word recommendation method described in this embodiment of the invention. See also... Figure 4 The device specifically includes the following units:

[0128] The question information acquisition unit 401 is used to acquire the original question and its multidimensional related information in real time during the process of the user inputting the original question on the intelligent agent interaction interface;

[0129] Question requirement identification unit 402 is used to identify the user's current question requirement based on the original question and its multidimensional association information;

[0130] The prompt word template matching unit 403 is used to match at least one candidate prompt word template from a preset prompt word template library according to the current question requirement, and display it to the user;

[0131] The prompt word generation unit 404 is used to receive the user's selection operation and revision input for one of the candidate prompt word templates, generate a target prompt word accordingly, and apply the target prompt word to the agent.

[0132] For example, the question information acquisition unit 401 is specifically used to perform the step of acquiring the multi-dimensional association information of the original question and the user in real time when the following conditions are met:

[0133] When the user's initial question input action is detected on the intelligent agent interaction interface, and the subsequent period without initial question input reaches a preset time threshold.

[0134] For example, the question requirement identification unit 402 is specifically used for:

[0135] Based on the original question, the user's historical interaction records, and identity tags, the demand characteristics are analyzed and extracted.

[0136] Based on the extracted demand characteristics, the user's industry and the user's current question scenario are determined.

[0137] Furthermore, the prompt word template matching unit 403 is specifically used for:

[0138] Transform the original query into one or more query features;

[0139] The determined industry and the current question scenario are used as classification dimensions for matching the prompt word template library;

[0140] In the set of prompt word templates selected based on the classification dimensions, the fit score between each template and the original question is calculated;

[0141] Based on the fit score from high to low, one or more templates with the highest ranking are selected as candidate prompt word templates.

[0142] Preferably, the step of the prompt word template matching unit 403 for calculating the fit score includes at least one of the following:

[0143] Calculate the matching degree between the query features and the core keywords of the template, and use it as the first scoring factor;

[0144] The historical frequency of template usage by user groups with the same or similar identity tags as the user is used as a second scoring factor.

[0145] The historical satisfaction feedback of the user group on the agent's responses after using the template is obtained and used as a third scoring factor.

[0146] Based on the above solution, the device further includes a prompt word template library creation unit 400, used for:

[0147] Acquire standard question tasks in various industry scenarios;

[0148] For each standard question task, they are categorized according to industry, user question scenario, and question task type, and prompt word templates containing core objectives, background supplements, output requirements, and example references are constructed.

[0149] The categorized and constructed prompt word templates are stored in a database to form the prompt word template library.

[0150] For example, the prompt word generation unit 404 is specifically used for:

[0151] Configure at least one variable item in the candidate prompt word template selected by the user as a human-computer interactive revision component;

[0152] The revision component receives the revision content input by the user;

[0153] The variable items are updated according to the revisions to generate the target prompt words.

[0154] The prompt word recommendation device provided in this embodiment belongs to the same inventive concept as the aforementioned prompt word recommendation method embodiment. Technical details not described in this embodiment can be found in the relevant descriptions in the aforementioned method embodiment, and will not be repeated here.

[0155] In summary, the technical solution provided by the embodiments of the present invention constructs a complete auxiliary mechanism from user input to high-quality prompt word generation, fundamentally solving the problem of poor agent interaction effect caused by insufficient prompt word writing ability, significantly improving interaction efficiency and user experience, and has the following advantages:

[0156] First, it achieves real-time assistance during the questioning process, avoiding interruption of interaction. This solution obtains the user's input content and multi-dimensional related information in real time during the user's original question input process, and starts the analysis process at the appropriate time when the user pauses input through an intelligent triggering mechanism. The user does not need to actively interrupt the current interaction to find the template, so that the prompt word assistance is seamlessly integrated into the natural questioning behavior, which solves the problem of poor experience caused by the operation separation in the existing technology.

[0157] Second, by using multi-dimensional information fusion and identification, the accuracy of demand understanding is improved. When identifying the user's current question, this solution not only analyzes the user's original question, but also combines it with multi-dimensional related information such as the user's historical interaction records and identity tags. This enables a more comprehensive and accurate grasp of the user's intent, the determination of the user's industry and the current question scenario, and overcomes the shortcomings of existing technologies, such as single matching dimensions and large deviations between recommendation results and the user's actual needs.

[0158] Third, a hierarchical matching strategy is adopted to balance retrieval efficiency and recommendation accuracy. This solution uses the identified industries and scenarios as classification dimensions to quickly locate the candidate set in the template library. Then, the original question is transformed into query features and the fit score is calculated in the located set. Through the hierarchical strategy of first screening and then refining, the computational overhead caused by traversing the entire library is avoided, and the recommendation results are highly matched with the user's current specific question.

[0159] Fourth, by integrating multi-dimensional scoring factors, personalized and accurate recommendations can be achieved. When calculating the suitability score, this solution can comprehensively consider multi-dimensional factors such as the matching degree between query features and core keywords of the template, the historical usage frequency of the template by similar user groups, and the satisfaction feedback of the group. This ensures that the recommendation results not only conform to the semantic features of the user's current question, but also incorporate the collective experience of similar users, further improving the accuracy and personalization of the recommendations.

[0160] Fifth, a lightweight revision mechanism is provided to lower the barrier to entry for users. After the user selects a candidate template, the variable items are configured as interactive revision components (such as input boxes or drop-down menus). Users only need to fill in or select a small amount of key information to complete the personalized adjustment of the template without modifying the overall structure of the template. This greatly reduces the barrier to entry for writing prompts. At the same time, the real-time preview function ensures that the generated effect meets expectations.

[0161] Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device of the present invention, which can implement the processes of Embodiment 1 and Embodiment 2 of the present invention, as follows. Figure 5 As shown, the above-mentioned electronic device may include: a housing 51, a processor 52, a memory 53, a circuit board 54, and a power supply circuit 55, wherein the circuit board 54 is disposed inside the space enclosed by the housing 51, and the processor 52 and the memory 53 are disposed on the circuit board 54; the power supply circuit 55 is used to supply power to the various circuits or devices of the above-mentioned electronic device; the memory 53 is used to store executable program code; the processor 52 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 53, for executing the prompt word recommendation method described in any of the foregoing embodiments.

[0162] For details on the specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running executable program code, please refer to the description of the method embodiments of the present invention, which will not be repeated here.

[0163] The electronic device can be an electronic device with data processing capabilities that exists in various forms, such as a server that provides computing services. Its structure is similar to that of a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0164] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more central processing units to implement the prompt word recommendation method described in the foregoing embodiments.

[0165] It should be noted that in this article, relational terms such as "first" and "second" are only used to refer to...

[0166] Distinguishing one entity or operation from another does not necessarily require or imply these distinctions.

[0167] There is no such actual relationship or order between entities or operations. Furthermore, the terms "including" and "package" do not apply.

[0168] The word "comprise" or any other variation thereof is 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. Without further limitation, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0169] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0170] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0171] In particular, the device embodiment is basically similar to the method embodiment, so the description is relatively simple. For relevant details, please refer to the description of the method embodiment.

[0172] For ease of description, the above apparatus is described by dividing it into various functional units / modules. Of course, in implementing this invention, the functions of each unit / module can be implemented in one or more software and / or hardware.

[0173] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0174] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A suggestion word recommendation method, characterized in that, The method includes: During the process of the user inputting the original question on the intelligent agent interaction interface, multi-dimensional correlation information between the original question and the user is acquired in real time. Based on the original question and the multidimensional correlation information, identify the user's current questioning needs; Based on the current question requirement, at least one candidate prompt word template is matched from the preset prompt word template library and displayed to the user; The system receives the user's selection of one of the candidate prompt word templates and revision input, generates a target prompt word accordingly, and applies the target prompt word to the agent.

2. The method according to claim 1, characterized in that, The step of acquiring the multidimensional correlation information between the original question and the user in real time is performed when the following conditions are met: When the user's initial question input action is detected on the intelligent agent interaction interface, and the subsequent period without initial question input reaches a preset time threshold.

3. The method according to claim 1, characterized in that, The step of identifying the user's current questioning needs based on the original question and the multidimensional correlation information includes: Based on the original question, the user's historical interaction records, and identity tags, the demand characteristics are analyzed and extracted. Based on the extracted demand characteristics, the user's industry and the user's current question scenario are determined.

4. The method according to claim 3, characterized in that, The step of matching at least one candidate prompt word template from a preset prompt word template library based on the current question requirement includes: Transform the original query into one or more query features; The determined industry and the current question scenario are used as classification dimensions for matching the prompt word template library; In the set of prompt word templates selected based on the classification dimensions, the fit score between each template and the original question is calculated; Based on the fit score from high to low, one or more templates with the highest ranking are selected as candidate prompt word templates.

5. The method according to claim 4, characterized in that, The steps for calculating the fitness score include at least one of the following: Calculate the matching degree between the query features and the core keywords of the template, and use it as the first scoring factor; The historical frequency of template usage by user groups with the same or similar identity tags as the user is used as a second scoring factor. The historical satisfaction feedback of the user group on the agent's responses after using the template is obtained and used as a third scoring factor.

6. The method according to claim 1, characterized in that, The method further includes: Acquire standard question tasks in various industry scenarios; For each standard question task, they are categorized according to industry, user question scenario, and question task type, and prompt word templates containing core objectives, background supplements, output requirements, and example references are constructed. The categorized and constructed prompt word templates are stored in a database to form the prompt word template library.

7. The method according to claim 1, characterized in that, The receiving of revision input includes: Configure at least one variable item in the candidate prompt word template selected by the user as a human-computer interactive revision component; The revision component receives the revision content input by the user; The variable items are updated according to the revisions to generate the target prompt words.

8. A prompt word recommendation device, characterized in that, The device includes: The question information acquisition unit is used to acquire the original question and its multidimensional related information in real time during the process of the user inputting the original question on the intelligent agent interaction interface; The question requirement identification unit is used to identify the user's current question requirement based on the original question and its multidimensional related information; The prompt word template matching unit is used to match at least one candidate prompt word template from a preset prompt word template library according to the current question requirement, and display it to the user; The prompt word generation unit is used to receive the user's selection operation and revision input for one of the candidate prompt word templates, generate a target prompt word accordingly, and apply the target prompt word to the agent.

9. An electronic device, characterized in that, The electronic device includes: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the prompt word recommendation method as described in any one of claims 1-7 above.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more central processing units to implement the prompt word recommendation method according to any one of claims 1-7.