Training method of recommendation question generation model and recommendation question generation method and device

By filtering the recommendation problems that have been clicked by the user's history and building sample data, training the initial generation model, the problem of inaccurate generation of recommendation problems in the existing technology is solved, and a higher quality recommendation problem generation is achieved.

CN119719284AActive Publication Date: 2025-03-28BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411776705.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The prior art is difficult to generate accurate and high-quality recommendation problems, which affects the smoothness of human-computer interaction.

Method used

By obtaining the recommendation questions that have been clicked by the user's history, filter out the positive sample recommendation problems with the semantic similarity to the user input less than a certain threshold, build sample data and train the initial generation model to obtain the recommendation problem generation model.

Benefits of technology

The accuracy and quality of the generated recommendation problems are improved, so that the model can generate recommendation problems that are more in line with user needs while learning user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719284A_ABST
    Figure CN119719284A_ABST
Patent Text Reader

Abstract

The invention provides a training method of a recommendation question generation model and a recommendation question generation method and device, and relates to the technical field of artificial intelligence, in particular to the technical field of deep learning, large language models and intelligent dialogues. According to the implementation scheme, a first recommendation question is obtained; determining the first recommendation question as a positive sample recommendation question in response to the judgment that the first recommendation question meets the first screening condition; obtaining at least one sample data based on the positive sample recommendation problem; and training the initial generation model based on the at least one sample data to obtain a recommendation problem generation model.
Need to check novelty before this filing date? Find Prior Art

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 is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] Human-computer interaction is a way for humans to interact with machines using natural language. With the continuous development of artificial intelligence technology, it has become possible for machines to understand the information output by humans, understand the inherent meaning of the information, and make corresponding feedback. In these operations, accurate understanding of semantics, rapid feedback, and giving corresponding opinions or suggestions have all become factors that affect the smoothness of human-computer interaction.

[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have 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 based on the at least one sample data, training the initial generation model 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, comprising: 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 for a 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, comprising: 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 screening condition, wherein the first screening condition comprises that a 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 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 a 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 a recommendation question is provided, comprising: a first acquisition unit, configured to acquire user input information and reply information generated by a large language model according to 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 for a 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 so that the at least one processor can 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 the computer program, when executed by a processor, implements the training method of the recommendation question generation model or the recommendation question generation method 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 content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0016] Figure 1 A schematic diagram showing 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 flow chart of obtaining sample data according to an exemplary embodiment of the present disclosure is shown;

[0019] Figure 4 A flow chart showing a method for generating a recommendation question 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 is a description of exemplary embodiments of the present disclosure 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 recognized by those of ordinary skill 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, the description of well-known functions and structures is omitted in the following description.

[0024] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0025] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0027] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which 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 may 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 recommendation question generation method 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 may use client devices 101, 102, 103, 104, 105 and / or 106 to obtain historical recommendation questions and related conversation data. The client device may provide an interface that enables the user of the client device to interact with the client device. The client device may 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 may 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 laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game 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, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), 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 may 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, dedicated 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 above operating systems and 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, etc.

[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 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, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in 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 various 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 may 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 the application of various methods and apparatuses described in 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 according to 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 that have a high semantic similarity with the corresponding first user input are screened out, and the screened recommended questions are used as positive sample recommended questions. Sample data is constructed based on the positive sample recommended questions to train the model, so that the model can learn user preferences while further improving the accuracy of the recommended questions generated by the model.

[0043] In the intelligent dialogue scenario, the large language model will generate reply information based on the input information entered by the user. At the same time, the initial generation model can be applied to generate multiple recommended questions based on the input information and reply information to guide the user to ask follow-up questions. The user can click on a recommended question, and the large language model can further generate reply information for the recommended question.

[0044] In some embodiments, the initial generation model may be a model that has been preliminarily trained for generating recommendation questions, wherein the preliminarily training may be supervised training using sample data, and the sample data used for the preliminarily training may include sample input information, sample response information, and sample recommendation questions.

[0045] In some embodiments, the above initial generation model can be constructed based on a Transformer network.

[0046] In some exemplary embodiments, the initial generation model can be constructed based on a Decoder network in a Transformer network. In some examples, the initial generation model can be a causal language model.

[0047] In some embodiments, user input information and generated reply information, multiple recommended questions, and user clicks on the recommended questions in multiple historical rounds of conversations can be stored in a historical conversation database, and the recommended questions that the user has historically clicked on (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 repeated. 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 repeated, that is, they do not meet the first filtering 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 filtering condition.

[0049] In some embodiments, the above-mentioned judgment of semantic similarity 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 together with the judgment prompt text. Under the guidance of the judgment prompt text, the large language model analyzes the semantic similarity of the first recommended question and the first user input, and outputs a judgment result of whether the first recommended question and the first user input are semantically repeated. Among them, the judgment prompt text can be, for example, "You are a linguistics expert, please judge whether the semantics of the following two sentences are repeated: <Sentence 1>, <Sentence 2>".

[0050] In some embodiments, the first recommendation question that does not meet the first screening condition (ie, the 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 recommendation questions displayed in the conversation corresponding to the recommendation 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, form a sample data (i.e., the first sample data). It is understandable that multiple sample data similar to the above can be constructed based on multiple historical recommendation questions that have not been 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 that have a high semantic similarity with 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 are 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, one or more recommendation questions with semantics that are repeated with 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, form a piece of sample data (i.e., second 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.

[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. Among them, the above-mentioned prompt text can be, for example, "You are a linguistics expert, please output a question with the same semantics as <Sentence 1>" or "You are a linguistics expert, please output a question with a semantic similarity with <Sentence 1> that is not less than <Second Threshold>".

[0059] Therefore, by further constructing a low-quality recommendation question that is semantically similar to the first user input as a negative sample recommendation question, constructing sample data containing positive and negative sample pairs, and training the model through 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 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, and will not be described in detail 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 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 with semantics that are repeated 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, form 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. Among them, the above prompt text can be, for example, "You are a linguistics expert, please output a question with the same semantics as <Sentence 2>" or "You are a linguistics expert, please output a question with a semantic similarity with <Sentence 2> that 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, building sample data containing positive and negative sample pairs, and training the model through 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 also 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 determined 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, the problem can be judged as a high-quality recommendation problem and used as a positive sample recommendation problem.

[0071] In some embodiments, the above Figure 1The judgment of consistency can also be implemented based on the large language model. In some examples, the first recommended question and the first user input together with the judgment prompt text can be input into the large language model. Under the guidance of the judgment prompt text, the large language model can judge the dialogue meaning between the first recommended 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 judge whether the conversation intentions of the following two statements are consistent: <statement 1>, <statement 2>" or "You are a linguistics expert, please judge whether the similarity of the conversation intentions of the following two statements is greater than the fifth threshold: <statement 1>, <statement 2>".

[0072] Thus, through the first recommendation question and the first user input Figure 1 Consistency can be further used to screen 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, thereby further improving the accuracy and quality of the recommendation questions generated by the model.

[0073] In some embodiments, at least one sample data may further include 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 no greater than a sixth threshold.

[0074] In some embodiments, one or more recommendation questions that are significantly different from the first user input intention 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, form a piece of sample data (i.e., fourth 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.

[0075] In some embodiments, the recommendation questions that differ greatly from the first user input intention 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 inconsistent with the first user input intention based on the first user input. Among them, the above prompt text can be, for example, "You are a linguistics expert, please output a question that is inconsistent with the dialogue intention of <Sentence 1>" or "You are a linguistics expert, please output a question whose similarity with the dialogue intention of <Sentence 1> is not greater than <Sixth Threshold>".

[0076] Therefore, by further constructing a low-quality recommendation question that is greatly different from the first user's input intention as a negative sample recommendation question, constructing sample data containing positive and negative sample pairs, and training the model through 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.

[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 Figure 1 If the first recommendation question is the same as the first one, then 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, construct a recommendation question that is semantically repeated with the first user input as a negative sample recommendation question in the second sample data; step S309, construct a recommendation question that is semantically repeated with the first reply as a negative sample recommendation question in the third sample data; step S310, based on the above-mentioned first recommendation question, obtain 4 sample data, 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 a first prompt text and the sample data into the first generation model, so as to obtain, through the first generation model, under the guidance of the first prompt text, according to the first input, a first probability of a positive sample recommendation problem and a second probability of a negative sample recommendation problem, 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 a 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 generation model to output the first probability corresponding to the positive sample recommendation question and the second probability corresponding to the negative sample recommendation question according to the first user input and the first reply in the input sample data, wherein the first probability and the second probability can represent the tendency of the current first generation model for the corresponding recommendation question. For example, if the first probability is 0.9 and the second probability is 0.1, the first generation 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 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, 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 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 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, Figure 4As shown, a method for generating recommendation questions is provided, the method comprising: step S401, obtaining user input information and reply information generated by a large language model according to the user input information; and step S402, 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 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, 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, the first recommendation question is a recommendation question clicked by a user among multiple historical recommendation questions, and the multiple historical recommendation questions are generated by an initial generation model according to a first user input and a first reply generated by a 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 a 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 a recommendation question not clicked by the user among 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 device 500 shown in FIG. 5 can be used in conjunction with the reference Figure 2 The steps in the training method for generating a recommendation question model described above correspond to each other. Therefore, the operations, features and advantages described above for the training method for generating a recommendation question model are also applicable to the device 500 and the various units included therein. For the sake of brevity, some 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 also 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, at least one sample data may further include 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 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 a first prompt text and 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 a third probability of the positive sample recommendation problem and a 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 may 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, 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 acquire user input information and reply information generated by a large language model according to the user input information; and a second acquisition unit 620, 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 an embodiment of the present disclosure.

[0108] in, Figure 6 The various units of the device 600 shown in FIG. 6 can be compared with those of the reference 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 device 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 solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance 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 be used 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, workbenches, 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 processing, 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. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. 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 in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 can be any type of device that can input information to the electronic device 700. The input unit 706 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 707 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 708 can include but is not limited to a disk, an optical disk. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and 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 may be a variety of general and / or special 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 running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the training method of the recommendation question generation model or the generation method of the recommendation question of the present disclosure. For example, in some embodiments, the training method of the recommendation question generation model or the generation method of the recommendation question of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may 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 of the recommendation question generation model or the generation method of the recommendation question of the present disclosure may be executed. 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 implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 may 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 with 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 may 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 the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0121] It should be understood that the various forms of 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 different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[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 only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A training method for 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 according to 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, 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, 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 is not clicked by the user 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 also 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 also 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 any one of claims 1 to 4, 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 also 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 any one of claims 1 to 6, 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 generation model, so as to obtain, through the first generation model, a first probability of the positive sample recommendation problem and a second probability of the negative sample recommendation problem according to the first input under the guidance of the first prompt text, wherein the first generation model is the initial generation 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 the third probability of the positive sample recommendation problem and the fourth probability of the negative sample recommendation problem according to the first input through the initial generation model 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: Based on the first probability, the second probability, the third probability and the fourth probability, parameters of the first generative model are updated.

9. A method for generating a recommendation question, the method comprising: Obtaining user input information and response information generated by the large language model according to 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 is configured to acquire 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 according to 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, 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, 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 is not clicked by the user 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 also 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 also 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 any one of claims 10 to 13, 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 also 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 any one of claims 10 to 15, 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 generation model, so as to obtain a first probability of the positive sample recommendation problem and a 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 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 the third probability of the positive sample recommendation problem and the fourth probability of the negative sample recommendation problem according to the first input through the initial generation model under the guidance of the first prompt text; and wherein, The updating subunit is 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.

18. A device for generating a recommendation question, the device comprising: A first acquisition unit is 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 described in 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 make a computer execute the method according to any one of claims 1-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

  • Information generation method and device, electronic equipment and readable storage medium

    CN116955526A

  • Data generation method and device based on artificial intelligence, computer equipment and medium

    CN119046432A

  • Semantic recognition-based verbal skill recommendation method and apparatus, device, and storage medium

    WO2022142006A1

  • Question-answer processing method and apparatus

    WO2024220031A1

Cited By

  • Question generation method and device, content display method and device, medium and electronic equipment

    CN120492585A

  • Data preprocessing and optimizing method and device for generative model in question and answer scene

    CN121303362A