Interactive recommendation method and interactive recommendation system based on large language model
Through interactive recommendation methods and systems based on large language models, using multiple rounds of dialogue interaction and user feature information, the problem of users' difficulty in accurately describing search needs is solved, and more efficient and accurate information recommendation is achieved, improving user experience.
Patent Information
- Application Number
- PCT/CN2024/115446
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-22
- Filing Date
- 2024-08-29
- Publication Date
- 2025-06-26
AI Technical Summary
In the prior art, it is difficult for users to accurately describe search requirements through key information, resulting in high search difficulty, high operation cost, and insufficient accuracy of information recommendation.
An interactive recommendation method and system based on a large language model is adopted, through multiple rounds of dialogue interaction, combining the user's current feature information, historical behavior information and scene information, the user's needs are gradually inferred and information recommendation is recommended.
It reduces the difficulty for users to obtain information, improves the accuracy of information recommendations, improves the user experience, and solves the problem that users find it difficult to accurately describe search needs.
Smart Images

Figure CN2024115446_26062025_PF_FP_ABST
Abstract
Description
Interactive recommendation method and interactive recommendation system based on large language model Technical Field
[0001] The present application relates to the field of information recommendation technology, and in particular to an interactive recommendation method based on a large language model, an interactive recommendation system, a storage medium, and a computer device. Background Art
[0002] Key information search is the primary way users search for products on e-commerce platforms. The accuracy of the key information users enter in this search model plays a decisive role in the platform's recall of products. In some real-world scenarios, users often struggle to accurately describe their search needs with a single key piece of information. For example, if a user wants to eat something spicy, they might search for all the spicy foods they can think of, such as malatang, hot pot, and Sichuan cuisine, until they find what they want. This current key information-based search method requires users to enter accurate search terms, making the search difficult and costly.
[0003] Summary of the Invention
[0004] In view of this, the embodiments of the present application provide an interactive recommendation method and interactive recommendation system, storage medium, and computer device based on a large language model, which reduces the difficulty for users to obtain information, improves the accuracy of information recommendations, and enhances the user experience.
[0005] According to one aspect of the present application, an interactive recommendation method based on a large language model is provided, the method comprising:
[0006] When entering the interactive recommendation mode, initializing current feature information and receiving a current round of input sentences corresponding to the current user, wherein the current feature information includes at least one of current user information, current scenario information, and current user historical behavior information;
[0007] Constructing prompt information for this round based on the current round input statement, the current feature information, the historical round dialogue information, and the preset prompt information corresponding to the interactive recommendation mode, wherein if this round is the first round, the historical round dialogue information is empty; if this round is not the first round, the historical round dialogue information includes the historical round input statements and historical round recommendation response information arranged in chronological order;
[0008] Using the large conversation language model, output the current round of recommended response information corresponding to the current round of input sentences;
[0009] Receive current-round feedback information for the current-round recommendation response information, and continue the next round of interaction or end the interactive recommendation mode based on the current-round feedback information.
[0010] According to another aspect of the present application, a conversation recommendation system based on a large language model is provided, characterized in that the conversation recommendation system includes an initialization module, a prompt information construction module, a conversation large language model, and a feedback information recognition module;
[0011] The initialization module is configured to initialize current feature information based on a trigger signal of the interactive recommendation mode, wherein the current feature information includes at least one of current user information, current scenario information, and current user historical behavior information;
[0012] The prompt information construction module is configured to, upon receiving a current round input statement corresponding to the current user, construct current round prompt information based on the current round input statement, the current feature information, historical round dialogue information, and preset prompt information corresponding to the interactive recommendation mode, wherein the historical round dialogue information is empty if the current round is the first round, and includes historical round input statements and historical round recommendation response information arranged in chronological order if the current round is not the first round;
[0013] The large dialogue language model is used to generate the current round recommendation response information corresponding to the current round input sentence;
[0014] The feedback information identification module is configured to determine whether to continue the next round of interaction or to end the interactive recommendation mode according to the received feedback information of the current round in response to the recommendation response information of the current round.
[0015] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned interactive recommendation method is implemented.
[0016] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned interactive recommendation method when executing the program.
[0017] By means of the above technical solution, the embodiments of the present application provide an interactive recommendation method based on a large language model, an interactive recommendation system, a storage medium, and a computer device. In the interactive recommendation mode, prompt information for each round is constructed based on the user's input statement in each round, historical round dialogue information, and the preset prompt information corresponding to the mode, so that the dialogue recommendation system outputs corresponding recommendation response information for the prompt information in each round. Further, based on the user's feedback on the recommendation response information, it is determined whether to continue the next round of interaction or end the current interactive recommendation mode. The embodiments of the present application recommend information to users through multi-round dialogue interaction. Even if the user has difficulty accurately describing the search key information, the user can obtain the information recommended by the system by inputting sentences and conducting dialogue interaction. In the multi-round dialogue process, the system not only pays attention to the user's input statement in the current round, but also pays attention to the historical round dialogue information. Thus, through multi-round dialogue interaction, the user's needs are gradually inferred and information is accurately recommended. This reduces the difficulty for users to obtain information, improves the accuracy of information recommendations, and enhances the user experience.
[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] FIG1 shows a schematic flow chart of an interactive recommendation method based on a large language model provided in an embodiment of the present application;
[0021] FIG2 shows a flow chart of another interactive recommendation method based on a large language model provided in an embodiment of the present application;
[0022] FIG3 shows a flow chart of another interactive recommendation method based on a large language model provided in an embodiment of the present application;
[0023] FIG4 shows a flow chart of another interactive recommendation method based on a large language model provided in an embodiment of the present application;
[0024] FIG5 shows a flow chart of another interactive recommendation method based on a large language model provided in an embodiment of the present application;
[0025] FIG6 is a flow chart showing a method for training a large conversational language model according to an embodiment of the present application;
[0026] FIG7 shows a schematic structural diagram of an interactive recommendation system based on a large language model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0028] In this embodiment, an interactive recommendation method based on a large language model is provided. As shown in FIG1 , the method includes:
[0029] Step 101, when entering the interactive recommendation mode, initialize current feature information and receive the current round input statement corresponding to the current user, wherein the current feature information includes at least one of current user information, current scene information and current user historical behavior information.
[0030] Step 102: Construct prompt information for this round based on the input statement for this round, the current feature information, the historical round dialogue information, and the preset prompt information corresponding to the interactive recommendation mode. When this round is the first round, the historical round dialogue information is empty; when this round is not the first round, the historical round dialogue information includes historical round input statements and historical round recommendation response information arranged in chronological order.
[0031] Step 103: Using the large dialogue language model, output the current round recommendation response information corresponding to the current round input sentence.
[0032] Step 104: receiving feedback information of this round in response to the recommendation response information of this round, and continuing the next round of interaction or ending the interactive recommendation mode according to the feedback information of this round.
[0033] The interactive recommendation method of the embodiment of the present application can be applied to an e-commerce platform. After the user enters the interactive recommendation mode through the e-commerce platform, he can have multiple rounds of dialogue with the platform AI. The interactive recommendation method in the embodiment of the present application can also be applied to other programs or dedicated devices, and multiple rounds of dialogue can be carried out after entering the interactive recommendation mode. Specifically, a large dialogue language model can be used to respond to sentences input by the user in text or voice, and the platform AI outputs the recommended response information corresponding to the response to complete a round of dialogue. The user can further continue to input sentences based on the recommended response information output by the platform AI. The dialogue recommendation system gives the response of the current round based on the user's input sentence in the current round and the historical dialogue of the previous round. Multiple rounds of dialogue are repeated in this way until the interactive recommendation mode is ended.
[0034] Specifically, after entering the interactive recommendation mode, the current feature information is initialized to obtain information about the current user, the current scenario, and the current user's historical behavior. The current user's first-round input statement is received, and the first-round prompt information is constructed using the first-round input statement, the current feature information, and the preset prompt information corresponding to the interactive recommendation mode. The conversational language model (hereinafter referred to as the conversational model) is then used to generate first-round recommendation responses corresponding to the first-round prompt information. The preset prompt information provides a reference for the conversational model's information reasoning when making recommendations. For example, it indicates the role the conversational model plays in the current environment and the rules it should follow when reasoning. The conversational model is then called upon to generate and output first-round recommendation responses to the first-round prompt information. Incorporating the current feature information into the prompt information helps address the cold start problem of the first-round response. Even if the user does not provide meaningful input, the conversational model leverages the current feature information to provide targeted responses related to the user, the current scenario, and the user's historical behavior, thereby improving the accuracy of the recommendations. Then, based on the first round of feedback information given by the user in response to the first round of recommendation response information, it is determined whether to end the interactive recommendation mode or continue the next round of interaction. For example, the user actively exits the interactive recommendation mode, or based on the behavioral data generated by the user in response to the first round of recommendation response information, it is determined that the user has achieved some results that can indicate that the user has obtained a satisfactory answer from the first round of recommendation response information (such as placing an order for the recommended product), then the current interactive recommendation mode can be ended. For another example, the user continues to input a sentence, indicating that the user wants to continue communicating with the AI, and then the next round of interaction can be continued. Starting from the second round of interaction, when constructing the prompt information, in addition to using the input sentence of the current round and the preset prompt information, the dialogue information of the previous round is also used, so that the dialogue model can fully combine the previously generated dialogue to give a response to the input sentence of the current round, so as to improve the accuracy of the recommendation response information.
[0035] The current scene information may include the current time scene information, the current geographic scene information, the current weather information, etc. The current time scene information may specifically include the current time, the current day's holiday information, whether the current day is a weekday, the current time period (e.g., breakfast, lunch, afternoon tea, dinner, supper), etc. The current geographic scene information may specifically include the city, district, business district, etc. of the current geographic location. The current weather information may specifically include the weather conditions (sunny, cloudy, rainy, snowy, etc.), temperature, etc. The current user information is obtained with the user's authorization and may specifically include the current user's gender, age, occupation, birthday, etc. The current user's historical behavior information is used with the user's authorization, and may specifically include the current user's search, click, and order behavior sequence. In an example, the historical behavior sequence includes: 2023-09-03 11:39:00, Wagang, not clicked, not ordered; 2023-09-03 11:40:16, Honey Barbecued Pork Rice, clicked, not ordered; 2023-09-03 11:41:57, Bibimbap, clicked, not ordered; 2023-09-03 11:42:43, Curry, clicked, not ordered; 2023-09-03 11:42:59, Curry, not clicked, not ordered; 2023-09-03 11:45:30, Noodles, not clicked, not ordered; 2023-09-03 11:45:45, Noodles with Toppings, clicked, ordered.
[0036] By applying the technical solution of this embodiment, in the interactive recommendation mode, prompt information for each round is constructed based on the user's input statements in each round, historical round dialogue information, and the preset prompt information corresponding to the mode. The conversational recommendation system then outputs corresponding recommendation response information for the prompt information in each round. Further, based on the user's feedback on the recommendation response information, it is determined whether to continue the next round of interaction or end the current interactive recommendation mode. The embodiment of the present application recommends information to users through multi-round conversational interaction. Even if the user has difficulty accurately describing the search key information, the user can obtain recommended information by entering a statement for conversational interaction. Furthermore, during the multi-round conversation, the system not only focuses on the user's input statements in the current round, but also on historical round dialogue information. Thus, through multi-round conversational interaction, the system gradually infers user needs and makes accurate information recommendations. Furthermore, the system introduces prompt information for constructing a large conversation model based on current feature information, effectively solving the cold start problem, reducing the difficulty for users to obtain information, improving the accuracy of information recommendations, and enhancing the user experience.
[0037] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another interactive recommendation method based on a large language model is provided, as shown in FIG2 , which includes:
[0038] Step 201 : When entering the interactive recommendation mode, initialize the current feature information and receive the current round of input sentences corresponding to the current user.
[0039] The current feature information includes at least one of current user information, current scene information and current user historical behavior information.
[0040] In the embodiment of the present application, in the interactive recommendation mode, a response is given to each round of input statements of the user, thereby generating multiple rounds of dialogue with the user, and information recommendation is performed during the dialogue with the user.
[0041] Step 202 : construct prompt information for this round based on the input sentence for this round, the current feature information, the historical round dialogue information, and the preset prompt information corresponding to the interactive recommendation mode.
[0042] Among them, when this round is the first round, the historical round dialogue information is empty, and when this round is not the first round, the historical round dialogue information includes historical round input sentences and historical round recommendation response information arranged in chronological order; when the character length of the historical round dialogue information is greater than the preset length value, the historical round dialogue information is semantically understood, and the summary information obtained by the semantic understanding replaces the historical round dialogue information to generate the prompt information of this round.
[0043] In an embodiment of the present application, after obtaining the user's current round input statement, the current round prompt information is constructed using the current round input statement, historical round conversation information, and preset prompt information for the interactive recommendation mode. The historical round conversation information specifically includes the historical round input statements and historical round recommendation response information generated by the user after the interactive recommendation mode is triggered and before the current round input statement. Obviously, if the current round is the first round, the historical round conversation information is empty. In addition, to avoid the historical round conversation information being too long, which would lead to inefficient processing of the conversational recommendation system, when the historical round conversation information is too long (the character length is greater than a preset value), the historical round conversation information can be semantically understood and summarized. The summary information is used to replace the excessively long historical round conversation information when constructing the current round prompt information. In addition, to avoid the historical round conversation information being too long, which would cause the conversational recommendation system to lose focus on the most recent historical conversation information and be disturbed by too much older historical conversation information, if there are many historical rounds, the historical round conversation information of a certain number of recent rounds can be intercepted when constructing the current round prompt information to construct the current round prompt information.
[0044] Step 203: Using the large dialogue language model, output the current round recommendation response information corresponding to the current round input sentence.
[0045] The types of recommendation response information include resource recommendation information type and preference query information type, wherein the resource recommendation information type includes product recommendation information type and / or store recommendation information type.
[0046] In an embodiment of the present application, the interactive recommendation mode can be specifically implemented in an e-commerce platform to recommend products and stores provided by the e-commerce platform. After the prompt information of this round is input into the conversational recommendation system, the conversational recommendation system analyzes the user's intention and user preferences based on the prompt information of this round. If the analysis result shows that the user intends to obtain resource recommendations on the platform and the preference is relatively clear, the conversational recommendation system can make resource recommendations and output resource recommendation information. If the analysis result shows that the user intends to obtain resource recommendations on the platform but the preference is not clear, the conversational recommendation system can query the user's preferences to obtain a clear preference before making resource recommendations, thereby improving the accuracy of resource recommendations and enhancing the user experience.
[0047] Step 204 : If the recommendation response information of this round includes resource recommendation information, execute any one of steps 204 - 1 to 204 - 3 ; if the recommendation response information of this round includes preference query information, execute step 204 - 4 .
[0048] In the embodiment of the present application, the output forms of different types of recommendation response information are not the same. For resource recommendation information, the key information of the recommended resources can be output, and the recommended resources can be output in the form of resource links, resource lists, resource cards, etc. For example, the key information "OK, I will find seven-point sweet milk tea for you right away" is output, and three seven-point sweet milk teas are displayed in the form of a resource list.
[0049] Step 204-1: If the feedback information of this round is selection information of the resource recommendation information, then the selected resource page is entered based on the selection information, and the interactive recommendation mode is ended when a preset behavior is generated based on the selected resource page or when the interactive recommendation mode page is not returned within a preset time.
[0050] Among them, the preset behavior includes order placement behavior.
[0051] Among them, if the feedback information of this round is the selection information of resource recommendation information, that is, the user chooses to view a certain recommended resource, then enter the selected resource page, such as entering a certain product page, entering a certain store page, etc. Further, if the user generates a preset behavior on the selected resource page, it can be considered that the user is relatively satisfied with the resources provided on the selected resource page, that is, the user has obtained the desired recommendation results through the interactive recommendation mode, then the interactive recommendation mode can be ended at this time. The preset behavior here at least includes the ordering behavior. Of course, in some scenarios, it can also include the add-to-cart behavior, etc. For example, during a cross-store full-reduction event, the user may need to purchase multiple products and then place an order together. Other forms of preset behavior are not limited here. In addition, if the user has not returned to the interactive recommendation mode page for a long time, it can be considered that there is no longer a need to obtain recommended resources through the interactive recommendation mode, and the interactive recommendation mode can also be ended at this time.
[0052] Step 204-2: If the feedback information of this round is negative feedback behavior information on the resource recommendation information, determine the next round of input sentences based on the negative feedback behavior information on the resource recommendation information, and continue the next round of interaction.
[0053] When outputting resource recommendations, controls such as "Change" and "Dislike" can be displayed simultaneously. If the user is dissatisfied with the recommended resource, this control can trigger negative feedback to express dissatisfaction with the recommendation. Furthermore, the negative feedback provided by the user can be used as a basis for generating the user's next input statement. Based on the negative feedback on the resource recommendation information, the next round of input statement is generated, and the next round of interactive dialogue continues.
[0054] Step 204-3: If the feedback information of this round is supplementary input information, determine the next round of input sentences based on the supplementary input information and continue the next round of interaction.
[0055] Among them, after outputting the resource recommendation information, if the user feels that the currently recommended resources do not quite match the resources he or she expects, he or she can continue to input information and continue to express his or her demands. At this time, the supplementary input information further input by the user for the resource recommendation information can be used as the next round of input statements, and the next round of interactive dialogue can continue.
[0056] Step 204-4: Determine the next round of input statements based on the feedback information of this round, and continue the next round of interaction.
[0057] In the case where the recommendation response information in this round is preference inquiry information, the feedback information in this round input by the user is used as the next round of input sentences, and the next round of interactive dialogue is continued.
[0058] In an embodiment of the present application, optionally, the dialogue recommendation system includes a dialogue large language model, a search engine, and a recommendation engine; wherein the dialogue large language model is used to perform information inference based on the current round of prompt information to infer a resource recommendation response or a preference inquiry response to the current round of prompt information, infer search key information for resource search, and infer preference key information for preference recommendation; the search engine is used to perform resource search based on the search key information inferred by the dialogue large language model; and the recommendation engine is used to perform preference recommendation based on the preference key information inferred by the dialogue large language model.
[0059] In this embodiment, the conversational recommendation system may specifically include a conversational large language model (LLM), a search engine, and a recommendation engine. The current round of prompt information is input into the conversational large model, which then performs information inference to determine whether to respond to resource recommendations or preference queries. The conversational large model may infer resource recommendations in two situations: when new recommended resources are needed for user recommendations, or when secondary screening is performed based on recommended resources already acquired in this interactive recommendation mode. In the case of new recommended resources, the conversational large model also infers search key information. The search engine is used to search for resources based on the search key information inferred by the conversational large model. The search engine can be the engine used by the platform's search function or a pre-built engine for the interactive recommendation mode. It is preferred to use the platform's existing search engine to reduce development effort. The recommendation engine is used to make preference recommendations based on the preference key information inferred by the conversational large model when the conversational large model infers a preference query response to the current round of prompt information. Similarly, the recommendation engine can be the engine used by the platform's recommendation function or a pre-built engine for the interactive recommendation mode.
[0060] In an embodiment of the present application, optionally, the preset prompt information includes at least one of task definition information, restriction information, reasoning process information and output structure information; wherein, the task definition information is used to describe the information reasoning task; the restriction information is used to describe the information reasoning constraint conditions; the reasoning process information is used to describe the information reasoning logic; and the output structure information is used to describe the presentation form of the output information after information reasoning.
[0061] To ensure that the conversational model can accurately and efficiently provide recommendations, preset prompt information can be pre-built based on the characteristics and purpose of the interactive recommendation model to provide a reference for the conversational model when performing information reasoning. The preset prompt information can include task definition information, constraint information, reasoning process information, output structure information, and so on. Task definition information is used to prompt the conversational model about the role it plays and the tasks it needs to complete when performing information reasoning based on the prompt information in this round; constraint information is used to prompt the conversational model about the constraints it needs to be subject to when performing information reasoning; reasoning process information is used to prompt the conversational model about the reasoning logic it needs to follow when performing information reasoning; and output structure information is used to prompt the conversational model about the output structure of the reasoning information for the information reasoning results. Taking the application of a food delivery platform as an example, the task definition information can be "You are the food delivery platform manager. You understand the food, know the nutritional content of the food, and can recommend products based on user needs. Your decisions must always be made independently without seeking help from the user. Leverage your strengths as an LLM and pursue simple strategies without involving legal issues."
[0062] Further, in an embodiment of the present application, optionally, the restriction condition information includes at least one of the following: completing information reasoning for this round based on the input prompt information for this round, independently generating recommendation response information for this round using the dialogue large language model when the input prompt information for this round has met the recommendation response information generation condition, and completing information reasoning for this round using the latest historical dialogue information of a preset length in the prompt information for this round; and / or, the reasoning process information includes: making preference recommendations based on the prompt information for this round or calling a recommendation engine for preference recommendations when the resource recommendation conditions are not met, and determining recommended resources based on the prompt information for this round or calling a search engine to obtain recommended resources when the resource recommendation conditions are met, wherein the priority of making preference recommendations based on the prompt information for this round is higher than the priority of calling a recommendation engine for preference recommendations, and the priority of determining recommended resources based on the prompt information for this round is higher than the priority of calling a search engine to obtain recommended resources.
[0063] The constraint information may include independently reasoning about the current round's information using the input prompt information without user assistance. It may also include minimizing the use of search engines and recommendation engines. If the conversational model infers a resource recommendation response, prioritizing the use of historically recommended resources obtained during the current interactive search mode. If this resource recommendation is unsuccessful, the search engine is invoked to obtain new recommended resources. This can be understood as minimizing the use of search engines and recommendation engines based on historical feedback if the historical information is sufficient to answer the question. It may also include limiting the short-term memory length of the conversational model by using only the most recent historical conversation information of the preset length if the character length of the historical conversation information in the current round's prompt information exceeds a preset length. The reasoning process information includes directly recommending resources if the resource recommendation conditions are met, prioritizing the use of historical information for resource recommendations, and invoking the search engine to obtain recommended resources if the historical information is unsuccessful. It also includes performing preferred recommendations if the resource recommendation conditions are not met.
[0064] Furthermore, in the interactive recommendation mode, in addition to recommending resources, users can also engage in casual conversations to meet their needs for question consultation, conversational entertainment, etc. In an embodiment of the present application, the type of recommendation response information optionally includes a question answer information type; the reasoning process information includes: identifying user intent based on the input prompt information of this round and determining whether the user intent matches the target service type corresponding to the conversation recommendation system; generating question answer information based on the conversation large language model if the user intent does not match the target service type; generating question answer information and preference query information based on the conversation large language model if the user intent does not match the target service type; if the user intent matches the target service type and the prompt information of this round does not meet the resource recommendation conditions, performing preference recommendation based on the prompt information of this round or calling the recommendation engine for preference recommendation; if the user intent matches the target service type and the prompt information of this round meets the resource recommendation conditions, determining recommended resources based on the prompt information of this round or calling a search engine to obtain recommended resources; wherein, the priority of performing preference recommendation based on the prompt information of this round is higher than the priority of calling the recommendation engine for preference recommendation, and the priority of determining recommended resources based on the prompt information of this round is higher than the priority of calling the search engine to obtain recommended resources.
[0065] Among them, in the interactive recommendation mode, in addition to recommending resources, you can also have a casual chat with the user, and the type of recommendation response information can also include the type of question answering information. Furthermore, the reasoning logic described by the reasoning process information can specifically include: first, perform intention recognition based on the input prompt information of this round; if it is recognized that the user's intention is to chat (that is, it does not match the target service type corresponding to the dialogue recommendation system), then answer the input statement of this round, that is, generate question answering information. In addition, after answering the question, you can also guide it in the direction of the target service and ask the user's preference for subsequent resource recommendation; if it is recognized that the user's intention is to obtain recommended resources (that is, it matches the target service type), and the user's preference is clear (meets the resource recommendation conditions), then directly recommend resources, among which recommendations based on historical information are given priority, and historical information is used as the basis for recommendation. When historical information cannot make a recommendation, the search engine is called to obtain recommended resources. If it is recognized that the user intention matches the target service type, but the user preference is not yet clear, then a preference query is performed, among which preference queries based on historical information are prioritized. For example, the historical information has made it clear that the user wants to obtain breakfast recommendations. Based on the historical information, the user can be further asked whether he likes sweet or salty breakfast. If the historical information cannot further inquire about the user's preference, the recommendation engine is called to obtain the recommended preference. For example, the historical information only makes it clear that the user does not want to obtain breakfast recommendations, and the historical information does not provide more effective preference information. At this time, the recommendation engine can be called to obtain recommended resources.
[0066] Furthermore, in an embodiment of the present application, the inference information output structure optionally includes an inference conclusion, inference response information, and execution command information; wherein the inference conclusion is used to indicate a resource recommendation response or preference query response for the current round of prompt information; the execution command information is used to generate an execution command so that the dialogue large model obtains recommended resources or recommended preferences through the execution command; the inference response information is used to generate the recommendation response information for this round; the preset prompt information also includes inference command information, which is used to describe the set of available commands for the large language model; and the constraint information also includes generating an execution command using the set of available commands in the inference instruction information. The preset prompt information also includes inference evaluation information, and the inference information output structure also includes inference defect information, wherein the inference evaluation information is used to indicate the inference defect information generation rules for the dialogue large language model, and the inference defect information is used to guide the optimization direction of the dialogue large language model. The inference information output structure also includes inference basis information, wherein the inference basis information is used to evaluate the inference effect of the dialogue large language model.
[0067] The reasoning information output structure may specifically include reasoning conclusions, reasoning response information, execution command information, reasoning defect information, and reasoning basis information. Specifically, the reasoning conclusion indicates the dialog model's response to the prompt information in this round, whether it is a resource recommendation response, a preference query response, or a question answer response. The reasoning conclusion may also include the reasoning behind the response to ensure that the reasoning conclusion is not a "hallucination" of the model. Execution command information is used to generate execution commands. The dialog model uses execution commands to obtain recommended resources and recommended preferences, for example, by invoking search engines or recommendation engines through execution commands. Execution command information includes at least an execution command statement and may also include key information, allowing the execution command statement and key information to be used to generate an executable execution command. Furthermore, key information can also be included as part of the reasoning information output structure, thereby generating an executable execution command using the execution command statement in the execution command information and key information in the key information, without limitation here. The reasoning response information is used directly or after packaging to generate the recommendation response information for this round.
[0068] In addition, the preset prompt information can also include reasoning evaluation information, which describes the rules for generating reasoning defect information for the large dialogue model. The large dialogue model can use this reasoning evaluation information to reflect on itself and generate reasoning defect information for self-optimization. Human resources can then analyze this reasoning defect information to identify optimization directions for the large dialogue model, thereby gradually improving its capabilities. In one example, this reasoning evaluation information might include: constantly reviewing and analyzing your actions to ensure you're doing your best; engaging in constructive self-criticism; reflecting on past decisions and strategies to refine your approach; and understanding that every command has a cost, so be smart and efficient, aiming to complete the task in the fewest steps. Furthermore, the reasoning information output structure can also include reasoning evidence information, which describes the reasoning behind the large dialogue model's conclusions and provides a basis for evaluating the large dialogue language model. Human resources can analyze this information to evaluate the model's reasoning effectiveness.
[0069] In one example, the recommendation response information is of the resource recommendation type, and the recommendation conclusion is "The user expressed a desire for milk tea and also specified the sweetness requirement. I can use the search engine to call the data of the food delivery platform to find products that meet the user's needs." The reasoning basis is "Based on the user's question, he has clearly specified the special requirements of the product he wants, namely, milk tea that is seven-point sweet. So I decided to call the search engine to provide the product the user wants." The reasoning flaw is "I assumed that the user wanted the product he clearly mentioned. However, I did not consider that the user may have preferences for price, brand, or other characteristics. I also did not ask the user for specific requirements for these factors. Next time, I may ask the user these questions first to provide more detailed recommendations." The reasoning response information is "Okay, I will find milk tea that is seven-point sweet for you right away." The execution command information is a command to call the search engine to search with "milk tea that is seven-point sweet" as the search key information.
[0070] In another example, the recommendation response information is of the preference inquiry type, and the recommendation conclusion is "Based on the current user question, the user does not seem to know which food to choose. This may mean that he does not have a clear idea of what he wants to eat and needs some advice or recommendations. Therefore, I can call the recommendation engine to recommend some products to him based on the user's historical behavior."; the reasoning basis is "The user's question indicates that he may be seeking advice, so it is reasonable to use the recommendation engine to recommend some products to the user. I chose the recommendation engine because it can recommend products based on the user's historical behavior, so that even if the user does not have a clear demand, he can find food he may like."; the reasoning defect is "The advantage of this decision is that it can meet the user's current needs, that is, help him choose food. However, if the user does not like the recommended food, it may lead to reduced user satisfaction. When implementing this decision, this possible result should be taken into account and the strategy should be adjusted if necessary." The reasoning response information is "What flavor do you like?"; the execution command information is a command to call the recommendation engine for preference recommendation.
[0071] Furthermore, to further illustrate the process of generating recommendation response information for each round using the large conversation model, as shown in FIG3 , an embodiment of the present application also provides another interactive recommendation method based on a large language model, which includes:
[0072] Step 301: Determine the response type of this round to the prompt information of this round using the large language model of the conversation, wherein the prompt information of this round is generated based on the input statement of this round, current feature information, historical round conversation information, and preset prompt information corresponding to the interactive recommendation mode, and the current feature information includes at least one of current user information, current scene information, and current user historical behavior information.
[0073] In the embodiment of the present application, for each round of interaction, prompt information for this round is generated based on the input statement of this round, historical round dialogue information, preset prompt information corresponding to the interactive recommendation model, current user information, current scenario information, and current user historical behavior information. The prompt information for this round is then input into the dialogue model of the dialogue recommendation system. Under the guidance of the preset prompt information, the response type of this round is first inferred to determine whether to respond to the input statement of this round with a resource recommendation, a preference query, or a question answering response. It should be noted that the dialogue recommendation system provided in the embodiment of the present application is primarily used for resource recommendation. If the user's preferences are already clear, resource recommendations can be made directly. If the user's preferences are not yet clear, a preference query is first performed to clarify the user's preferences before making resource recommendations. The preference query can combine known information to first determine the user's likely preferences, so that the preference query can be targeted, providing the user with some preference options for reference, and avoiding blunt, direct inquiries about the user's preferences. When the conversational model determines a resource recommendation response, it also infers key search information based on the current round's input sentence, previous rounds of conversation information, and current feature information, in order to make resource recommendations based on this key search information. If it determines that the user is simply chatting, it can also ask the user a question and, after answering the question, proactively ask the user if they would like a resource recommendation.
[0074] Step 302: When it is determined that the response type of this round is a resource recommendation response and the recommendation response information of the historical round does not include the recommended resources obtained based on the search engine, the search key information for the input statement of this round is generated based on the prompt information of this round, the search engine is called to perform a resource search, and the recommended resources obtained are filtered based on the prompt information of this round, and the resource recommendation information of this round is generated based on the filtered recommended resources.
[0075] In this embodiment of the present application, prioritization is performed using previously obtained recommended resources, followed by invoking a search engine to obtain new recommended resources. When the conversational model infers a resource recommendation response for the current round, the model can first check whether resource recommendations have already been made in previous rounds. If no resource recommendations have been made, the search engine can be invoked to search for resources using the search key information inferred by the conversational model, obtaining the recommended resources returned by the search engine. Search engines typically return recommended resources in the form of a list, and search engines perform searches based on search key information. The recommended resources presented in the list returned by the search engine are ranked by their degree of match with the search key information. When outputting recommended resources to users in an interactive recommendation mode, the number of recommended resources output per round is generally limited, and it is desirable for the recommended resources output to best match user preferences. Therefore, the conversational model uses the current round's input statement, historical round conversation information, and current feature information to perform a secondary screening of the recommended resources returned by the search engine, obtaining a number of high-quality recommended resources for outputting the current round's resource recommendations.
[0076] Step 303, when it is determined that the response type of this round is a resource recommendation response and the recommendation response information of the historical round includes the recommended resources obtained based on the search engine, judge whether the recommended resources obtained in the historical interaction process meet the resource recommendation response conditions for the input statement of this round; if they meet, filter the obtained recommended resources based on the prompt information of this round, and generate the resource recommendation information of this round based on the filtered recommended resources; if they do not meet, generate the search key information for the input statement of this round based on the prompt information of this round, call the search engine to search for resources, and filter the newly obtained recommended resources based on the prompt information of this round, and generate the resource recommendation information of this round based on the filtered recommended resources.
[0077] In an embodiment of the present application, when the dialogue model infers that a resource recommendation response is made in this round, and the search engine has been called before to obtain recommended resources, the dialogue model will give priority to using the recommended resources that have been obtained before to try to make resource recommendations in this round. If the dialogue model determines that the recommended resources for this round can be filtered out for the input statement of this round from the recommended resources obtained in the historical interaction process, that is, the recommended resources obtained in the historical interaction process meet the response conditions for the input statement of this round, then the recommended resources obtained can be directly filtered out according to the search key information, and the filtered recommended resources can be used to generate resource recommendation information for this round for resource recommendations in this round. For example, a resource for seven-point sweet milk tea has been obtained before, and the user expressed the desire to obtain brown sugar flavored milk tea in this round. At this time, the brown sugar flavored milk tea can be filtered out from the seven-point sweet milk tea resources obtained before for recommendation in this round. If the dialogue model determines that it cannot use the obtained recommended resources to filter out the recommended resources for this round, that is, the obtained recommended resources do not meet the response conditions for the input statements of this round, it is necessary to call the search engine to search for resources according to the search key information inferred by the dialogue model. Similar to the description in step 302, the dialogue model can also perform a secondary screening of the newly obtained recommended resources and recommend several better resources.
[0078] Step 304, when it is determined that the response type of this round is a preference inquiry response, judge whether the recommended preferences obtained in the historical interaction process meet the preference inquiry response conditions for the input statement of this round; if they do, generate the preference inquiry information of this round based on the prompt information of this round and the obtained recommended preferences; if they do not meet the conditions, generate the preference key information for the input statement of this round based on the prompt information of this round, call the recommendation engine to obtain the preference recommendation information corresponding to the preference key information, and generate the preference inquiry information of this round based on the preference recommendation information.
[0079] In the embodiment of the present application, preference inquiries are made using known information first, and secondly, the recommendation engine is called to obtain recommended preferences. When the dialogue model infers that a preference inquiry is made in this round, it can first be determined whether preference detection can be continued based on the recommended preferences already obtained in the historical round dialogue information, that is, whether the recommended preferences obtained in the historical interaction process meet the preference inquiry response conditions for the input statement of this round. If so, the recommended preferences already obtained and the prompt information of this round are used to determine the recommended preferences of this round and generate the preference inquiry information of this round. For example, in the previous interaction process, it has been determined that the user wants to obtain recommendations for breakfast with a sweet taste. The dialogue model can determine some breakfast categories with a sweet taste (such as muffins, French toast, jam biscuits, yogurt and fruit, oatmeal porridge, etc.) based on its previously learned knowledge, and select several of these breakfast categories with a sweet taste based on the current feature information, and generate the corresponding preference inquiry information of this round (for example, you can try French toast or muffins, both are very delicious~). In addition, to ensure that the taste preferences recommended by the large model in the current scenario have corresponding resources, when entering the interactive recommendation mode, the platform's product supply information can be obtained based on the current scenario information. When the dialogue large model makes preference recommendations, it can also query whether these recommended preferences have corresponding supply products. If the recommended preferences obtained during the historical interaction process do not meet the preference query response conditions for the current round of input statements, preference key information is generated based on the current round of input statements, current feature information, and historical round interaction information. The recommendation engine is called to obtain the corresponding preference recommendation information. The preference recommendation information is then screened again to generate the current round of preference query information.
[0080] In one example, as shown in Figures 4 and 5, after entering the interactive recommendation mode, if it is the first time to enter, the user identification and geographic location information are first provided to the dialogue recommendation system, so that the dialogue recommendation system calls the user engine to obtain the current user information, the current user historical behavior information, and calls the LBS engine to obtain the current scene information; the user inputs a question or generates feedback behavior, that is, user feedback is provided. The system uses the current user information, the current user historical behavior information, the current scene information, the user question of this round (that is, the input statement of this round), the historical round dialogue information (if any) and the prompt information template (that is, the preset prompt information corresponding to the interactive recommendation mode) to construct the prompt information of this round. The dialogue model determines and gives the answer (that is, the recommendation response information of this round), or gives the answer by calling the search engine, or gives the answer by calling the recommendation engine, and the question entered by the user and the answer given by the dialogue model are stored as the historical round dialogue information; the answer is displayed to the user, and when the user gives negative feedback or continues to input a statement to determine the next round of dialogue interaction, the above process is repeated until the interactive recommendation mode ends.
[0081] The present application also provides a method for training a large conversational language model, wherein the interactive recommendation model is implemented in a target e-commerce platform; as shown in FIG6 , the method includes:
[0082] Step 601, obtain multiple real historical behavior data generated based on the search page of the target e-commerce platform, wherein each real historical behavior data includes a historical behavior sequence composed of historical behaviors generated at multiple historical time points, and the historical behaviors include search terms, click status and order status.
[0083] In an embodiment of the present application, multiple real historical behavior data are obtained from the real log generated by the target e-commerce platform based on the search page SRP, among which the real log of the order placement behavior is preferably used to obtain the real historical behavior data, and each real historical behavior data includes a historical behavior sequence composed of historical behaviors generated at multiple historical time points.
[0084] Step 602: Generate a large language model through dialogue to generate dialogue data samples corresponding to the real historical behavior data.
[0085] Optionally, a large language model is generated through dialogue to generate dialogue data samples corresponding to the real historical behavior data, including: based on the historical user corresponding to the real historical behavior data, obtaining historical user information corresponding to the historical user, and user historical behavior data of the historical user before the time when the real historical behavior data was generated, and based on the time and place corresponding to the real historical behavior data, obtaining historical scene data corresponding to the real historical behavior data; based on the real historical behavior data, the historical user information, the user historical behavior data and the historical scene data, determining historical data samples, and generating a large language model through dialogue to generate dialogue data samples corresponding to the historical data samples.
[0086] In the embodiment of the present application, for each piece of real historical behavior data, the historical user corresponding to the real historical behavior data is determined, the historical behavior data of the user generated before the real historical behavior data is obtained, the historical user information of the historical user is obtained, and the time and location corresponding to the real historical behavior data are obtained. The corresponding historical scene data is determined based on the time and location. The historical scene information includes time scene information, geographical scene information, historical weather information, etc. The historical user's historical behavior information is used with the authorization of the user, and specifically may include the historical user's search, click, and order behavior sequence.
[0087] This information is then used to determine historical data samples, and conversation data samples are generated using a large conversation generation model (such as the Qwen-7b model). Furthermore, to ensure the validity and reliability of conversation data samples, scoring and filtering can also be performed. In one example, a conversation data sample might include the following: User: Hello, could you recommend any delicious breakfasts? AI: Of course. Would you like something sweet or savory? User: I'd like a sweet breakfast. A: You could try French toast or muffins, both are delicious. User: Sounds great. Any other recommendations? AI: You could try jam biscuits or yogurt with fruit, which are also great breakfast options. User: Thanks for the recommendations, but I'd like a more nutritious breakfast. Any suggestions? AI: You could consider oatmeal or whole-wheat bread with a boiled egg and milk to enrich your breakfast. User: Sounds great. Any other breakfast recommendations? AI: You could try various fruit and vegetable salads or homemade wraps, which are also great for breakfast. User: Okay, both sound great. I'll try them. Thank you for your recommendations. AI: You're welcome. Enjoy your breakfast.
[0088] Step 603: Use the conversation data samples to train and obtain the conversation language model.
[0089] In an embodiment of the present application, a large model is trained using conversation data samples to obtain a large conversation model. Optionally, the conversation data samples include at least one conversation round sample, each conversation round sample including a user question sample and a system answer sample. The method of using the conversation data samples to train the large conversation language model includes: for any conversation data sample, generating training samples corresponding to each conversation round sample, wherein each training round sample includes a training input sample and a training output sample, wherein the training input sample is prompt information generated based on any user question sample, historical conversation round samples corresponding to the user question sample, the historical user information, the user's historical behavior data, the historical scenario data, and the preset prompt information, and the training output sample is any system answer sample. The large conversation language model is trained using the training samples.
[0090] In this embodiment, when training a large conversation model, a set of conversation data samples can be split into several rounds of conversation samples. Each round of conversation samples includes a user question sample and a system answer sample. Each round of conversation samples can be used to construct a training sample. For each round of conversation samples, the user question sample in the conversation sample, the previous round of conversation samples, the user's historical behavior data, historical scenario data, historical user information, and preset prompt information are used to generate training input samples, and the system answer sample in the conversation sample is used to generate training output samples. This is how large model training is performed.
[0091] The technical solution of the embodiment of this application provides a new interactive recommendation system. Compared with traditional dialogue recommendation systems, this system utilizes the in-context learning capabilities of a large model, comprehensively considers user information, location-based services (LBS) information, historical interactions, and other information, and considers user long-term and short-term preferences. It makes autonomous decisions on resource recommendations or preference inquiries, which helps solve the cold start problem and reduce the labor cost of shopping guides. In addition, even when users find it difficult to quickly and accurately describe their needs, it can gradually infer user needs and make resource recommendations, thereby improving recommendation accuracy and enhancing the user experience.
[0092] Furthermore, an embodiment of the present application provides a conversational recommendation system based on a large language model. As shown in FIG7 , the conversational recommendation system includes an initialization module, a prompt information construction module, a conversational large language model, and a feedback information recognition module. The initialization module is configured to initialize current feature information based on a trigger signal of an interactive recommendation mode, wherein the current feature information includes at least one of current user information, current scene information, and current user historical behavior information. The prompt information construction module is configured to, upon receiving a current round input statement corresponding to the current user, construct current round prompt information based on the current round input statement, the current feature information, historical round conversation information, and preset prompt information corresponding to the interactive recommendation mode. When the current round is the first round, the historical round conversation information is empty; when the current round is not the first round, the historical round conversation information includes historical round input statements and historical round recommendation response information arranged in chronological order. The conversational large language model is configured to generate current round recommendation response information corresponding to the current round input statement. The feedback information recognition module is configured to determine whether to continue the next round of interaction or end the interactive recommendation mode based on the current round feedback information received for the current round recommendation response information.
[0093] It should be noted that for other corresponding descriptions of the various functional units involved in the dialogue recommendation system based on a large language model provided in an embodiment of the present application, please refer to the corresponding descriptions in the methods of Figures 1 to 6, and will not be repeated here.
[0094] Furthermore, an embodiment of the present application provides an interactive recommendation device, which is used to implement the methods in Figures 1 to 6 above, and will not be described in detail here.
[0095] It should be noted that for other corresponding descriptions of the functional units involved in an interactive recommendation device provided in an embodiment of the present application, reference can be made to the corresponding descriptions in the methods of Figures 1 to 6, which will not be repeated here.
[0096] The embodiment of the present application also provides a computer device, which can be specifically a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0097] Those skilled in the art will understand that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different component arrangement.
[0098] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0099] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0100] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0101] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, and the like.
[0102] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0103] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. An interactive recommendation method based on a large language model, characterized in that: The method comprises: In the case of entering the interactive recommendation mode, initializing current feature information and receiving a current round of input sentences corresponding to the current user, wherein the current feature information includes at least one of current user information, current scene information, and current user historical behavior information; Constructing prompt information for this round according to the input sentence for this round, the current feature information, the historical round dialogue information, and the preset prompt information corresponding to the interactive recommendation mode, wherein when this round is the first round, the historical round dialogue information is empty, and when this round is not the first round, the historical round dialogue information includes the historical round input sentences and historical round recommendation response information arranged in chronological order; Outputting the current round recommendation response information corresponding to the current round input sentence using the dialogue language model; Receive current round feedback information for the current round recommendation response information, and continue the next round of interaction or end the interactive recommendation mode according to the current round feedback information.
2. The method according to claim 1, characterized in that The types of recommendation response information include resource recommendation information types and preference inquiry information types, wherein the resource recommendation information types include product recommendation information types and / or store recommendation information types.
3. The method according to claim 2, characterized in that In the case that the recommendation response information of this round includes resource recommendation information, continuing the next round of interaction or ending the interactive recommendation mode according to the feedback information of this round includes: If the feedback information of this round is selection information of the resource recommendation information, then entering the selected resource page based on the selection information, and terminating the interactive recommendation mode when a preset behavior is generated based on the selected resource page or when the interactive recommendation mode page is not returned within a preset time, wherein the preset behavior includes an order placement behavior; If the feedback information of this round is negative feedback behavior information on the resource recommendation information, determining the next round of input sentences based on the negative feedback behavior information on the resource recommendation information, and continuing the next round of interaction; If the feedback information of this round is supplementary input information, the next round of input statements is determined based on the supplementary input information, and the next round of interaction is continued.
4. The method according to claim 2, characterized in that: In the case that the current round recommendation response information includes preference inquiry information, continuing the next round of interaction or ending the interactive recommendation mode according to the current round feedback information includes: According to the feedback information of this round, the next round of input sentences is determined, and the next round of interaction continues.
5. The method according to claim 2, characterized in that: When the character length of the historical round dialogue information is greater than a preset length value, semantic understanding is performed on the historical round dialogue information, and summary information obtained by the semantic understanding replaces the historical round dialogue information to generate the prompt information of this round.
6. The method according to any one of claims 2 to 5, characterized in that The large dialogue language model is used to perform information reasoning based on the current round of prompt information, so as to infer a resource recommendation response or a preference inquiry response to the current round of prompt information, infer search key information for resource search and call the search engine for resource search, and infer preference key information for preference recommendation and call the recommendation engine for preference recommendation.
7. The method according to claim 6, characterized in that The preset prompt information includes at least one of task definition information, constraint information, reasoning process information and output structure information; Among them, the task definition information is used to describe the information reasoning task; the restriction condition information is used to describe the information reasoning constraint conditions; the reasoning process information is used to describe the information reasoning logic; and the output structure information is used to describe the presentation form of the output information after information reasoning.
8. The method according to claim 7, characterized in that The restriction condition information includes at least one of the following: completing information reasoning for this round based on the input prompt information for this round, using the dialogue large language model to independently generate recommendation response information for this round when the input prompt information for this round has satisfied the recommendation response information generation condition, and completing information reasoning for this round using the latest historical dialogue information of a preset length in the prompt information for this round; and / or, The reasoning process information includes: making preference recommendations based on the prompt information of this round or calling the recommendation engine to make preference recommendations when the resource recommendation conditions are not met, and determining recommended resources based on the prompt information of this round or calling the search engine to obtain recommended resources when the resource recommendation conditions are met, wherein the priority of making preference recommendations based on the prompt information of this round is higher than the priority of calling the recommendation engine to make preference recommendations, and the priority of determining recommended resources based on the prompt information of this round is higher than the priority of calling the search engine to obtain recommended resources.
9. The method according to claim 8, characterized in that The types of recommended response information also include question answer information types; The reasoning process information includes: identifying the user intention based on the input prompt information of this round and judging whether the user intention matches the target service type corresponding to the dialogue large language model; generating question answering information based on the dialogue large language model when the user intention does not match the target service type; generating question answering information and preference inquiry information based on the dialogue large language model when the user intention does not match the target service type; making preference recommendations based on the prompt information of this round or calling the recommendation engine for preference recommendations when the user intention matches the target service type and the prompt information of this round does not meet the resource recommendation conditions; determining recommended resources based on the prompt information of this round or calling the search engine to obtain recommended resources when the user intention matches the target service type and the prompt information of this round meets the resource recommendation conditions; wherein the priority of making preference recommendations based on the prompt information of this round is higher than the priority of calling the recommendation engine for preference recommendations, and the priority of determining recommended resources based on the prompt information of this round is higher than the priority of calling the search engine to obtain recommended resources.
10. The method according to claim 7, characterized in that The reasoning information output structure includes reasoning conclusion, reasoning response information, and execution command information; wherein, the reasoning conclusion is used to indicate a resource recommendation response or a preference inquiry response to the prompt information of this round; the reasoning response information is used to generate recommendation response information of this round; the execution command information is used to generate an execution command so that the dialogue macro model obtains recommended resources or recommended preferences through the execution command.
11. The method according to claim 10, characterized in that The preset prompt information also includes inference command information, and the inference command information is used to describe the usable command set of the large language model; the restriction condition information also includes generating an execution command using the usable command set in the inference instruction information.
12. The method according to claim 10, characterized in that The preset prompt information also includes reasoning evaluation information, and the reasoning information output structure also includes reasoning defect information, wherein the reasoning evaluation information is used to prompt the reasoning defect information generation rule of the dialogue large language model, and the reasoning defect information is used to guide the optimization direction of the dialogue large language model; and / or, The reasoning information output structure also includes reasoning basis information, wherein the reasoning basis information is used to evaluate the reasoning effect of the large dialogue language model.
13. The method according to claim 6, characterized in that The using of the dialogue large language model to output the current round recommendation response information corresponding to the current round input sentence includes: Determine a current round response type to the current round prompt information by using the large dialogue language model; When it is determined that the response type of the current round is a resource recommendation response and the historical round recommendation response information includes recommended resources obtained based on the search engine, determining whether the recommended resources obtained in the historical interaction process meet the resource recommendation response conditions for the input statement of the current round; If they are in compliance, the obtained recommended resources are screened based on the prompt information of this round, and resource recommendation information of this round is generated based on the screened recommended resources; If not, the search key information for the input statement of this round is generated based on the prompt information of this round, the search engine is called to search for resources, and the newly obtained recommended resources are screened based on the prompt information of this round, and the resource recommendation information of this round is generated based on the screened recommended resources.
14. The method according to claim 13, characterized in that After determining the current round response type to the current round prompt information by using the dialogue large language model, the method further includes: When it is determined that the response type of this round is a resource recommendation response and the recommendation response information of the historical round does not include the recommended resources obtained based on the search engine, the search key information for the input statement of this round is generated based on the prompt information of this round, the search engine is called to perform a resource search, and the recommended resources obtained are screened based on the prompt information of this round, and the resource recommendation information of this round is generated based on the screened recommended resources.
15. The method according to claim 13, characterized in that After determining the current round response type to the current round prompt information by using the dialogue large language model, the method further includes: In the case where it is determined that the response type of the current round is a preference inquiry response, determining whether the recommendation preferences obtained in the historical interaction process meet the preference inquiry response conditions for the input statement of the current round; If it is in accordance with the requirements, then generating the current round preference inquiry information based on the current round prompt information and the obtained recommendation preferences; If not, preference key information for the input statement of this round is generated based on the prompt information of this round, the recommendation engine is called to obtain preference recommendation information corresponding to the preference key information, and preference query information of this round is generated based on the preference recommendation information.
16. The method according to claim 1, characterized in that The interactive recommendation model is implemented in the target e-commerce platform; Before entering the interactive recommendation mode, the method further includes: Acquire multiple pieces of real historical behavior data generated based on the search page of the target e-commerce platform, wherein each piece of real historical behavior data includes a historical behavior sequence consisting of historical behaviors generated at multiple historical time points, and the historical behaviors include search terms, click status, and order status; Generate a large language model through dialogue, and generate dialogue data samples corresponding to the real historical behavior data; The large dialogue language model is obtained by training with the dialogue data samples.
17. The method according to claim 16, characterized in that The step of generating a large language model through dialogue to generate dialogue data samples corresponding to the real historical behavior data includes: Based on the historical user corresponding to the real historical behavior data, obtaining the historical user information corresponding to the historical user and the user historical behavior data of the historical user before the time when the real historical behavior data was generated, and based on the time and place corresponding to the real historical behavior data, obtaining the historical scene data corresponding to the real historical behavior data; Based on the real historical behavior data, the historical user information, the user historical behavior data and the historical scenario data, historical data samples are determined, and a large language model is generated through dialogue to generate dialogue data samples corresponding to the historical data samples.
18. The method according to claim 17, characterized in that The dialogue data sample includes at least one round of dialogue samples, each round of dialogue samples includes a user question sample and a system answer sample; the step of training the dialogue large language model using the dialogue data sample includes: For any dialogue data sample, generate training samples corresponding to each round of dialogue samples, wherein any round of training samples includes training input samples and training output samples, the training input samples are prompt information generated based on any round of user question samples, the historical round of dialogue samples corresponding to the any round of user question samples, the historical user information, the user historical behavior data, the historical scene data and the preset prompt information, and the training output samples are any round of system answer samples; The large dialogue language model is trained using the training samples.
19. A conversational recommendation system based on a large language model, characterized in that: The dialogue recommendation system includes an initialization module, a prompt information construction module, a dialogue large language model and a feedback information recognition module; The initialization module is used to initialize current feature information based on a trigger signal of the interactive recommendation mode, wherein the current feature information includes at least one of current user information, current scene information, and current user historical behavior information; The prompt information construction module is used to construct the prompt information of this round based on the input sentence of this round, the current feature information, the historical round dialogue information and the preset prompt information corresponding to the interactive recommendation mode when receiving the current round input sentence corresponding to the current user, wherein when this round is the first round, the historical round dialogue information is empty, and when this round is not the first round, the historical round dialogue information includes the historical round input sentences and the historical round recommendation response information arranged in chronological order; The dialogue large language model is used to generate the current round recommendation response information corresponding to the current round input sentence; The feedback information identification module is used to determine whether to continue the next round of interaction or end the interactive recommendation mode according to the received feedback information of the current round in response to the recommendation response information of the current round.
20. The system according to claim 19, characterized in that The types of recommendation response information include question answer information type, resource recommendation information type and preference inquiry information type; In the case where the current round of recommendation response information includes resource recommendation information, the feedback information identification module is specifically configured to: If the feedback information of this round is selection information of the resource recommendation information, the selected resource information is output based on the selection information, and when a preset behavior is generated based on the selected resource information or the next round of input statements is not received within a preset time, the interactive recommendation mode is terminated, wherein the preset behavior includes an order placement behavior; If the feedback information of this round is negative feedback behavior information on the resource recommendation information, determining the next round of input sentences based on the negative feedback behavior information on the resource recommendation information, and continuing the next round of interaction; If the feedback information of this round is supplementary input information, determining the next round of input sentences based on the supplementary input information, and continuing the next round of interaction; In the case where the recommendation response information of this round includes preference inquiry information, the feedback information identification module is specifically used to: According to the feedback information of this round, the next round of input sentences is determined, and the next round of interaction continues.
21. The system according to claim 19, characterized in that The dialog recommendation system further includes: a search engine calling module and a recommendation engine calling module; The large dialogue language model is also used to perform information reasoning based on the current round of prompt information, including reasoning about a question answering response, a resource recommendation response or a preference inquiry response to the current round of prompt information; reasoning about question answering information; reasoning about search key information for resource search, and calling a search engine for resource search through the search engine calling module; and reasoning about preference key information for preference recommendation, and calling a recommendation engine for preference recommendation through the recommendation engine calling module.
22. The system according to claim 21, characterized in that The large dialogue language model is specifically used for: Determine a current round response type to the current round prompt information; When it is determined that the response type of the current round is a resource recommendation response and the historical round recommendation response information includes recommended resources obtained based on the search engine, determining whether the recommended resources obtained in the historical interaction process meet the resource recommendation response conditions for the input statement of the current round; If they are in compliance, the obtained recommended resources are screened based on the prompt information of this round, and resource recommendation information of this round is generated based on the screened recommended resources; If not, generating search key information for the input statement of the current round based on the prompt information of the current round, calling the search engine to search for resources, and screening the newly obtained recommended resources based on the prompt information of the current round, and generating resource recommendation information of the current round based on the screened recommended resources; In the case where it is determined that the response type of the current round is a resource recommendation response and the recommendation response information of the historical round does not include the recommended resources obtained based on the search engine, generating search key information for the input statement of the current round based on the prompt information of the current round, calling the search engine to search for resources, and filtering the obtained recommended resources based on the prompt information of the current round, and generating resource recommendation information of the current round based on the filtered recommended resources; In the case where it is determined that the response type of this round is a preference inquiry response, it is determined whether the recommended preferences obtained in the historical interaction process meet the preference inquiry response conditions for the input statement of this round; if they meet, based on the prompt information of this round and the obtained recommended preferences, Good generation of this round of preference inquiry information; If not, generating preference key information for the input sentence of the current round based on the prompt information of the current round, calling the recommendation engine to obtain preference recommendation information corresponding to the preference key information, and generating preference query information of the current round based on the preference recommendation information; In the case where it is determined that the response type of the current round is a question answer response, generating question answer information corresponding to the input sentence of the current round; Alternatively, question answer information and resource recommendation inquiry information corresponding to the current round input sentence are generated.
23. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 18 is implemented.
24. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 18 is implemented.
Citation Information
Patent Citations
Man-machine interaction method and system based on artificial intelligence
CN105068661A
Artificial intelligence-based prompt information recommendation method and apparatus
CN106557576A
Interaction instruction prompting method, intelligent equipment and readable storage medium
CN113704631A
Human-computer interaction method, device and system
CN116483980A
Problem searching method, device and equipment based on AI language model and medium
CN116975232A
Cited By
Vehicle recommendation method and device, storage medium and program product
CN120429509A
Structure-driven dialogue form-filling prompt word dynamic generation method and structure-driven dialogue form-filling prompt word dynamic generation device
CN120493918A
Take-out service system and method based on vertical domain large model, and take-out service platform
CN120612159A
Multi-modal intelligent dialogue method and system based on AI language model
CN120744063A
Search system updating method and device based on large language model, equipment and storage medium
CN121116353A