Recommended verbal skill generation method and device and electronic equipment
By obtaining historical conversation data for classification and using large language models to generate recommended speeches, and matching them with user characteristics, the problem of inability to adjust recommended speeches based on user characteristics in the existing technology is solved, and the effect of improving recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202411544804.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art cannot adjust the recommendation speech according to the user's characteristics when recommending products to customers, resulting in low recommendation accuracy and conversion rate.
By obtaining historical session data for classification, a large language model is used to generate corresponding recommendation speeches for each category identification, and matching them according to user characteristics to achieve accurate recommendations.
It improves the accuracy and conversion rate of recommendations, can accurately recommend based on user characteristics, and solves the problem that the recommendation speech cannot be adjusted according to user characteristics in the prior art.
Smart Images

Figure CN119475026A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular, to a method, device, computer-readable storage medium and electronic device for generating recommendation words. Background Art
[0002] Automatically generating customer recommendation scripts can save time and quickly generate a large amount of content, especially in scenarios that require large-scale personalized communication, such as email customer recommendations, social media promotion, etc.; and the generated scripts can help companies maintain the consistency of brand information and ensure that all communication content follows the same style and tone. By using data analysis and machine learning technology, the existing customer manager scripts can generate more personalized customer recommendation scripts to increase the interaction rate and conversion rate with potential customers. Customer recommendation scripts are the scripts used in the process of making personalized recommendations to customers.
[0003] At present, there are some methods for generating recommendation scripts based on artificial intelligence technology. These methods mainly use intelligent algorithms to match pre-generated script databases during conversations between users and recommenders to obtain corresponding recommendation scripts. However, this method cannot automatically adjust the corpus according to the chat situation, and the accuracy and conversion rate of recommendations are low. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device, computer-readable storage medium and electronic device for generating recommendation words, so as to at least solve the problem in the prior art that the recommendation words cannot be adjusted according to the characteristics of the user when recommending products to customers.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for generating recommendation words is provided, comprising: obtaining historical conversation data, classifying the historical conversation data, and obtaining multiple category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier represents a category corresponding to the content of the historical conversation data; obtaining a large language model, and using the large language model to generate recommendation words corresponding to each category identifier, wherein the large language model is obtained by training with multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation words are the words used by the recommender to recommend a product to the user; performing feature classification on the user according to the historical conversation data to obtain a feature category, matching the recommendation words corresponding to the feature category, and using the recommendation words to make recommendations to the user.
[0006] Optionally, the historical conversation data is classified to obtain multiple category identifiers, including: obtaining a classification language model, classifying the historical conversation data through the classification language model, and outputting the multiple category identifiers according to a prompt word template, wherein the classification language model is obtained by training multiple groups of historical conversation data and labels of corresponding category identifiers, and the prompt word template is a template of output rules and output formats of the category identifiers.
[0007] Optionally, after obtaining the historical session data, the method further includes: performing data cleansing on the historical session data to obtain the historical session data after data cleansing; obtaining data filtering rules, and using the data filtering rules to perform data filtering on the historical session data after data cleansing, wherein the data filtering rules include at least sensitive word filtering and repeated word filtering.
[0008] Optionally, after obtaining multiple category identifiers, the method also includes: storing the category identifiers in a target search system, wherein the target search system is a system for performing web page searches; searching the target search system for text information corresponding to the category identifiers, and converting the text information into an array in a predetermined format, wherein the predetermined format is the same format as the data format of the large language model.
[0009] Optionally, the user is feature classified according to the historical conversation data to obtain a feature category, including: parsing the historical conversation data using a mind map framework to obtain parsed information of the historical conversation data, and feature classifying the parsed information to obtain the feature category, wherein the parsed information is information characterizing the meaning of the historical conversation data, and the mind map framework is a graphical framework for representing the thinking logic of the large language model.
[0010] Optionally, matching the recommended words corresponding to the feature category includes: obtaining a one-to-one mapping relationship between the feature category and the recommended words; and matching the recommended words corresponding to the feature category according to the one-to-one mapping relationship.
[0011] Optionally, after using the recommendation words to recommend to the user, the method further includes: obtaining feedback information from the user, wherein the feedback information represents feedback from the user on the recommendation words; calculating a recommendation rate based on the feedback information, and optimizing the large language model based on the recommendation rate, wherein the recommendation rate represents the probability of obtaining positive feedback from the user by using the recommendation words.
[0012] According to another aspect of the present application, a device for generating recommendation words is provided, including: a classification unit, used to obtain historical conversation data, classify the historical conversation data, and obtain multiple category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier represents a category corresponding to the content of the historical conversation data; a generation unit, used to obtain a large language model, and use the large language model to generate recommendation words corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation words are the words used by the recommender to recommend products to the user; a recommendation unit, used to perform feature classification on the user according to the historical conversation data to obtain a feature category, match the recommendation words corresponding to the feature category, and use the recommendation words to make recommendations to the user.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for generating recommendation words.
[0014] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for generating a recommendation speech for executing any one of the above-described recommendation speech.
[0015] Apply the technical solution of the present application, obtain historical conversation data, classify the historical conversation data, and obtain multiple category identifiers, wherein the historical conversation data is the historical conversation between the recommender and the user, and the category identifier indicates the category corresponding to the content of the historical conversation data; obtain a large language model, and use the large language model to generate the recommendation speech corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of historical conversation data, and the recommendation speech is the speech used by the recommender to recommend products to users; classify the user's features according to the historical conversation data to obtain feature categories, match the recommendation speech corresponding to the feature categories, and use the recommendation speech to recommend to users. Compared with the prior art, when recommending products to customers, the recommendation speech cannot be adjusted according to the characteristics of the user. The present application generates the recommendation speech corresponding to each of the category identifiers through a large language model, and matches it according to the user characteristics, so that accurate recommendations can be made according to the user characteristics, and the recommendation rate of the recommendation can be improved. Therefore, it can solve the problem that the speech cannot be recommended according to the characteristics of the user in the prior art, and achieve the effect of improving the accuracy of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for generating a recommendation speech provided in an embodiment of the present application is shown;
[0018] Figure 2 A schematic diagram showing a flow chart of a method for generating a recommendation speech provided in an embodiment of the present application;
[0019] Figure 3 A flowchart of a specific method for generating recommendation words provided in an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram of the structure of a mind map framework provided by an embodiment of the present application is shown;
[0021] Figure 5 A flowchart of using a mind map framework to recommend speech techniques is shown in an embodiment of the present application;
[0022] Figure 6 A structural block diagram of a device for generating recommendation words provided in an embodiment of the present application is shown.
[0023] The above drawings include the following reference numerals:
[0024] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0029] GoT: Mind map, using large language models to solve complex problems. In GoT, an LLM thought is modeled as a vertex, and the dependencies between vertices are modeled as edges. Using GoT, any thoughts can be aggregated by constructing vertices with more than one input edge. Overall, the graph abstraction method used by GoT can seamlessly generalize CoT and ToT to more complex thinking patterns, and this process does not require updating the model.
[0030] LLM: Large Language Models, or LLM for short. These models are in the field of natural language processing (NLP) and are trained with large amounts of text data to model natural language text, understand, and generate language.
[0031] ToT: Tree of Thoughts, or ToT for short, is a framework that uses large language models to solve problems by breaking down problems, generating thinking steps, evaluating states, and using search algorithms to explore solutions. It mimics the human decision-making process and is versatile and modular, but is also limited by the capabilities of language models and search strategies.
[0032] As introduced in the background technology, in the prior art, the recommendation words cannot be adjusted according to the characteristics of the user when recommending products to the customer. In order to solve the problem that the recommendation words cannot be adjusted according to the characteristics of the user when recommending products to the customer, the embodiments of the present application provide a method, device, computer-readable storage medium and electronic device for generating recommendation words.
[0033] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0034] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal for generating a method for generating a recommendation speech in an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating the recommendation speech in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] In this embodiment, a method for generating recommendation words running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 2 FIG. 1 is a flow chart of a method for generating a recommendation speech according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0038] Step S201, acquiring historical conversation data, classifying the historical conversation data, and obtaining a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data;
[0039] Specifically, based on the historical conversation data of existing account managers talking with users, the historical conversation data is preprocessed, and a large language model is called to classify the historical conversation data, and each type of document is identified by a category.
[0040] Step S202, obtaining a large language model, and using the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user;
[0041] Specifically, the classified documents in the above steps are put into ElasticSearch (search system), and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier, and the batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0042] Step S203, classifying the features of the user according to the historical conversation data to obtain a feature category, matching the recommendation words corresponding to the feature category, and using the recommendation words to make recommendations to the user.
[0043] Specifically, to make personalized recommendations to users, this application adopts GoT (mind map), and the reasoning process of generating personalized recommendations is modeled as a directed graph G = (V, E), where V is a set of vertices, is a set of edges. G is directed, so edges are ordered pairs of vertices. A vertex contains an answer to the current question, whether it is the initial question, the intermediate question, or the final question. The specific form of this thinking depends on the use case; personalized speech generation is the process of scoring a series of generated speech according to a scoring standard. The directed edge (t_1, t_2) indicates that the way to construct thinking t_2 is to use t_1 as "direct input", that is, by explicitly instructing LLM (Large Language Models, LLM for short) to use t_1 to generate t_2.
[0044] GoT consists of a set of interactive modules: the Prompter module is used for LLM-based statement generation, the Parser parser is used to extract information from the LLM reply, the scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The Controller contains two other important components: the operation graph (GoO) and the graph reasoning state (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. Each node corresponds to a single idea generated by LLMs, and the edge represents the relationship between ideas. That is, the edge from idea a to b - or the directed edge (a, b) in the graph - simply tells us that idea b was generated using idea a as input. Similar to ToT prompts, the exact definition of an idea depends on the problem to be solved. Furthermore, each node represents a (possibly intermediate) solution to the problem, but we can use different types of nodes to represent different aspects of the reasoning process (e.g., planning vs. execution).
[0045] GOT is particularly suitable for tasks that can be naturally decomposed into smaller subtasks, and these subtasks can be solved separately and then merged into a final solution. It classifies users based on historical conversation data; labels historical conversations of excellent account managers into recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, it matches words and products based on user characteristics, and finally generates product words recommendations suitable for the user.
[0046] Through this embodiment, historical conversation data is obtained, and the historical conversation data is classified to obtain multiple category identifiers, wherein the historical conversation data is the historical conversation between the recommender and the user, and the category identifier indicates the category corresponding to the content of the historical conversation data; a large language model is obtained, and the large language model is used to generate the recommendation speech corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of historical conversation data, and the recommendation speech is the speech used by the recommender to recommend products to the user; the user is feature-classified according to the historical conversation data to obtain the feature category, the recommendation speech corresponding to the feature category is matched, and the recommendation speech is used to recommend to the user. Compared with the prior art, when recommending products to customers, the recommendation speech cannot be adjusted according to the characteristics of the user. In this application, the recommendation speech corresponding to each category identifier is generated by the large language model, and matched according to the user characteristics, so that accurate recommendations can be made according to the user characteristics, and the recommendation rate of the recommendation can be improved. Therefore, the problem that the speech recommendation cannot be made according to the characteristics of the user in the prior art can be solved, and the effect of improving the accuracy of the recommendation can be achieved.
[0047] In the specific implementation process, the above step S201 classifies the historical conversation data to obtain multiple category identifiers, which can be implemented by the following steps: Step S2011: Obtain a classification language model, classify the historical conversation data through the classification language model, and output multiple category identifiers according to a prompt word template, wherein the classification language model is obtained by training multiple groups of historical conversation data and corresponding category identifier labels, and the prompt word template is a template of the output rules and output format of the category identifier. The method uses the classification language model to classify through the above steps, so that classification can be performed accurately and conveniently, avoiding the problem of low efficiency and high error rate of manual labeling.
[0048] Specifically, this step can use prompt words based on the semantic understanding ability of the classification language model to classify the text and give a category identifier. The category identifier can be, for example, Spring Festival blessing words, birthday blessing words, financial product recommendation words, loan product recommendation words, etc. The prompt words can be, for example, please directly output [category identifier], [description], [classification result].
[0049] In some optional implementations, after the above step S201 acquires the historical session data, the method further comprises the following steps: step S204: performing data cleaning on the historical session data to obtain the cleaned historical session data; step S205: acquiring data filtering rules, and using the data filtering rules to perform data filtering on the cleaned historical session data, wherein the data filtering rules at least include sensitive word filtering and repeated word filtering. The method pre-processes the data through the above steps, so that the data can be uniformly processed into data that conforms to a predetermined format, which is convenient for subsequent model recognition and training.
[0050] Specifically, preprocessing involves data cleaning, removing sensitive words according to filtering rules, and recommending session archive data filtering rules. For example, the filtering rules mentioned in this solution include but are not limited to filtering repeated content, non-Chinese content, any content with a length of less than 5, content with too many emoticons or other symbols, content with customer sensitive information (telephone number, ID number, etc.), filtering content ending with full-width or half-width question mark, and title information cleaning.
[0051] In some other optional implementations, after obtaining multiple category identifiers in the above step S201, the method further includes the following steps: Step S206: storing the category identifiers in a target search system, wherein the target search system is a system for performing web page searches; Step S207: searching the target search system for text information corresponding to the category identifiers, and converting the text information into an array in a predetermined format, wherein the predetermined format is the same format as the data format of the large language model. The method performs text search and format conversion through the above steps, so that the searched speech text data can be format converted to facilitate subsequent model processing.
[0052] In the specific implementation process, the target search system can be ElasticSearch or other systems with search functions. The classified documents in the above steps are placed in the target search system, and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier. The batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0053] In some optional implementations, step S203 classifies the features of the user according to the historical conversation data to obtain feature categories, which can be achieved by the following steps: parsing the historical conversation data using a mind map framework to obtain parsed information of the historical conversation data, and classifying the parsed information to obtain the feature categories, wherein the parsed information is information that characterizes the meaning of the historical conversation data, and the mind map framework is a graphical framework for representing the thinking logic of the large language model. The method classifies the historical conversation data through the above steps, so that the features of the historical conversation data can be extracted, and then data matching the user features can be recommended to the user.
[0054] Specifically, the specific process of using mind maps for personalized recommendation tasks is as follows: Step 1: First, decompose the entire task into multiple subtasks, which can be divided into three subtasks: classify and analyze users and label them; label excellent speech templates; and recommend products to users based on excellent speech templates. Step 2: Use the mind map framework (GOT) to process each subtask separately. Classify user personality characteristics based on historical conversation data; label and classify historical conversation data of excellent account managers, and the feature categories can be recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, perform speech matching and product matching based on user feature categories, and finally generate product speech recommendations suitable for the user. Step 3: Integrate the above tasks to form the final solution.
[0055] In some optional implementations, the above step S203 of matching the recommended speech corresponding to the feature category can be implemented by the following steps: obtaining a one-to-one mapping relationship between the feature category and the recommended speech; and matching the recommended speech corresponding to the feature category according to the one-to-one mapping relationship. The method performs feature matching through the above steps to match and obtain recommended speech suitable for the user's features.
[0056] In the specific implementation process, the GOT framework is used in the above steps to classify user features and obtain feature categories. The feature matching can be performed based on the one-to-one mapping relationship between the pre-stored feature categories and the recommended words, or the user features extracted by the GOT framework can be matched with the features of historical session data to provide users with more appropriate recommended words.
[0057] In some optional implementations, after the recommendation words are used to recommend to the user in the above step S204, the method further includes the following steps: step S208: obtaining feedback information from the user, wherein the feedback information is a representation of the user's feedback on the recommendation words; step S209: calculating the recommendation rate according to the feedback information, and optimizing the large language model according to the recommendation rate, wherein the recommendation rate represents the probability of obtaining positive feedback from the user by using the recommendation words. The method performs feedback through the above steps, so that the model can be further optimized.
[0058] During the specific implementation process, user feedback information is collected and scoring indicators are introduced to calculate the recommendation rate. The recommendation rate can be expressed as recommendation conversion rate, customer retention rate, etc. The product recommendations made using the words generated by this process are tracked, as well as user purchases, etc., to reflect the rationality of the words and adjust the model.
[0059] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for generating recommendation words of the present application will be described in detail below in combination with specific embodiments.
[0060] This embodiment relates to a specific method for generating recommendation words, such as Figure 3 As shown, the following steps are included:
[0061] Step S1: Call the speech classification model to classify the existing excellent speech templates, and obtain a category identifier for each type of document;
[0062] Step S2: Put the document of the classification number into ElasticSearch to obtain the document index;
[0063] Step S3: retrieve the document slice in ElasticSearch according to the category identifier and convert it into a Json array;
[0064] Step S4: Call the large language model batch interface to generate speech sentences corresponding to the category identification.
[0065] Figure 4A structural diagram of the mind map framework is provided. The Prompter module is used for LLM-based statement generation, the Parser is used to extract information from the LLM reply, the Scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The controller contains two other important components: the Operation Graph (GoO) and the Graph Reasoning State (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. User is the user, and the Ranker selects the top ranking. Scoring&Validation means scoring, and then feedback is given to (Human or LLM).
[0066] Figure 5 A flowchart for recommending speech skills using a mind map framework is shown, including the following steps:
[0067] Step 1: The entire task is broken down into multiple subtasks, including classifying and analyzing users to label them, labeling excellent speech templates, and recommending products to users based on excellent speech templates;
[0068] Step 2: Use the GOT framework to process each subtask separately;
[0069] Step 3: Integrate the tasks to form the final solution.
[0070] The embodiment of the present application also provides a device for generating recommendation words. It should be noted that the device for generating recommendation words in the embodiment of the present application can be used to execute the device for generating recommendation words provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0071] The following is an introduction to the device for generating recommendation words provided in the embodiment of the present application.
[0072] Figure 6 Schematic diagram of a device for generating recommendation words according to an embodiment of the present application. Figure 6 As shown, the device comprises:
[0073] The classification unit 10 is used to obtain historical conversation data, classify the historical conversation data, and obtain multiple category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data;
[0074] Specifically, based on the historical conversation data of existing account managers talking with users, the historical conversation data is preprocessed, and a large language model is called to classify the historical conversation data, and each type of document is identified by a category.
[0075] A generating unit 20 is used to obtain a large language model, and use the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user;
[0076] Specifically, the classified documents in the above steps are put into ElasticSearch (search system), and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier, and the batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0077] The recommendation unit 30 is used to classify the features of the user according to the historical conversation data to obtain feature categories, match the recommendation words corresponding to the feature categories, and use the recommendation words to make recommendations to the user.
[0078] Specifically, to make personalized recommendations to users, this application adopts GoT (mind map), and the reasoning process of generating personalized recommendations is modeled as a directed graph G = (V, E), where V is a set of vertices, is a set of edges. G is directed, so edges are ordered pairs of vertices. A vertex contains an answer to the current question, whether it is the initial question, the intermediate question, or the final question. The specific form of this thinking depends on the use case; personalized speech generation is the process of scoring a series of generated speech according to a scoring standard. The directed edge (t_1, t_2) indicates that the way to construct thinking t_2 is to use t_1 as "direct input", that is, by explicitly instructing LLM (Large Language Models, LLM for short) to use t_1 to generate t_2.
[0079] GoT consists of a set of interactive modules: the Prompter module is used for LLM-based statement generation, the Parser parser is used to extract information from the LLM reply, the scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The Controller contains two other important components: the operation graph (GoO) and the graph reasoning state (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. Each node corresponds to a single idea generated by LLMs, and the edge represents the relationship between ideas. That is, the edge from idea a to b - or the directed edge (a, b) in the graph - simply tells us that idea b was generated using idea a as input. Similar to ToT prompts, the exact definition of an idea depends on the problem to be solved. Furthermore, each node represents a (possibly intermediate) solution to the problem, but we can use different types of nodes to represent different aspects of the reasoning process (e.g., planning vs. execution).
[0080] GOT is particularly suitable for tasks that can be naturally decomposed into smaller subtasks, and these subtasks can be solved separately and then merged into a final solution. It classifies users based on historical conversation data; labels historical conversations of excellent account managers into recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, it matches words and products based on user characteristics, and finally generates product words recommendations suitable for the user.
[0081] Through this embodiment, historical conversation data is obtained, and the historical conversation data is classified to obtain multiple category identifiers, wherein the historical conversation data is the historical conversation between the recommender and the user, and the category identifier indicates the category corresponding to the content of the historical conversation data; a large language model is obtained, and the large language model is used to generate the recommendation speech corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of historical conversation data, and the recommendation speech is the speech used by the recommender to recommend products to the user; the user is feature-classified according to the historical conversation data to obtain the feature category, the recommendation speech corresponding to the feature category is matched, and the recommendation speech is used to recommend to the user. Compared with the prior art, when recommending products to customers, the recommendation speech cannot be adjusted according to the characteristics of the user. In this application, the recommendation speech corresponding to each category identifier is generated by the large language model, and matched according to the user characteristics, so that accurate recommendations can be made according to the user characteristics, and the recommendation rate of the recommendation can be improved. Therefore, the problem that the speech recommendation cannot be made according to the characteristics of the user in the prior art can be solved, and the effect of improving the accuracy of the recommendation can be achieved.
[0082] In the specific implementation process, the classification unit includes an output module for obtaining a classification language model, classifying the historical conversation data through the classification language model, and outputting a plurality of the category identifiers according to the prompt word template, wherein the classification language model is obtained by training multiple groups of the historical conversation data and labels of the corresponding category identifiers, and the prompt word template is a template of the output rules and output format of the category identifier. The device performs classification through the classification language model through the above steps, so that classification can be performed accurately and conveniently, avoiding the problem of low efficiency and high error rate of manual labeling.
[0083] Specifically, this step can use prompt words based on the semantic understanding ability of the classification language model to classify the text and give a category identifier. The category identifier can be, for example, Spring Festival blessing words, birthday blessing words, financial product recommendation words, loan product recommendation words, etc. The prompt words can be, for example, please directly output [category identifier], [description], [classification result].
[0084] In some optional implementations, the device further includes a data cleaning unit and a filtering unit, wherein the data cleaning unit is used to clean the historical session data to obtain the cleaned historical session data; and the filtering unit is used to obtain data filtering rules and use the data filtering rules to filter the cleaned historical session data, wherein the data filtering rules at least include sensitive word filtering and repeated word filtering. The device pre-processes the data through the above steps, so that the data can be uniformly processed into data that conforms to a predetermined format, which is convenient for subsequent model recognition and training.
[0085] Specifically, preprocessing involves data cleaning, removing sensitive words according to filtering rules, and recommending session archive data filtering rules. For example, the filtering rules mentioned in this solution include but are not limited to filtering repeated content, non-Chinese content, any content with a length of less than 5, content with too many emoticons or other symbols, content with customer sensitive information (telephone number, ID number, etc.), filtering content ending with full-width or half-width question mark, and title information cleaning.
[0086] In some other optional implementations, the device further includes a storage unit and a conversion unit, the storage unit is used to store the category identifier in a target search system, wherein the target search system is a system for performing web page search; the conversion unit is used to search the target search system for text information corresponding to the category identifier, and convert the text information into an array in a predetermined format, wherein the predetermined format is the same format as the data format of the large language model. The device performs text search and format conversion through the above steps, so that the searched speech text data can be format converted to facilitate subsequent model processing.
[0087] In the specific implementation process, the target search system can be ElasticSearch or other systems with search functions. The classified documents in the above steps are placed in the target search system, and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier. The batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0088] In some optional implementations, the recommendation unit includes a classification module, which is used to parse the historical conversation data using a mind map framework to obtain parsed information of the historical conversation data, and to perform feature classification on the parsed information to obtain the feature category, wherein the parsed information is information characterizing the meaning of the historical conversation data, and the mind map framework is a graphical framework for representing the thinking logic of the large language model. The device classifies the historical conversation data through the above steps, so that the features of the historical conversation data can be extracted, and then data matching the user features can be recommended to the user.
[0089] Specifically, the specific process of using mind maps for personalized recommendation tasks is as follows: Step 1: First, decompose the entire task into multiple subtasks, which can be divided into three subtasks: classify and analyze users and label them; label excellent speech templates; and recommend products to users based on excellent speech templates. Step 2: Use the mind map framework (GOT) to process each subtask separately. Classify user personality characteristics based on historical conversation data; label and classify historical conversation data of excellent account managers, and the feature categories can be recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, perform speech matching and product matching based on user feature categories, and finally generate product speech recommendations suitable for the user. Step 3: Integrate the above tasks to form the final solution.
[0090] In some optional implementations, the recommendation unit further includes an acquisition module and a matching module, wherein the acquisition module is used to acquire a one-to-one mapping relationship between the feature category and the recommended speech; and the matching module is used to match the recommended speech corresponding to the feature category according to the one-to-one mapping relationship. The device performs feature matching through the above steps to match and obtain a recommended speech suitable for the user's features.
[0091] In the specific implementation process, the GOT framework is used in the above steps to classify user features and obtain feature categories. The feature matching can be performed based on the one-to-one mapping relationship between the pre-stored feature categories and the recommended words, or the user features extracted by the GOT framework can be matched with the features of historical session data to provide users with more appropriate recommended words.
[0092] In some optional implementations, the device further includes an acquisition unit and an optimization unit, the acquisition unit is used to acquire feedback information from the user, wherein the feedback information is a representation of the user's feedback on the recommended speech; the optimization unit is used to calculate a recommendation rate based on the feedback information, and optimize the large language model based on the recommendation rate, wherein the recommendation rate represents the probability of obtaining positive feedback from the user by using the recommended speech. The device performs feedback through the above steps, so that the model can be further optimized.
[0093] During the specific implementation process, user feedback information is collected and scoring indicators are introduced to calculate the recommendation rate. The recommendation rate can be expressed as recommendation conversion rate, customer retention rate, etc. The product recommendations made using the words generated by this process are tracked, as well as user purchases, etc., to reflect the rationality of the words and adjust the model.
[0094] The device for generating recommendation words includes a processor and a memory. The classification unit, generation unit, and recommendation unit are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0095] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to recommend words based on user characteristics.
[0096] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0097] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for generating the recommendation speech.
[0098] Specifically, the method for generating the recommendation script includes:
[0099] Step S201, acquiring historical conversation data, classifying the historical conversation data, and obtaining a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data;
[0100] Specifically, based on the historical conversation data of existing account managers talking with users, the historical conversation data is preprocessed, and a large language model is called to classify the historical conversation data, and each type of document is identified by a category.
[0101] Step S202, obtaining a large language model, and using the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user;
[0102] Specifically, the classified documents in the above steps are put into ElasticSearch (search system), and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier, and the batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0103] Step S203, classifying the features of the user according to the historical conversation data to obtain a feature category, matching the recommendation words corresponding to the feature category, and using the recommendation words to make recommendations to the user.
[0104] Specifically, to make personalized recommendations to users, this application adopts GoT (mind map), and the reasoning process of generating personalized recommendations is modeled as a directed graph G = (V, E), where V is a set of vertices, is a set of edges. G is directed, so edges are ordered pairs of vertices. A vertex contains an answer to the current question, whether it is the initial question, the intermediate question, or the final question. The specific form of this thinking depends on the use case; personalized speech generation is the process of scoring a series of generated speech according to a scoring standard. The directed edge (t_1, t_2) indicates that the way to construct thinking t_2 is to use t_1 as "direct input", that is, by explicitly instructing LLM (Large Language Models, LLM for short) to use t_1 to generate t_2.
[0105] GoT consists of a set of interactive modules: the Prompter module is used for LLM-based statement generation, the Parser parser is used to extract information from the LLM reply, the scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The Controller contains two other important components: the operation graph (GoO) and the graph reasoning state (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. Each node corresponds to a single idea generated by LLMs, and the edge represents the relationship between ideas. That is, the edge from idea a to b - or the directed edge (a, b) in the graph - simply tells us that idea b was generated using idea a as input. Similar to ToT prompts, the exact definition of an idea depends on the problem to be solved. Furthermore, each node represents a (possibly intermediate) solution to the problem, but we can use different types of nodes to represent different aspects of the reasoning process (e.g., planning vs. execution).
[0106] GOT is particularly suitable for tasks that can be naturally decomposed into smaller subtasks, and these subtasks can be solved separately and then merged into a final solution. It classifies users based on historical conversation data; labels historical conversations of excellent account managers into recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, it matches words and products based on user characteristics, and finally generates product words recommendations suitable for the user.
[0107] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, at least the following steps are implemented:
[0108] Step S201, acquiring historical conversation data, classifying the historical conversation data, and obtaining a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data;
[0109] Specifically, based on the historical conversation data of existing account managers talking with users, the historical conversation data is preprocessed, and a large language model is called to classify the historical conversation data, and each type of document is identified by a category.
[0110] Step S202, obtaining a large language model, and using the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user;
[0111] Specifically, the classified documents in the above steps are put into ElasticSearch (search system), and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier, and the batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0112] Step S203, classifying the features of the user according to the historical conversation data to obtain a feature category, matching the recommendation words corresponding to the feature category, and using the recommendation words to make recommendations to the user.
[0113] Specifically, to make personalized recommendations to users, this application adopts GoT (mind map), and the reasoning process of generating personalized recommendations is modeled as a directed graph G = (V, E), where V is a set of vertices, is a set of edges. G is directed, so edges are ordered pairs of vertices. A vertex contains an answer to the current question, whether it is the initial question, the intermediate question, or the final question. The specific form of this thinking depends on the use case; personalized speech generation is the process of scoring a series of generated speech according to a scoring standard. The directed edge (t_1, t_2) indicates that the way to construct thinking t_2 is to use t_1 as "direct input", that is, by explicitly instructing LLM (Large Language Models, LLM for short) to use t_1 to generate t_2.
[0114] GoT consists of a set of interactive modules: the Prompter module is used for LLM-based statement generation, the Parser parser is used to extract information from the LLM reply, the scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The Controller contains two other important components: the operation graph (GoO) and the graph reasoning state (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. Each node corresponds to a single idea generated by LLMs, and the edge represents the relationship between ideas. That is, the edge from idea a to b - or the directed edge (a, b) in the graph - simply tells us that idea b was generated using idea a as input. Similar to ToT prompts, the exact definition of an idea depends on the problem to be solved. Furthermore, each node represents a (possibly intermediate) solution to the problem, but we can use different types of nodes to represent different aspects of the reasoning process (e.g., planning vs. execution).
[0115] GOT is particularly suitable for tasks that can be naturally decomposed into smaller subtasks, and these subtasks can be solved separately and then merged into a final solution. It classifies users based on historical conversation data; labels historical conversations of excellent account managers into recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, it matches words and products based on user characteristics, and finally generates product words recommendations suitable for the user.
[0116] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0117] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in each embodiment of the present application:
[0118] Step S201, acquiring historical conversation data, classifying the historical conversation data, and obtaining a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data;
[0119] Specifically, based on the historical conversation data of existing account managers talking with users, the historical conversation data is preprocessed, and a large language model is called to classify the historical conversation data, and each type of document is identified by a category.
[0120] Step S202, obtaining a large language model, and using the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user;
[0121] Specifically, the classified documents in the above steps are put into ElasticSearch (search system), and the document slices of the corresponding words are retrieved in ElasticSearch according to the category identifier, and the batch interface of the large language model is called to generate the recommended words corresponding to the category identifier, which are generally sentences.
[0122] Step S203, classifying the features of the user according to the historical conversation data to obtain a feature category, matching the recommendation words corresponding to the feature category, and using the recommendation words to make recommendations to the user.
[0123] Specifically, to make personalized recommendations to users, this application adopts GoT (mind map), and the reasoning process of generating personalized recommendations is modeled as a directed graph G = (V, E), where V is a set of vertices, is a set of edges. G is directed, so edges are ordered pairs of vertices. A vertex contains an answer to the current question, whether it is the initial question, the intermediate question, or the final question. The specific form of this thinking depends on the use case; personalized speech generation is the process of scoring a series of generated speech according to a scoring standard. The directed edge (t_1, t_2) indicates that the way to construct thinking t_2 is to use t_1 as "direct input", that is, by explicitly instructing LLM (Large Language Models, LLM for short) to use t_1 to generate t_2.
[0124] GoT consists of a set of interactive modules: the Prompter module is used for LLM-based statement generation, the Parser parser is used to extract information from the LLM reply, the scoring module is used to verify the LLM reply and score the generated text, and the Controller module is responsible for controlling the entire reasoning process and deciding how to advance the reasoning. The Controller contains two other important components: the operation graph (GoO) and the graph reasoning state (GRS). GoO is a static structure that specifies the graph decomposition of a given task, that is, it specifies the transformations applied to LLM thinking and their order and dependencies. GRS is a dynamic structure that maintains the state of the ongoing LLM reasoning process. Each node corresponds to a single idea generated by LLMs, and the edge represents the relationship between ideas. That is, the edge from idea a to b - or the directed edge (a, b) in the graph - simply tells us that idea b was generated using idea a as input. Similar to ToT prompts, the exact definition of an idea depends on the problem to be solved. Furthermore, each node represents a (possibly intermediate) solution to the problem, but we can use different types of nodes to represent different aspects of the reasoning process (e.g., planning vs. execution).
[0125] GOT is particularly suitable for tasks that can be naturally decomposed into smaller subtasks, and these subtasks can be solved separately and then merged into a final solution. It classifies users based on historical conversation data; labels historical conversations of excellent account managers into recommendation categories, customer relationship maintenance categories, etc.; for product recommendation tasks, it matches words and products based on user characteristics, and finally generates product words recommendations suitable for the user.
[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0132] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0133] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0135] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0136] 1) In the method for generating the recommendation speech of the present application, historical conversation data is obtained, the historical conversation data is classified, and multiple category identifiers are obtained, wherein the historical conversation data is the historical conversation between the recommender and the user, and the category identifier indicates the category corresponding to the content of the historical conversation data; a large language model is obtained, and the large language model is used to generate the recommendation speech corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of historical conversation data, and the recommendation speech is the speech used by the recommender to recommend products to the user; the user is feature-classified according to the historical conversation data to obtain the feature category, the recommendation speech corresponding to the feature category is matched, and the recommendation speech is used to recommend to the user. Compared with the prior art, when recommending products to customers, the recommendation speech cannot be adjusted according to the characteristics of the user, the present application generates the recommendation speech corresponding to each category identifier through a large language model, and matches it according to the user characteristics, so that accurate recommendations can be made according to the user characteristics, and the recommendation rate of the recommendation can be improved. Therefore, the problem that the speech recommendation cannot be made according to the characteristics of the user in the prior art can be solved, and the effect of improving the accuracy of the recommendation can be achieved.
[0137] 2) In the device for generating the recommendation speech of the present application, historical conversation data is obtained, the historical conversation data is classified, and multiple category identifiers are obtained, wherein the historical conversation data is the historical conversation between the recommender and the user, and the category identifier indicates the category corresponding to the content of the historical conversation data; a large language model is obtained, and the large language model is used to generate the recommendation speech corresponding to each category identifier, wherein the large language model is obtained by training multiple groups of historical conversation data, and the recommendation speech is the speech used by the recommender to recommend products to the user; the user is feature-classified according to the historical conversation data to obtain the feature category, the recommendation speech corresponding to the feature category is matched, and the recommendation speech is used to recommend to the user. Compared with the prior art, when recommending products to customers, the recommendation speech cannot be adjusted according to the characteristics of the user, the present application generates the recommendation speech corresponding to each category identifier through a large language model, and matches it according to the user characteristics, so that accurate recommendations can be made according to the user characteristics, and the recommendation rate of the recommendation can be improved. Therefore, the problem that the speech recommendation cannot be made according to the characteristics of the user in the prior art can be solved, and the effect of improving the accuracy of the recommendation can be achieved.
[0138] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a recommendation script, characterized in that: include: Acquire historical conversation data, classify the historical conversation data, and obtain a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data; Obtaining a large language model, and using the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user; The user is feature classified according to the historical conversation data to obtain a feature category, the recommendation words corresponding to the feature category are matched, and the recommendation words are used to make recommendations to the user.
2. The method for generating recommendation words according to claim 1, characterized in that: The historical session data is classified to obtain multiple category identifiers, including: Obtain a classification language model, classify the historical conversation data through the classification language model, and output a plurality of the category identifiers according to a prompt word template, wherein the classification language model is obtained by training with labels of a plurality of groups of the historical conversation data and corresponding category identifiers, and the prompt word template is a template of the output rules and output format of the category identifiers.
3. The method for generating recommendation words according to claim 1, characterized in that: After acquiring the historical session data, the method further includes: Performing data cleaning on the historical session data to obtain the historical session data after data cleaning; A data filtering rule is obtained, and the data filtering rule is used to filter the historical session data after data cleaning, wherein the data filtering rule at least includes sensitive word filtering and repeated word filtering.
4. The method for generating recommendation words according to claim 1, characterized in that: After obtaining the multiple category identifiers, the method further includes: storing the category identifier in a target search system, wherein the target search system is a system for performing web page search; The target search system is searched for text information corresponding to the category identifier, and the text information is converted into an array in a predetermined format, wherein the predetermined format is the same as the data format of the large language model.
5. The method for generating recommendation words according to claim 1, characterized in that: The user is characterized according to the historical session data to obtain characteristic categories, including: The historical conversation data is parsed using a mind map framework to obtain parsed information of the historical conversation data, and the parsed information is feature classified to obtain the feature category, wherein the parsed information is information characterizing the meaning of the historical conversation data, and the mind map framework is a graphical framework for representing the thinking logic of the large language model.
6. The method for generating recommendation words according to claim 1, characterized in that: The recommendation words corresponding to the feature category are matched, including: Obtaining a one-to-one mapping relationship between the feature category and the recommended speech; The recommended words corresponding to the feature categories are matched according to the one-to-one mapping relationship.
7. The method for generating recommendation words according to claim 1, characterized in that: After recommending to the user using the recommendation words, the method further includes: Acquiring feedback information from the user, wherein the feedback information is information representing feedback from the user on the recommended speech; A recommendation rate is calculated according to the feedback information, and the large language model is optimized according to the recommendation rate, wherein the recommendation rate represents the probability of obtaining positive feedback from the user by using the recommendation words.
8. A device for generating recommendation words, characterized in that: include: a classification unit, configured to obtain historical conversation data, classify the historical conversation data, and obtain a plurality of category identifiers, wherein the historical conversation data is a historical conversation between a recommender and a user, and the category identifier indicates a category corresponding to the content of the historical conversation data; a generating unit, configured to obtain a large language model, and use the large language model to generate a recommendation speech corresponding to each of the category identifiers, wherein the large language model is obtained by training multiple groups of the category identifiers and corresponding historical conversation data, and the recommendation speech is the speech used by the recommender to recommend the product to the user; The recommendation unit is used to classify the features of the user according to the historical conversation data to obtain feature categories, match the recommendation words corresponding to the feature categories, and use the recommendation words to recommend to the user.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for generating recommendation words as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for generating a recommendation script as described in any one of claims 1 to 7.
Citation Information
Cited By
Intelligent recommendation method for welcome language and first-time contact verbal skill, medium and electronic equipment
CN120744100A
Welcome speech and first contact script intelligent recommendation method, medium and electronic device
CN120744100B