Search enhancement generation parameter automatic adjustment method based on content feature modeling

By using a content feature-based modeling approach to dynamically adjust retrieval and generation parameters, the problem of mismatch between users' professional levels in existing technologies is solved, enabling personalized content presentation and improving information delivery efficiency and user experience.

CN120821818BActive Publication Date: 2025-12-09BEIJING ZHONGSHURUIZHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511335752.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-12-09
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing technical documentation systems cannot dynamically adjust the depth of knowledge and the form of expression according to the user's professional level, resulting in the same document not being able to meet the needs of both beginners and expert users at the same time, causing uneven cognitive load and low information transmission efficiency.

Method used

By using a content feature-based modeling approach, the system receives user query text, analyzes its components, identifies technical terms and entities, constructs a user level score by combining the user's historical behavior, dynamically adjusts retrieval and generation parameters, and outputs customized content that matches the user's cognitive level.

Benefits of technology

It enables personalized content presentation based on the user's professional level, reduces cognitive load, improves information delivery efficiency and user satisfaction, and solves the problem of fragmented user experience in traditional systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821818B_ABST
    Figure CN120821818B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of retrieval enhancement generation, in particular to a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling. The method comprises the following steps: receiving original query text of a user, performing component analysis, identifying professional terms, general words and problem entities, and quantifying to form a query fingerprint; obtaining a user historical behavior sequence, combining the query fingerprint, adopting a time decay weighting algorithm, and constructing a user level score; converting the user level score into specific retrieval parameter configuration to form a retrieval strategy blueprint; guiding document library retrieval according to the retrieval strategy blueprint to screen out a candidate knowledge set most matching the professional level of the user; and intelligently filling a preset instruction template according to the user level score to construct a contextual generation instruction. The application solves the problem of uneven cognitive load caused by traditional systems through retrieval enhancement generation technology, and significantly improves technical knowledge transmission efficiency and user satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of retrieval enhancement generation, and particularly relates to a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling. BACKGROUND

[0002] The prior art document system generally adopts a fixed content presentation mode, which cannot dynamically adjust the knowledge depth and expression form according to the professional level of the user, resulting in the same document needing to serve both beginners and experts, and the content being too simple for some users and too complex for other users; beginners are prone to cognitive overload when using the existing document system, and the learning curve is steep, making it difficult to get started; expert users need to manually filter key technical details from a large amount of basic information, wasting valuable time and effort; the existing system lacks the ability to implicitly perceive the professional level of the user, and cannot automatically adjust the retrieval and generation parameters according to the user behavior, the information presentation mode is fixed, and it is difficult to adapt to the dynamic changes in the user's knowledge level, reducing the efficiency of knowledge transfer.

[0003] In summary, the existing technology has the problem of being unable to provide personalized technical knowledge services for users with different professional levels, which needs to be solved urgently. SUMMARY

[0004] Therefore, it is necessary to provide a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling to solve at least one of the above technical problems.

[0005] To achieve the above purpose, a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling comprises the following steps:

[0006] Step S1: receiving the original query text of the user, performing component analysis, identifying professional terms, general terms and problem entities, and quantifying to form a query fingerprint;

[0007] Step S2: obtaining a user behavior sequence, combining the query fingerprint, and using a time decay weighting algorithm to construct a user level score reflecting the current professional level of the user;

[0008] Step S3: converting the user level score into specific retrieval parameter configuration to form a retrieval strategy blueprint;

[0009] Step S4: guiding the document library retrieval according to the retrieval strategy blueprint to filter out a candidate knowledge set most matching the professional level of the user;

[0010] Step S5: intelligently filling in the role, style and structure placeholders in the preset instruction template according to the user level score to construct a contextual generation instruction;

[0011] Step S6: guide the model to process the candidate knowledge set using the contextual generation instruction, and output customized content that meets the user's cognitive level.

[0012] The present application accurately identifies professional terms and entities in the query through professional dictionaries and natural language processing technology, overcoming the limitations of traditional keyword matching; the term density and rarity index quantifies the professional level of the query, providing a numerical basis for user intent; the structured query fingerprint integrates semantics and statistical features, improving the accuracy of user professional level perception; the rare term recognition mechanism effectively discovers advanced domain knowledge mastered by the user, avoiding the problem of underestimating professional level.

[0013] The time decay weighting algorithm makes the evaluation results reflect the user's latest state first, overcoming the lag in user profile updating; the multi-dimensional behavior feature fusion analysis provides a comprehensive level evaluation perspective; the two-stage fusion strategy balances the stability of historical behavior and the immediacy of current query; the S-type normalization mapping ensures the stability of score statistics, solving the pain point of technical document systems that cannot perceive user cognitive differences.

[0014] The segmented knowledge base activation mechanism avoids the distress of low-level users facing overly professional content, ensuring that high-level users are not disturbed by basic content; the three-interval weight distribution strategy ensures accurate matching of search results and user cognitive ability; the non-linear inverse slice size mapping and stepwise recall quantity adjustment effectively reduce information noise and balance the breadth and depth of knowledge needs; the retrieval strategy blueprint enables fully parameterized adaptive retrieval, solving the user experience fragmentation problem caused by traditional "standardization".

[0015] The semantic boundary segmentation technology ensures the integrity of knowledge fragments; vector similarity calculation combined with weight adjustment realizes differentiated document importance evaluation; the deduplication mechanism and context expansion technology improve information density and coherence; accurate control of knowledge granularity enables low-level users to obtain more context support and high-level users to obtain refined core content.

[0016] The multi-dimensional parameter mapping mechanism aligns the behavior of the generation model with the user's level accurately; dynamic control parameters adjust to achieve a continuous transition from diverse and detailed to precise and concise; contextual instructions integrate user cognitive models and retrieval knowledge, solving the defects of traditional system-generated content "standardization".

[0017] The five-stage processing flow ensures the logicality and relevance of the output content; the post-processing mechanism driven by level thresholds solves the fine-tuning needs of key adaptation points; the high correlation between content complexity and user level verifies the system's precise adaptation ability; structured processing improves output readability and knowledge coherence, completely solving the cognitive load imbalance problem caused by traditional systems, significantly improving technical knowledge transfer efficiency and user satisfaction.

[0018] Therefore, the application realizes accurate perception of the professional level of the user by establishing a user professional level modeling system based on content features and combining time decay weighted historical behavior analysis. Based on this, the method automatically adjusts retrieval parameter configuration and generates instruction templates, dynamically optimizes document retrieval strategies and content generation logic, and finally outputs personalized technical content matching the cognitive level of the user, effectively solving core problems such as standardization of technical documents, fragmentation of user experience, and low information transmission efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0019] Fig. 1 A step flowchart of a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling;

[0020] Fig. 2 A flowchart of an adaptive retrieval enhancement generation based on the professional level of the user in the application.

[0021] The purposes, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0022] The technical method of the application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the application.

[0023] In addition, the accompanying drawings are only schematic illustrations of the application, and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some block diagrams shown in the drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0024] It should be understood that although the terms "first", "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the exemplary embodiments, a first element can be called a second element, and similarly a second element can be called a first element. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0025] To achieve the above-mentioned purposes, please refer to Figs. 1-2The application provides a retrieval enhancement generation parameter automatic adjustment method based on content feature modeling, comprising the following steps:

[0026] Step S1: receiving the original query text of the user, performing component analysis, identifying professional terms, general words and problem entities, and quantifying to form a query fingerprint;

[0027] In the embodiment of the application, the user query is processed through multi-level text analysis. The system first receives the original query text and limits the length to 5000 characters, and performs standardization cleaning. Then, a professional dictionary covering 20 fields and 10000+ terms in each field is loaded, and component analysis is performed using a word segmentation engine and a syntax analyzer. Then, professional terms, general words and technical entities are identified and labeled, and their position index, field label and importance are recorded. Then, the term density is calculated and limited to the interval [0.05, 0.6]; the term rarity is calculated, wherein is the term frequency in the corpus; and finally, a JSON format structured query fingerprint containing the term list, density, rarity average, entity and original query is generated, and a unique hash identification is generated.

[0028] Step S2: obtaining the user historical behavior sequence, combining the query fingerprint, and using a time decay weighting algorithm to construct a user level score reflecting the current professional level of the user;

[0029] In the embodiment of the application, the user level evaluation based on historical behavior is realized. The system extracts up to 100 historical behavior records in the last 30 days from the session cache, including query fingerprints, document clicks and page scrolling data. An exponential decay function is applied to assign a time weight to each behavior, so that the behavior weight 24 hours ago is reduced to 0.79, and the behavior weight 7 days ago is reduced to 0.18. The professional degree features of the behavior are extracted, including the query professional degree , content preference index (five-level document classification weighting) and reading behavior mode (region stay ratio and jump mode analysis). A two-stage weighted fusion strategy is used to calculate the weighted average value of historical features, and then the current query features are fused in a ratio of 0.6:0.4. Finally, an S-shaped normalization function is applied to map the result to the interval [0.05, 0.95] to obtain the user level score.

[0030] Step S3: converting the user level score into specific retrieval parameter configuration to form a retrieval strategy blueprint;

[0031] In the embodiment of the application, an accurate mapping from a level score to a retrieval parameter is established. The system receives a user level score S as input, and maps S to a knowledge base selection parameter, activates different levels of knowledge base combinations through five equal intervals, realizes weight distribution mapping, sets T1=0.35 and T2=0.65 as two thresholds, uses concept bias weight [0.40, 0.35, 0.15, 0.07, 0.03] when S

[0032] Step S4: Guiding the document library retrieval according to the retrieval strategy blueprint to screen out a candidate knowledge set most matching the professional level of the user;

[0033] In the embodiment of the application, a parameterized knowledge retrieval process is performed. The system parses the knowledge base selection parameter in the blueprint, filters the effective documents in the activated knowledge base from the document metadata table; according to the slice size parameter, the documents are segmented in semantic boundaries to maintain the structural integrity; the query and the knowledge segment are converted into vector representations by using a 768-dimensional BERT variant model, and L2 normalization is performed; the original similarity is calculated , and then the weight adjustment formula is applied , and the document freshness and quality factor are further corrected; a descending order sorting is performed, and a 30% overlap rate deduplication mechanism is implemented to extract the first RC knowledge segments from K_sorted, and after context expansion, a candidate knowledge set is formed, including the original text, similarity score, document metadata and location information.

[0034] Step S5: According to the user level score, the role, style and structure placeholders in the preset instruction template are intelligently filled to construct a contextual generation instruction;

[0035] In the embodiment of the present application, dynamic personalization of instruction templates is achieved. The system presets a JSON structure instruction template containing four types of placeholders: ${ROLE}, ${STYLE}, ${STRUCTURE} and ${EXPERTISE}; a set of mapping functions that map user level score S to the content of each placeholder is constructed; the S is mapped to a three-dimensional parameter space RP of professional, tutoring inclination and technical depth by applying a role identification adjustment function, and a pre-defined role is matched through a nearest neighbor algorithm; the S is converted into interpretation detail, term frequency and expression complexity parameters LP by using a language style adjustment function, and a style description is generated through a decision tree; the proportions of concept explanation, example demonstration and technical details SP are calculated by a content structure adjustment function, and converted into a percentage expression; an accurate placeholder replacement operation is performed to generate a filled instruction; finally, the instruction and the candidate knowledge set are integrated into a contextualized generated instruction, and the model control parameters are dynamically adjusted through the formulas T = 0.9-0.6xS, P = 0.95-0.4xS and L = 4000-2500xS.

[0036] Step S6: guiding the model to process the candidate knowledge set using the contextualized generated instruction, and outputting customized content that meets the user's cognitive level.

[0037] In the embodiment of the present application, customized content generation and optimization are completed. The system transmits the contextualized instruction to a 175B parameter scale generation model through a high-throughput API, and allocates differentiated computing resources according to the user level score; the model performs five-stage processing of instruction analysis, knowledge understanding, content planning, draft generation and self-correction, adjusts the professional level according to the role identification, controls the term density according to the language style, and divides the proportion according to the content structure; the content organization module performs format standardization, blocking, key point highlighting and link enhancement to ensure that the correlation coefficient between content complexity C and user level S is greater than or equal to 0.85; the post-processing module performs differential optimization according to S, extracts technical terms TE and inserts brief explanations when S<0.35, deletes redundant basic explanations and enhances technical details when S>0.75, and controls the output length to be no more than MaxLen = h(S), to achieve the final customized output.

[0038] Preferably, step S1 comprises the following steps:

[0039] Step S11: receiving the original query text input by the user;

[0040] Step S12: performing component analysis on the query text using a pre-set domain dictionary and a natural language processing tool;

[0041] Step S13: identifying and labeling professional terms, general vocabulary and problem entities in the query;

[0042] Step S14: calculating the term density in the query text, the term density being the ratio of the number of professional terms to the total number of words in the query;

[0043] Step S15: calculating the term rarity, the term rarity being determined according to the frequency of each professional term in a preset corpus;

[0044] Step S16: generating a structured query fingerprint containing the term list, the density, the average rarity, the entity and the original query.

[0045] In the embodiment of the application, the original query text receiving module captures the user query through an API interface, limits the length to 5000 characters and performs standardization preprocessing, including space deletion, punctuation standardization and special character removal.

[0046] The component parsing unit loads a professional dictionary covering 20 technical fields and 10,000+ terms in each field, performs word segmentation processing on the query text to generate a word sequence, and performs part-of-speech tagging and dependency analysis through a syntax analyzer to construct a syntax tree structure.

[0047] The term recognition unit matches the word segmentation result with the dictionary, marks the professional terms and records the position index, field label and importance; the entity recognition unit extracts problem entities such as technical names, method names and tool names, assigns type labels and confidence values, and finally generates a set of labeling results.

[0048] The term density calculation unit counts the number of professional terms N_term and the total number of words N_total, calculates the density TD = N_term / N_total, and limits it in the interval [0.05, 0.6] to ensure reasonableness.

[0049] The term rarity calculation unit queries the frequency of each term in a 1 billion-word technical corpus , calculates the rarity , the rarity of a term that does not appear is 1, and finally calculates the weighted average as the overall rarity index.

[0050] The query fingerprint generation unit constructs JSON format structured data containing the term list, the density value, the average rarity, the problem entity array and the metadata, and generates a unique hash identifier for subsequent retrieval and behavior correlation analysis.

[0051] Preferably, step S2 comprises the following steps:

[0052] Step S21: extracting the user historical behavior sequence from the user's session cache, wherein the user historical behavior sequence includes the fingerprint of the historical query, the document click preference and the page scrolling behavior;

[0053] Step S22: assigning a time decay weight to each behavior in the user historical behavior sequence, wherein the time decay weight decreases with the increase of the interval between the behavior occurrence time and the current time;

[0054] Step S23: extracting the professional degree features corresponding to each behavior item in the user historical behavior sequence, including the term density of historical query, the technical depth of clicked content and the jump mode of page reading;

[0055] Step S24: weighting and fusing the professional degree features of the current query fingerprint and the professional degree features of each historical behavior item to obtain a weighted fusion result, wherein the weighting coefficient in the weighted fusion result is the corresponding time decay weight;

[0056] Step S25: mapping the weighted fusion result to the interval [0, 1] through a normalization function to obtain the final user level score.

[0057] In the embodiment of the application, first, a user session database is connected, and the session cache data in the last 30 days is retrieved according to a user unique identifier. The cache adopts a hierarchical key-value structure to store three types of core behaviors: a historical query fingerprint set HQ={q_1, q_2,..., q_n}, containing structured query fingerprints and time stamps; a document click record set DC={d_1, d_2,..., d_m}, containing document IDs, type labels, technical difficulty coefficients and stay time lengths; and a page scrolling behavior sequence PS={p_1, p_2,..., p_k}, containing scrolling rates, pause positions and reading depth proportions. The most 100 recent behavior records are extracted to constitute an initial historical behavior sequence H_init.

[0058] Then, an exponential decay function is applied to each record to calculate the weight. The time interval (hours), and the time decay weight is calculated by to reduce the weight of behaviors 24 hours ago to 0.79 and behaviors 7 days ago to 0.18. The lower limit of the weight is set to 0.05 to retain the minimum influence of early behaviors.

[0059] Then, the professional degree features of each record are extracted: the term density TD_i and rarity TR_i are extracted from the historical query; the document type DT_i (1-5) is obtained from the document click record, and the technical depth score DS_i is calculated; the jump mode feature JS_i is calculated from the page scrolling record to evaluate behaviors such as the frequency of directly jumping to advanced chapters. The feature vectors F_i=[TD_i, TR_i, DS_i, JS_i] are summarized to fill in the missing features.

[0060] The two-stage weighted fusion is performed: firstly, the weighted average values TD_fused, TR_fused, DS_fused and JS_fused of each type of feature are calculated, and the weight is the time decay value; and secondly, the current query feature and the historical fusion feature are fused according to a 0.6:0.4 ratio to generate the final vector F_final.

[0061] Finally, the fused feature is mapped to the [0, 1] interval by applying a segmented S-shaped function. The S-shaped normalization function with pre-set parameters is applied to each feature component to calculate the weighted average score, and the weight distribution is 0.3 for term density, 0.3 for term rarity, 0.2 for document depth, and 0.2 for jump feature. The final score is limited to the [0.05, 0.95] interval by applying a calibration function, and the accurate quantification of the user's professional level is realized.

[0062] Especially important is that the time decay weight in step S22 is calculated by an exponential decay function, so that the influence of the behavior occurring earlier on the current user level score is significantly smaller than that of the behavior occurring recently, wherein the decay rate is controlled by a pre-set decay coefficient.

[0063] In the embodiment of the application, the time decay weight calculation adopts an exponential decay function is realized, wherein is a decay coefficient fixed value 0.01, represents the interval hours between the behavior occurrence time and the current time, is the natural logarithm base number. When the system is implemented, the accurate time difference is first calculated by a millisecond-level time stamp, which is converted into hours, and then substituted into the decay formula. The function makes the behavior weight 0.99 one hour ago, 0.89 12 hours ago, 0.79 24 hours ago, 0.49 3 days ago, 0.18 7 days ago, and 0.03 14 days ago. The system sets a lower threshold value 0.05 for weight calculation, and forces it to be 0.05 when the calculated weight is lower than the value, to prevent the long-term behavior from being completely ignored; and sets an upper limit of 1.0 to ensure the weight normalization. The exponential decay mechanism accurately quantifies the influence of time on the importance of user behavior, and through the accurate calibration of the parameter λ=0.01, the system maintains high sensitivity to recent behavior while retaining the influence of long-term behavior patterns, realizing the time sequence dynamics of user professional level evaluation.

[0064] Preferably, the professional degree feature in step S23 includes:

[0065] the query professional degree calculated according to the term density and the term rarity in the query fingerprint;

[0066] the content preference index determined according to the type of document clicked by the user, wherein API documents, source code analysis and technical documents correspond to high professional degree, and introductory tutorials, concept explanations and basic documents correspond to low professional degree;

[0067] The reading behavior mode determined according to the length of stay distribution and the jump behavior of the user in the document, wherein the behavior of directly jumping to the advanced chapter or API part corresponds to high professionalism, and the behavior of sequentially reading or frequently checking the basic part corresponds to low professionalism.

[0068] In the embodiment of the application, the professional degree feature extraction includes three core dimensions. The first dimension is query professional degree calculation. The system extracts term density TD and term rarity TR from the query fingerprint, and calculates the query professional degree by using a weighted summation formula QP=0.4×TD+0.6×TR. In the formula, the weight of the term rarity is greater than the weight of the term density, because the use of rare terms can better reflect the actual professional level of the user. The system sets a professional degree threshold. When QP<0.3, it is determined as a primary query, when QP>0.7, it is determined as an advanced query, and when between the two, it is determined as an intermediate query. The second dimension is the content preference index. The system classifies technical documents into five levels: L1 (introduction tutorial, weight 0.2), L2 (concept explanation, weight 0.4), L3 (basic practice, weight 0.6), L4 (technical document, weight 0.8), and L5 (API document and source code analysis, weight 1.0). The user click behavior is accumulated and weighted according to the document classification to form a content preference vector , wherein represents the preference degree of the user for the content of the level, and the value range is [0, 1]. The system calculates the comprehensive score of the content preference , and the value range is [1, 5]. The higher the score, the more professional the content preferred by the user. The third dimension is the reading behavior mode analysis. The system records the page stay heat map HM and the jump sequence JS of the user in the document. The heat map HM divides the document into three parts: basic area B, intermediate area M, and advanced area A, and records the proportion of the stay time of the user in each area. The jump sequence JS captures the reading path of the user in the document, including the number of times of directly jumping from the table of contents to the advanced chapter DJ, the access frequency of the API part AF, and the number of times of repeatedly checking the basic part RB. The system calculates the reading professional degree by using the formula , wherein is the total number of jumps, and the value range is [0, 1]. After standardization processing, the professional degree features of the three dimensions jointly constitute the professional degree feature vector of the user behavior, which provides a multi-dimensional professional level evaluation basis for subsequent weighted fusion.

[0069] Preferably, step S3 comprises the following steps:

[0070] Step S31: receiving the user level score as input;

[0071] Step S32: mapping the user level score to a knowledge base selection parameter, which is used to determine the search scope;

[0072] Step S33: mapping the user level score to a weight allocation parameter, which is used to adjust the search priority of different types of content;

[0073] Step S34: mapping the user level score to a slice size parameter, which decreases with the increase of the user level score;

[0074] Step S35: mapping the user level score to a recall number parameter, which is used to control the number of returned knowledge slices;

[0075] Step S36: integrating the weight allocation parameter, the slice size parameter and the recall number parameter to generate the search strategy blueprint.

[0076] In the embodiment of the application, the user level score S∈[0.05, 0.95] is first received as a search parameter configuration benchmark, effectiveness verification is performed and boundary truncation processing is executed to ensure that S is strictly located in the preset interval.

[0077] Then, mapping of the user level score to the knowledge base configuration is realized. A preset five-level document knowledge base is: L1 (entry level), L2 (basic concept), L3 (application practice), L4 (technical details) and L5 (professional senior). The [0.05, 0.95] interval is divided into five equal parts to correspond to different activation combinations: S∈[0.05, 0.23) activates {L1, L2}; S∈[0.23, 0.41) activates {L1, L2, L3}; S∈[0.41, 0.59) activates {L2, L3, L4}; S∈[0.59, 0.77) activates {L3, L4, L5}; and S∈[0.77, 0.95] activates {L4, L5}. This strategy ensures that the search scope matches the user level.

[0078] Then, conversion of the user level score to a document type weight vector W=[w_1, w_2, w_3, w_4, w_5] is performed. A linear interpolation method is adopted, a low level benchmark weight W_low=[0.45, 0.30, 0.15, 0.07, 0.03] and a high level benchmark weight W_high=[0.03, 0.07, 0.15, 0.30, 0.45] are preset, and for any level score S, the weight vector W is calculated through linear interpolation to ensure that the weight of senior content gradually increases with the improvement of the user level.

[0079] The user level score is converted to a document slice size parameter. A nonlinear inverse mapping function is adopted, where =2000, =200, so that the primary users obtain larger knowledge pieces and the advanced users obtain accurate positioning small pieces. The calculation result is rounded to the nearest 50 multiple, so as to ensure the normality of the slice boundary.

[0080] The number of returned matching knowledge pieces is calculated. The basic number RN_base=10 is set, and is dynamically adjusted by a step function: when S<0.3, RN=RN_base+5; when S∈[0.3,0.7), RN=RN_base; and when S≥0.7, RN=RN_base+3, so as to balance the knowledge breadth and depth requirements of users at different levels.

[0081] Finally, the generated parameters are integrated into a JSON format retrieval strategy blueprint, including five core parts: an activeKnowledgeBases array, a weightDistribution object, an integer chunkSize, an integer recallCount and a metaData object, so as to guide the subsequent document retrieval process.

[0082] Preferably, in the step S33,

[0083] When the user level score is lower than a first preset threshold, the weight of the conceptual document is increased and the weight of the technical detail document is reduced;

[0084] When the user level score is higher than a second preset threshold, the weight of the technical detail document is increased and the weight of the conceptual document is reduced;

[0085] When the user level score is between the first preset threshold and the second preset threshold, a balanced weight distribution is adopted.

[0086] In the embodiment of the application, the weight distribution unit realizes a weight adjustment mechanism based on threshold segmentation. The system sets a first preset threshold =0.35 and a second preset threshold =0.65, and divides the user level score into three intervals. The documents are divided into five categories: conceptual documents , ), application practice documents ) and technical detail documents , ). When <T1, the system performs a concept-biased weight distribution, and the specific weight values are =[0.40,0.35,0.15,0.07,0.03], wherein the five elements correspond to the retrieval weights of the five categories of documents to respectively. This configuration makes and The total weight of documents of each category reaches 0.75, ensuring that conceptual content dominates the search results and helps users with lower levels of knowledge build a basic knowledge framework. At time T2, the system performs a weighted allocation based on technical bias, with the weight value being [value missing]. =[0.03,0.07,0.15,0.35,0.40], this configuration reverses the weighting ratio between conceptual documents and technical documents, making... and The total document weight reaches 0.75, providing advanced users with in-depth technical details. When T1 ≤ When T2 is less than or equal to T2, the system performs a balanced weight allocation, with the weight value being [value missing]. =[0.20,0.20,0.20,0.20,0.20], all document types receive equal search opportunities, catering to the needs of users with average skill levels. To achieve a smooth transition, the system employs an interpolation smoothing algorithm at the interval boundaries: when near hour, When S approaches T2, This weighting mechanism avoids the drawbacks of "standardization" in traditional document retrieval, dynamically adjusting content bias for users of different skill levels to achieve personalized optimization of search results. In actual implementation, the weight array is normalized to ensure that the sum of the weights of the five document categories is 1, guaranteeing the numerical stability of the retrieval system.

[0087] Preferably, step S4 includes the following steps:

[0088] Step S41: Determine the set of documents to be retrieved based on the knowledge base selection parameters in the retrieval strategy blueprint;

[0089] Step S42: Divide the document collection into knowledge fragments according to the slice size parameter in the retrieval strategy blueprint;

[0090] Step S43: Use a vector embedding model to convert user queries and knowledge fragments into vector representations;

[0091] Step S44: Calculate the similarity between the query vector and each knowledge fragment vector, and adjust the similarity score according to the weight allocation parameters in the retrieval strategy blueprint to obtain the adjusted similarity score;

[0092] Step S45: Sort the knowledge fragments according to the adjusted similarity scores, and select the fragments with the highest relevance according to the recall quantity parameter in the retrieval strategy blueprint to form the candidate knowledge set.

[0093] In this embodiment of the invention, technical documents are first organized using a layered knowledge base architecture: (Introductory knowledge base, 1 million documents) (Base Concepts Library, 1.5M documents), (Application Practices Library, 2M documents), (Technical Details Library, 1.8M documents), and (Professional Advanced Library, 1.2M documents). According to the activated knowledge base list in the retrieval strategy blueprint, perform parallel query to filter the qualified documents, and use bitmap index to accelerate the process. Perform metadata filtering to exclude outdated (>5 years) and low-quality (<3.5 5) documents, forming the document set D to be retrieved.

[0094] According to the slice size parameter CS in the retrieval strategy blueprint, perform semantic segmentation on the documents. The segmentation is preferentially performed at semantic boundaries to ensure integrity; when the semantic block exceeds CS, perform sentence-level division. Special content such as code blocks and tables is kept structurally intact. Each knowledge piece contains original text, metadata references, location indexes, and automatically extracted summaries, forming the knowledge piece set K.

[0095] Use a pre-trained 768-dimensional BERT variant two-tower encoding model (fine-tuned on 15M technical documents) to convert text into vector representations. Query encoding combines the original query and identified entities into an enhanced query text, generating query vector q; piece encoding processes each knowledge piece in parallel, extracting text, title, and type information, generating a set of piece vectors . Perform normalization on all vectors to ensure a Euclidean length of 1.

[0096] Calculate the dot product similarity between the query vector and each piece vector , then adjust the similarity according to the type and weight of the document to which the piece belongs: . This formula retains 50% of the original similarity and adjusts 50% according to the document type. Further apply the document freshness and quality factors to correct: .

[0097] Perform descending order sorting on the adjusted similarity scores to generate the K_sorted sequence. Implement a de-duplication mechanism with a content overlap rate of >30% to extract the top RC pieces (RC is the recall quantity parameter in the retrieval strategy blueprint) from K_sorted to form the candidate knowledge set. Perform context expansion on each selected piece to supplement necessary information to enhance integrity. Finally, serialize the candidate knowledge set into JSON format, containing original text, similarity score, metadata, and location information.

[0098] Preferably, step S5 comprises the following steps:

[0099] Step S51: presetting an instruction template with placeholders, wherein the placeholders include role identification, language style, content structure, and professional degree assumption;

[0100] Step S52: constructing a mapping function of user level score to placeholder filled content;

[0101] Step S53: determining specific filled content of each placeholder according to the mapping function and the user level score;

[0102] Step S54: substituting the determined filled content into the instruction template, completing placeholder replacement, and obtaining filled instructions;

[0103] Step S55: combining the filled instructions with the candidate knowledge set to generate the contextualized generation instruction.

[0104] In the embodiment of the application, a unified JSON structure generation instruction framework is first defined, including four types of key placeholders: ${ROLE} (answerer role), ${STYLE} (language expression style), ${STRUCTURE} (content organization structure), and ${EXPERTISE} (professional degree assumption). The instruction template includes three parts of task description, style guide, and content specification, and maintains five standardized template variants for different difficulty levels, each of which is stable after 1000 times of test verification.

[0105] A quantitative conversion mechanism of user level score to placeholder content is established, and four groups of mapping functions are defined: a role mapping function R(S) that maps the score to five roles; a style mapping function L(S) that maps to a [explanation detail, term usage frequency, expression complexity] parameter vector; a structure mapping function T(S) that maps to a [concept explanation proportion, example proportion, technical detail proportion] parameter vector; and a professional degree mapping function E(S) that maps to five levels of professional degree assumption. Each function is implemented by piecewise linear, optimized by 10,000 user historical data, and the weight adjustment parameters α=0.8, β=0.7, γ=0.9, and δ=0.6 are set to control the sensitivity.

[0106] The specific placeholder content is calculated by receiving the user level score S: the role identification is "junior lecturer" when S<0.3, and increases to "basic tutorial instructor", "application specialist", "technical consultant", and "senior engineer" (S≥0.85) in turn with the increase of S; the language style evolves from "concise and intuitive, a small amount of terms, simple sentence structure" to "professional and accurate, a large number of terms, complex sentence structure"; the content structure changes from "concept-based (60%), example (30%), and a small amount of details (10%)" to "technology details-based (70%), necessary concepts (20%), and key examples (10%)"; and the professional degree assumption gradually increases from "beginner" to "expert".

[0107] Perform placeholder replacement, select the most matching template variant, replace four types of placeholders in turn using regular expressions, and use a single-pass scanning algorithm (O(n) complexity). After replacement, perform verification to ensure that all placeholders have been replaced and the syntax is correct. Implement cache for common replacement patterns, reuse generated templates with the same interval score.

[0108] Integrate the filled instructions and the candidate knowledge set into the final input: place the instructions at the beginning as control instructions, add query descriptions (original query, key entities, term explanations), insert knowledge context markers, add knowledge fragments in descending order of relevance, and attach output format guidelines. The final instruction contains four parts: instructions, queries, knowledge, and output guidelines, with a total length of 65536 characters. Perform compression processing to remove redundant formats and optimize transmission efficiency.

[0109] Especially important, the contextualized instruction generation module also includes control parameters for the generation model, including:

[0110] temperature parameter, which decreases with the increase of user level score;

[0111] top_p parameter, which decreases with the increase of user level score;

[0112] maximum output length parameter, which decreases with the increase of user level score.

[0113] In the embodiments of the present application, the contextualized instruction generation module integrates a generation model control parameter adjustment mechanism based on user level score. The system dynamically calculates three types of key control parameters according to the accurate mapping function: the temperature parameter is calculated by the formula T=0.9-0.6×S (S is the user level score), so that beginners obtain diverse explanations (T≈0.8) and experts obtain accurate focused content (T≈0.3); the top_p parameter is calculated by P=0.95-0.4×S, and low-level users set a higher threshold (P≈0.9) to retain multiple expression paths, and high-level users reduce to about 0.6 to ensure accurate output; the maximum output length parameter follows the calculation rule L=4000-2500×S, beginners obtain detailed explanations (about 3500 characters), and expert-level users obtain concise answers (about 1500 characters). These three sets of parameter adjustments are embedded in the contextualized instruction as a generation_config object in JSON format, which works together with the content guide to achieve output control from diverse and detailed (beginners) to accurate and concise (experts), ensuring that the generated content accurately matches the user's cognitive level in terms of information quantity and expression method, greatly improving the efficiency of knowledge transmission.

[0114] Preferably, step S53 comprises:

[0115] constructing a role identification adjustment function to map the user level score to a role identification parameter set containing values representing the degree of professionalism, the degree of guidance inclination and the degree of technical depth, and generating a corresponding role identification according to the role identification parameter set;

[0116] constructing a language style adjustment function to map the user level score to a language style parameter set containing values representing the degree of explanation elaboration, the frequency of term usage and the degree of expression complexity, and generating a corresponding language style according to the language style parameter set;

[0117] constructing a content structure adjustment function to map the user level score to a content structure parameter set containing values representing the proportion of concept explanation, the proportion of example demonstration and the proportion of technical details, and generating a corresponding content structure according to the content structure parameter set;

[0118] filling the generated role identification, language style and content structure into the corresponding placeholders of the instruction template.

[0119] In the embodiment of the application, the role identification adjustment function first maps the user level score S to a three-dimensional parameter space RP=[rp_1, rp_2, rp_3] representing the degree of professionalism, the degree of guidance inclination and the degree of technical depth, respectively, with a value range of [0, 1]. Piecewise linear mapping is adopted: when S<0.3, RP=[0.2, 0.9, 0.1]; when 0.3≤S<0.5, RP=[0.4, 0.7, 0.3]; when 0.5≤S<0.7, RP=[0.6, 0.5, 0.5]; when 0.7≤S<0.85, RP=[0.8, 0.3, 0.7]; and when S≥0.85, RP=[0.9, 0.1, 0.9]. A mapping table containing 25 predefined roles is queried according to the parameter set RP, and the nearest neighbor algorithm is used to select the most matched role, for example, RP=[0.2, 0.9, 0.1] is mapped to "technical beginner guide", and RP=[0.9, 0.1, 0.9] is mapped to "senior technical architect".

[0120] The language style adjustment function maps S to a parameter set LP=[lp_1, lp_2, lp_3] representing the degree of explanation elaboration, the frequency of term usage and the degree of expression complexity. The mapping formula is: lp_1=1-0.7×S, lp_2=0.2+0.7×S, lp_3=0.1+0.8×S, ensuring that as the user level improves, the explanation is simplified, and the term and complexity are improved. LP is converted to a specific style description through a decision tree, for example, LP=[0.9, 0.3, 0.2] is converted to "use simple language, explain each concept in detail, avoid complex terms".

[0121] The content structure adjustment function maps S to a parameter set SP = [sp_1, sp_2, sp_3] representing the proportions of conceptual explanation, example demonstration, and technical detail, satisfying sp_1 + sp_2 + sp_3 = 1. Linear interpolation is adopted: sp_1 = 0.7 - 0.5 x S, sp_2 = 0.25 constant, sp_3 = 0.05 + 0.5 x S, ensuring that as the user's level improves, conceptual explanation decreases and technical detail increases. Convert SP to percentage representation, such as SP = [0.6, 0.25, 0.15] to "Content structure: conceptual explanation (60%), example demonstration (25%), technical detail (15%)".

[0122] Finally, the generated role identification, language style, and content structure description are filled into the instruction template through regular expression replacement to fill in the ${ROLE}, ${STYLE}, and ${STRUCTURE} placeholders, achieving automatic conversion from user level score to specific instruction text, ensuring that the generated model adapts to the cognitive needs of users at different levels. Perform replacement result verification to prevent format errors that cause instructions to fail.

[0123] Preferably, step S6 comprises the following steps:

[0124] Step S61: input the contextualized generation instruction into the generation model;

[0125] Step S62: the generation model processes the candidate knowledge set according to the role identification, language style, content structure, and professional degree in the contextualized generation instruction, to obtain processed content;

[0126] Step S63: organize the processed content to generate a customized response;

[0127] Step S64: post-process the customized response according to the user level score, automatically add term explanations when the user level score is low, and omit basic explanations and increase technical depth when the user level score is high.

[0128] In the embodiment of the present application, the contextualized generation instruction is first transmitted to the pre-deployed large language model with a scale of 175B parameters through a high-throughput API interface. The model has been fine-tuned for 30 billion tokens for technical document understanding and knowledge integration tasks. The asynchronous processing mechanism is adopted to serialize the instruction into JSON format, adding request ID, timestamp, and priority marker. According to the user level score, implement differentiated computing resource allocation: S < 0.3 allocates 4 tensor processing units, S > 0.7 allocates 8 tensor processing units. Set a 30-second timeout threshold, and the timeout triggers a backup call process.

[0129] The generation process performs a five-stage process: the instruction analysis stage extracts and internalizes control signals such as role identification and language style; the knowledge understanding stage processes candidate knowledge fragments, performs entity linking and relationship extraction, and constructs a temporary knowledge graph; the content planning stage determines the output framework according to the structure parameters, divides the proportions of concept explanation, examples, and technical details; the draft generation stage adjusts the tone and professionalism according to the role identification, controls the term density and sentence complexity according to the language style; the self-correction stage checks the adaptability against the professionalism assumption and adjusts the depth of explanation. The entire process uses temperature parameters T = f(S) and top_p parameters P = g(S) to control the diversity of output, f and g are decreasing functions, so that the output becomes more accurate as the user's level improves.

[0130] After receiving the original output, perform structured processing: convert plain text to HTML format, add title, paragraph, and other structural tags; divide functional blocks according to the preset content structure ratio; identify core terms and conclusions and apply bold or highlight to enhance their prominence; add internal reference links for related technical concepts; perform consistency checks to ensure uniformity of terms and completeness of structure. Calculate the complexity index C (term density, sentence complexity, concept abstraction degree) to ensure that the correlation coefficient with the user level score S is ≥0.85.

[0131] Finally, according to the user level score, perform differentiated post-processing: when S <0.35, extract technical terms, filter the set of explanations TE that need to be explained, retrieve basic definitions and insert concise explanations at the first occurrence position; when S > 0.75, identify and delete redundant basic explanations, enhance the technical details section, add implementation principles, performance parameters, and other deep information, and replace vague expressions with precise descriptions. Real-time tracking of content length ensures that it does not exceed the MaxLen = h(S) limit, where h is a decreasing function that decreases as the user's level improves.

[0132] Please refer to Fig. 2To generate a flow chart of the adaptive retrieval enhancement based on user's professional level in the present application, the picture shows a complete set of workflow chart of the adaptive question-answering system based on user's professional level. The whole process starts from "user's original query", which is first converted into a structured "query fingerprint" by the S1 query analysis module. Then, the fingerprint is fed into the core link of S2 user level modeling together with the user's historical behavior data, and the key indicator "user level score" is calculated. This score is the watershed of the process, which drives two parallel paths at the same time: the retrieval path above uses the score to generate a retrieval blueprint and performs adaptive retrieval from the document library to obtain a "candidate knowledge set" through S3 and S4; the generation path below uses the score to build "contextual generation instructions" in S5. Finally, the products of the two paths are fused in the S6 personalized content generation stage, combining "what to say" (knowledge set) and "how to say" (instructions) to generate and output the "customized response" tailored for the user.

[0133] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the present application being defined by the appended claims and not by the above description, therefore all variations falling within the meaning and scope of the equivalent elements of the application file are intended to be included in the present application.

[0134] The above description is merely one specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for automatic adjustment of retrieval enhancement generation parameters based on content feature modeling, characterized in that, The method is applied to a technical document system and comprises the following steps: Step S1: receiving original query text of a user, performing component analysis, identifying professional terms, general words and problem entities, and generating a structured query fingerprint comprising a term list, a term density, a term rarity mean value, an entity and the original query, wherein the term density is a ratio of the number of professional terms to the total number of query words, and the term rarity is determined according to the frequency of each professional term in a preset corpus; Step S2: obtaining a user historical behavior sequence, assigning a time decay weight to each behavior item in the user historical behavior sequence, weighting and fusing the professional degree features of the current combined query fingerprint and each historical behavior item to obtain a weighted fusion result, and constructing a user level score reflecting the current professional level of the user, wherein the weighted fusion result is weighted by the corresponding time decay weight; Step S3: converting the user level score into specific retrieval parameter configurations to form a retrieval strategy blueprint comprising a knowledge base selection parameter, a weight distribution parameter, a slice size parameter and a recall quantity parameter, wherein the slice size parameter is a knowledge fragment length threshold dynamically set by the user level score; Step S4: guiding document library retrieval according to the retrieval strategy blueprint to screen out a candidate knowledge set most matching the professional level of the user; Step S5: intelligently filling in role identifier placeholders, language style placeholders and content structure placeholders in a preset instruction template according to the user level score to construct a contextual generation instruction; Step S6: using the contextual generation instruction to guide the model to process the candidate knowledge set and output customized content conforming to the cognitive level of the user.

2. The method of claim 1, wherein, Step S1 comprises the following steps: Step S11: receiving original query text input by a user; Step S12: using a pre-set domain dictionary and a natural language processing tool to perform component analysis on the query text; Step S13: identifying and labeling professional terms, general words and problem entities in the query; Step S14: calculating the term density and the term rarity in the query text.

3. The method of claim 1, wherein, Step S2 comprises the following steps: Step S21: extracting a user historical behavior sequence from a session cache of the user, wherein the user historical behavior sequence comprises a fingerprint of a historical query, a document click preference and a page scrolling behavior; Step S22: extracting professional degree features corresponding to each behavior item in the user historical behavior sequence, including a term density of a historical query, a technical depth of clicked content and a page reading jump mode; Step S23: mapping the weighted fusion result to the [0, 1] interval through a normalization function to obtain a final user level score.

4. The method of claim 3, wherein, The professional degree features in step S22 comprise: a query professional degree calculated according to the term density and the term rarity in the query fingerprint; a content preference index determined according to the type of documents clicked by the user, wherein API documents, source code analysis and technical documents correspond to high professional degree, and introductory tutorials, concept explanations and basic documents correspond to low professional degree; and a page reading jump mode. The reading behavior mode is determined according to the distribution of the user's stay time in the document and the jumping behavior, wherein the behavior of directly jumping to the advanced chapter or API part corresponds to high professionalism, and the behavior of sequentially reading or frequently checking the basic part corresponds to low professionalism.

5. The method of claim 1, wherein, Step S3 comprises the following steps: Step S31: receiving the user level score as input; Step S32: mapping the user level score to a knowledge base selection parameter, the knowledge base selection parameter being used to determine the retrieval range; Step S33: mapping the user level score to a weight allocation parameter, the weight allocation parameter being used to adjust the retrieval priority of different types of content; Step S34: mapping the user level score to a slice size parameter, the slice size parameter decreasing with the increase of the user level score; Step S35: mapping the user level score to a recall quantity parameter, the recall quantity parameter being used to control the number of returned knowledge slices.

6. The method of claim 5, wherein the content feature-based modeling of retrieval enhancement generation parameter automatic adjustment is characterized by, In the step S33: When the user level score is lower than a first preset threshold, the weight of the conceptual document is increased, and the weight of the technical detail document is decreased; When the user level score is higher than a second preset threshold, the weight of the technical detail document is increased, and the weight of the conceptual document is decreased; When the user level score is between the first preset threshold and the second preset threshold, a balanced weight allocation is adopted.

7. The method of claim 1, wherein, Step S4 comprises the following steps: Step S41: determining the document set to be retrieved according to the knowledge base selection parameter in the retrieval strategy blueprint; Step S42: dividing the document set into knowledge slices according to the slice size parameter in the retrieval strategy blueprint; Step S43: converting the user query and the knowledge slices into vector representations by using a vector embedding model; Step S44: calculating the similarity between the query vector and each knowledge slice vector, and adjusting the similarity score according to the weight allocation parameter in the retrieval strategy blueprint to obtain an adjusted similarity score; Step S45: sorting the knowledge slices according to the adjusted similarity score, and selecting the slices with the highest relevance according to the recall quantity parameter in the retrieval strategy blueprint to form the candidate knowledge set.

8. The method of claim 1, wherein the content feature based modeling of retrieval enhancement generation parameter automatic adjustment is characterized by, Step S5 comprises the following steps: Step S51: presetting an instruction template with placeholders, wherein the placeholders include role identification, language style, content structure and professionalism assumption; Step S52: constructing a mapping function of the user level score to the placeholder filling content; Step S53: determining the specific filling content of each placeholder according to the mapping function and the user level score; Step S54: substituting the determined filling content into the instruction template to complete the placeholder replacement, and obtaining the filled instruction; Step S55: combining the filled instruction with the candidate knowledge set to generate the contextualized generation instruction.

9. The method of claim 8, wherein, In the step S53: A role identification adjustment function is constructed to map the user level score to a role identification parameter set, the role identification parameter set containing numerical values representing the degree of professionalism, the degree of guidance inclination and the degree of technical depth, and a corresponding role identification is generated according to the role identification parameter set; A language style adjustment function is constructed to map the user level score to a language style parameter set containing numerical values of explanation elaboration, term usage frequency and expression complexity, and a corresponding language style is generated according to the language style parameter set; A content structure adjustment function is constructed to map the user level score to a content structure parameter set containing numerical values of concept explanation proportion, example demonstration proportion and technical detail proportion, and a corresponding content structure is generated according to the content structure parameter set; The generated role identification, language style and content structure are filled into the corresponding placeholders of the instruction template.

10. The method of claim 1, wherein, Step S6 includes the following steps: Step S61: input the contextualized generation instruction into the generation model; Step S62: the generation model processes the candidate knowledge set according to the role identification, language style, content structure and professional degree assumption in the contextualized generation instruction to obtain processed content; Step S63: the processed content is organized to generate a customized response; Step S64: the customized response is post-processed according to the user level score, and when the user level score is low, term explanation is automatically added; when the user level score is high, basic explanation is omitted and technical depth is increased.

Citation Information

Patent Citations

  • User preference analysis method based on memory enhanced multi-modal large model

    CN119884981A

  • Dynamic knowledge retrieval enhancement method based on large language model

    CN120407570A