Vector node optimization method and system for enhancing RAG retrieval accuracy

By employing methods such as contextual understanding and reconstruction, dynamic weight adaptation, and multi-dimensional verification, the problems of user query ambiguity and information gaps in RAG retrieval have been solved. This has enabled a leap from shallow semantic matching to deep contextualized precise matching, thereby improving the adaptive capability of the retrieval system and the credibility of the results.

CN121996764APending Publication Date: 2026-05-08HUAJINGLEYOU (SHENZHEN) SMART TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAJINGLEYOU (SHENZHEN) SMART TECHNOLOGY CO LTD
Filing Date
2026-01-20
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing RAG retrieval solutions struggle to effectively handle the ambiguity, missing information, and semantic ambiguity of user queries. Furthermore, mainstream vector retrieval fails to comprehensively consider the timeliness and authority of documents, resulting in potentially outdated, unauthoritative, or mismatched search results. Consequently, they cannot achieve a balance between efficiency and accuracy in complex and professional scenarios.

Method used

By understanding and reconstructing user queries in a contextualized manner, target queries are generated, and multi-way retrieval is performed based on dynamic weights. Combined with multi-dimensional verification and re-ranking, vector nodes are optimized to achieve an adaptive retrieval strategy, including comprehensive weight calculation of semantic relevance, timeliness, and authority. The multi-way retrieval strategy is adaptively triggered, and multi-dimensional verification and re-ranking are performed.

Benefits of technology

It significantly improves the relevance and accuracy of search results. The system can intelligently respond to different query scenarios, achieve the optimal balance between efficiency and accuracy, and ensure the timeliness and reliability of the output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996764A_ABST
    Figure CN121996764A_ABST
Patent Text Reader

Abstract

The invention discloses a vector node optimization method and system for enhancing RAG retrieval accuracy, and particularly relates to the technical field of information retrieval and natural language process.The method comprises the steps that scenarized understanding and reconstruction are conducted on an original query of a user, and a target query is generated; based on the target query, calculating scene adaptive dynamic weights fusing semantic relevancy, timeliness and authority for the knowledge base document nodes; multi-channel retrieval is triggered in a self-adaptive mode according to the scene and complexity, and preliminary sorting is optimized through dynamic weight; performing multi-dimensional verification and reordering on the primary result, and outputting a high-order result; and continuously optimizing the system through feedback learning. According to the method, the problems of fuzzy query, static weight and single strategy in traditional retrieval are solved, the spanning from semantic matching to scenarized accurate matching is realized, and the accuracy, adaptability and result reliability of retrieval are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of information retrieval and natural language processing technology, and more specifically, to a vector node optimization method and system for enhancing the accuracy of RAG retrieval. Background Technology

[0002] With the development of large-scale pre-trained language models, Retrieval Augmentation (RAG) technology has become the core paradigm for building knowledge-intensive intelligent question-answering systems. This technology transforms user queries into vectors, performs semantic retrieval in a vectorized knowledge base, and uses relevant documents as contextual input to generate the model, thereby improving the accuracy and credibility of the answers.

[0003] However, existing RAG retrieval schemes still face significant challenges: First, directly vectorizing the user's original query makes it difficult to effectively handle its inherent ambiguity, missing information, and semantic ambiguity, resulting in deviations in the source of the search intent. Secondly, mainstream vector retrieval usually relies only on static semantic similarity and fails to comprehensively consider the timeliness, authority, and dynamic adaptation of documents to specific application scenarios, which may result in outdated, unauthoritative, or mismatched search results. Finally, retrieval strategies are often singular and rigid, unable to adaptively select or integrate multiple retrieval paths based on query complexity and domain characteristics, making it difficult to achieve a balance between efficiency and accuracy.

[0004] These shortcomings limit the practical application effectiveness and reliability of the RAG system in complex, professional, and demanding scenarios.

[0005] In view of this, the present invention provides a vector node optimization method and system to enhance the accuracy of RAG retrieval. Summary of the Invention

[0006] To overcome the aforementioned deficiencies of the prior art, this invention provides a vector node optimization method and system to enhance the accuracy of RAG retrieval, thereby addressing the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a vector node optimization method to enhance the accuracy of RAG retrieval, comprising the following steps: The original query input by the user is understood and reconstructed in a contextualized manner to generate the target query; Based on the target query, dynamic weights are generated for vectorized document nodes in the knowledge base, which are adapted to the scenario. Based on the results of contextual understanding, multi-path retrieval is adaptively triggered and executed, and a primary retrieval result set is obtained based on dynamic weights; Perform multi-dimensional validation and reordering on the primary search result set to output higher-order search results.

[0008] Preferably, contextual understanding and reconstruction specifically includes: identifying the context category to which the original query belongs based on the textual features of the original query and the user session context, and supplementing information and eliminating ambiguity in the original query according to the context category.

[0009] Preferably, the dynamic weight for scene adaptation is a comprehensive weight that integrates semantic relevance, timeliness, and authority information. Semantic relevance is determined based on the vector similarity between the target query and the document node, timeliness is dynamically determined based on the document update time, and authority is determined based on the level of the document source.

[0010] Preferably, adaptive triggering and execution of multi-path retrieval specifically includes: selecting at least one retrieval strategy from a preset strategy set for execution based on whether the scenario category is a professional field and the query complexity. The preset strategy set includes fast retrieval based on vector similarity, hybrid retrieval combining keywords and vectors, and enhanced retrieval fused with knowledge graphs.

[0011] Preferably, when multiple retrieval strategies are selected, they are executed in parallel and the retrieval results are fused and deduplicated. The multi-path retrieval at least integrates text vector similarity retrieval and knowledge graph-based entity relationship retrieval.

[0012] Preferably, in text vector similarity retrieval, dynamic weights are used as the core ranking factor.

[0013] Preferably, the multi-dimensional verification and re-ranking specifically includes: calculating the scores of each document in the primary search result set on multiple verification dimensions, weighting and fusing the scores of each dimension with the corresponding dynamic weights to obtain the comprehensive confidence score, and sorting and filtering out low-confidence documents based on the comprehensive confidence score.

[0014] This invention also provides a vector node optimization system to enhance the accuracy of RAG retrieval, for implementing the above method, the system comprising: The semantic understanding and reconstruction module is used to perform contextual understanding and reconstruction of the original query input by the user to generate the target query; The dynamic weight calculation module is used to calculate dynamic weights for vectorized document nodes in the knowledge base based on the target query, adapting to the specific scenario. The multi-path retrieval execution module is used to adaptively trigger and execute retrieval based on the results of contextual understanding, and obtain a primary retrieval result set based on dynamic weights; The integrated verification and ranking module is used to perform multi-dimensional verification and re-ranking of the primary search result set; The feedback learning module is used to optimize the semantic understanding and reconstruction module, the dynamic weight calculation module, or the multi-way retrieval execution module based on user interaction data.

[0015] Preferably, the dynamic weight calculation module forms a scene-adaptive dynamic weight by integrating semantic relevance weight based on vector similarity, timeliness weight based on update time, and authority weight based on source level.

[0016] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0017] The technical effects and advantages of this invention are as follows: 1. This invention introduces a scenario-based semantic understanding and reconstruction mechanism and generates multi-dimensional weights that dynamically adapt to the scenario. This fundamentally solves the problem of retrieval source deviation caused by ambiguous user queries, missing information, and ambiguous expressions in traditional RAG retrieval. It achieves a leap from shallow semantic matching to deep scenario-based accurate matching, and significantly improves the relevance and accuracy of retrieval results. 2. This invention uses an adaptive triggering multi-path retrieval strategy, combined with a multi-dimensional verification and feedback learning loop, to enable the system to intelligently handle a full spectrum of query scenarios, from simple to complex and from general to professional. While ensuring retrieval efficiency, it significantly enhances the system's adaptive capability, scenario generalization capability, and continuous evolution capability. 3. The pipeline design of scene-adaptive weight calculation, intelligent routing retrieval, and multi-dimensional refined sorting adopted in this invention ensures response speed by using dynamic weights and efficient retrieval algorithms in the coarse recall stage, and integrates deep semantic verification and scene consistency assessment in the fine sorting stage to ensure output accuracy. This achieves the optimal balance between retrieval efficiency and result reliability, and ensures that the final output is based on the latest and most authoritative knowledge sources. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the overall steps of the present invention.

[0019] Figure 2 This is a system module connection diagram of the present invention.

[0020] The attached diagram is labeled as follows: 1. Semantic understanding and reconstruction module; 2. Dynamic weight calculation module; 3. Multi-path retrieval execution module; 4. Fusion verification and ranking module; 5. Feedback learning module. Detailed Implementation

[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0022] Example 1

[0023] As attached Figure 1 As shown, this invention provides a vector node optimization method to enhance the accuracy of RAG retrieval. This method significantly improves retrieval quality through a closed-loop process of deep understanding, dynamic adaptation, intelligent retrieval, and accurate verification. The method includes the following steps: S1. Contextual Understanding and Reconstruction This step aims to address the ambiguity and information gaps in users' original queries. The system receives the user's original query (e.g., "What to do if the fan stops") and related conversation context. First, it uses a pre-trained language model to analyze the query text features and context, identifying its multi-dimensional scenario category, such as {Industry: Coal, Problem Type: Equipment Failure, User Role: Field Engineer}. Then, based on the identified scenario category, it calls the corresponding semantic completion rules and domain dictionary (e.g., equipment terminology library) to supplement information and eliminate ambiguity in the original query, generating a target query with a clear intent and complete information, such as "Emergency handling and reporting process for unplanned shutdown of the main ventilation fan in a coal mine". This step ensures the targeted accuracy of subsequent searches from the source. S2, Generate dynamic weights for scene adaptation Traditional retrieval relies solely on semantic similarity, while this invention calculates a dynamic, multi-dimensional fusion weight for each vectorized document node in the knowledge base. This weight consists of three core dimensions: Semantic relevance weight: Calculate the similarity (e.g., cosine similarity) between the target query vector and the document node vector. As a preferred implementation method, the semantic relevance calculation process includes: Based on the target query, extract 2-5 core keywords using a "rule + model" fusion approach. First, the model captures the semantic importance of the keywords in the context, and after comprehensive ranking, selects the Top 5 keywords. Then, the extracted results are filtered using a domain dictionary to remove generic words with no actual retrieval meaning. Finally, based on an industry knowledge graph, the extracted keywords are subjected to synonym replacement and hyponym expansion, and weights are assigned to each keyword to ensure that the keywords both cover the core user intent and conform to the retrieval specifications of the knowledge base. On this basis, the semantic relevance weight between the keyword weights and the target query vector representation is calculated. Timeliness weight: Based on the last update time of the document, it is dynamically calculated using a decay function (such as exponential decay), and the most recent documents are updated first; Authority weight: Assigned based on the predefined level of the document source (e.g., national standards > enterprise standards > personal notes); The key innovation lies in the fact that the fusion ratio (weight coefficient) of the above three dimensions is not fixed, but dynamically related to the scenario category identified in step S1. For example, in the "policy compliance consultation" scenario, the system will increase the proportion of "authoritative weight", while in the "technical fault troubleshooting" scenario, it may balance "semantic relevance" and "timeliness weight". Thus, a weight evaluation system that is highly adapted to the current query scenario is formed. S3, Adaptive triggering and execution of multi-way search This step intelligently selects the best search path based on the complexity and specialization of the query. The system has multiple preset search strategies, including: fast search based on vector similarity, hybrid search combined with keyword matching, and enhanced search using knowledge graphs for association expansion. The strategy routing module determines whether to use a single strategy or multiple strategies in parallel based on the scenario category (such as whether it is a highly specialized field) and query complexity in S1. For example, for simple queries, only fast retrieval is enabled to ensure efficiency, while for complex professional questions such as "pump vibration is large and there are abnormal noises", hybrid retrieval and enhanced retrieval are enabled in parallel to balance recall and precision. During the retrieval process, the dynamic weight generated in step S2 is used as the core ranking factor to directly optimize the ranking of the preliminary results. Finally, the system merges and deduplicates the retrieval results from each path and outputs the initial retrieval result set. S4, Multi-dimensional Validation and Reordering To further improve the accuracy of the results, this step performs in-depth processing on the initial result set, with the system conducting a refined evaluation of each document from at least two dimensions: Deep semantic fit: Calculates a deep semantic match score between a document and the target query using a more refined cross-encoder model; Scene fit: Evaluates the relevance between the document content and the scene categories identified by S1; Subsequently, the scores of these two dimensions are combined with the dynamic weights of the corresponding documents in S2 for a second weighted fusion to calculate the comprehensive confidence of each document. Finally, based on the comprehensive confidence, a strict sorting and threshold filtering are performed to output a high-quality, highly relevant high-order retrieval result set, which can be directly supplied to the large language model to generate the final answer. Preferably, the method of the present invention further includes feedback learning and optimization. To achieve continuous system evolution, this invention introduces a closed-loop feedback mechanism. The system collects actual user interaction data (such as clicks, acceptances, and dwell time) on higher-order search results. Using this feedback, the system iteratively optimizes the scene recognition model in S1, the dynamic weight fusion coefficient in S2, or the search routing logic in S3 through online learning technology, enabling the system to adapt to knowledge base updates and changes in user preferences.

[0024] Example 2

[0025] This invention also provides a vector node optimization system for enhancing the accuracy of RAG retrieval to implement the above method. This system adopts a modular pipeline design, with each module working collaboratively to complete the transformation from fuzzy query to accurate retrieval results. The system includes: Semantic understanding and reconstruction module 1, which serves as the intelligent entry point of the system, is responsible for receiving and deeply parsing the user's original query, and outputting structured scene information and refined target query; Dynamic weight calculation module 2, which acts as a scene adapter, receives target query and scene information, accesses the knowledge base, and calculates dynamic weights for all document nodes that integrate semantic, timeliness, and authority dimensions with adjustable proportions. Multi-path retrieval execution module 3, which serves as the intelligent scheduling and retrieval hub, adaptively schedules fast, hybrid, and enhanced retrieval strategies to work in parallel according to the scenario and complexity, and uses dynamic weights to optimize the initial sorting and output a preliminary result set; The fusion verification and ranking module 4 acts as a precision filter, performing deep semantic and scenario consistency verification on the primary results, combining dynamic weights to perform confidence fusion and re-ranking, and outputting the final high-order result set. Feedback learning module 5 serves as the system evolution engine, collecting user feedback and driving continuous optimization of semantic understanding and reconstruction module 1, dynamic weight calculation module 2, and multi-way retrieval execution module 3, forming a closed loop.

[0026] To facilitate understanding, the working process of this invention is briefly explained below through two typical scenarios: Scene 1 Corporate policy consultation (Employee asks: How is annual leave calculated?): The system identifies this as a human resources scenario, completes the query to include years of service and policy name, significantly increases the authority weight of the latest version and official policy documents when calculating weights, quickly locates the relevant chapter of "Employee Leave Management Regulations" through mixed search, and places it first after verification and sorting.

[0027] Scene 2 Industrial fault diagnosis (maintenance personnel ask: pump vibration is large and there is abnormal noise): The system identifies it as a professional equipment fault scenario. Combined with equipment model completion query, when calculating weight, it also pays attention to the timeliness of recent maintenance cases, and triggers hybrid search (find manual) and knowledge graph enhanced search (associate fault entities) in parallel. Finally, a recent case report recording successful maintenance of the same model is ranked first, providing direct reference for on-site maintenance.

[0028] By implementing the above-described solution, the present invention has achieved the following significant technological advancements: 1. Revolutionary improvement in search accuracy: Through scenario-based reconstruction and dynamic weight adaptation, a leap from semantic matching to scenario-based precise matching has been achieved, fundamentally solving the problem of search bias caused by ambiguity and missing information; 2. Enhanced system intelligence and adaptability: The adaptive multi-path retrieval mechanism and closed-loop feedback learning enable the system to intelligently handle a full spectrum of queries, from simple to complex and from general to professional, and have a strong ability to generalize to different scenarios. 3. Optimal balance between efficiency and accuracy: The pipeline design of "coarse screening (dynamic weight + multi-way retrieval) → refinement (multi-dimensional verification)" ensures speed in the recall stage by using efficient algorithms and ensures accuracy in the ranking stage by using complex models, thereby optimizing the overall performance. 4. Guaranteed Result Credibility: The timeliness and authority factors embedded in the dynamic weights ensure that the output results are not only relevant, but also based on the latest and most reliable knowledge sources, greatly enhancing the practical value and credibility of the final answer.

[0029] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A vector node optimization method to enhance the accuracy of RAG retrieval, characterized in that: Includes the following steps: The original query input by the user is understood and reconstructed in a contextualized manner to generate the target query; Based on the target query, dynamic weights are generated for vectorized document nodes in the knowledge base, which are adapted to the scenario. Based on the results of contextual understanding, multi-path retrieval is adaptively triggered and executed, and a primary retrieval result set is obtained based on dynamic weights; Perform multi-dimensional validation and reordering on the primary search result set to output higher-order search results.

2. The method according to claim 1, characterized in that: Contextual understanding and reconstruction specifically includes: identifying the context category of the original query based on its textual features and user session context, and supplementing and dissolving ambiguities in the original query according to the context category.

3. The method according to claim 1, characterized in that: The dynamic weight for scenario adaptation is a comprehensive weight that integrates semantic relevance, timeliness, and authority information. Semantic relevance is determined based on the vector similarity between the target query and the document node, timeliness is dynamically determined based on the document update time, and authority is determined based on the level of the document source.

4. The method according to claim 1, characterized in that: The adaptive triggering and execution of multi-path retrieval specifically includes: selecting at least one retrieval strategy from a preset strategy set based on whether the scenario category is a professional field and the query complexity. The preset strategy set includes fast retrieval based on vector similarity, hybrid retrieval combining keywords and vectors, and enhanced retrieval fused with knowledge graphs.

5. The method according to claim 4, characterized in that: When multiple retrieval strategies are selected, they are executed in parallel and the retrieval results are fused and deduplicated. The multi-path retrieval at least integrates text vector similarity retrieval and knowledge graph-based entity relationship retrieval.

6. The method according to claim 5, characterized in that: In text vector similarity retrieval, dynamic weights are used as the core ranking factor.

7. The method according to claim 1, characterized in that: Multi-dimensional verification and re-ranking specifically includes: calculating the scores of each document in the primary search result set on multiple verification dimensions, weighting and fusing the scores of each dimension with the corresponding dynamic weights to obtain the comprehensive confidence score, and sorting and filtering out low-confidence documents based on the comprehensive confidence score.

8. A vector node optimization system for enhancing the accuracy of RAG retrieval, characterized in that: The system for implementing the method of any one of claims 1-7 comprises: The semantic understanding and reconstruction module (1) is used to perform contextual understanding and reconstruction of the original query input by the user to generate the target query; The dynamic weight calculation module (2) is used to calculate the dynamic weights adapted to the scenario based on the target query for vectorized document nodes in the knowledge base; The multi-path retrieval execution module (3) is used to adaptively trigger and execute the retrieval based on the results of the scenario-based understanding, and obtain the primary retrieval result set based on dynamic weights; The integrated verification and ranking module (4) is used to perform multi-dimensional verification and re-ranking of the primary search result set; The feedback learning module (5) is used to optimize the semantic understanding and reconstruction module (1), the dynamic weight calculation module (2), or the multi-way retrieval execution module (3) based on user interaction data.

9. The system according to claim 8, characterized in that: The dynamic weight calculation module (2) forms a scene-adaptive dynamic weight by integrating semantic relevance weight based on vector similarity, timeliness weight based on update time, and authority weight based on source level.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it implements the method as described in any one of claims 1-7.