Domain-adaptive retrieval enhancement generation method and system

By building a data-centric large model iterative self-feedback link, the shortcomings of the existing search-enhanced question-and-answer system in terms of training cost, effect, iterative efficiency and field adaptation are solved, and automated model optimization and high-quality search results are achieved.

CN119669400APending Publication Date: 2025-03-21SI-TECH INFORMATION TECH CO LTD
View PDF 0 Cites 11 Cited by

Patent Information

Application Number
CN202411673125.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing search-enhanced question-and-answer system has defects in terms of high training cost, poor training effect, low iteration efficiency, difficult data structure and poor field adaptation, and cannot efficiently adapt to new field data and complex samples.

Method used

By building an iterative self-feedback link with a data-centered large model as the core, iterative optimization of the model is automatically carried out to realize field adaptive retrieval enhancement generation. Specific steps include document analysis, problem generation, search result evaluation, intelligent scoring and labeling, sample construction and supervised training.

Benefits of technology

Automatic model iterative optimization is realized, which reduces training costs and data construction difficulty, improves the model's domain adaptability and iterative efficiency, and ensures high-quality search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669400A_ABST
    Figure CN119669400A_ABST
Patent Text Reader

Abstract

The invention discloses a domain-adaptive retrieval enhancement generation method and system, and the method comprises the steps: carrying out the document analysis and semantic partitioning of a document through a semantic understanding model and a document rule, and storing document fragments; on the basis of the large language model and a preset question library, generating a question and disassembling the question; performing correlation evaluation and sorting on the initial retrieval results in combination with a retrieval technology; candidate content most matched with the cue words is screened out through a large language model, and question-retrieval fragments are scored and marked; performing fusion on the initial retrieval result and the scoring and labeling result to construct positive and negative samples, and constructing a supervised data set; and based on a preset loss function, utilizing the supervised data set to carry out supervised training on the knowledge semantic search model, replacing the RAG mixed search module, and carrying out continuous iteration. By means of the technical scheme, new domain knowledge and operation feedback data can be flexibly applied, and domain self-adaptive retrieval enhancement generation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of retrieval technology, and in particular to a domain-adaptive retrieval enhancement generation method and a domain-adaptive retrieval enhancement generation system. Background Art

[0002] The Retrieval-Augmented Generation (RAG) method is a natural language processing technology that combines retrieval and generation strategies to enhance the performance of language models. It generally uses an efficient BERT-based retrieval system to extract relevant information from a large document library, and uses the retrieval information through a large language model to generate fluent and content-rich answers.

[0003] The advantage of the RAG method is that it combines the capabilities of precise retrieval and flexible generation, which enables it to perform well in processing complex queries and generating detailed answers. Therefore, this technology has great practical value in question-answering systems, dialogue systems, and scenarios that require natural language understanding and generation.

[0004] The RAG method involves many technical points, such as document parsing, hybrid retrieval, large language model, etc.

[0005] The existing retrieval-enhanced question-answering system is a question-answering system built with a hybrid search model and a large language model as the core. The hybrid search part has the following shortcomings:

[0006] (1) High training cost: The mainstream method in the industry is to generate pseudo labels through the text2vec-chinese model and obtain data for comparative learning and training. It often takes 100 million pieces of data to achieve usable results, and the training cost is extremely high.

[0007] (2) Poor training effect: The model obtained by comparative learning of massive data has ordinary performance in the field and cannot efficiently adapt to new field data. It has poor effect on difficult and complex samples, resulting in low overall recall rate.

[0008] (3) Low iteration efficiency: The labeled data obtained from operational feedback belongs to a supervised data set and cannot be efficiently applied in the contrastive learning method, resulting in poor operational iteration training efficiency and high iteration cost.

[0009] (4) Data construction is difficult: Data construction costs are high. Labeling through pseudo-labeling has a high probability of sample conflict, making it difficult to construct a high-quality labeled data set. Manual labeling is inefficient and cannot meet the requirements of enterprise-level knowledge question-answering scenarios.

[0010] (5) Poor domain adaptability: When the number of documents / knowledge doubles, the knowledge recall effect will drop sharply and cannot adapt to situations with large changes. As a result, the RAG method cannot flexibly adapt to different fields and has high customization costs. Summary of the invention

[0011] In response to the above problems, the present invention provides a domain-adaptive retrieval enhancement generation method and system. By constructing an iterative self-feedback link with data as the center and big models as the core technology, it can flexibly apply new domain knowledge and operational feedback data, automatically perform model iterative optimization, and realize domain-adaptive retrieval enhancement generation.

[0012] To achieve the above object, the present invention provides a domain-adaptive retrieval enhancement generation method, comprising:

[0013] Through the semantic understanding model and document rules, the preset document is parsed and semantically segmented, and the segmented document fragments are stored in the vector database of the RAG hybrid retrieval module;

[0014] Generate and break down questions based on a large language model and a preset question library;

[0015] Combined with the preset search technology, the initial search results are evaluated and ranked for relevance;

[0016] Based on the preset prompt words, the large language model is used to sort the retrieval results by relevance to select the candidate content that best matches the prompt words, and the question-retrieval fragments are scored and annotated;

[0017] The initial search results and the scoring and labeling results are fused to construct positive and negative samples, and a supervised data set is constructed;

[0018] Based on a preset loss function, the supervised data set is used to perform supervised training on the knowledge semantic search model;

[0019] The trained semantic search model is used to replace the RAG hybrid search module and the iteration is continued.

[0020] In the above technical solution, preferably, the document is parsed and semantically segmented on the preset document through the semantic understanding model and document rules, and the segmented document fragments are stored in the vector database of the RAG hybrid retrieval module. The specific process includes:

[0021] According to the semantic understanding model and document rules, semantic understanding is performed on a preset document, and document parsing is performed on text, tables or pictures in the document;

[0022] The document segments are divided according to the semantic blocks of the document, and the document segments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module.

[0023] In the above technical solution, preferably, the process of generating and decomposing questions based on the large language model and the preset question library includes:

[0024] Use a large language model to break down sub-questions in the preset question library;

[0025] The document is searched through the RAG hybrid search module to perform question search on the document, so as to deeply explore the deep colloquial meaning in the document.

[0026] In the above technical solution, preferably, based on the preset prompt word, the retrieval results ranked by relevance are screened out through a large language model to obtain the candidate content that best matches the prompt word, and the question-retrieval fragment is scored and annotated. The specific process includes:

[0027] Based on the preset prompt words, the search results sorted by relevance are screened again through the large language model to obtain the candidate content that best matches the prompt words;

[0028] The large language model is used to intelligently score and annotate question-retrieval segments.

[0029] In the above technical solution, preferably, the supervised training of the knowledge semantic search model using the supervised data set based on the preset loss function specifically includes:

[0030] According to the similarity of the positive sample pairs and the similarity of the negative sample pairs in the supervised data set, combined with the following loss function, supervised training is performed on the knowledge semantic search model, so that the similarity of the positive sample pairs is greater than the similarity of the negative sample pairs, and the difference information between the positive sample pairs and the negative sample pairs is added to the loss function;

[0031]

[0032] The present invention also proposes a domain-adaptive retrieval enhancement generation system, which applies the domain-adaptive retrieval enhancement generation method disclosed in any one of the above technical solutions, including:

[0033] The document parsing module is used to parse and semantically segment the preset document through the semantic understanding model and document rules, and store the segmented document fragments into the vector database of the RAG hybrid retrieval module;

[0034] The question decomposition module is used to generate and decompose questions based on a large language model and a preset question library;

[0035] A hybrid search module is used to combine preset search techniques to evaluate and sort the relevance of initial search results;

[0036] The sorting and annotation module is used to sort the retrieval results by relevance based on the preset prompt words through the large language model to filter out the candidate content that best matches the prompt words, and to score and annotate the question-retrieval fragments;

[0037] A sample construction module is used to fuse the initial search results and the scoring and annotation results to construct positive and negative samples and a supervised data set;

[0038] A supervised training module, used for performing supervised training on the knowledge semantic search model using the supervised dataset based on a preset loss function;

[0039] The iterative training module is used to replace the RAG hybrid search module with the semantic search model obtained through training and continue iterating.

[0040] In the above technical solution, preferably, the document parsing module is specifically used for:

[0041] According to the semantic understanding model and document rules, semantic understanding is performed on a preset document, and document parsing is performed on text, tables or pictures in the document;

[0042] The document segments are divided according to the semantic blocks of the document, and the document segments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module.

[0043] In the above technical solution, preferably, the problem disassembly module is specifically used to:

[0044] Use a large language model to break down sub-questions in the preset question library;

[0045] The document is searched through the RAG hybrid search module to perform question search on the document, so as to deeply explore the deep colloquial meaning in the document.

[0046] In the above technical solution, preferably, the sorting and marking module is specifically used for:

[0047] Based on the preset prompt words, the search results sorted by relevance are screened again through the large language model to obtain the candidate content that best matches the prompt words;

[0048] The large language model is used to intelligently score and annotate question-retrieval segments.

[0049] In the above technical solution, preferably, the supervised training module is specifically used for:

[0050] According to the similarity of the positive sample pairs and the similarity of the negative sample pairs in the supervised data set, combined with the following loss function, supervised training is performed on the knowledge semantic search model, so that the similarity of the positive sample pairs is greater than the similarity of the negative sample pairs, and the difference information between the positive sample pairs and the negative sample pairs is added to the loss function;

[0051]

[0052] Compared with the existing technology, the beneficial effects of the present invention are: by constructing an iterative self-feedback link with data as the center and large models as the core technology, it makes up for the shortcomings and pain points of the existing RAG process, eliminates manual labeling, can flexibly apply new domain knowledge and operational feedback data, automatically realize model iterative optimization, and achieve domain adaptation, which is generally higher than mainstream solutions in terms of model training convergence speed and final effect.

[0053] (1) Intelligent labeling saves labeling costs: This method can automatically build high-quality data sets. Every time 100,000 data sets are built through intelligent labeling, 100 man-days of work can be saved, saving about 50,000 yuan in labeling costs. After manual review, the accuracy of intelligent labeling exceeds 95%, which is about 45% higher than the pseudo-labeling method.

[0054] (2) Lightweight training, saving training costs: Compared with contrastive learning and other training methods, which require more than 3 million data sets for training, the method proposed in this invention only requires 50,000 high-quality data sets for model training, and can achieve 88%+ context relevance, which is far superior to contrastive learning solutions in terms of effect and training cost. Each model iteration saves about 50,000 yuan in training costs.

[0055] (3) Domain adaptation and flexible scenario expansion: When RAG applications add a certain amount of new knowledge, change scenario applications, and iterate models, the traditional method requires manual data labeling, model training, feedback verification, etc., which results in slow product iteration and poor user experience. This solution can achieve domain adaptation for data of different scales and fields, reduce operating costs, improve production service user experience, and ensure the overall accuracy of RAG questions and answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A schematic diagram of a flow chart of a domain-adaptive retrieval enhancement generation method disclosed in an embodiment of the present invention;

[0057] Figure 2 A schematic diagram of modules of a domain-adaptive retrieval enhancement generation system disclosed in an embodiment of the present invention.

[0058] In the figure, the corresponding relationship between each component and the reference numeral is as follows:

[0059] 1. Document parsing module, 2. Question decomposition module, 3. Hybrid retrieval module, 4. Sorting and annotation module, 5. Sample construction module, 6. Supervised training module, 7. Iterative training module. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0062] like Figure 1 As shown, a domain-adaptive retrieval enhancement generation method provided by the present invention includes:

[0063] Through the semantic understanding model and document rules, the preset document is parsed and semantically segmented, and the segmented document fragments are stored in the vector database of the RAG hybrid retrieval module;

[0064] Generate and break down questions based on a large language model and a preset question library;

[0065] Combined with the preset search technology, the initial search results are evaluated and ranked for relevance;

[0066] Based on the preset prompt words, the large language model is used to sort the retrieval results by relevance to select the candidate content that best matches the prompt words, and the question-retrieval fragments are scored and annotated;

[0067] The initial retrieval results and the scoring and annotation results are fused to construct positive and negative samples and a supervised dataset.

[0068] Based on the preset loss function, supervised training of the knowledge semantic search model is performed using supervised datasets;

[0069] The trained semantic search model is used to replace the RAG hybrid search module and iterate continuously.

[0070] In this implementation, by constructing an iterative self-feedback link with data as the center and big models as the core technology, it is possible to flexibly apply new domain knowledge and operational feedback data, automatically perform iterative optimization of the model, and achieve domain-adaptive retrieval enhancement generation.

[0071] Specifically, through this method and system, an iterative self-feedback data pipeline is used to complete data self-construction, reduce training costs, improve training effects, and improve iteration efficiency, provide automated methods and tools for RAG retrieval model training and improvement, and realize a domain-adaptive retrieval enhancement generation system.

[0072] Among them, in order to address the difficulties such as poor generalization ability of user question understanding and lack of dialogue materials, the large language model technology is introduced. Through question generation, approximate question expansion, question decomposition and other technologies, high-quality complex, combined, approximate and other types of questions are constructed, and the deep meanings used in spoken expressions are deeply mined to solve the problem of quality deviation in complex question retrieval.

[0073] The introduction of a large language model, through the powerful semantic understanding and knowledge reasoning capabilities of the large language model, as a data annotator, replaces the traditional pseudo-label annotation method and quickly constructs high-quality positive and negative sample data. Combined with the CoSENT semantic search algorithm and optimizing its loss function, it can train the model with a small amount of high-quality positive and negative sample data. It is generally higher than mainstream solutions in terms of convergence speed and final effect, and can achieve domain adaptation at a very low training cost.

[0074] In the above implementation, preferably, the preset document is parsed and semantically segmented through the semantic understanding model and document rules, and the segmented document segments are stored in the vector database of the RAG hybrid retrieval module. The specific process includes:

[0075] According to the semantic understanding model and document rules, the preset document is semantically understood and the text, tables or pictures in the document are parsed;

[0076] The document segments are divided according to the semantic block of the document, and the document segments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module.

[0077] In the above implementation, preferably, based on the large language model and the preset question library, questions are generated and broken down, and the specific process includes:

[0078] Use a large language model to break down sub-questions in the preset question library;

[0079] The document is retrieved through the RAG hybrid retrieval module to conduct question retrieval to deeply explore the colloquial deep meaning in the document.

[0080] In the above implementation, preferably, based on the preset prompt word, the search results ranked by relevance are screened out through a large language model to obtain the candidate content that best matches the prompt word, and the question-search fragment is scored and annotated. The specific process includes:

[0081] Based on the preset prompt words, the search results after relevance sorting are screened again through the large language model to obtain the candidate content that best matches the prompt words;

[0082] Through a large language model, question-retrieval fragments are intelligently scored and labeled.

[0083] In the above implementation, preferably, based on a preset loss function, supervised training is performed on the knowledge semantic search model using a supervised data set, and the specific process includes:

[0084] According to the similarity of positive sample pairs and negative sample pairs in the supervised data set, the knowledge semantic search model is supervised and trained in combination with the following loss function, so that the similarity of positive sample pairs is greater than that of negative sample pairs, and the difference information between positive sample pairs and negative sample pairs is added to the loss function;

[0085]

[0086] According to the domain-adaptive search enhancement generation method disclosed in the above embodiment, during the implementation process, the specific implementation steps include:

[0087] (1) Document parsing: Through the semantic understanding model and document rules, the text, tables, and images in the document are intelligently parsed, and divided into appropriate segments through semantic segmentation, and the segments are transferred to the vector database of the RAG hybrid retrieval module.

[0088] (2) Question generation and decomposition module: Generate and decompose complex questions through a large language model, retrieve related sub-questions through the RAG hybrid retrieval module, deeply explore the deep meaning of spoken expressions, and use the higher retrieval effect of sub-questions to solve the problem of quality deviation in complex question retrieval.

[0089] (3) RAG hybrid search module: It combines multiple technologies such as keyword search, semantic search, metadata (entity) search and search re-ranking to conduct a more in-depth relevance evaluation and sorting of the initial search results, ensuring that the results finally displayed to the user are more in line with their query intent and improving search performance.

[0090] (4) Large model intelligent annotation module: Based on the prompt word design, the large language model is used to introspect the retrieved content from the perspectives of relevance and availability, and conduct secondary screening to select the candidate content that best matches the prompt and has the highest quality, and to implement intelligent scoring and annotation of the question-retrieval fragment.

[0091] (5) Automatic dataset construction module: Integrate the results of the RAG hybrid retrieval module and the large model intelligent annotation module to conduct a comprehensive evaluation, automatically construct positive and negative samples, and build a high-quality supervised sentence pair similarity dataset.

[0092] (6) Supervised training module for semantic search model: Based on automatically constructed data sets and some general data sets, domain knowledge semantic search models are trained. The algorithm optimization is to combine the similarity of positive sample pairs and negative sample pairs in the training set in the loss function. Through model training, the similarity of positive sample pairs is made greater than the similarity of negative sample pairs. The difference information between positive sample pairs and negative sample pairs is added to the loss function. The loss function is as follows:

[0093]

[0094] (7) Continuous iterative training: Replace the semantic search model newly trained in (6) into the RAG hybrid search component, and continue to iterate the process from (1) to (6). The model can continuously improve its search and understanding process, search for more accurate and relevant fragments, and thus improve the overall accuracy of RAG. In this process, domain adaptation can be achieved without manual labeling, which helps to quickly expand the application of auxiliary scenarios.

[0095] like Figure 2 As shown, the present invention also proposes a domain-adaptive retrieval enhancement generation system, which applies the domain-adaptive retrieval enhancement generation method disclosed in any one of the above embodiments, including:

[0096] The document parsing module 1 is used to parse and semantically segment the preset document through the semantic understanding model and document rules, and store the segmented document fragments into the vector database of the RAG hybrid retrieval module;

[0097] Question decomposition module 2, used to generate and decompose questions based on a large language model and a preset question library;

[0098] A hybrid search module 3 is used to evaluate and sort the relevance of the initial search results by combining a preset search technology;

[0099] The sorting and annotation module 4 is used to filter out the candidate content that best matches the prompt word based on the preset prompt word through the large language model from the retrieval results sorted by relevance, and to score and annotate the question-retrieval fragment;

[0100] Sample construction module 5 is used to fuse the initial retrieval results and the scoring and annotation results to construct positive and negative samples and a supervised data set;

[0101] A supervised training module 6 is used to perform supervised training on the knowledge semantic search model using a supervised data set based on a preset loss function;

[0102] The iterative training module 7 is used to replace the RAG hybrid search module with the semantic search model obtained through training and continue to iterate.

[0103] In the above implementation, preferably, the document parsing module 1 is specifically used for:

[0104] According to the semantic understanding model and document rules, the preset document is semantically understood and the text, tables or pictures in the document are parsed;

[0105] The document segments are divided into document fragments according to the semantic blocks of the document, and the document fragments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module 3.

[0106] In the above implementation, preferably, the problem disassembly module 2 is specifically used for:

[0107] Use a large language model to break down sub-questions in the preset question library;

[0108] The document is searched through the RAG hybrid retrieval module 3 to conduct question retrieval to deeply explore the colloquial deep meaning in the document.

[0109] In the above implementation, preferably, the sorting and marking module 4 is specifically used for:

[0110] Based on the preset prompt words, the search results after relevance sorting are screened again through the large language model to obtain the candidate content that best matches the prompt words;

[0111] Through a large language model, question-retrieval fragments are intelligently scored and labeled.

[0112] In the above implementation, preferably, the supervised training module 6 is specifically used for:

[0113] According to the similarity of positive sample pairs and negative sample pairs in the supervised data set, the knowledge semantic search model is supervised and trained in combination with the following loss function, so that the similarity of positive sample pairs is greater than that of negative sample pairs, and the difference information between positive sample pairs and negative sample pairs is added to the loss function;

[0114]

[0115] According to the domain adaptive retrieval enhancement generation system disclosed in the above-mentioned implementation mode, the functions to be implemented by each module thereof correspond to the respective steps of the domain adaptive retrieval enhancement generation method disclosed in the above-mentioned implementation mode. During the implementation process, the operations are performed with reference to the above-mentioned implementation mode, which will not be repeated here.

[0116] According to the domain-adaptive retrieval enhancement generation method and system disclosed in the above-mentioned implementation mode, a comparative test is conducted, taking 1,000 telecommunications customer service knowledge documents and knowledge questions and answers as an example, to compare the effects of three mainstream open source semantic search models in the industry and the model of the present invention in the retrieval part of the RAG question and answer system, and the advantages of the present invention are revealed through comparative analysis.

[0117] Table 1 Training data and computing resources description

[0118]

[0119] After experimental analysis, it was found that mainstream solutions all require training of data sets in the billions, and at least 8 A100s are needed to ensure model effects, which results in extremely high data processing and training costs. However, the method of the present invention requires data in the 100,000s, and only 1 A40 is needed to complete the training, which has a higher cost advantage.

[0120] Table 2 Comparison of test effect evaluation

[0121]

[0122] After the test evaluation, the test effect evaluation comparison table in Table 2 was obtained, and the analysis showed that:

[0123] (1) Solutions such as jina-embedding and Sentence-BERT use massive text data sets to construct pseudo-labels for comparative learning. The resulting models perform well in small-scale domain knowledge searches, with TOP@5 indicators generally higher than 81%. When the amount of knowledge increases, the indicator effect decreases significantly, and the spearman correlation coefficient indicators are all low, making it impossible to handle complex problems.

[0124] (2) The CoSENT algorithm that does not adopt the domain adaptation method is trained with high-quality general data sets, but the effect is worse than the results of training with massive data such as jina-embedding. This is mainly due to the lack of data sets with knowledge in this field and insufficient understanding of complex problems in this field, resulting in poor generalization ability.

[0125] (3) The CoSENT algorithm, which uses a domain-adaptive method, obtains data sets through automatic annotation, and significantly improves the TOP@5 index and the spearman correlation coefficient index. The TOP@5 index increases by 26%, the spearman correlation coefficient increases by 120%, and the RAG system accuracy increases from 56% to 86%. Moreover, after the domain knowledge scale is expanded by 10 times, it still maintains a good generalization ability.

[0126] During the implementation process, the platform tools are used to upload domain knowledge, and the background automatically conducts domain adaptive iterative training. After the training is completed, it is pushed to the inference container for inference. After intelligent evaluation without abnormality, it is automatically released online. The inference container provides the underlying model service, and the retrieval enhanced question and answer system is used to conduct interactive questions and answers to realize the online application.

[0127] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A domain-adaptive retrieval enhancement generation method, characterized in that: include: Through the semantic understanding model and document rules, the preset document is parsed and semantically segmented, and the segmented document fragments are stored in the vector database of the RAG hybrid retrieval module; Generate and break down questions based on a large language model and a preset question library; Combined with the preset search technology, the initial search results are evaluated and ranked for relevance; Based on the preset prompt words, the large language model is used to sort the retrieval results by relevance to select the candidate content that best matches the prompt words, and the question-retrieval fragment is scored and annotated; The initial search results and the scoring and labeling results are fused to construct positive and negative samples, and a supervised data set is constructed; Based on a preset loss function, the supervised data set is used to perform supervised training on the knowledge semantic search model; The trained semantic search model is used to replace the RAG hybrid search module and the iteration is continued.

2. The domain-adaptive retrieval enhancement generation method according to claim 1, characterized in that: The document is parsed and semantically segmented for a preset document through a semantic understanding model and document rules, and the segmented document segments are stored in a vector database of a RAG hybrid retrieval module. The specific process includes: According to the semantic understanding model and document rules, semantic understanding is performed on a preset document, and document parsing is performed on text, tables or pictures in the document; The document segments are divided according to the semantic blocks of the document, and the document segments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module.

3. The domain-adaptive retrieval enhancement generation method according to claim 1, characterized in that: The process of generating and breaking down questions based on the large language model and the preset question library includes: Use a large language model to break down sub-questions in the preset question library; The document is searched through the RAG hybrid search module to perform question search on the document, so as to deeply explore the deep colloquial meaning in the document.

4. The domain-adaptive retrieval enhancement generation method according to claim 1, characterized in that: Based on the preset prompt word, the retrieval results ranked by relevance are screened out through a large language model to select the candidate content that best matches the prompt word, and the question-retrieval fragment is scored and annotated. The specific process includes: Based on the preset prompt words, the search results sorted by relevance are screened again through the large language model to obtain the candidate content that best matches the prompt words; The large language model is used to intelligently score and annotate question-retrieval segments.

5. The domain-adaptive retrieval enhancement generation method according to claim 1, characterized in that: The supervised training of the knowledge semantic search model based on the preset loss function using the supervised data set specifically includes: According to the similarity of the positive sample pairs and the similarity of the negative sample pairs in the supervised data set, combined with the following loss function, supervised training is performed on the knowledge semantic search model, so that the similarity of the positive sample pairs is greater than the similarity of the negative sample pairs, and the difference information between the positive sample pairs and the negative sample pairs is added to the loss function; 6. A domain-adaptive retrieval enhancement generation system, characterized in that: The method for domain-adaptive retrieval enhancement generation according to any one of claims 1 to 5 is applied, comprising: The document parsing module is used to parse and semantically segment the preset document through the semantic understanding model and document rules, and store the segmented document fragments into the vector database of the RAG hybrid retrieval module; The question decomposition module is used to generate and decompose questions based on a large language model and a preset question library; A hybrid search module is used to combine preset search techniques to evaluate and sort the relevance of initial search results; The sorting and annotation module is used to sort the retrieval results by relevance based on the preset prompt words through the large language model to filter out the candidate content that best matches the prompt words, and to score and annotate the question-retrieval fragments; A sample construction module is used to fuse the initial search results and the scoring and annotation results to construct positive and negative samples and a supervised data set; A supervised training module, used for performing supervised training on the knowledge semantic search model using the supervised dataset based on a preset loss function; The iterative training module is used to replace the RAG hybrid search module with the semantic search model obtained through training and continue iterating.

7. The domain-adaptive search enhancement generation system according to claim 6, characterized in that: The document parsing module is specifically used for: According to the semantic understanding model and document rules, semantic understanding is performed on a preset document, and document parsing is performed on text, tables or pictures in the document; The document segments are divided according to the semantic blocks of the document, and the document segments are stored in the vector database obtained by the initial retrieval of the RAG hybrid retrieval module.

8. The domain-adaptive search enhancement generation system according to claim 6, characterized in that: The problem disassembly module is specifically used for: Use a large language model to break down sub-questions in the preset question library; The document is searched through the RAG hybrid search module to perform question search on the document, so as to deeply explore the deep colloquial meaning in the document.

9. The domain-adaptive search enhancement generation system according to claim 6, characterized in that: The sorting and marking module is specifically used for: Based on the preset prompt words, the search results sorted by relevance are screened again through the large language model to obtain the candidate content that best matches the prompt words; The large language model is used to intelligently score and annotate question-retrieval segments.

10. The domain-adaptive search enhancement generation system according to claim 6, characterized in that: The supervised training module is specifically used for: According to the similarity of the positive sample pairs and the similarity of the negative sample pairs in the supervised data set, combined with the following loss function, supervised training is performed on the knowledge semantic search model, so that the similarity of the positive sample pairs is greater than the similarity of the negative sample pairs, and the difference information between the positive sample pairs and the negative sample pairs is added to the loss function;

Citation Information

Cited By

  • Knowledge-adaptive code retrieval model, method and system

    CN120470108A

  • Enhanced retrieval generation method based on potential fusion LoRA

    CN120596624A

  • Enhanced retrieval generation method based on latent fusion LoRA

    CN120596624B

  • Method for constructing retrieval data set based on video source data set and electronic equipment

    CN120726422A

  • Document question and answer method and device, electronic equipment and computer storage medium

    CN120821819A