Prompt word optimization method and system based on large language model

Through natural language processing technology, users' input content is deeply analyzed and evaluated, and prompt words matching user needs are generated, which solves the problem that the existing AI big model generates prompt words and user needs, and improves output quality and user satisfaction , and adapt to the needs of different users through a continuous learning mechanism, achieving long-term technological progress and performance improvement.

CN119047482APending Publication Date: 2024-11-29WUHAN CARBIT INFORMATION CO LTD
View PDF 0 Cites 19 Cited by

Patent Information

Application Number
CN202411168784.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Existing AI models have limitations in processing unstructured data and understanding complex user intentions, resulting in the generated prompt words not exactly matching user needs, increasing the cost and time of users when using large language models.

Method used

Through natural language processing technology, semantic analysis of the content input by users is generated, multiple candidate prompt words are generated, and their effects are evaluated based on preset evaluation indicators, and the optimized prompt words are determined and displayed to users. The system includes a semantic analysis module, a prompt word evaluation module and a prompt word optimization module. Through in-depth text preprocessing, entity recognition, syntax and semantic analysis and other technologies, it generates prompt words that match user needs.

Benefits of technology

Reduces the number of times users modify and adjust the output results, reduces the demand for professional knowledge, improves the output quality and user satisfaction of the large language model, and adapts to the needs of different users through user feedback and continuous learning mechanisms, providing personalized Service to achieve long-term technological progress and performance improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047482A_ABST
    Figure CN119047482A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of large language models, and discloses a cue word optimization method and system based on a large language model.The input content of a user is subjected to semantic analysis through a natural language processing technology to obtain a semantic analysis result, and a plurality of candidate cue words are generated according to the semantic analysis result; performing effect evaluation on the plurality of candidate cue words to obtain a cue word evaluation result; and determining an optimized cue word according to the cue word evaluation result, and displaying the optimized cue word to a user. The cue word matched with the user demand is generated based on the natural language processing technology, so that the number of times of modifying and adjusting the output result by the user is reduced, the requirement of the user for professional knowledge when the user uses the large language model is reduced, the use threshold is also reduced, and the output quality of the large language model and the user satisfaction degree are improved. In addition, through user feedback and a continuous learning mechanism, requirements and preferences of different users can be adapted, and the individuation degree of the large language model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a prompt word optimization method and system based on a large language model. Background Art

[0002] In the field of artificial intelligence (AI) natural language processing (NLP) technology, large language models (LLM) usually require precise prompt words to guide them to generate output that meets user needs. However, existing AI large models have limitations in processing unstructured data and understanding complex user intentions. These limitations are mainly manifested in the following aspects:

[0003] (1) Existing AI models are highly dependent on user input, which means that users need to have certain professional knowledge to provide effective prompts.

[0004] (2) Existing large AI models may have biases in understanding user intent, especially when dealing with ambiguous or ambiguous input content.

[0005] (3) The lack of in-depth semantic analysis of the user's input content may result in the generated prompt words not fully matching the user's actual needs.

[0006] (4) When using large AI models, users often need to make multiple attempts and adjustments to obtain satisfactory output, which increases usage costs and time.

[0007] Therefore, how to generate prompt words that match user needs to improve the output quality of large language models and user satisfaction has become an urgent problem to be solved.

[0008] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0009] The main purpose of the present invention is to provide a prompt word optimization method and system based on a large language model, aiming to solve the technical problem that the prior art cannot generate prompt words matching user needs, so as to improve the output quality of the large language model and user satisfaction.

[0010] To achieve the above object, the present invention provides a prompt word optimization method based on a large language model, the method comprising the following steps:

[0011] Performing semantic analysis on the user's input content through natural language processing technology to obtain a semantic analysis result, and generating a plurality of candidate prompt words according to the semantic analysis result;

[0012] Performing effect evaluation on multiple candidate prompt words to obtain prompt word evaluation results;

[0013] An optimized prompt word is determined according to the prompt word evaluation result, and the optimized prompt word is displayed to the user.

[0014] Optionally, the step of performing semantic analysis on the user's input content by using natural language processing technology to obtain a semantic analysis result, and generating a plurality of candidate prompt words according to the semantic analysis result includes:

[0015] The user's input content is subjected to text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, topic identification, context understanding and context adaptation in sequence through natural language processing technology to obtain a semantic analysis result, and a plurality of candidate prompt words are generated based on the semantic analysis result.

[0016] Optionally, the step of evaluating the effects of multiple candidate prompt words to obtain prompt word evaluation results includes:

[0017] Evaluate the effects of multiple candidate prompt words according to multiple preset prompt word evaluation indicators to obtain prompt word evaluation results;

[0018] Multiple preset prompt word evaluation indicators include relevance, coverage, information content, detail, user-friendliness, comprehensibility, contextual adaptability, and personalization.

[0019] Optionally, the step of determining an optimized prompt word according to the prompt word evaluation result and displaying the optimized prompt word to the user includes:

[0020] According to the prompt word evaluation result, multiple candidate prompt words are sorted from high to low according to the scores to obtain a prompt word sorting result;

[0021] An optimized prompt word is determined according to the prompt word sorting result, and the optimized prompt word is displayed to the user.

[0022] Optionally, after the step of determining the optimized prompt word according to the prompt word evaluation result and displaying the optimized prompt word to the user, the method further includes:

[0023] A target prompt word selected by the user from the optimized prompt words is obtained, and output content required by the user is generated according to the target prompt word.

[0024] In addition, to achieve the above purpose, the present invention also proposes a prompt word optimization system based on a large language model, and the prompt word optimization system based on a large language model includes:

[0025] A semantic analysis module, used to perform semantic analysis on the user's input content through natural language processing technology to obtain a semantic analysis result, and generate a plurality of candidate prompt words according to the semantic analysis result;

[0026] A prompt word evaluation module is used to evaluate the effects of multiple candidate prompt words to obtain prompt word evaluation results;

[0027] The prompt word optimization module is used to determine the optimized prompt word according to the prompt word evaluation result, and display the optimized prompt word to the user.

[0028] Optionally, the semantic analysis module is also used to perform text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, topic identification, context understanding and context adaptation on the user's input content in sequence through natural language processing technology to obtain semantic analysis results, and generate multiple candidate prompt words based on the semantic analysis results.

[0029] Optionally, the prompt word evaluation module is further used to evaluate the effects of multiple candidate prompt words according to multiple preset prompt word evaluation indicators to obtain a prompt word evaluation result;

[0030] Multiple preset prompt word evaluation indicators include relevance, coverage, information content, detail, user-friendliness, comprehensibility, contextual adaptability, and personalization.

[0031] Optionally, the prompt word optimization module is further used to sort the multiple candidate prompt words from high to low according to the scores according to the prompt word evaluation result to obtain a prompt word sorting result;

[0032] The prompt word optimization module is further used to determine the optimized prompt word according to the prompt word sorting result, and display the optimized prompt word to the user.

[0033] Optionally, the prompt word optimization module is further used to obtain a target prompt word selected by a user from the optimized prompt words, and generate output content required by the user according to the target prompt word.

[0034] In the present invention, the user's input content is semantically analyzed by natural language processing technology to obtain semantic analysis results, and multiple candidate prompt words are generated according to the semantic analysis results; the multiple candidate prompt words are evaluated for effect to obtain prompt word evaluation results; the optimized prompt words are determined according to the prompt word evaluation results, and the optimized prompt words are displayed to the user. By generating prompt words that match user needs based on natural language processing technology, the number of times the user modifies and adjusts the output results is reduced, the user's need for professional knowledge when using a large language model is reduced, the usage threshold is lowered, and the output quality and user satisfaction of the large language model are improved. In addition, through user feedback and continuous learning mechanisms, it can adapt to the needs and preferences of different users, provide more personalized services, and enable the model to continuously learn and optimize according to actual usage, thereby achieving long-term technological progress and performance improvement. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of the first embodiment of the prompt word optimization method based on the large language model of the present invention;

[0036] Figure 2 A schematic diagram of a feedback process involved in the first embodiment of the prompt word optimization method based on a large language model of the present invention;

[0037] Figure 3 A schematic diagram of the interaction process involved in the first embodiment of the prompt word optimization method based on a large language model of the present invention;

[0038] Figure 4 It is a structural block diagram of the first embodiment of the prompt word optimization system based on the large language model of the present invention.

[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0040] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0041] The embodiment of the present invention provides a prompt word optimization method based on a large language model, referring to Figure 1 , Figure 1 It is a flowchart of the first embodiment of the prompt word optimization method based on the large language model of the present invention.

[0042] In this embodiment, the prompt word optimization method based on the large language model includes the following steps:

[0043] Step S10: Perform semantic analysis on the input content of the user through natural language processing technology to obtain a semantic analysis result, and generate multiple candidate prompt words according to the semantic analysis result;

[0044] Refer to Figure 2 , Figure 2 FIG. is a schematic diagram of the feedback process involved in the first embodiment of the prompt word optimization method based on the large language model of the present invention. Figure 2 In [the figure], first, the initial prompt word input by the user and the relevant context information are received. This information can be a short text description, a code snippet, a query statement, etc., providing a basis for the model to generate prompt words. Then, the pre-trained AI large model is used to deeply analyze the input content. The model is generated based on natural language processing technology and can identify the theme, intention, and key concepts of the input content to better understand the user's needs. Then, according to the analysis result, an algorithm is used to generate a set of candidate optimized prompt words. The algorithm can be generated based on statistical analysis, machine learning, or deep learning models to identify and generate the prompt words most relevant to the user's input content. Then, the generated candidate prompt words are evaluated for their effects to determine their potential effects. The evaluation can be completed through other evaluation criteria such as the quality of the model prediction output, the relevance score, and the user feedback. Further, according to the evaluation result, the optimal prompt word can be selected and recommended to the user. The recommendation system can be designed in the form of a list or as a sorted recommendation to help the user select the most appropriate prompt word. Finally, the user's final choice and satisfaction can be fed back to the AI large model for further training and optimization of the model generation algorithm to form a continuous learning and improvement closed loop.

[0045] In this embodiment, through natural language processing (NLP) technology, the input content of the user is sequentially subjected to text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, theme recognition, context understanding, and context adaptation to obtain a semantic analysis result, and multiple candidate prompt words are generated according to the semantic analysis result.

[0046] Among them, text preprocessing includes tokenization and stopword removal. Tokenization is used to decompose the text into words or sub-word units to establish basic language units. Stopword removal is used to remove common words that are irrelevant to understanding the theme and intention, such as "de" (of), "shi" (is), etc.

[0047] Entity recognition, namely named entity recognition (NER), is used to identify entities with specific meanings in text, such as names, places, time, etc. Part-of-Speech Tagging is used to mark the part of speech (noun, verb, etc.) of each word to help understand the structure and intention of the sentence.

[0048] Syntactic and semantic analysis includes dependency parsing and semantic role labeling. Dependency parsing is used to analyze the dependency relationship between words in a sentence to help understand the grammatical structure of the sentence. Semantic role labeling is used to determine the semantic role of each word in a sentence, such as subject, predicate, object, etc.

[0049] Topic identification is achieved through topic modeling, which is used to discover hidden topics in text collections through statistical methods and identify topics entered by users.

[0050] Contextual understanding and context adaptation include dialogue management and disambiguation. Dialogue management is used to manage the flow and context of the dialogue, ensuring that each round of dialogue can respond appropriately based on previous history. Disambiguation is used to indicate who or what is being referred to.

[0051] For example, suppose the user enters the question: "I'm looking for a family friendly vacation spot."

[0052] First, the input can be preprocessed. By word segmentation, the sentence is broken down into words and phrases. That is, "I" "want" "find" "a" "suitable" "family" "travel" "of" "vacation" "resort". Stop words are removed by stop word filtering, where "I", "a", "of", these words can be filtered when understanding the subject and intention.

[0053] Then, named entity recognition and part-of-speech tagging are used to identify entities and parts of speech in the sentence. Through entity recognition, "family" can be identified as an entity describing a family, and "resort" can be identified as an entity of a travel destination. Through part-of-speech tagging, "suitable" can be marked as a verb, indicating that the user needs to find a place suitable for a family trip, and "resort" and "resort" can be marked as nouns, indicating the user's travel needs.

[0054] Next, we use syntactic and semantic analysis to perform dependency syntactic analysis and semantic role labeling to understand the sentence structure and semantic roles. Dependency syntactic analysis is used to determine the subject-object relationship between "find" and "resort", that is, what to find? Find a resort. Semantic role labeling is used to label "family" as the target of the resort, that is, "resort" "suitable for family".

[0055] Furthermore, topic recognition may be used to capture the topic of the user input, and identify that the topic is "resort selection", which is the core requirement of the user input.

[0056] Finally, consider the context of the conversation and context adaptation. If this is the context of a conversation system, the system will understand the user's preferences and make better suggestions based on previous historical conversation records. Disambiguation is used to ensure that "family" is understood to refer to the context of family members traveling, not other meanings.

[0057] Thus, a set of candidate prompt words or suggestions closely related to user needs can be generated, such as prompt words: family vacation, family-friendly tourist destinations, family-friendly resorts, etc. Or, suggestions: provide some resorts with family activities and facilities, recommend seasons and activities suitable for family travel, etc. The generated candidate prompt words and suggestions can help further dialogue interaction or information retrieval to meet user needs.

[0058] Step S20: Evaluate the effects of multiple candidate prompt words to obtain prompt word evaluation results;

[0059] In this embodiment, the effects of multiple candidate prompt words can be evaluated according to multiple preset prompt word evaluation indicators to obtain a prompt word evaluation result, wherein the multiple preset prompt word evaluation indicators include but are not limited to relevance, coverage, amount of information, detail, user-friendliness, comprehensibility, context adaptability, and degree of personalization.

[0060] Among them, relevance is used to evaluate the degree to which the prompt word is directly related to the user's needs. For example, in the context of a user looking for a family vacation resort, the relevance check can confirm whether the prompt word covers keywords related to "family travel" and "resort", such as "family-friendly", "children's park", "family suite", etc.

[0061] Coverage is used to evaluate the breadth of the prompt word coverage, taking into account the preferences and needs of different users. It can be determined by analyzing and simulating different user inputs. For example, different types of resorts (seaside resorts, mountain resorts, theme park resorts, etc.) can be analyzed to ensure that the prompt words can adapt to the needs of various users.

[0062] Informativeness is used to assess whether the provided cue words provide enough information for users to understand its meaning and context. Simple keywords may not be enough to convey the complete meaning and require more detailed description or explanation. For example, "family-friendly resort" is more informative than "family-friendly" alone because it clearly points out the attributes of the resort.

[0063] Verbosity is used to assess whether the prompt word needs further description or context to ensure user understanding. The prompt word is not just a collection of keywords, but also includes relevant descriptions or context so that users can understand its application scenario and intention. For example, "activities suitable for children" can be supplemented with "children's playground" or "parent-child interaction project".

[0064] User-friendliness is used to assess how easy the prompt is to understand and use, avoiding content that is ambiguous or difficult to understand. For example, "family-friendly" is a widely known and easily understood term.

[0065] Comprehensibility is used to assess the degree to which the prompt words are easy to understand in terms of language and culture, and to avoid ambiguous or unclear content. For example, check whether the prompt words have multiple meanings or terms that may cause confusion, avoid overly professional terms or local expressions, etc.

[0066] Contextual adaptability is used to assess the extent to which the prompt words adapt to different conversational contexts and scenarios. For example, in the context of family vacation resorts, factors such as seasonality, geographic location, and age of family members need to be considered, and considerations such as winter ski resorts and summer seaside resorts need to be introduced.

[0067] The personalization level is used to evaluate the degree of personalization of the prompt words. The prompt words can be adjusted according to the user's historical conversation records or personal preferences to better meet personalized needs. For example, prompt words can be generated based on specific activities or facilities that the user mentioned as favorite.

[0068] In addition, a feedback mechanism can be set up to evaluate the effect and optimization space of prompt words through user feedback, dialogue simulation, etc. According to the feedback results and data analysis, the selection and combination of prompt words can be adjusted and optimized to provide results that better meet user expectations.

[0069] The above prompt word evaluation indicators can be used to effectively evaluate and optimize candidate prompt words to help understand user needs and thus improve the user's language interaction experience.

[0070] Step S30: determining an optimized prompt word according to the prompt word evaluation result, and displaying the optimized prompt word to the user.

[0071] In this embodiment, according to the prompt word evaluation result, multiple candidate prompt words can be sorted from high to low according to the score to obtain the prompt word sorting result, and then the optimized prompt word can be determined according to the prompt word sorting result, and the optimized prompt word can be displayed to the user. For example, the top three candidate prompt words with the highest score can be displayed, or the candidate prompt word with the highest score can be directly displayed, etc. The specific display method can be selected according to the user's needs.

[0072] In a specific implementation, the target prompt word selected by the user from the optimized prompt words can also be obtained, and the output content required by the user can be generated according to the target prompt word. The target prompt word selected by the user can be fed back to the large language model for continuous learning and optimization of the model, so that the model can adapt to the needs and preferences of different users, which is also conducive to improving the personalization of the large language model.

[0073] Reference Figure 3 , Figure 3 The diagram is a schematic diagram of the interaction process involved in the first embodiment of the prompt word optimization method based on a large language model of the present invention. Figure 3 In the process, based on the needs input by users in natural language, NLP technology is used to conduct in-depth semantic understanding and contextual analysis of the user's input content. For example, the ChatGPT 4o and Qianwen models are used to identify the topics and intentions in the input content, and to accurately extract key concepts. These analysis results can be used to generate a set of candidate prompt words that are closely related to user needs. Subsequently, the K-Means algorithm can be used to further screen and optimize these candidate prompt words according to the above prompt word evaluation indicators to ensure the accuracy and relevance of the prompt words. Next, the optimized prompt words are displayed to the user so that the user can choose the most appropriate prompt word by himself. Then, the prompt words selected by the user are recorded, and the user's feedback is used for continuous learning and optimization of the model to form a closed loop to ensure that the AI ​​large model can continue to evolve and better meet user needs. Finally, the prompt words selected by the user are used to guide the AI ​​model to generate the required output and complete the entire process.

[0074] Among them, when using the K-Means algorithm to score the prompt words according to multiple prompt word evaluation indicators, the data set of the prompt words can be collected first, and multiple prompt word evaluation indicators can be defined for each prompt word. Then, multiple evaluation indicators are extracted as feature vectors for each prompt word according to its characteristics, and the feature vectors are standardized to ensure that the values ​​of different indicators are within the same scale range to avoid the influence of certain evaluation indicators on the K-Means algorithm. Then, the standardized feature vectors are input into the K-Means algorithm for clustering. The K-Means algorithm clusters the prompt words into a pre-specified number of clusters, and analyzes the cluster centers obtained by each cluster. These cluster centers can be regarded as representatives or scores of each cluster, that is, the feature vector value of the cluster center is the score of the cluster on the corresponding evaluation indicator. Then, the feature vectors and their values ​​of each cluster are analyzed, and the feature patterns and scores represented by each cluster are explained to understand the differences and similarities of different clusters in the evaluation indicators. Finally, the scores of the cluster centers can be displayed through visualization tools (such as scatter plots, radar charts, etc.) to more intuitively understand the scoring patterns and trends of different prompt words. Through the above steps, the K-Means algorithm can be used to effectively score and cluster the prompt words according to multiple prompt word evaluation indicators, thereby revealing the distribution and differences of different prompt words in natural language related features.

[0075] Therefore, through in-depth semantic understanding and contextual analysis, the AI ​​big model can more accurately identify and understand the intentions and needs of user input, thereby generating more precise and relevant prompt words. Through user feedback and continuous learning mechanisms, the AI ​​big model can adapt to the needs and preferences of different users and provide more personalized services. On the other hand, the optimized prompt words will guide the big AI model to generate higher-quality text, content or code to reduce the number of times users modify and adjust the output results, reduce the user's need for professional knowledge when using the AI ​​big model, and lower the threshold for use. In addition, the closed-loop mechanism of user feedback enables the AI ​​big model to continuously learn and optimize according to actual usage, thereby achieving long-term technological progress and performance improvement.

[0076] In this embodiment, the user's input content is semantically analyzed by natural language processing technology to obtain semantic analysis results, and multiple candidate prompt words are generated according to the semantic analysis results; the effects of multiple candidate prompt words are evaluated to obtain prompt word evaluation results; the optimized prompt words are determined according to the prompt word evaluation results, and the optimized prompt words are displayed to the user. By generating prompt words that match user needs based on natural language processing technology, the number of times users modify and adjust the output results is reduced, the user's need for professional knowledge when using large language models is reduced, the usage threshold is lowered, and the output quality and user satisfaction of large language models are improved. In addition, through user feedback and continuous learning mechanisms, it can adapt to the needs and preferences of different users, provide more personalized services, and enable the model to continuously learn and optimize according to actual usage, thereby achieving long-term technological progress and performance improvement.

[0077] Reference Figure 4 , Figure 4 It is a structural block diagram of the first embodiment of the prompt word optimization system based on the large language model of the present invention.

[0078] like Figure 4 As shown, the prompt word optimization system based on the large language model proposed in the embodiment of the present invention includes:

[0079] The semantic analysis module 10 is used to perform semantic analysis on the user's input content through natural language processing technology to obtain a semantic analysis result, and generate a plurality of candidate prompt words according to the semantic analysis result;

[0080] A prompt word evaluation module 20 is used to evaluate the effects of multiple candidate prompt words to obtain prompt word evaluation results;

[0081] The prompt word optimization module 30 is used to determine the optimized prompt word according to the prompt word evaluation result, and display the optimized prompt word to the user.

[0082] Optionally, the semantic analysis module 10 is also used to perform text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, topic identification, context understanding and context adaptation on the user's input content in sequence through natural language processing technology to obtain semantic analysis results, and generate multiple candidate prompt words based on the semantic analysis results.

[0083] Optionally, the prompt word evaluation module 20 is further used to evaluate the effects of multiple candidate prompt words according to multiple preset prompt word evaluation indicators to obtain a prompt word evaluation result;

[0084] Multiple preset prompt word evaluation indicators include relevance, coverage, information content, detail, user-friendliness, comprehensibility, contextual adaptability, and personalization.

[0085] Optionally, the prompt word optimization module 30 is further used to sort the multiple candidate prompt words from high to low according to the scores according to the prompt word evaluation result to obtain a prompt word sorting result;

[0086] The prompt word optimization module is further used to determine the optimized prompt word according to the prompt word sorting result, and display the optimized prompt word to the user.

[0087] Optionally, the prompt word optimization module 30 is further configured to obtain a target prompt word selected by a user from the optimized prompt words, and generate output content required by the user according to the target prompt word.

[0088] In this embodiment, the user's input content is semantically analyzed by natural language processing technology to obtain semantic analysis results, and multiple candidate prompt words are generated according to the semantic analysis results; the effects of multiple candidate prompt words are evaluated to obtain prompt word evaluation results; the optimized prompt words are determined according to the prompt word evaluation results, and the optimized prompt words are displayed to the user. By generating prompt words that match user needs based on natural language processing technology, the number of times users modify and adjust the output results is reduced, the user's need for professional knowledge when using large language models is reduced, the usage threshold is lowered, and the output quality and user satisfaction of large language models are improved. In addition, through user feedback and continuous learning mechanisms, it can adapt to the needs and preferences of different users, provide more personalized services, and enable the model to continuously learn and optimize according to actual usage, thereby achieving long-term technological progress and performance improvement.

[0089] Other embodiments or specific implementations of the prompt word optimization system based on a large language model of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.

[0090] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0091] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0093] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A prompt word optimization method based on a large language model, characterized in that: The prompt word optimization method based on the large language model comprises the following steps: Performing semantic analysis on the user's input content through natural language processing technology to obtain a semantic analysis result, and generating a plurality of candidate prompt words according to the semantic analysis result; Performing effect evaluation on multiple candidate prompt words to obtain prompt word evaluation results; An optimized prompt word is determined according to the prompt word evaluation result, and the optimized prompt word is displayed to the user.

2. The method for optimizing prompt words based on a large language model according to claim 1, characterized in that: The step of performing semantic analysis on the user's input content by using natural language processing technology to obtain a semantic analysis result, and generating a plurality of candidate prompt words according to the semantic analysis result includes: The user's input content is subjected to text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, topic identification, context understanding and context adaptation in sequence through natural language processing technology to obtain a semantic analysis result, and a plurality of candidate prompt words are generated based on the semantic analysis result.

3. The method for optimizing prompt words based on a large language model according to claim 1, characterized in that: The step of evaluating the effects of multiple candidate prompt words to obtain prompt word evaluation results includes: Evaluate the effects of multiple candidate prompt words according to multiple preset prompt word evaluation indicators to obtain prompt word evaluation results; Multiple preset prompt word evaluation indicators include relevance, coverage, information content, detail, user-friendliness, comprehensibility, contextual adaptability, and personalization.

4. The method for optimizing prompt words based on a large language model according to claim 1, characterized in that: The step of determining the optimized prompt word according to the prompt word evaluation result and displaying the optimized prompt word to the user includes: According to the prompt word evaluation result, multiple candidate prompt words are sorted from high to low according to the scores to obtain a prompt word sorting result; An optimized prompt word is determined according to the prompt word sorting result, and the optimized prompt word is displayed to the user.

5. The method for optimizing prompt words based on a large language model according to any one of claims 1 to 4, characterized in that: After the step of determining the optimized prompt word according to the prompt word evaluation result and displaying the optimized prompt word to the user, the method further includes: A target prompt word selected by the user from the optimized prompt words is obtained, and output content required by the user is generated according to the target prompt word.

6. A prompt word optimization system based on a large language model, characterized in that: The prompt word optimization system based on the large language model includes: A semantic analysis module, used to perform semantic analysis on the user's input content through natural language processing technology to obtain a semantic analysis result, and generate a plurality of candidate prompt words according to the semantic analysis result; A prompt word evaluation module is used to evaluate the effects of multiple candidate prompt words to obtain prompt word evaluation results; The prompt word optimization module is used to determine the optimized prompt word according to the prompt word evaluation result, and display the optimized prompt word to the user.

7. The prompt word optimization system based on a large language model as claimed in claim 6, characterized in that: The semantic analysis module is also used to perform text preprocessing, entity recognition and part-of-speech tagging, syntactic and semantic analysis, topic identification, context understanding and context adaptation on the user's input content in sequence through natural language processing technology to obtain semantic analysis results, and generate multiple candidate prompt words based on the semantic analysis results.

8. The prompt word optimization system based on a large language model as claimed in claim 6, characterized in that: The prompt word evaluation module is further used to evaluate the effects of multiple candidate prompt words according to multiple preset prompt word evaluation indicators to obtain prompt word evaluation results; Multiple preset prompt word evaluation indicators include relevance, coverage, information content, detail, user-friendliness, comprehensibility, contextual adaptability, and personalization.

9. The prompt word optimization system based on a large language model as claimed in claim 6, characterized in that: The prompt word optimization module is further used to sort the multiple candidate prompt words from high to low according to the scores according to the prompt word evaluation result to obtain a prompt word sorting result; The prompt word optimization module is further used to determine the optimized prompt word according to the prompt word sorting result, and display the optimized prompt word to the user.

10. The prompt word optimization system based on a large language model according to any one of claims 6 to 9, characterized in that: The prompt word optimization module is further used to obtain a target prompt word selected by a user from the optimized prompt words, and generate output content required by the user according to the target prompt word.

Citation Information

Cited By

  • Reverse constraint knowledge graph automatic construction method based on adaptive feedback

    CN119250193A

  • A method for automatically constructing inverse constraint knowledge graph based on adaptive feedback

    CN119250193B

  • Teaching design generation, optimization and reflection method and system based on AI chain driving

    CN119886737A

  • Large model automatic prompt tuning method and device using gradient optimization and medium

    CN119962681A

  • Large model cue word automatic optimization method and device and electronic equipment

    CN120086360A