A Generative Recommendation Method Based on Adaptive Reflection Mechanism Driven by Large Language Models

The generative recommendation method based on a large language model driven by an adaptive reflection mechanism solves the problems of lengthy reflection iterations and high computational overhead in existing systems. It enables real-time correction and content optimization, improves the efficiency and accuracy of the recommendation system, and ensures that the recommendation results match the user's intent.

CN121412461BActive Publication Date: 2026-03-10ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing generative recommendation systems lack internal reflection mechanisms, which may lead to intent drift or semantic deviation in recommendation results. They cannot autonomously detect errors and correct deviations, and the reflection process is iterative, computationally expensive, and lacks lightweight or parallel fast reflection paths, making it difficult to apply in high-concurrency, low-latency real-time recommendation scenarios.

Method used

An adaptive reflection mechanism is adopted, which calculates multi-level reflection scores, including local, macro and strategic reflection scores, simultaneously during the generation stage through the rapid reflection module. This enables immediate correction and content optimization, builds a lightweight, real-time reflection mechanism, and introduces multi-dimensional consistency indicators for dynamic optimization, reducing the probability of user intent deviation.

Benefits of technology

It enables real-time correction and content optimization of generated recommendation results, improving recommendation efficiency and accuracy, ensuring that recommendation results are more in line with user intent in terms of semantics, theme and style, dynamically balancing effect and quality, and reducing inference latency and computational cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121412461B_ABST
    Figure CN121412461B_ABST
Patent Text Reader

Abstract

This invention discloses a generative recommendation method based on an adaptive reflection mechanism driven by a large language model, relating to the field of recommendation technology. The method includes: online real-time learning of user behavior data to determine initial recommendation results using a large language model; automated feedback learning based on the initial recommendation results to calculate a three-layer reflection score and a comprehensive reflection score; performing full or partial regeneration on the initial recommendation network based on the three-layer reflection score and the comprehensive reflection score to regenerate the initial recommendation results; re-evaluating the newly generated initial recommendation results to determine a new comprehensive reflection score; if the new comprehensive reflection score is less than a comprehensive score threshold, optimizing local segments of the initial recommendation results to obtain locally generated results; and weightedly fusing the locally generated results and the newly generated initial recommendation results to obtain a global recommendation result. This method can improve recommendation efficiency while maintaining recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommendation technology, and in particular to a generative recommendation method for large language models driven by an adaptive reflection mechanism. Background Technology

[0002] With the rapid development of artificial intelligence technology, large-scale models have demonstrated unprecedented capabilities in the fields of multimodal understanding and generation. The rapid development of generative large-scale models has driven the evolution of generative recommendation methods. Generative recommendation based on large-scale models has broken through the limitations of traditional discriminative recommendation, which only performs "item ranking," and has achieved wide application in text generation, ID recommendation, multimodal fusion, and intelligent conversational recommendation, gradually becoming the main way to recommend personalized items to users.

[0003] In recent years, generative recommendation driven by Large Language Models (LLMs) has become an important direction in intelligent recommendation. However, existing generative recommendation systems lack internal reflection mechanisms to detect potential biases, factual errors, or semantic inconsistencies with the user's contextual intent after generating recommendations in one go. This leads to potential intent drift or semantic deviation in the recommendation results, as the system cannot autonomously detect errors and correct biases, severely affecting the accuracy of recommendations. To address this issue, existing research has introduced reasoning and reflection mechanisms into generative recommendation systems, such as R4Rec, which can improve the accuracy of generated recommendations to some extent. However, existing generative recommendation systems design the reflection process as a separate post-processing stage, requiring the model to first generate complete recommendations and then call the large model for reflection and rewriting, resulting in a significant increase in reasoning latency.

[0004] Therefore, existing technologies urgently need a method that can improve recommendation efficiency while ensuring recommendation accuracy. Summary of the Invention

[0005] Therefore, it is necessary to provide a generative recommendation method for large language models driven by an adaptive reflection mechanism to address the aforementioned technical problems.

[0006] The present invention adopts the following technical solution:

[0007] This invention provides a generative recommendation method for large language models driven by an adaptive reflection mechanism, comprising:

[0008] Based on user behavior data, a large language model is used to predict and determine the initial recommendation results;

[0009] According to the initial recommendation result, a local reflection score, a macro reflection score and a strategy reflection score are calculated, and the local reflection score, the macro reflection score and the strategy reflection score are weighted by a reflection weight of each reflection score to obtain a comprehensive reflection score; the local reflection score represents a local deviation between the initial recommendation result and the user intention at a semantic level; the macro reflection score represents a matching degree of the initial recommendation result and the user long-term interest and theme distribution; and the strategy reflection score represents an influence of the initial recommendation result on recommendation quality and stability.

[0010] According to the various reflection scores and the comprehensive reflection score, full regeneration or local regeneration is performed on the initial recommendation network to regenerate the initial recommendation result; the full regeneration includes adjusting parameters of the large language model to regenerate the initial recommendation result; and the local regeneration includes adjusting a local segment of the initial recommendation result.

[0011] The newly generated initial recommendation result is re-evaluated to determine a new comprehensive reflection score, and if the new comprehensive reflection score is less than a comprehensive score threshold, the newly generated initial recommendation result is taken as a context input large model to optimize a local segment of the initial recommendation result to obtain a local generation result.

[0012] The local generation result and the newly generated initial recommendation result are weighted and fused to obtain a global recommendation result.

[0013] Optionally, based on the behavior data of the user, prediction is performed by the large language model to determine the initial recommendation result, including:

[0014] The behavior data of the user is input into a pre-trained multi-modal feature fusion network to obtain a fine-grained user feature vector; the fine-grained user feature vector includes a user intention vector, a user interest feature vector and a user context feature vector.

[0015] The user intention vector, the user interest feature vector and the user context feature vector are spliced to obtain a user feature vector.

[0016] The user feature vector is injected into the large language model to obtain the initial recommendation result.

[0017] Optionally, the behavior data includes user intention recognition content; according to the initial recommendation result, a local reflection score is calculated, including:

[0018] A first semantic similarity between the user intention vector and an embedding vector of the initial recommendation result is calculated.

[0019] An attention distribution of the initial recommendation result to the user intention recognition content is calculated, and an entropy value of the attention distribution is calculated, and a difference value between 1 and the entropy value is determined as an attention score of the user query intention.

[0020] We weight the first semantic similarity and attention score to obtain the local reflection score.

[0021] Optionally, the user intent identification content includes the user's historical click sequence; based on the initial recommendation results, a macro-reflection score is calculated, including:

[0022] Calculate the KL divergence between the topic distribution derived from the initial recommendation results and the historical topic distribution, and determine the long-term interest consistency value as the reciprocal of the KL divergence.

[0023] The hidden state of the user's historical click sequence is calculated by a recurrent neural network, and the second semantic similarity between the hidden state and the embedding vector of the initial recommendation result is calculated. The second semantic similarity is determined as the cross-session coherence value.

[0024] The macro-reflection score is obtained by weighting the long-term interest consistency score and the cross-conversation coherence score.

[0025] Optionally, based on the initial recommendation results, a policy reflection score is calculated, including:

[0026] Obtain the first semantic similarity between the user intent vector and the embedding vector of the initial recommendation result, and obtain the KL divergence between the topic distribution derived from the initial recommendation result and the historical topic distribution. The difference between 1 and the KL divergence is determined as the behavior consistency value.

[0027] The content relevance index is obtained by weighting the first semantic similarity and behavioral consistency values.

[0028] The values ​​for diversity and novelty indices are determined based on the differences between different items in the initial recommendation results and the proportion of unpopular items or low-frequency tags in the initial recommendation results.

[0029] The interaction performance metrics are determined based on real user behavior signals from the initial recommendation results.

[0030] The quality score of the initial recommendation result is obtained by weighting the values ​​of the content relevance index, the diversity and novelty index, and the interaction effect index.

[0031] The strategy reflection score is determined based on the quality score of the initial recommendation results.

[0032] Optionally, the values ​​for diversity and novelty indices can be... The calculation formula is:

[0033] ;

[0034] in, This represents the number of recommended items in the initial recommendation results. The first in the initial recommendation resultsi Embedsion vectors of recommended items, The first in the initial recommendation results j Embedsion vectors of recommended items, express and Cosine similarity between them To control the impact of novelty on the overall quality of the initial recommendation results, Indicates the initial recommendation result The proportion of niche or low-frequency items;

[0035] Real user behavior signals include click-through rate, normalized values ​​of average user dwell time, and conversion rate; interaction performance metrics are... The calculation formula is:

[0036] ;

[0037] in, As a weighting factor, For click-through rate, This refers to the average time a user spends on the recommended items in the initial recommendation results. The historical average time users spend on all products. The normalized value of the average user dwell time. For conversion rate.

[0038] Optionally, based on various reflection scores and the comprehensive reflection score, the initial recommendation network is fully or partially regenerated to regenerate the initial recommendation results, including:

[0039] If the overall reflection score is less than the preset overall score threshold or the strategy reflection score is less than the corresponding threshold, the temperature parameter and top-k parameter of the large language model are adjusted according to the strategy reflection score, and the initial recommendation results are regenerated.

[0040] If the overall reflection score is greater than or equal to the overall score threshold, and the local reflection score or macro reflection score is less than the corresponding reflection threshold, but the strategy score is greater than or equal to the corresponding reflection threshold, then the local deviation segments in the initial recommendation results are determined based on the similarity between the user intent vector and each segment in the initial recommendation results. The local deviation segments are then generated using a large language model, and the local rewriting prompts and user intent are input into the large language model to obtain the optimized local deviation segments. The optimized local deviation segments are then fused with the undevised segments in the initial recommendation results to obtain the newly generated initial recommendation results.

[0041] Optionally, the temperature and top-k parameters of the large language model are adjusted based on the policy reflection score to regenerate the initial recommendation results, including:

[0042] Based on the strategy reflection score, adjust the temperature and top-k parameters of the large language model;

[0043] The initial recommendation results are regenerated by adjusting the parameters of the large language model; the large language model satisfies multidimensional constraints in the process of regenerating the initial recommendation results; the multidimensional constraints include semantic constraints and interest constraints.

[0044] The semantic constraints are as follows:

[0045] ;

[0046] in, The maximum semantic similarity. The first in the initial recommendation results i Recommended items Embedded vector, For user intent vectors, express and Cosine similarity between them;

[0047] Interest constraints are:

[0048] ;

[0049] in, The maximum value of behavioral similarity. The topic distribution derived from the initial recommendation results. Distributed by historical themes, The KL divergence between the topic distribution derived from the initial recommendation results and the historical topic distribution.

[0050] Optionally, based on the similarity between the user intent vector and each segment in the initial recommendation result, locally biased segments in the initial recommendation result are determined, including:

[0051] Fragments with similarity less than a local threshold corresponding to the initial recommendation results are identified as local bias fragments.

[0052] Optionally, the method further includes:

[0053] After recommending the global recommendation results to users, obtain the user feedback behavior corresponding to the global recommendation results; the user feedback behavior includes the user's click behavior, dwell behavior and interaction behavior on the recommended content;

[0054] By adjusting factors, user feedback behavior is quantified to obtain a feedback score;

[0055] The reflection weight of each reflection score is adjusted based on feedback scores and each type of reflection score.

[0056] The parameters of the large language model are adjusted based on feedback scores.

[0057] This invention provides a generative recommender system based on an adaptive reflection mechanism driven by a large language model, comprising:

[0058] The initial recommendation module is used to predict and determine the initial recommendation results based on user behavior data and a large language model.

[0059] The rapid reflection module calculates local reflection scores, macro reflection scores, and strategic reflection scores based on the initial recommendation results. It then weights these scores using the reflection weights of each type to obtain a comprehensive reflection score. The local reflection score represents the semantic deviation between the initial recommendation results and the user's intent. The macro reflection score represents the degree of matching between the initial recommendation results and the user's long-term interests and topic distribution. The strategic reflection score represents the impact of the initial recommendation results on the quality and stability of the recommendations.

[0060] The adaptive regeneration module is used to perform full or partial regeneration on the initial recommendation network based on various reflection scores and comprehensive reflection scores, and regenerate the initial recommendation results. Full regeneration includes adjusting the parameters of the large language model to regenerate the initial recommendation results; partial regeneration includes adjusting local segments of the initial recommendation results; the newly generated initial recommendation results are re-evaluated to determine a new comprehensive reflection score. If the new comprehensive reflection score is less than the comprehensive score threshold, the newly generated initial recommendation results are used as context input to the large model to optimize the local segments of the initial recommendation results to obtain the locally generated results; the locally generated results and the newly generated initial recommendation results are weighted and fused to obtain the global recommendation results.

[0061] The feedback optimization module is used to adjust the reflection weights and parameters of the large language model based on user feedback behavior after the global recommendation results are recommended to the user.

[0062] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described generative recommendation method for large language models driven by an adaptive reflection mechanism.

[0063] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described generative recommendation method for large language models driven by an adaptive reflection mechanism.

[0064] The above-mentioned at least one technical solution adopted in this invention can achieve the following beneficial effects:

[0065] In this invention, the initial recommendation results undergo micro-level semantic verification, macro-level interest matching, and generation strategy sensitivity assessment to achieve multi-level self-checking. Based on the reflection scores at each level and the overall reflection score, the initial recommendation results are fully or partially regenerated to ensure that the final global recommendation results are more semantically, thematically, and stylistically aligned with user intent. Compared to the existing R4Rec solution, which primarily relies on fixed multi-layered reflection memory and reinforcement strategies, this invention introduces a rapid dynamic reflection + adaptive generation closed loop. This allows for the acquisition of reflection scores while generating recommendation results, enabling real-time correction and content optimization without multiple rounds of reasoning. This reduces the probability of user intent deviation and achieves a dynamic balance between effectiveness and recommendation quality, thereby improving recommendation efficiency while maintaining accuracy. Attached Figure Description

[0066] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0067] Figure 1 A schematic diagram of the process of a generative recommendation method for large language models driven by an adaptive reflection mechanism provided by the present invention;

[0068] Figure 2 This is a schematic diagram of a computer device for implementing a generative recommendation method for large language models driven by an adaptive reflection mechanism, as provided by the present invention. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0070] Currently, there are several representative studies. For example, P5 unifies various recommendation tasks into a "text-to-text" generation paradigm; M6-Rec achieves multi-task integration based on a large-scale generative pre-trained model; TALLRec improves the adaptability of large models to recommendation tasks through lightweight fine-tuning; CoT-based Recommendation introduces chain-like reasoning to enhance interpretability; and OneRec achieves end-to-end generative recommendation and ranking unification. These methods overcome the limitations of traditional recommendation systems that rely on feature engineering and multi-stage pipelines, making the recommendation process more semantically understandable and generalizable.

[0071] However, despite the significant improvement in the expressiveness and richness of recommended content brought about by the introduction of LLM, existing generative recommendation systems still generally suffer from the following three prominent problems, which together constitute the key technical bottlenecks limiting their performance and user experience:

[0072] 1. Lack of Model Robustness and Self-Correction Capabilities: After generating recommended content once, the model lacks an internal reflection mechanism to detect potential biases, factual errors, or semantic inconsistencies with the user's contextual intent. This leads to potential intent drift or semantic deviation in the recommendation results, as the model cannot autonomously detect errors and correct biases, severely impacting the reliability and accuracy of the recommendations.

[0073] 2. The "black box" of the generation process and the lack of a dynamic feedback mechanism: The generation process of large models involves key decoding parameters such as temperature and top-k kernel sampling. These parameters have a decisive impact on the diversity, creativity, and fidelity of the generated content. Existing systems typically use fixed or preset parameters. The model cannot adaptively and dynamically adjust the generation strategy based on the current user state, the complexity of historical interaction sequences, and the quality of real-time generated results, leading to inefficiency and fluctuations in generation quality.

[0074] 3. The limited scope and lag in recommendation quality assessment mechanisms: Traditional recommendation system evaluation primarily relies on sparse and lagging behavioral metrics such as click-through rate (CTR) and conversion rate (CVR). For generative content, these metrics cannot immediately capture semantic level quality, such as the logical coherence of the text, the accuracy of information, or whether the sentiment orientation meets expectations. This limited evaluation paradigm makes it difficult for the model to obtain immediate, fine-grained semantic feedback for online reflection and improvement.

[0075] Therefore, how to draw on the traditional cognitive process of "examination-reflection-correction" to build a highly efficient generative recommendation framework with real-time self-checking, adaptive optimization, and reflective adjustment capabilities, in order to break the "static generation" limitation of traditional systems, has become a key technical bottleneck that urgently needs to be solved in the field of intelligent recommendation.

[0076] Currently, in the field of generative recommendation, some studies have attempted to introduce reasoning and reflection mechanisms to improve the reliability and interpretability of recommendation results.

[0077] A representative approach is R4ec, which proposes enhancing the intelligent decision-making capabilities of recommendation systems through a multi-stage interactive process of "Reasoning – Reflection – Refinement." Within this framework, the recommendation system consists of two types of models:

[0078] The first is the inference model (Actor), which is responsible for generating recommendation results based on the input context.

[0079] Second, the Reflection Model is used to evaluate the rationality and consistency of the output of the reasoning model.

[0080] The two operate iteratively in a multi-round interactive manner. The reflection model provides feedback on the reasoning results, and the reasoning model then adjusts the generation strategy accordingly, thereby obtaining an optimized result after several rounds.

[0081] However, despite the introduction of a reflection mechanism into the recommendation system, the above solutions still have the following shortcomings from the perspectives of engineering feasibility and real-time performance:

[0082] 1. The reflection process is iterative, lengthy, and computationally expensive.

[0083] The R4ec framework relies on multi-round interactions between the inference model and the reflection model. Each reflection requires calling the entire large language model inference process, resulting in a significant increase in computational and communication overhead. While this design can capture high-level biases and improve the depth of reflection, it struggles to correct errors in real time during the generation phase, leading to lag in recommendation responses and wasted resources, thus limiting its application in high-concurrency, low-latency real-time recommendation scenarios. The root cause of this deficiency lies in R4ec's "deep iterative reflection" strategy, which lacks a lightweight or parallelizable fast reflection path.

[0084] 2. The reflection model has a complex structure.

[0085] R4ec uses a small language model with some generative or discriminative capabilities as a reflexor, yet it still needs to execute the complete language generation and evaluation process. Even with a small model size, multi-turn reflexive inference operations still consume significant GPU / CPU resources, making online real-time deployment difficult. This is because the method primarily focuses on improving the model's inference capabilities, rather than optimizing computational processes and designing scheduling mechanisms for online reflexivity.

[0086] 3. Lack of an interpretable multidimensional quality assessment mechanism

[0087] R4ec's feedback is typically in the form of textual suggestions or scores, but it doesn't explicitly quantify the results in terms of semantic consistency, diversity, and contextual relevance, resulting in a lack of interpretability and controllability. R4rec lacks a structured quality indicator system, making it difficult to directly guide parameter tuning or automatic regeneration.

[0088] 4. Lack of adaptive modeling of generation parameters and output quality

[0089] In recommendation generation, parameters such as temperature, top-k, and prompt significantly impact the stability of recommendation results. However, the R4ec framework fails to establish a statistical relationship between these parameters and result quality, and it also lacks a dynamic parameter tuning mechanism. Insufficient research on the stability and controllability of the generation strategy results in the model's inability to dynamically learn user interests when user intent distribution changes.

[0090] Existing large-scale generative recommender system reasoning frameworks (such as R4Rec) can improve the robustness and interpretability of models in multi-round generation tasks to some extent by introducing reasoning and reflection mechanisms. However, through systematic analysis, the following technical bottlenecks are still found in these methods:

[0091] 1. The reflection process is lagging and computational costs are high.

[0092] R4Rec designs the reflection process as a separate post-processing stage, requiring the model to first generate a complete recommendation before calling the larger model for reflection and rewriting, resulting in a significant increase in inference latency. While its "global reflection" approach can capture high-level biases, it struggles to correct errors in real time during the generation stage, leading to lag in recommendation response and wasted resources.

[0093] 2. The reflection lacks granularity and a hierarchical evaluation.

[0094] Existing reflection mechanisms primarily evaluate the overall consistency and contextual logic of the text generation results, without distinguishing between different reflection dimensions such as semantics, interest matching, and strategy parameters. This makes it difficult for reflection signals to accurately pinpoint the source of the problem and makes the direction of correction vague.

[0095] 3. The reflection score lacks quantitative and dynamic optimization mechanisms.

[0096] R4Rec's reflection outputs are mostly verbal descriptions or heuristic corrections, lacking quantifiable reflection scores or consistency metrics, which prevents the model from forming a self-optimization loop during the training and online recommendation phases.

[0097] 4. The model is limited to short-term interests.

[0098] R4Rec can only make recommendations based on users' short-term interests and cannot dynamically learn users' long-term interest characteristics or make dynamic recommendations based on user interaction information.

[0099] To address the above problems, this invention proposes a generative recommendation method for large language models driven by an adaptive reflection mechanism. Its core objective is:

[0100] (1) Achieve lightweight and real-time reflection process: By constructing a differentiable FastReflection Module, the reflection score is calculated synchronously and dynamically corrected during the generation stage, without the need for additional reasoning rounds;

[0101] (2) Achieve multi-level decomposition of reflection and evaluation: Through a three-level structure of micro-reflection layer, macro-reflection layer and strategy reflection layer, semantic deviation, user intent deviation and generation parameter instability are detected respectively, thereby achieving accurate reflection;

[0102] (3) Achieve quantitative and closed-loop optimization of reflection scores: By introducing multi-dimensional consistency indicators (such as semantic consistency, interest matching degree, content novelty and generation stability), the reflection scores are calculated in a comprehensive manner and fed back to the generation model for dynamic parameter tuning.

[0103] Therefore, this invention aims to construct a real-time, quantifiable, and interpretable adaptive fast reflection mechanism to overcome the shortcomings of the existing R4Rec framework in terms of latency, granularity, and closed-loop optimization, thereby significantly improving the response efficiency, personalization accuracy, and user experience of generative recommendation systems.

[0104] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0105] Figure 1 This is a schematic diagram of a generative recommendation method for large language models driven by an adaptive reflection mechanism, which specifically includes the following steps:

[0106] S101, based on user behavior data, uses a large language model to predict and determine the initial recommendation results.

[0107] Among them, the user can be any user who needs to be recommended.

[0108] Behavioral data includes user intent identification content (user's historical click sequence, historical browsed items, historical dwell time), interest characteristics, user profile, and current context; the initial recommendation results can include multiple items recommended to the user; for example, in the field of product recommendation, the initial recommendation results can be multiple products.

[0109] In one embodiment, based on user behavior data, a large language model is used to predict and determine the initial recommendation result, including: inputting the user behavior data into a pre-trained multimodal feature fusion network to obtain a fine-grained user feature vector; the fine-grained user feature vector includes a user intent vector. User interest feature vector and user context feature vector ; User intent vector User interest feature vector and user context feature vector splicing We obtain user feature vectors; then we inject these user feature vectors into a large language model to obtain initial recommendation results.

[0110] Specifically, user feature vectors are injected into the embedding layer of the large language model through injection, and the initial recommendation results are obtained through subsequent transformer and decoding layers.

[0111] The multimodal feature fusion network uses a Transformer architecture, and the large language model can be a multimodal large model. Initial recommendation results. It includes a multimodal structured information list containing products, titles, articles, videos, and more.

[0112] It should be noted that a user context understanding model can be used to extract user behavior features, interests and preferences, and context features to generate user intent vectors, user interest feature vectors, and user context feature vectors; a generative recommendation model can be used to generate preliminary initial recommendation results based on a large language model (LLM / Vision-Language Model (VLM)).

[0113] S102, based on the initial recommendation results, calculate the local reflection score, macro reflection score, and strategy reflection score, and then weight the local reflection score, macro reflection score, and strategy reflection score by using the reflection weight of each reflection score to obtain the comprehensive reflection score; the local reflection score represents the local deviation between the initial recommendation results and the user's intent at the semantic level; the macro reflection score represents the degree of matching between the initial recommendation results and the user's long-term interests and topic distribution; the strategy reflection score represents the impact of the initial recommendation results on the recommendation quality and stability.

[0114] A rapid reflection module can be used. The initial recommendation results are evaluated in real-time across multiple dimensions, and a comprehensive reflection score is calculated. (Quick Reflection Module) It is responsible for real-time, multi-layered self-checking and quantification of the initial recommendation results. The rapid reflection module includes a micro-reflection layer, a macro-reflection layer, and a strategy reflection layer.

[0115] The micro-reflection layer calculates local reflection scores. Its objective is to detect local deviations between the generated results and the user intent at the semantic level. The input to the micro-reflection layer is the user intent recognition content. Initial recommendation results User intent vector Initial recommendation results Embedded vector .

[0116] Specifically, in one embodiment, the behavioral data includes user intent identification content; based on the initial recommendation result, a local reflection score is calculated, including: calculating a first semantic similarity between the user intent vector and the embedding vector of the initial recommendation result; calculating the attention distribution of the initial recommendation result on the user intent identification content, and calculating the entropy value of the attention distribution, determining the difference between 1 and the entropy value as the attention score of the user query intent; and weighting the first semantic similarity and the attention score to obtain the local reflection score.

[0117] First semantic similarity The calculation formula is:

[0118] (1);

[0119] in, express and Cosine similarity between them.

[0120] Attention score The calculation formula is:

[0121] (2);

[0122] in, Indicates the initial recommendation result Content that identifies user intent Attention distribution, that is, using attention layers, using Query The score, The entropy value represents the distribution of attention.

[0123] Calculate local reflection scores by combining attention and similarity levels. Local reflection score The calculation formula is:

[0124] (3);

[0125] in, As learnable weights, the dynamic learning attention score is the proportion of the first semantic similarity.

[0126] The macro-reflection layer calculates a macro-reflection score. The goal of the macro-reflection layer is to evaluate the degree of match between the generated results and the user's long-term interests and topic distribution. The input to the macro-reflection layer is the user's historical click sequence. Current initial recommendation results R Distribution of historical themes .

[0127] Specifically, in one embodiment, the user intent identification content includes the user's historical click sequence; based on the initial recommendation result, a macro-reflection score is calculated, including: calculating the KL divergence between the topic distribution derived from the initial recommendation result and the historical topic distribution, and determining the reciprocal of the KL divergence as the long-term interest consistency value; calculating the hidden state of the user's historical click sequence through a recurrent neural network, and calculating the second semantic similarity between the hidden state and the embedding vector of the initial recommendation result, and determining the second semantic similarity as the cross-session coherence value; weighting the long-term interest consistency value and the cross-session coherence value to obtain the macro-reflection score.

[0128] Long-term interest consistency value The calculation formula is:

[0129] (4);

[0130] in, The topic distribution derived from the initial recommendation results. Distributed by historical themes, The divergence between the topic distribution derived from the initial recommendation results and the historical topic distribution. for The reciprocal of.

[0131] Cross-session coherence value The calculation formula is:

[0132] (5);

[0133] in, For the user's historical click sequence, This is the embedding vector of the initial recommendation result. To use recurrent neural networks The hidden state of the calculated user historical click sequence. This is the function for calculating cosine similarity, i.e., semantic similarity.

[0134] Macro Reflection Score The calculation formula is:

[0135] (6);

[0136] in, and All of these are learnable weights.

[0137] The strategy reflection layer calculates the strategy reflection score for users. The goal of the strategy reflection layer is to evaluate the impact of the parameters of the large language model on the recommendation quality and stability.

[0138] Specifically, in one embodiment, a strategy reflection score is calculated based on the initial recommendation results, including: obtaining the first semantic similarity between the user intent vector and the embedding vector of the initial recommendation results, and obtaining the KL divergence between the topic distribution derived from the initial recommendation results and the historical topic distribution, and determining the difference between 1 and the KL divergence as the behavioral consistency value; weighting the first semantic similarity and the behavioral consistency value to obtain the content relevance index value; determining the diversity and novelty index values ​​based on the differences between different items in the initial recommendation results and the proportion of unpopular items or low-frequency tags in the initial recommendation results; determining the interaction effect index value based on the real user behavior signals of the initial recommendation results; weighting the content relevance index value, the diversity and novelty index value, and the interaction effect index value to obtain the quality score of the initial recommendation results; and determining the strategy reflection score based on the quality score of the initial recommendation results.

[0139] Content relevance metrics indicate whether recommended content meets user intent, and are used to assess the semantic and behavioral consistency between recommended content and user intent: Content relevance metric values... The calculation formula is:

[0140] (7);

[0141] in, and As a weighting factor, The value represents behavioral consistency; higher semantic similarity and lower KL divergence indicate high consistency.

[0142] Diversity and novelty include whether duplication is avoided and reasonable innovation is introduced; they are used to avoid overly simplistic or redundant recommended content; the values ​​for diversity and novelty indicators are as follows. The calculation formula is:

[0143] (8);

[0144] in, This represents the number of recommended items in the initial recommendation results. The first in the initial recommendation results i Embedsion vectors of recommended items, The first in the initial recommendation results j Embedsion vectors of recommended items, express and Cosine similarity between them To control the impact of novelty on the overall quality of the initial recommendation results, Indicates the initial recommendation result The proportion of niche or low-frequency items. Values ​​for diversity and novelty indicators. The first term in the calculation formula measures the difference between different items in the recommendation list, and the second term... This can be calculated by statistically analyzing the proportion of unpopular items or low-frequency tags.

[0145] After the initial recommendations are presented to users, we can obtain real user behavior signals related to those recommendations. These signals include click-through rate, normalized average user dwell time, and conversion rate. Interaction effectiveness includes whether users genuinely "liked" or "used" the recommended content. Based on these real user behavior signals (such as clicks, dwell time, and conversions), interaction effectiveness metrics are calculated. The calculation formula is:

[0146] (9);

[0147] in, As a weighting factor, For click-through rate, This refers to the average time a user spends on the recommended items in the initial recommendation results. The historical average time users spend on all products. The normalized value of the average user dwell time. Conversion rate; It can be adaptively adjusted according to the task objectives.

[0148] The formula for calculating the quality score of the initial recommendation results is:

[0149] (10);

[0150] in, , and All are weighting factors.

[0151] In one embodiment, determining the strategy reflection score based on the quality score of the initial recommendation result includes: obtaining the historical quality score of the historical recommendation result; using both the historical quality score and the quality score of the initial recommendation result as sample quality scores; calculating the variance of all sample quality scores; and determining the difference between 1 and the variance as the parameter sensitivity.

[0152] Calculate parameter sensitivity :

[0153] (11);

[0154] in, Represents variance. Indicates the first i Individual sample quality score for The corresponding parameter combination of the large language model, This represents the variance of the quality scores for all samples.

[0155] Optionally, the historical quality scores and the corresponding parameter combinations of the large language model are stored in the database and can be obtained from the database. The historical quality scores can be the quality scores corresponding to the most recent historical recommendation results obtained at the current time.

[0156] Strategy Reflection Score for:

[0157] (12).

[0158] The comprehensive reflection score is obtained by weighting and integrating the three levels of reflection scores. The calculation formula is:

[0159] (13);

[0160] in, , and The reflection weights for the micro-reflection layer, macro-reflection layer, and policy reflection layer are respectively learned dynamically by a neural network with a Mixture of Experts (MOE) architecture.

[0161] S103. Based on various reflection scores and comprehensive reflection scores, perform full or partial regeneration on the initial recommendation network to regenerate the initial recommendation results. Full regeneration includes adjusting the parameters of the large language model to regenerate the initial recommendation results. Partial regeneration includes adjusting local segments of the initial recommendation results.

[0162] If the reflection score is lower than the corresponding threshold, the adaptive regeneration module triggers a local or full regeneration mechanism to generate new recommendation results.

[0163] Specifically, based on various reflection scores and the comprehensive reflection score, the initial recommendation network is fully or partially regenerated to regenerate the initial recommendation results, including the following steps:

[0164] S201, If ​​the comprehensive reflection score is less than the preset comprehensive score threshold or the strategy reflection score is less than the corresponding threshold, adjust the temperature parameter and top-k parameter of the large language model according to the strategy reflection score, and regenerate the initial recommendation results.

[0165] If the overall reflection score is less than a preset overall score threshold or the strategy reflection score is less than the corresponding threshold, a full regeneration is performed. Specifically, in one embodiment, the temperature parameter and top-k parameter of the large language model are adjusted according to the strategy reflection score, and the initial recommendation results are regenerated. This includes: adjusting the temperature parameter and top-k parameter of the large language model according to the strategy reflection score; regenerating the initial recommendation results using the large language model with adjusted parameters; and satisfying multidimensional constraints in the process of regenerating the initial recommendation results.

[0166] Specifically, by controlling the temperature and top-k parameters, the diversity of generated content is maintained, monotonicity is prevented, and diversity constraints are ensured. Adjusting the temperature parameter can control diversity and prevent the spread of bias; adjusting the top-k parameter can control the generation probability distribution and improve the generation quality of the large language model.

[0167] In one embodiment, adjusting the temperature parameter and top-k parameter of the large language model based on the policy reflection score includes: substituting the policy reflection score into a first mapping relationship to obtain the adjustment amount of the temperature parameter; substituting the policy reflection score into a second mapping relationship to obtain the adjustment amount of the top-k parameter; adding the adjustment amount of the temperature parameter to the current value of the temperature parameter of the large language model to obtain the adjusted temperature parameter of the large language model; and adding the adjustment amount of the top-k parameter to the current value of the top-k parameter of the large language model to obtain the adjusted top-k parameter of the large language model.

[0168] The first and second mapping relations can both take the form of: ,in, This refers to the adjustment amount of the parameters in the large language model. Scoring for strategy reflection and All values ​​are constants. It should be noted that the constant values ​​in the first and second mapping equations can be different and can be obtained from simulation calculations. This can satisfy the following: when the feedback is low, reduce temperature and top-k to enhance generation stability and reduce deviation from user intent; when the feedback is high, moderately increase temperature and top-k to increase generation diversity.

[0169] Multidimensional constraints include semantic constraints and interest constraints; semantic constraints include ensuring that the generated result matches the user intent vector through embedding alignment. Maximum matching, with semantic constraints as follows:

[0170] (14);

[0171] in, The maximum semantic similarity. The first in the initial recommendation results i Recommended items Embedded vector, For user intent vectors, express and Cosine similarity between them;

[0172] Interest constraints: combining users' long-term interest distribution With topic distribution The generated results are then subject to topic probability correction, with the following interest constraints:

[0173] (15);

[0174] in, The maximum value of behavioral similarity. The topic distribution derived from the initial recommendation results. Distributed by historical themes, The KL divergence between the topic distribution derived from the initial recommendation results and the historical topic distribution.

[0175] S202, if the comprehensive reflection score is greater than or equal to the comprehensive score threshold, and the local reflection score or macro reflection score is less than the corresponding reflection threshold, and the strategy score is greater than or equal to the corresponding reflection threshold, then based on the similarity between the user intent vector and each segment in the initial recommendation result, the local deviation segments in the initial recommendation result are determined, and the local rewriting prompt words of the local deviation segments are generated using the large language model. The local rewriting prompt words and the user intent are input into the large language model to obtain the optimized local deviation segments. The optimized local deviation segments are then fused with the undevised segments in the initial recommendation result to obtain the newly generated initial recommendation result.

[0176] Based on the comprehensive reflection score Compared with the comprehensive score threshold Determine if regeneration is triggered; simultaneously check the scores of each layer. Whether it is below their respective reflection thresholds :

[0177] Micro-reflection layer Significant semantic or local deviations require local rewriting and embedding alignment optimization.

[0178] Macro-reflection layer If there is insufficient long-term interest or topic matching, update the user profile or resample to recommend candidates.

[0179] Strategy Reflection Layer The generation strategy is not stable. Dynamically adjust the generation parameters (such as lowering the temperature or adjusting the prompt words).

[0180] Based on the similarity between the user intent vector and each segment in the initial recommendation result, local deviation segments in the initial recommendation result are determined, including: segments in the initial recommendation result with similarity less than a local threshold are identified as local deviation segments.

[0181] Local regeneration:

[0182] For local biases detected by the micro-reflection layer or macro-reflection layer, only the biased segments are corrected without affecting the high-quality parts. This balances generation efficiency and recommendation accuracy, avoiding the computational overhead of full regeneration.

[0183] 1. Local deviation segment localization

[0184] Based on the output of the micro-reflection layer, the local semantic similarity between the item list and the user's intent in the generated recommendation results is calculated. :

[0185] (16);

[0186] Among them, those below the threshold The segment is marked as "segment that needs to be rewritten".

[0187] 2. Prompt-guided rewriting

[0188] Use large models (LLM / VLM) to dynamically generate locally rewritten prompts, such as: "Please match the following recommended content with the user's interest vector to improve relevance while retaining the original high-scoring information."

[0189] Input the locally rewritten prompts and the initial recommendation results into the large language model to generate optimized local bias fragments. .

[0190] 3. High-scoring segments retention and fusion

[0191] High-scoring segments in the initial recommendation results (Partial reflection score) Remain unchanged;

[0192] The optimized local deviation segment High-scoring segments The final local regeneration result is generated by fusion, which is the global recommendation result. :

[0193] (17).

[0194] in, For a pre-trained fusion network, This indicates the optimized local deviation segment. High-scoring segments The result of the fusion.

[0195] If the strategy reflection layer score is lower than the corresponding threshold, dynamically modify the generation parameters:

[0196] 1. Lower the temperature parameter to reduce randomness;

[0197] 2. Adjust the top-k parameters to control the diversity of generated content;

[0198] 3. Modify the prompts to make the model more focused on user intent. This can include adding reinforcement instructions, such as "note" or "strictly follow," to the original structured prompts, and injecting the initial recommendation results into the prompts as negative examples of bias.

[0199] In one embodiment, based on various reflection scores and a comprehensive reflection score, the initial recommendation network is fully or partially regenerated to regenerate the initial recommendation results. This process can be divided into two layers for judgment, specifically:

[0200] First level: Determine whether the comprehensive reflection score is greater than the comprehensive score threshold.

[0201] If not, then perform a full regeneration, that is, adjust the temperature and top-k parameters of the large language model according to the policy reflection score, and regenerate the initial recommendation results.

[0202] If so, proceed to the second level.

[0203] The second layer: Determine whether at least one of the local reflection score and the macro reflection score is less than the corresponding reflection threshold.

[0204] If so, check the strategy reflection score. If the strategy reflection score is greater than or equal to the corresponding reflection threshold, perform local regeneration; if the strategy reflection score is less than the corresponding reflection threshold, perform full regeneration, that is, adjust the temperature parameter and top-k parameter of the large language model according to the strategy reflection score, and regenerate the initial recommendation results.

[0205] If not, that is, if both the local reflection score and the macro reflection score are greater than or equal to the corresponding reflection threshold, then check the strategy reflection score; if the strategy reflection score is greater than or equal to the corresponding reflection threshold, then all are qualified and no further generation is needed; if the strategy reflection score is less than the corresponding reflection threshold, then perform a full regeneration, that is, adjust the temperature parameter and top-k parameter of the large language model according to the strategy reflection score, and regenerate the initial recommendation results.

[0206] S104, re-evaluate the newly generated initial recommendation results to determine a new comprehensive reflection score. If the new comprehensive reflection score is less than the comprehensive score threshold, use the newly generated initial recommendation results as context input to the large model to optimize local segments of the initial recommendation results and obtain local generated results.

[0207] The method for determining the new comprehensive reflection score is the same as the method for calculating the comprehensive reflection score in the above embodiment, and will not be repeated here.

[0208] If the new comprehensive reflection score is still less than the comprehensive score threshold, 1-2 rounds of iteration can be performed: each round uses the results generated in the previous round as context to optimize local segments or resample topics.

[0209] S105, the locally generated results and the newly generated initial recommendation results are weighted and fused to obtain the global recommendation results.

[0210] In one embodiment, after recommending the global recommendation results to the user, the user feedback behavior corresponding to the global recommendation results is obtained; the user feedback behavior includes the user's click behavior, dwell behavior, and interaction behavior on the recommended content; the user feedback behavior is quantified by adjusting factors to obtain a feedback score; the reflection weight of each reflection score is adjusted by the feedback score and each reflection score; and the parameters of the large language model are adjusted by the feedback score.

[0211] The Feedback Reinforcement Module dynamically updates the reflection weights of the three reflection layers based on user behavior, achieving long-term adaptive optimization. The Feedback Reinforcement Module includes user behavior feedback quantification and modeling, adaptive updating of reflection weights, and adaptive optimization of the generation strategy.

[0212] 1. Quantification and Modeling of User Behavior Feedback

[0213] Feedback signal type:

[0214] Click behavior: Whether users click on recommended content, click frequency, and click delay time;

[0215] Dwell Behavior: The length of time users spend on recommended content, distinguishing between short dwell times and in-depth reading;

[0216] Interactive behaviors such as liking, saving, sharing, and commenting are quantified with positive and negative weights.

[0217] Quantification methods:

[0218] (18);

[0219] in, For feedback rating, , and As a weighting factor, it can be dynamically adjusted according to business objectives; This indicates whether the user has clicked the action, with a value of 0 or 1, where 1 represents yes and 0 represents no. Indicates whether the stay is short or long, with a value of 0 or 1, where 1 indicates yes and 0 indicates no. This indicates whether there have been any likes, favorites, shares, or comments. The value ranges from 0 to 4, and is incremented by 1 for each of these actions. For example, if only likes and comments were performed, then... The value of is 2.

[0220] Optionally, a short stay or a long stay can be determined based on the duration of the stay. If the duration of the stay is less than a preset stay threshold, it is determined to be a short stay; otherwise, it is a long stay.

[0221] Reverse encoding is used for negative feedback (fast skipping, low dwell time), that is, the coefficient of a certain item is directly assigned a negative value to improve the system sensitivity.

[0222] Long-term feedback modeling: Accumulating user historical behavior and processing it using a sliding window to construct a long-term user interest distribution. .

[0223] By combining topic vector embedding, behavioral feedback is mapped to the feature space of recommended content to guide the optimization of generated content.

[0224] 2. Reflection-based adaptive weight update

[0225] (19);

[0226] in, The weights of the micro-reflection layer, macro-reflection layer, and strategy reflection layer before the update. The updated weights for the micro-reflection layer, macro-reflection layer, and strategy reflection layer. i =1,2,3; Output a reflection score for the corresponding reflection layer; It is a dynamic learning rate that can be automatically adjusted based on fluctuations in user behavior feedback.

[0227] Increase sensitivity to low-feedback content and prompt partial or full regeneration modules to focus on optimizing deviation areas; maintain the stability of high-feedback content and reduce unnecessary modifications.

[0228] 3. Adaptive optimization of generation strategy

[0229] Dynamic parameter adjustment: Temperature, top-k: When the feedback is low, reduce temperature and top-k to enhance generation stability and reduce deviation from user intent; when the feedback is high, they can be moderately increased to increase generation diversity.

[0230] Lightweight online learning / reinforcement learning implementation: Incorporating feedback scoring As a reward signal, a simple RL or gradient update model is constructed, and the generated parameters are fine-tuned online; Bayesian optimization is combined to explore parameters and balance quality and diversity.

[0231] The method provided by this invention has the following effects:

[0232] 1. Improve the matching degree between recommendation results and user intent.

[0233] The rapid reflection module performs micro-semantic verification, macro-interest matching, and generation strategy sensitivity assessment on the initial recommendation results, achieving multi-level self-checking of candidate recommendation content. The adaptive regeneration module performs partial or full regeneration based on the reflection score, ensuring that the final recommendation results are more semantically, thematically, and stylistically aligned with user intent. Compared to the existing R4Rec solution, which mainly relies on fixed multi-layered reflection memory and reinforcement strategies, this invention introduces a rapid dynamic reflection + adaptive generation closed loop. This allows for the acquisition of reflection scores while generating recommendation results, enabling real-time correction and content optimization without multiple rounds of reasoning, thus reducing the probability of user intent deviation.

[0234] 2. Supports long-term personalized adaptive optimization

[0235] The feedback optimization module converts user clicks, dwell time, and interaction behaviors into feedback scores and dynamically updates the weights of the reflection module and the parameters of the generation strategy. Through closed-loop iteration, the system can adaptively adjust the generation and reflection mechanisms according to changes in user interests, achieving long-term optimization. The economic benefits are significant: it can significantly improve recommendation click-through rates, dwell time, and user satisfaction, thereby increasing user stickiness and the monetization value of platform advertising / content.

[0236] 3. The generated content balances high quality and diversity.

[0237] This invention introduces multi-dimensional constraint generation to optimize content under semantic constraints, interest constraints, and generation strategy diversity constraints. Compared to R4Rec's more static generation strategy, this invention can adjust temperature and top-k parameters in real time to ensure that the content is both accurate and varied. Technical effects: Reduces duplication of generation results, improves recommendation diversity, and maintains high matching degree.

[0238] 4. Flexible combination of local and full regeneration

[0239] Local biases detected by micro-reflection or macro-reflection are locally regenerated to retain high-scoring content and save computing resources; results of comprehensive reflection or long-term poor feedback are fully regenerated to ensure the overall recommendation quality.

[0240] Technical benefits: Achieves a dynamic balance between efficiency and recommendation quality, making it more flexible and efficient than the existing R4Rec.

[0241] 5. Enhance system stability and controllability

[0242] The strategy reflection layer, combined with sensitivity analysis of generated parameters, enables real-time monitoring and adjustment of result stability; technical effect: avoids excessive randomness in generated results leading to a decline in user experience, and improves the reliability and controllability of generative recommendation systems.

[0243] advantage:

[0244] 1. Innovation: It integrates rapid reflection, adaptive generation strategy, multi-dimensional constraint generation, and feedback loop into a unified framework, supporting immediate correction and long-term adaptive optimization, while taking into account the diversity and stability of generation.

[0245] 2. Feasibility: The modular structure (user context understanding, recommendation generation, reflection, regeneration, and feedback optimization) facilitates integration with existing recommendation platforms. Feedback scores, reflection scores, and regeneration strategies can all be calculated and adjusted online, supporting real-time recommendation optimization.

[0246] 3. Economic benefits: Increase user click-through rate, dwell time and interaction rate, increase platform content consumption and monetization capabilities, reduce manual intervention and post-optimization costs, and achieve automated and sustainable recommendation optimization.

[0247] When applying the generative recommendation method for large language models driven by adaptive reflection mechanism provided in this invention, it is not necessary to rely on... Figure 1 The steps shown are executed in sequence. The specific execution order of each step can be determined as needed, and this invention does not impose any restrictions on it.

[0248] The above describes one or more embodiments of the generative recommendation method for large language models driven by an adaptive reflection mechanism. Based on the same idea, the present invention also provides a corresponding generative recommendation system for large language models driven by an adaptive reflection mechanism, which includes:

[0249] The initial recommendation module is used to predict and determine the initial recommendation results based on user behavior data and a large language model.

[0250] The rapid reflection module calculates local reflection scores, macro reflection scores, and strategic reflection scores based on the initial recommendation results. It then weights these scores using the reflection weights of each type to obtain a comprehensive reflection score. The local reflection score represents the semantic deviation between the initial recommendation results and the user's intent. The macro reflection score represents the degree of matching between the initial recommendation results and the user's long-term interests and topic distribution. The strategic reflection score represents the impact of the initial recommendation results on the quality and stability of the recommendations.

[0251] The adaptive regeneration module is used to perform full or partial regeneration on the initial recommendation network based on various reflection scores and comprehensive reflection scores, and regenerate the initial recommendation results. Full regeneration includes adjusting the parameters of the large language model to regenerate the initial recommendation results; partial regeneration includes adjusting local segments of the initial recommendation results; the newly generated initial recommendation results are re-evaluated to determine a new comprehensive reflection score. If the new comprehensive reflection score is less than the comprehensive score threshold, the newly generated initial recommendation results are used as context input to the large model to optimize the local segments of the initial recommendation results to obtain the locally generated results; the locally generated results and the newly generated initial recommendation results are weighted and fused to obtain the global recommendation results.

[0252] The feedback optimization module is used to adjust the reflection weights and parameters of the large language model based on user feedback behavior after the global recommendation results are recommended to the user.

[0253] Specific limitations regarding the generative recommender system based on adaptive reflection mechanisms for large language models can be found in the limitations of generative recommender methods based on adaptive reflection mechanisms mentioned above, and will not be repeated here. Each module in the aforementioned generative recommender system based on adaptive reflection mechanisms for large language models can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0254] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 We provide a generative recommendation method for large language models driven by an adaptive reflection mechanism.

[0255] The present invention also provides Figure 2 The schematic diagram of the computer device shown is as follows: Figure 2 As shown, at the hardware level, this computer device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 We provide a generative recommendation method for large language models driven by an adaptive reflection mechanism.

[0256] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. 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), etc.

[0257] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 invention.

Claims

1. A large language model generative recommendation method driven based on an adaptive reflection mechanism, characterized in that, The method comprises the following steps: Based on the user's behavior data, the initial recommendation result is determined by predicting through a large language model; According to the initial recommendation result, the local reflection score, the macro reflection score and the strategy reflection score are calculated, and the local reflection score, the macro reflection score and the strategy reflection score are weighted through the reflection weight of each reflection score to obtain the comprehensive reflection score; the local reflection score represents the local deviation between the initial recommendation result and the user's intention in the semantic level; the macro reflection score represents the matching degree of the initial recommendation result and the user's long-term interest and theme distribution; the strategy reflection score represents the influence of the initial recommendation result on the recommendation quality and stability; According to various reflection scores and comprehensive reflection scores, full regeneration or local regeneration is performed on the initial recommendation network to regenerate the initial recommendation result; the full regeneration includes adjusting the parameters of the large language model to regenerate the initial recommendation result; the local regeneration includes adjusting the local segment of the initial recommendation result; The newly generated initial recommendation result is re-evaluated to determine a new comprehensive reflection score, and if the new comprehensive reflection score is less than the comprehensive score threshold, the newly generated initial recommendation result is input into the large model as the context to optimize the local segment of the initial recommendation result, and a local generation result is obtained; The local generation result and the newly generated initial recommendation result are weighted and fused to obtain a global recommendation result.

2. The method of claim 1, wherein, Based on the user's behavior data, the initial recommendation result is determined by predicting through a large language model, including: The user's behavior data is input into a pre-trained multi-modal feature fusion network to obtain a fine-grained user feature vector; the fine-grained user feature vector includes a user intention vector, a user interest feature vector and a user context feature vector; The user intention vector, the user interest feature vector and the user context feature vector are spliced to obtain a user feature vector; The user feature vector is injected into the large language model to obtain the initial recommendation result.

3. The method of claim 2, wherein, The behavior data includes user intention recognition content; According to the initial recommendation result, the local reflection score is calculated, including: The first semantic similarity between the user intention vector and the embedding vector of the initial recommendation result is calculated; The attention distribution of the initial recommendation result to the user intention recognition content is calculated, and the entropy value of the attention distribution is calculated, and the difference between 1 and the entropy value is determined as the attention score of the user query intention; The first semantic similarity and the attention score are weighted to obtain the local reflection score.

4. The method of claim 3, wherein, The user intention recognition content includes a user historical click sequence; according to the initial recommendation result, the macro reflection score is calculated, including: The KL divergence between the theme distribution derived from the initial recommendation result and the historical theme distribution is calculated, and the reciprocal of the KL divergence is determined as the long-term interest consistency value; The hidden state of the user historical click sequence is calculated through a recurrent neural network, and the second semantic similarity between the hidden state and the embedding vector of the initial recommendation result is calculated, and the second semantic similarity is determined as the cross-session coherence value; The long-term interest consistency value and the cross-session coherence value are weighted to obtain the macro reflection score.

5. The method of claim 3, wherein, According to the initial recommendation result, the strategy reflection score is calculated, including: obtaining a first semantic similarity between the user intention vector and the embedding vector of the initial recommendation result, and obtaining a KL divergence between a topic distribution derived from the initial recommendation result and a historical topic distribution, and determining a difference between 1 and the KL divergence as a behavior consistency value; weighting the first semantic similarity and the behavior consistency value to obtain a content relevance index value; determining a diversity and novelty index value according to differences between different items in the initial recommendation result and a proportion of cold items or low-frequency labels in the initial recommendation result; determining an interaction effect index value according to real user behavior signals of the initial recommendation result; weighting the content relevance index value, the diversity and novelty index value, and the interaction effect index value to obtain a quality score of the initial recommendation result; determining a strategy reflection score according to the quality score of the initial recommendation result.

6. The method of claim 5, wherein, Diversity and novelty indicator value The formula for calculating the diversity and novelty indicator value is: ; in, This represents the number of recommended items in the initial recommendation results. The first in the initial recommendation results i Embedsion vectors of recommended items, The first in the initial recommendation results j Embedsion vectors of recommended items, express and Cosine similarity between them To control the impact of novelty on the overall quality of the initial recommendation results, Indicates the initial recommendation result The proportion of niche or low-frequency items; The real user behavior signals include click rate, normalized value of user average stay time, and conversion rate; the calculation formula of the interaction effect index value is: ​ ; wherein, is a weight factor, is a click rate, is an average dwell time of a user on a recommended item in the initial recommendation result, is a historical average dwell time of a user on all items, is a normalized value of the average dwell time of a user, is a conversion rate.

7. The method of claim 2, wherein, According to various reflection scores and a comprehensive reflection score, performing full regeneration or partial regeneration on the initial recommendation network to regenerate the initial recommendation result, including: in a case where the comprehensive reflection score is less than a preset comprehensive score threshold or the strategy reflection score is less than a corresponding threshold, adjusting a temperature parameter and a top-k parameter of the large language model according to the strategy reflection score to regenerate the initial recommendation result; in a case where the comprehensive reflection score is greater than or equal to the comprehensive score threshold, if a local reflection score or a macroscopic reflection score is less than a corresponding reflection threshold and the strategy score is greater than or equal to the corresponding reflection threshold, determining a local deviation segment in the initial recommendation result according to a similarity between the user intention vector and each segment in the initial recommendation result, generating a local rewriting prompt word of the local deviation segment using the large language model, inputting the local rewriting prompt word and the user intention into the large language model to obtain an optimized local deviation segment, and fusing the optimized local deviation segment and a non-deviation segment in the initial recommendation result to obtain a newly generated initial recommendation result.

8. The method of claim 7, wherein, Adjusting the temperature parameter and the top-k parameter of the large language model according to the strategy reflection score to regenerate the initial recommendation result, including: adjusting the temperature parameter and the top-k parameter of the large language model according to the strategy reflection score; regenerating the initial recommendation result through the large language model with the adjusted parameters; the large language model satisfies multi-dimensional constraints in the process of regenerating the initial recommendation result; the multi-dimensional constraints include semantic constraints and interest constraints; the semantic constraints are: ; wherein, is the maximum semantic similarity, is the embedding vector of the i recommendation item in the initial recommendation result, is the user intent vector, represents the cosine similarity between and​ the interest constraints are: ; wherein, is a maximum value of behavior similarity, is a topic distribution derived from the initial recommendation result, is a history topic distribution, is a KL divergence between the topic distribution derived from the initial recommendation result and the history topic distribution.

9. The method of claim 7, wherein, determining a local deviation segment in the initial recommendation result according to a similarity between the user intention vector and each segment in the initial recommendation result, including: determining a segment of the initial recommendation result with a similarity less than a local threshold as the local deviation segment.

10. The method of claim 1, wherein, The method further includes: after the global recommendation result is recommended to the user, obtaining a user feedback behavior corresponding to the global recommendation result; the user feedback behavior includes a click behavior, a stay behavior, and an interaction behavior of the user on the recommended content; quantifying the user feedback behavior through an adjustment factor to obtain a feedback score; Adjust the reflection weight of each reflection score through the feedback score and each reflection score; Adjust the parameters of the large language model through the feedback score.

Citation Information

Patent Citations

  • Physical examination item recommendation method and device based on large language model, equipment and medium

    CN119833059A

  • Time series data prediction method and system based on auto-reflection mechanism large language model

    CN121188589A