Training method for recommendation question generation model, recommendation question generation method and device
By screening the recommended questions clicked by users as positive samples and constructing negative samples to train the generation model, the problem that the recommendation question generation model has difficulty understanding user intentions is solved, and higher quality recommendation question generation is achieved.
Patent Information
- Application Number
- CN202411776705.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the existing technology, it is difficult for recommendation question generation models to accurately understand user intentions and preferences when generating recommendation questions, resulting in low quality of generated recommendation questions.
By screening the recommended questions clicked by users as positive samples, constructing sample data, training the initial generation model, using the large language model to generate negative samples, and optimizing the model to improve the accuracy of recommended questions.
The accuracy and quality of the recommendation question generation model are improved, making the generated recommendation questions more in line with user preferences and improving user experience.
Smart Images

Figure CN119719284B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of deep learning, large language models, and intelligent dialogue technology, and specifically to a training method for a recommendation question generation model, a method for generating recommendation questions, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0003] Human-computer interaction (HCI) is a way for humans to interact with machines using natural language. With the continuous development of artificial intelligence (AI), machines have become able to understand human input, comprehend its underlying meaning, and provide appropriate feedback. Accurate semantic understanding, prompt feedback, and the provision of appropriate opinions or suggestions all play a crucial role in ensuring smooth HCI.
[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any approach described in this section is prior art simply by virtue of its inclusion in this section. Similarly, unless otherwise indicated, the issues raised in this section should not be considered as having been recognized in any prior art. Summary of the Invention
[0005] The present disclosure provides a training method for a recommendation question generation model, a method for generating a recommendation question, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, a training method for a recommendation question generation model is provided, including: obtaining a first recommendation question, the first recommendation question being a recommendation question clicked by a user among multiple historical recommendation questions, the multiple historical recommendation questions being generated by an initial generation model based on a first user input and a first reply generated by a large language model; in response to a judgment that the first recommendation question meets a first screening condition, determining the first recommendation question as a positive sample recommendation question, wherein the first screening condition includes that the semantic similarity between the first recommendation question and the first user input is less than a first threshold; based on the positive sample recommendation question, obtaining at least one sample data, each sample data in the at least one sample data including the first user input, the first reply, a positive sample recommendation question and a negative sample recommendation question, the at least one sample data including the first sample data, the negative sample recommendation question in the first sample data being a recommendation question not clicked by the user among the multiple historical recommendation questions; and training the initial generation model based on the at least one sample data to obtain a recommendation question generation model.
[0007] According to another aspect of the present disclosure, a method for generating a recommendation question is provided, including: obtaining user input information and reply information generated by a large language model based on the user input information; and processing the user input information and reply information using a recommendation question generation model to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the training method of the recommendation question generation model of the present disclosure.
[0008] According to another aspect of the present disclosure, a training device for a recommendation question generation model is provided, including: a first acquisition unit, configured to acquire a first recommendation question, the first recommendation question being a recommendation question clicked by a user among multiple historical recommendation questions, the multiple historical recommendation questions being generated by an initial generation model based on a first user input and a first reply generated by a large language model; a determination unit, configured to determine the first recommendation question as a positive sample recommendation question in response to a judgment that the first recommendation question meets a first filtering condition, wherein the first filtering condition includes that the semantic similarity between the first recommendation question and the first user input is less than a first threshold; a second acquisition unit, configured to acquire at least one sample data based on the positive sample recommendation question, each sample data in the at least one sample data including the first user input, the first reply, a positive sample recommendation question and a negative sample recommendation question, the at least one sample data including the first sample data, the negative sample recommendation question in the first sample data being a recommendation question not clicked by the user among the multiple historical recommendation questions; and a training unit, configured to train the initial generation model based on the at least one sample data to obtain a recommendation question generation model.
[0009] According to another aspect of the present disclosure, a device for generating recommendation questions is provided, including: a first acquisition unit, configured to acquire user input information and reply information generated by a large language model based on the user input information; and a second acquisition unit, configured to process the user input information and reply information using a recommendation question generation model to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the training method of the recommendation question generation model of the present disclosure.
[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the training method of the recommendation question generation model or the recommendation question generation method of the present disclosure.
[0011] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the training method of the recommendation question generation model or the recommendation question generation method of the present disclosure.
[0012] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for training a recommendation question generation model or the method for generating a recommendation question of the present disclosure.
[0013] According to one or more embodiments of the present disclosure, the accuracy of the generated recommendation questions can be improved.
[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0016] Figure 1 A schematic diagram illustrating an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0017] Figure 2 A flowchart of a method for training a recommendation question generation model according to an embodiment of the present disclosure is shown;
[0018] Figure 3 A flowchart of obtaining sample data according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 4 A flowchart of a method for generating recommendation questions according to an embodiment of the present disclosure is shown;
[0020] Figure 5 A structural block diagram of a training device for a recommendation question generation model according to an embodiment of the present disclosure is shown;
[0021] Figure 6 A structural block diagram of a device for generating recommendation questions according to an embodiment of the present disclosure is shown;
[0022] Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] In this disclosure, unless otherwise specified, the use of terms such as "first" and "second" to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements. Such terms are only used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of the element, while in some cases, based on the context of the description, they may also refer to different instances.
[0025] The terms used in the descriptions of the various examples described in this disclosure are for the purpose of describing specific examples only and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element may be one or more. In addition, the term "and / or" used in this disclosure encompasses any one and all possible combinations of the listed items.
[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0027] Figure 1 FIG2 is a schematic diagram of an exemplary system 100 in which the various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 can be configured to execute one or more applications.
[0028] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the training method of the recommendation question generation model or the generation method of the recommendation question of the present disclosure to be executed.
[0029] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0030] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may, in turn, utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0031] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to obtain historical recommended questions and related conversation data. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure can support any number of client devices.
[0032] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing a variety of different applications, such as various internet-related applications, communication applications (such as email applications), and short message service (SMS) applications, and may use various communication protocols.
[0033] The network 110 may be any type of network known to those skilled in the art that can support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0034] Server 120 may include one or more general-purpose computers, specialized server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0035] The computing units in the server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
[0036] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0037] In some embodiments, server 120 may be a distributed system server or a server integrated with blockchain. Server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host equipped with artificial intelligence technology. A cloud server is a host product within the cloud computing service system that addresses the management difficulties and poor scalability of traditional physical hosts and virtual private servers (VPS) services.
[0038] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in a variety of locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0039] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0040] Figure 1The system 100 may be configured and operated in various ways to enable application of the various methods and apparatuses described in accordance with the present disclosure.
[0041] According to the embodiments of the present disclosure, Figure 2 As shown, a training method for a recommendation question generation model is provided, the method comprising: step S201, obtaining a first recommendation question, the first recommendation question being a recommendation question clicked by a user among multiple historical recommendation questions, the multiple historical recommendation questions being generated by an initial generation model based on a first user input and a first reply generated by a large language model; step S202, in response to determining that the first recommendation question meets a first screening condition, determining the first recommendation question as a positive sample recommendation question, wherein the first screening condition comprises that the semantic similarity between the first recommendation question and the first user input is less than a first threshold; step S203, based on the positive sample recommendation question, obtaining at least one sample data, each sample data in the at least one sample data comprising a first user input, a first reply, a positive sample recommendation question and a negative sample recommendation question, the at least one sample data comprising the first sample data, the negative sample recommendation question in the first sample data being a recommendation question not clicked by the user among multiple historical recommendation questions; and step S204, training the initial generation model based on the at least one sample data to obtain a recommendation question generation model.
[0042] Therefore, by further screening the recommended questions that the user has clicked on in the past, the recommended questions with high semantic similarity to the corresponding first user input are screened out, and the recommended questions obtained by the screening are used as positive sample recommendation questions. Sample data is constructed based on the positive sample recommendation questions to train the model, so that the model can learn user preferences while further improving the accuracy of the recommendation questions generated by the model.
[0043] In intelligent conversation scenarios, the large language model generates responses based on user input. Simultaneously, the initial generation model can be applied to generate multiple recommended questions based on the input and responses to guide the user in asking further questions. Users can click on a recommended question, and the large language model will generate further responses for that recommended question.
[0044] In some embodiments, the above-mentioned initial generation model can be a model that has undergone preliminary training for generating recommendation questions, wherein the above-mentioned preliminary training can be supervised training using sample data, and the sample data used for preliminary training may include sample input information, sample response information, and sample recommendation questions.
[0045] In some embodiments, the above-mentioned initial generation model can be constructed based on a Transformer network.
[0046] In some exemplary embodiments, the initial generative model may be constructed based on a Decoder network in a Transformer network. In some examples, the initial generative model may be a causal language model.
[0047] In some embodiments, user input information and generated reply information, multiple recommended questions, and user clicks on recommended questions in multiple rounds of historical conversations can be stored in a historical conversation database, and the recommended questions that the user has clicked on in the past (i.e., the first recommended question) and the corresponding user input information and reply information (i.e., the first user input and the first reply) of the recommended question as well as other historical recommended questions corresponding to the round of conversation can be obtained therefrom.
[0048] After obtaining the first recommended question, it can be first determined whether the first recommended question and the first user input are semantically repetitive. In some embodiments, semantic features can be extracted for the first recommended question and the first user input respectively, the semantic similarity between the two semantic features can be calculated, and it can be determined whether the semantic similarity is less than a first threshold. If the semantic similarity is greater than or equal to the first threshold, it is considered that the first recommended question and the first user input are semantically repetitive, that is, they do not meet the first screening condition. If the semantic similarity is less than the first threshold, it is considered that the first recommended question and the first user input are semantically non-repetitive, that is, they meet the first screening condition.
[0049] In some embodiments, the above-mentioned semantic similarity determination can also be implemented based on a large language model. In some examples, the first recommended question and the first user input can be input into the large language model along with a judgment prompt text. Under the guidance of the judgment prompt text, the large language model analyzes the semantic similarity between the first recommended question and the first user input and outputs a judgment result on whether the first recommended question and the first user input are semantically redundant. The judgment prompt text can be, for example, "You are a linguistics expert. Please determine whether the semantics of the following two sentences are redundant: <Sentence 1>, <Sentence 2>".
[0050] In some embodiments, a first recommendation question that does not meet the first screening condition (ie, a recommendation question that has semantic overlap with the first user input) may be determined as a low-quality recommendation question and discarded.
[0051] In some embodiments, the first recommendation question that meets the first screening condition may be determined as a positive sample recommendation question for generating sample data.
[0052] In some embodiments, after obtaining a positive sample recommendation question, other historical recommended questions that were displayed in the conversation corresponding to the recommended question but not clicked by the user can be used as negative sample recommendation questions, and together with the first user input and the first reply, they can form a sample data (i.e., first sample data). It is understandable that multiple similar sample data can be constructed based on multiple historical recommended questions that were not clicked by users.
[0053] In some embodiments, applying each of the above sample data to train the initial generation model can be to input the first user input and the first reply into the initial generation model, so that the initial generation model analyzes the first user input and the first reply, and outputs one or more predicted recommendation questions; then, based on the difference between the predicted recommendation question and the positive sample recommendation question, and the difference between the predicted recommendation question and the negative sample recommendation question, calculate the loss function, update the parameters of the initial generation model based on the loss function, and perform the next round of training on the updated initial generation model until the model converges to obtain a recommendation question generation model.
[0054] In some embodiments, the above loss function may be a contrast loss function.
[0055] Therefore, by further screening the recommended questions that the user has clicked on in the past, the low-quality recommended questions with high semantic similarity to the corresponding first user input are screened out, and the high-quality recommended questions obtained by screening are used as positive sample recommendation questions. Based on the positive sample recommendation questions, sample data containing positive and negative sample pairs is constructed to train the model, so that the model can learn user preferences while enabling the model to generate recommendation questions with higher accuracy and quality.
[0056] In some embodiments, the at least one sample data may further include second sample data, and the semantic similarity between the negative sample recommendation question in the second sample data and the first user input is not less than a second threshold.
[0057] In some embodiments, based on the first user input, one or more recommendation questions that are semantically duplicated with the first user input can be generated as negative sample recommendation questions, and together with the positive sample recommendation question, the first user input, and the first reply, they form a piece of sample data (i.e., second sample data). It is understood that multiple pieces of sample data can be constructed based on multiple generated negative sample recommendation questions and the positive sample recommendation questions.
[0058] In some embodiments, the above-mentioned recommendation questions that are semantically repeated with the first user input can be constructed by a large language model. In some examples, the first user input and the prompt text for constructing the recommendation questions can be input into the large language model, so that the large language model, under the guidance of the prompt text, generates one or more recommendation questions that are semantically repeated with the first user input based on the first user input. The above-mentioned prompt text can be, for example, "You are a linguistics expert, please output a question that is semantically identical to <statement 1>" or "You are a linguistics expert, please output a question that has a semantic similarity with <statement 1> that is not less than <second threshold>".
[0059] Therefore, by further constructing a low-quality recommendation question with similar semantics to the first user input as a negative sample recommendation question, constructing sample data containing positive and negative sample pairs, and training the model with the above sample data, the model can be further enabled to generate higher-quality recommendation questions that are more in line with user preferences while avoiding the generation of low-quality recommendation questions as much as possible.
[0060] In some embodiments, the first screening condition may further include that the semantic similarity between the first recommended question and the first reply is less than a third threshold.
[0061] In some embodiments, the first screening condition may include that the semantic similarity between the first recommended question and the first user input is less than a first threshold, and that the semantic similarity between the first recommended question and the first reply is less than a third threshold. The method for determining the semantic similarity between the first recommended question and the first reply is similar to the method for determining the semantic similarity between the first recommended question and the first user input described above and is not further described here.
[0062] Therefore, through the semantic similarity between the first recommended question and the first reply, low-quality recommended questions that are semantically repeated with the first reply can be further screened out, and the quality of positive sample recommended questions can be further improved, thereby further improving the accuracy and quality of the recommended questions generated by the model.
[0063] In some embodiments, the at least one sample data may further include third sample data, and the semantic similarity between the negative sample recommendation question in the third sample data and the first reply is not less than a fourth threshold.
[0064] In some embodiments, one or more recommendation questions that are semantically duplicated with the first reply may be further generated based on the first reply as negative sample recommendation questions, and together with the positive sample recommendation question, the first user input, and the first reply, constitute a piece of sample data (i.e., third sample data). It is understandable that multiple pieces of sample data may be constructed based on multiple generated negative sample recommendation questions and the positive sample recommendation questions.
[0065] In some embodiments, the recommended questions that are semantically repeated with the first reply can be constructed by a large language model. In some examples, the first reply and the prompt text for constructing the recommended questions can be input into the large language model, so that the large language model, under the guidance of the prompt text, generates one or more recommended questions that are semantically repeated with the first reply based on the first reply. The prompt text can be, for example, "You are a linguistics expert, please output a question that is semantically identical to <statement 2>" or "You are a linguistics expert, please output a question whose semantic similarity to <statement 2> is not less than <fourth threshold>".
[0066] Therefore, by further constructing a low-quality recommendation question with similar semantics to the first reply as a negative sample recommendation question, constructing sample data containing positive and negative sample pairs, and training the model with the above sample data, the model can be further enabled to generate higher-quality recommendation questions that are more in line with user preferences while avoiding the generation of low-quality recommendation questions as much as possible.
[0067] In some embodiments, the first filtering condition may further include that the similarity between the conversation intention of the first recommended question and the conversation intention input by the first user is greater than a fifth threshold.
[0068] In some embodiments, the first filtering condition may include that the semantic similarity between the first recommended question and the first user input is less than a first threshold, and the similarity between the conversation intention of the first recommended question and the conversation intention of the first user input is greater than a fifth threshold.
[0069] In some embodiments, the first filtering condition may include that the semantic similarity between the first recommended question and the first user input is less than a first threshold, the similarity between the conversation intention of the first recommended question and the conversation intention of the first user input is greater than a fifth threshold, and the semantic similarity between the first recommended question and the first reply is less than a third threshold.
[0070] In some embodiments, the conversation intentions of the first recommended question and the first user input can be extracted respectively, and the similarity between the two conversation intentions (e.g., semantic similarity) can be calculated to determine whether the intention similarity is greater than a fifth threshold. If the intention similarity is less than or equal to the fifth threshold, it is considered that the first recommended question and the first user input intention are inconsistent, that is, they do not meet the first screening condition and should be judged as low-quality recommended questions and discarded. If the intention similarity is greater than the fifth threshold, it is considered that the first recommended question and the first user input intention are inconsistent. Figure 1 After meeting other screening conditions, it can be judged as a high-quality recommendation problem and used as a positive sample recommendation problem.
[0071] In some embodiments, the above meaning Figure 1The judgment of consistency can also be implemented based on the large language model. In some examples, the first recommendation question and the first user input can be input into the large language model together with the judgment prompt text. Under the guidance of the judgment prompt text, the large language model can judge the dialogue meaning of the first recommendation question and the first user input. Figure 1 The consistency is analyzed and the first recommendation question and the first user input are output. Figure 1 The judgment prompt text may be, for example, "You are a linguistics expert. Please determine whether the conversational intentions of the following two statements are consistent: <statement 1>, <statement 2>" or "You are a linguistics expert. Please determine whether the similarity of the conversational intentions of the following two statements is greater than a fifth threshold: <statement 1>, <statement 2>".
[0072] Thus, through the first recommendation question and the first user input Figure 1 Consistency can be achieved by further filtering out low-quality recommendation questions that are significantly different from the first user's input intention, further improving the quality of positive sample recommendation questions, and thus further improving the accuracy and quality of the recommendation questions generated by the model.
[0073] In some embodiments, the at least one sample data may further include fourth sample data, and the similarity between the conversation intention of the negative sample recommendation question in the fourth sample data and the conversation intention input by the first user is no greater than a sixth threshold.
[0074] In some embodiments, one or more recommendation questions that differ significantly from the intent of the first user input may be further generated based on the first user input as negative sample recommendation questions, and together with the positive sample recommendation question, the first user input, and the first reply, they constitute a piece of sample data (i.e., fourth sample data). It is understood that multiple pieces of sample data may be constructed based on multiple generated negative sample recommendation questions and the positive sample recommendation questions.
[0075] In some embodiments, the recommendation questions that differ significantly from the intention of the first user input can be constructed using a large language model. In some examples, the first user input and a prompt text for constructing the recommendation questions can be input into the large language model, so that the large language model, under the guidance of the prompt text, generates one or more recommendation questions that are inconsistent with the intention of the first user input based on the first user input. The prompt text can be, for example, "You are a linguistics expert. Please output a question that is inconsistent with the conversational intent of <Statement 1>" or "You are a linguistics expert. Please output a question whose similarity to the conversational intent of <Statement 1> is not greater than <sixth threshold>."
[0076] Therefore, by further constructing a low-quality recommendation problem that is significantly different from the first user's input intention as a negative sample recommendation problem, constructing sample data containing positive and negative sample pairs, and training the model with the above sample data, the model can be further enabled to generate higher-quality recommendation problems that are more in line with user preferences while avoiding the generation of low-quality recommendation problems as much as possible.
[0077] It is understandable that the various thresholds mentioned above can be determined based on the actual needs of relevant technical personnel and are not limited here.
[0078] Figure 3 A flowchart of acquiring sample data according to an exemplary embodiment of the present disclosure is shown.
[0079] In some exemplary embodiments, Figure 3 As shown, the process of obtaining sample data is as follows: Step S301, obtain the first recommended question; Step S302, determine whether the first recommended question is semantically repeated with the first user input and the first reply; Step S303, if the semantics are repeated, discard the first recommended question; Step S304, if the semantics are not repeated, further determine whether the first recommended question is semantically repeated with the first user input. Figure 1 Step S305: If the intention is not consistent, the first recommended question is discarded; Step S306: If the intention is not consistent, the first recommended question is discarded; Figure 1 If the first recommendation question is the same as the first one, the first recommendation question is determined as the positive sample recommendation question; step S307, the two recommendation questions displayed in the same round of dialogue but not clicked by the user are respectively used as the two negative sample recommendation questions of the first sample data; step S308, a recommendation question that is semantically repeated with the first user input is constructed as a negative sample recommendation question in the second sample data; step S309, a recommendation question that is semantically repeated with the first reply is constructed as a negative sample recommendation question in the third sample data; step S310, based on the above-mentioned first recommendation question, 4 sample data are obtained, including 2 first sample data, one second sample data and one third sample data, each sample data includes the first user input and the first reply, a positive sample recommendation question (i.e., the first recommendation question) and a negative sample recommendation question.
[0080] In some embodiments, the sample data may be constructed based on all first recommendation questions in the database that meet the first screening condition to obtain a sample data set for training a recommendation question generation model.
[0081] In some embodiments, based on at least one sample data, training the initial generation model may include: for each sample data in the at least one sample data, performing the following operations: inputting the first prompt text and the sample data into the first generation model, so as to obtain the first probability of the positive sample recommendation problem and the second probability of the negative sample recommendation problem through the first generation model, under the guidance of the first prompt text, according to the first input, wherein the first generation model is the initial generation model in training; and updating the parameters of the first generation model based on the first probability and the second probability.
[0082] In some embodiments, the first generation model is the initial generation model in training, that is, when the first sample data is input, the first generation model is the initial generation model; after one round of training, the first generation model is the initial generation model after parameter update.
[0083] In some embodiments, the first prompt text can be used to guide the first generative model to output a first probability corresponding to a positive sample recommendation question and a second probability corresponding to a negative sample recommendation question, respectively, based on the first user input and the first response in the input sample data. The first and second probabilities can represent the current first generative model's tendency toward the corresponding recommendation question. For example, if the first probability is 0.9 and the second probability is 0.1, the first generative model is more inclined to generate positive sample recommendation questions.
[0084] In some embodiments, updating the parameters of the first generation model based on the first probability and the second probability may be calculating a loss function based on the difference between the first probability and the second probability, and then updating the parameters of the first generation model based on the loss function.
[0085] In some embodiments, the difference between the first probability and the second probability may be a difference in log-likelihood probabilities.
[0086] In some embodiments, the model can be trained by maximizing the above-mentioned difference until the model converges, thereby obtaining a recommendation question generation model.
[0087] Therefore, by guiding the generation model through the first prompt text to output the first probability of selecting the positive sample recommendation problem and the second probability of selecting the negative sample recommendation problem, and calculating the loss and training the model based on the first probability and the second probability, the efficiency of model training can be improved while ensuring the effectiveness of model training.
[0088] In some embodiments, based on at least one sample data, training the initial generation model may also include: in response to the parameters of the first generation model being updated at least once, for each sample data in the at least one sample data, inputting the first prompt text and the sample data into the initial generation model, so that through the initial generation model, under the guidance of the first prompt text, according to the first input, the third probability of the positive sample recommendation problem and the fourth probability of the negative sample recommendation problem are obtained; and wherein, based on the first probability and the second probability, updating the parameters of the first generation model may include: updating the parameters of the first generation model based on the first probability, the second probability, the third probability and the fourth probability.
[0089] In some embodiments, the above-mentioned sample data and the first prompt text can be input into the initial generation model (i.e., the initial generation model without updated parameters) at the same time as the above-mentioned sample data and the first prompt text are input into the first generation model, and the third probability and the fourth probability output by the initial generation model are obtained.
[0090] In some embodiments, based on the first probability, the second probability, the third probability and the fourth probability, updating the parameters of the first generation model can be based on the difference between the probability ratio between the first probability and the third probability and the probability ratio between the second probability and the fourth probability, determining the loss function, and then updating the parameters of the first generation model based on the loss function.
[0091] In some embodiments, the above probability ratio may be a log probability ratio.
[0092] In some embodiments, the above loss function can be expressed as the following formula:
[0093]
[0094] Among them, π θ ,π ref are the first generation model and the initial generation model in the optimization, respectively. x is the first user input, the first reply, and the first prompt text in the sample data. y w ,y l They represent the positive sample recommendation problem and the negative sample recommendation problem in the sample data respectively, β is a hyperparameter, and σ is the sigmoid function.
[0095] In this way, the initial generation model can be used as a reference object in the model training process to train the first generation model, thereby further improving the efficiency and effect of model training and improving the accuracy of recommendation question generation.
[0096] In some embodiments, as Figure 4As shown, a method for generating recommendation questions is provided, which includes: step S401, obtaining user input information and reply information generated by a large language model based on the user input information; and step S402, using a recommendation question generation model to process the user input information and reply information to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the training method of the recommendation question generation model of an embodiment of the present disclosure.
[0097] Therefore, by applying the recommendation question generation model trained based on the above model training method to generate recommendation questions, it is possible to obtain recommendation questions that are more in line with user preferences and more accurate, thereby optimizing the user experience.
[0098] In some embodiments, as Figure 5 As shown, a training device 500 for a recommendation question generation model is provided, and the device 500 includes: a first acquisition unit 510, configured to acquire a first recommendation question, where the first recommendation question is a recommendation question that has been clicked by a user among multiple historical recommendation questions, and the multiple historical recommendation questions are generated by the initial generation model based on the first user input and the first reply generated by the large language model; a determination unit 520, configured to determine the first recommendation question as a positive sample recommendation question in response to judging that the first recommendation question meets the first screening condition, wherein the first screening condition includes that the semantic similarity between the first recommendation question and the first user input is less than a first threshold; a second acquisition unit 530, configured to acquire at least one sample data based on the positive sample recommendation question, each sample data in the at least one sample data includes the first user input, the first reply, the positive sample recommendation question and the negative sample recommendation question, and the at least one sample data includes the first sample data, and the negative sample recommendation question in the first sample data is the recommendation question that has not been clicked by the user among the multiple historical recommendation questions; and a training unit 540, configured to train the initial generation model based on the at least one sample data to obtain a recommendation question generation model.
[0099] in, Figure 5 The various units of the apparatus 500 shown in FIG. 5 can be compared with those in FIG. Figure 2 The steps in the training method for the recommendation question generation model described above correspond to each other. Therefore, the operations, features, and advantages described above for the training method for the recommendation question generation model are also applicable to the apparatus 500 and the various units included therein. For the sake of brevity, certain operations, features, and advantages are not repeated here.
[0100] In some embodiments, the at least one sample data may further include second sample data, and the semantic similarity between the negative sample recommendation question in the second sample data and the first user input is not less than a second threshold.
[0101] In some embodiments, the first screening condition may further include that the semantic similarity between the first recommended question and the first reply is less than a third threshold.
[0102] In some embodiments, the at least one sample data may further include third sample data, and the semantic similarity between the negative sample recommendation question in the third sample data and the first reply is not less than a fourth threshold.
[0103] In some embodiments, the first filtering condition may further include that the similarity between the conversation intention of the first recommended question and the conversation intention input by the first user is greater than a fifth threshold.
[0104] In some embodiments, the at least one sample data may further include fourth sample data, and the similarity between the conversation intention of the negative sample recommendation question in the fourth sample data and the conversation intention input by the first user is no greater than a sixth threshold.
[0105] In some embodiments, the training unit may include: an execution unit, configured to perform the operations of the following sub-units for each sample data in at least one sample data, and the execution unit may include: an input sub-unit, configured to input the first prompt text and the sample data into the first generation model, so as to obtain the first probability of the positive sample recommendation problem and the second probability of the negative sample recommendation problem according to the first input through the first generation model under the guidance of the first prompt text, wherein the first generation model is the initial generation model in training; and an update sub-unit, configured to update the parameters of the first generation model based on the first probability and the second probability.
[0106] In some embodiments, the training unit may also include: an input unit, configured to input the first prompt text and the sample data into the initial generation model for each sample data in at least one sample data in response to the parameters of the first generation model being updated at least once, so as to obtain the third probability of the positive sample recommendation problem and the fourth probability of the negative sample recommendation problem through the initial generation model under the guidance of the first prompt text and according to the first input; and wherein the update subunit can be further configured to: update the parameters of the first generation model based on the first probability, the second probability, the third probability and the fourth probability.
[0107] In some embodiments, as Figure 6 As shown, a device 600 for generating recommendation questions is provided, and the device 600 includes: a first acquisition unit 610, configured to obtain user input information and reply information generated by a large language model based on the user input information; and a second acquisition unit 620, configured to use a recommendation question generation model to process the user input information and reply information to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the training method of the recommendation question generation model of an embodiment of the present disclosure.
[0108] in, Figure 6 The various units of the apparatus 600 shown in FIG. 6 can be compared with those in FIG. Figure 4 The steps in the method for generating recommendation questions described above correspond to each other. Therefore, the operations, features, and advantages described above for the method for generating recommendation questions are also applicable to the apparatus 600 and the various units included therein. For the sake of brevity, some operations, features, and advantages are not repeated here.
[0109] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0110] According to an embodiment of the present disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0111] refer to Figure 7 , a block diagram of an electronic device 700 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0112] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0113] Multiple components within electronic device 700 are connected to I / O interface 705, including an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. Input unit 706 can be any type of device capable of inputting information into electronic device 700. Input unit 706 can receive input numeric or character information and generate key signal input related to user settings and / or function control of the electronic device. It can include, but is not limited to, a mouse, keyboard, touch screen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 707 can be any type of device capable of presenting information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 708 can include, but is not limited to, a magnetic disk or an optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks. It can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0114] The computing unit 701 can be various general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the training method for the recommendation question generation model or the method for generating recommendation questions disclosed herein. For example, in some embodiments, the training method for the recommendation question generation model or the method for generating recommendation questions disclosed herein can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method for the recommendation question generation model or the method for generating recommendation questions disclosed herein can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured in any other appropriate manner (for example, by means of firmware) to execute the training method of the recommendation question generation model or the recommendation question generation method of the present disclosure.
[0115] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0119] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0120] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0121] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0122] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is only limited by the claims after authorization and their equivalents. Various elements in the embodiments or examples can be omitted or replaced by their equivalents. In addition, the steps can be performed in an order different from that described in this disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that as technology evolves, many of the elements described here can be replaced by equivalent elements that appear after this disclosure.
Claims
1. A method for training a recommendation question generation model, the method comprising: Obtaining a first recommended question, where the first recommended question is a recommended question clicked by a user among multiple historical recommended questions, where the multiple historical recommended questions are generated by an initial generation model based on a first user input and a first reply generated by a large language model; In response to determining that the first recommended question meets a first screening condition, determining the first recommended question as a positive sample recommended question, wherein the first screening condition includes that a semantic similarity between the first recommended question and the first user input is less than a first threshold; Based on the positive sample recommendation question, at least one sample data is obtained, where each sample data in the at least one sample data includes the first user input, the first reply, the positive sample recommendation question, and a negative sample recommendation question, and the at least one sample data includes the first sample data, and the negative sample recommendation question in the first sample data is a recommendation question that the user did not click on among the multiple historical recommendation questions; and Based on the at least one sample data, the initial generation model is trained to obtain a recommendation question generation model.
2. The method according to claim 1, wherein The at least one sample data further includes second sample data, and the semantic similarity between the negative sample recommendation question in the second sample data and the first user input is not less than a second threshold.
3. The method according to claim 1 or 2, wherein: The first screening condition also includes that the semantic similarity between the first recommended question and the first reply is less than a third threshold.
4. The method according to claim 3, wherein: The at least one sample data further includes third sample data, and the semantic similarity between the negative sample recommendation question in the third sample data and the first reply is not less than a fourth threshold.
5. The method according to claim 1 or 2, wherein: The first screening condition also includes that the similarity between the conversation intention of the first recommendation question and the conversation intention input by the first user is greater than a fifth threshold.
6. The method according to claim 5, wherein: The at least one sample data further includes fourth sample data, and the similarity between the dialogue intention of the negative sample recommendation question in the fourth sample data and the dialogue intention input by the first user is not greater than a sixth threshold.
7. The method according to claim 1 or 2, wherein: The training of the initial generation model based on the at least one sample data comprises: For each sample data in the at least one sample data, perform the following operations: Inputting the first prompt text and the sample data into a first generative model, so as to obtain, through the first generative model, a first probability of the positive sample recommendation question and a second probability of the negative sample recommendation question based on the first user input under the guidance of the first prompt text, wherein the first generative model is the initial generative model in training; and Based on the first probability and the second probability, parameters of the first generative model are updated.
8. The method according to claim 7, wherein: The training of the initial generation model based on the at least one sample data further comprises: In response to the parameters of the first generation model being updated at least once, for each sample data in the at least one sample data, the first prompt text and the sample data are input into the initial generation model, so as to obtain, through the initial generation model, a third probability of the positive sample recommendation problem and a fourth probability of the negative sample recommendation problem based on the first user input under the guidance of the first prompt text; and wherein, The updating of the parameters of the first generation model based on the first probability and the second probability includes: Parameters of the first generative model are updated based on the first probability, the second probability, the third probability, and the fourth probability.
9. A method for generating a recommendation question, the method comprising: Obtaining user input information and response information generated by the large language model based on the user input information; as well as The user input information and the reply information are processed using a recommendation question generation model to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the method according to any one of claims 1 to 8.
10. A training device for a recommendation question generation model, the device comprising: a first acquisition unit configured to acquire a first recommended question, where the first recommended question is a recommended question clicked by a user from a plurality of historical recommended questions, where the plurality of historical recommended questions are generated by an initial generation model based on a first user input and a first reply generated by a large language model; a determining unit configured to, in response to determining that the first recommended question meets a first screening condition, determine the first recommended question as a positive sample recommended question, wherein the first screening condition includes that a semantic similarity between the first recommended question and the first user input is less than a first threshold; A second acquisition unit is configured to acquire at least one sample data based on the positive sample recommendation question, wherein each sample data in the at least one sample data includes the first user input, the first reply, the positive sample recommendation question, and a negative sample recommendation question, and the at least one sample data includes the first sample data, and the negative sample recommendation question in the first sample data is a recommendation question that the user did not click on among the multiple historical recommendation questions; and The training unit is configured to train the initial generation model based on the at least one sample data to obtain a recommendation question generation model.
11. The device according to claim 10, wherein The at least one sample data further includes second sample data, and the semantic similarity between the negative sample recommendation question in the second sample data and the first user input is not less than a second threshold.
12. The device according to claim 10 or 11, wherein The first screening condition also includes that the semantic similarity between the first recommended question and the first reply is less than a third threshold.
13. The device according to claim 12, wherein The at least one sample data further includes third sample data, and the semantic similarity between the negative sample recommendation question in the third sample data and the first reply is not less than a fourth threshold.
14. The device according to claim 10 or 11, wherein The first screening condition also includes that the similarity between the conversation intention of the first recommendation question and the conversation intention input by the first user is greater than a fifth threshold.
15. The device according to claim 14, wherein The at least one sample data further includes fourth sample data, and the similarity between the dialogue intention of the negative sample recommendation question in the fourth sample data and the dialogue intention input by the first user is not greater than a sixth threshold.
16. The device according to claim 10 or 11, wherein The training unit comprises: An execution unit is configured to execute the operations of the following subunits for each sample data in the at least one sample data, the execution unit comprising: an input subunit configured to input a first prompt text and the sample data into a first generative model, so as to obtain, through the first generative model, a first probability of the positive sample recommendation problem and a second probability of the negative sample recommendation problem based on the first user input under the guidance of the first prompt text, wherein the first generative model is the initial generative model in training; and An updating subunit is configured to update parameters of the first generation model based on the first probability and the second probability.
17. The device according to claim 16, wherein The training unit also includes: The input unit is configured to, in response to the parameters of the first generation model being updated at least once, input the first prompt text and the sample data into the initial generation model for each sample data in the at least one sample data, so as to obtain, through the initial generation model, under the guidance of the first prompt text and according to the first user input, the third probability of the positive sample recommendation problem and the fourth probability of the negative sample recommendation problem; and wherein, The updating subunit is further configured to update parameters of the first generation model based on the first probability, the second probability, the third probability, and the fourth probability.
18. A device for generating a recommendation question, the device comprising: a first acquiring unit configured to acquire user input information and reply information generated by the large language model according to the user input information; as well as The second acquisition unit is configured to use a recommendation question generation model to process the user input information and the reply information to obtain at least one recommendation question output by the recommendation question generation model, wherein the recommendation question generation model is trained by the method according to any one of claims 1 to 8.
19. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.
21. A computer program product comprising a computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Large language model training method and device, equipment and medium
CN116821684A
Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium
WO2022142006A1
Cited By
Recommendation question generation method and system, electronic equipment and storage medium
CN121434373A
A recommended question generation method, system, electronic device and storage medium
CN121434373B