Question and answer pair retrieval enhancement generation method based on three-library separation architecture and cross vector conflict verification
By employing a three-dimensional decoupled storage architecture and a cross-vector conflict verification algorithm, the problems of answer leakage and insufficient logical discrimination in RAG technology are solved, achieving efficient retrieval enhancement generation, which is suitable for scenarios with high rigor requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING HUAGAN INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-01-15
- Publication Date
- 2026-05-05
AI Technical Summary
Existing retrieval augmentation generation (RAG) technology based on question-answer pairs suffers from answer leakage and lacks exclusionary logic discrimination, leading to retrieval pollution and insufficient negative logic processing.
A three-database separation architecture and cross-vector conflict verification method are adopted to decouple the question-answer pair data into three dimensions: indicative, exclusionary, and answer. A word vector model is used to construct a dual independent vector space for questions, and logical filtering is achieved through a cross-dimensional vector conflict algorithm.
It solves the problem of answer leakage, improves the logical discrimination of retrieval, and ensures the ability to handle negative logic, making it particularly suitable for scenarios with high requirements for rigor.
Smart Images

Figure SMS_35 
Figure SMS_48 
Figure QLYQS_1
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to an optimization technique for noise-resistant retrieval of a retrieval enhancement generation (RAG) system based on question-answer pairs (QA-Pairs), which utilizes a three-dimensional decoupled storage of indicative evidence sets, exclusionary evidence sets, and answers, as well as a cross-conflict filtering algorithm. Background Technology
[0002] RAG technology is widely used in intelligent question-answering systems. In enterprise-level knowledge bases, data usually exists in the form of standardized QA-Pair. However, existing RAG technology based on question-answer pairs has the following technical bottlenecks: (1) "Answer leakage" caused by index granularity confusion: Traditional technology usually concatenates the question and answer into a whole text block for embedding indexing. When the user enters a query, the search engine is likely to match the high-frequency common words in the answer (such as "restart" and "check power"), thereby recalling erroneous records that are not related to the question description and are only similar in wording to the solution, causing search pollution. (2) Lack of discriminative power of "exclusionary logic": Traditional QA-Pair retrieval is based on the semantic similarity of a single vector space and can only handle "what happened" (positive matching) and cannot handle "what did not happen / what was excluded" (negative logic). For example, when the user query clearly indicates "the power failure has been ruled out", the traditional system will still recall the answer "the power is damaged" because of the high relevance of the word "power". Summary of the Invention
[0003] To overcome the shortcomings of existing technologies, this invention proposes a question-answer pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification. The method implements a three-dimensional decoupled storage architecture for QA-Pair data, which includes "indicative-exclusionary-answer" features. It also utilizes a word vector model to construct a dual independent vector space for questions and achieves logical filtering through a cross-dimensional vector conflict algorithm.
[0004] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0005] A question-answering pair retrieval enhancement generation system based on a three-database separation architecture and cross-vector conflict verification does not involve parsing unstructured documents, but directly processes structured QA-Pair data.
[0006] 1. Database Construction (Three-Dimensional Decoupling): Each question-answer pair C stored in the system consists of the following three independent parts:
[0007] (I) Indicative evidence set The problem description confirms the existence of a set of features;
[0008] (II) Set of Exclusionary Evidence The set of features that are confirmed to be non-existent or excluded in the problem description;
[0009] (III) Answer (A_c): The corresponding question and answer text.
[0010] 2. Vector Database Architecture: Three independent databases are set up, linked by a unique question-and-answer identifier (Case_ID):
[0011] (I) Indicative Aggregated Vector Database: Stores aggregated vectors of indicative evidence sets (used for initial screening).
[0012] (II) Vector list database: stores indicative vector lists and exclusion vector lists.
[0013] (III) Answer Vector Database: It only stores the original question-and-answer pairs and does not participate in vector retrieval calculations to prevent semantic interference.
[0014] The indicative aggregate vector database and the exclusionary vector database are associated with a unique identifier Case_ID, and the answer vector database does not participate in vector calculation.
[0015] 3. User Query Data Structure: The user-input query Q is structured as follows:
[0016] (I) Inquiry into the indicative evidence set : A set of features that the user has confirmed already exists.
[0017] (II) Inquiry into the set of exclusionary evidence The set of features that the user has confirmed does not exist.
[0018] A question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification, comprising the following steps:
[0019] Step S1: Dual-granularity independent vectorization and database-specific storage: Using word vector models (such as Qwen3-Embedding), the indicative evidence set of QA-Pair data is generated. and exclusionary evidence set Perform vectorization processing and encoding storage.
[0020] 1. Handling of indicative evidence:
[0021] (a) Aggregation processing: combining indicative evidence sets The list of keywords in the middle is denoted as { }, concatenated into a coherent text sequence using semantic connectors. .
[0022] (b) Vectorization: Using word vector models to transform the set { The keywords in the list are vectorized one by one to generate an indicative vector list. A coherent text sequence of indicative evidence. Convert to word vectors to obtain indicative aggregation vectors .
[0023] 2. Handling of Exclusionary Evidence:
[0024] The exclusionary evidence set { Each keyword in the list is converted into a word vector, resulting in an exclusion vector list. ; The number of keywords in the indicative evidence set and the exclusionary evidence set, respectively.
[0025] 3. Storage:
[0026] The three independent databases are an indicative aggregation vector database, a vector list database, and an answer database. The indicative aggregation vector database stores indicative aggregation vectors for question-answer pairs, the vector list database stores indicative vector lists and exclusionary vector lists, and the answer database stores question-answer pair text. The three databases are linked by a unique identifier, Case_ID.
[0027] 4. Query vector generation:
[0028] Receive user queries, parse them into indicative and exclusionary evidence sets, and generate corresponding query indicative aggregation vectors. Query the list of indicative vectors Query exclusion vector list . ( (The number of keywords in the indicative evidence set and the exclusionary evidence set, respectively).
[0029] Step S2: Initial Recall Phase Based on Aggregate Vector: The system receives the user's query indicative aggregate vector. Perform coarse-grained screening.
[0030] 1. Search objective: Perform the search only within the indicative aggregate vector library.
[0031] 2. Calculation process: Calculate user query:
[0032]
[0033] Select those with similarity greater than the threshold The records are used to generate an initial candidate set containing an indicative vector list and an exclusion vector list, based on Case_ID. .
[0034] Step S3: Conflict filtering based on vector lists: Set the conflict threshold to... (For example 0.5 represents a high degree of semantic overlap.
[0035] Detection Logic I: Exclusion Collision Definition: Detect whether "features explicitly excluded by the user" appear in "indicative features of the initial candidate set".
[0036] Let the list of excluded atomic vectors queried by the user be... .set up The list of the p-th indicative atom vectors is as follows .
[0037] for The Middle The number of vectors in the indicative vector list of each record.
[0038] Calculate two lists of indicative vectors and pairwise similarity between vectors
[0039]
[0040] )
[0041] like If so, it is determined that there is a first type of logical conflict, that is, the user's exclusionary feature appears. No. From a certain indicative feature in each record, from the initial candidate set C init Remove the record from the list;
[0042] Detection Logic II: Indication Collision: This is defined as detecting whether a "feature confirmed by the user" appears in a "feature explicitly excluded by the candidate case".
[0043] Let the list of user query indicative vectors be... ;
[0044] set up The p-th exclusion vector list is , for The Middle The number of vectors in a list of record indicative vectors.
[0045] Calculate two lists of indicative vectors and pairwise similarity between vectors
[0046]
[0047] )
[0048] like If so, it is determined that there is a second type of logical conflict, that is, the user's indicative feature appears No. From a certain exclusionary feature in the record; from the initial candidate set C init Remove the record from the list.
[0049] Step S4: Output the result: After double filtering by detection logic I and detection logic II, output the answer corresponding to the final candidate set after filtering, and use it as the context input of the RAG large model.
[0050] Beneficial effects:
[0051] 1. Three-Dimensional Decoupling and Storage Architecture: This invention breaks with the traditional RAG convention of treating QA-Pairs as a single text block, pioneering a three-element decoupling architecture of "indicative-exclusionary-answer". This solves the "answer leakage" problem in traditional indexes (i.e., the search term matches the answer instead of the question), and isolates negative logic (exclusionary evidence) from the mixed semantics, giving it independent retrieval weight.
[0052] 2. "Aggregation + Atom" Dual-Granularity Hybrid Indexing Mechanism: Innovation: Simultaneously retains "aggregated vectors" (for efficient recall retrieval in stage S2) and "vector lists" (for precise logical verification in stage S3) at the storage layer. This solves the semantic dilution (data pollution) problem of long text vectors. No matter how long the evidence chain is, a single key conflicting feature (atomic vector) will not be submerged in the overall semantics, ensuring the sharpness of logical verification.
[0053] 3. Fine-grained conflict filtering algorithm based on full permutations: A conflict detection algorithm based on nested loops is proposed, which includes a dual mechanism of "exclusion item collision (Logic I)" and "occurrence item collision (Logic II)". It achieves a precise mathematical expression of "logical mutual exclusion". This elevates fuzzy semantic similarity retrieval to precise reasoning with logical judgment capabilities, making it particularly suitable for scenarios with extremely high rigor, such as medical and industrial troubleshooting. Detailed Implementation
[0054] The technical solution of the present invention will be described in detail below with reference to the embodiments.
[0055] Example 1:
[0056] In this embodiment, the application scenario is intelligent troubleshooting of server faults in enterprise-level data centers. System parameter settings: Word vector model: simplified to a 4-dimensional word vector model for easier display; Recall threshold = 0.50; Conflict determination threshold =0.80.
[0057] Step 1: Knowledge base data preparation: In this embodiment, the system pre-stores two typical fault cases.
[0058] (1) The system performs atomic decomposition, normalization and two-level vectorization storage on them.
[0059] (1-1). Case A: Poor memory contact (Case_ID: 101)
[0060] Indicative evidence set ( ):
[0061] Evidence Item 1: "Server boots up with a black screen" = [0.9, 0.1, 0.0, 0.0]
[0062] Evidence Item 2: "Power indicator light is always on" = [0.1, 0.9, 0.0, 0.0]
[0063] Aggregate vector ( ): [0.707, 0.707, 0.0, 0.0]
[0064] Exclusionary evidence set ):
[0065] Evidence Item 1: "An alarm sound was heard" = [0.0, 0.0, 0.0, 1.0]
[0066] Question and answer text:
[0067] Q: The server screen is black when I turn it on, the power indicator light is always on, and there is no alarm sound.
[0068] A: Reseat the memory modules.
[0069] (1-2). Case B: Power module failure (Case_ID: 102)
[0070] Indicative evidence set ( ):
[0071] Evidence Item 1: "Server boots up with a black screen" -> = [0.9, 0.1, 0.0, 0.0]
[0072] Evidence Item 2: "Power error light is on" -> = [0.0, 0.1, 0.9, 0.0]
[0073] Aggregate vector ( ): [0.699, 0.155, 0.699, 0.0]
[0074] Exclusionary evidence set ):
[0075] Evidence Item 1: "Power indicator light is always on" -> = [0.1, 0.9, 0.0, 0.0]
[0076] Question and answer text:
[0077] Q: The server is black when I turn it on, the power error light is on, but there is no power indicator light.
[0078] A: Check the power supply module.
[0079] (2) User query processing: The user inputs: "The server is black when it is turned on, but the power indicator light is on. I have checked and there is no power error light or any alarm sound."
[0080] (2-1) Inquiry into indicative evidence ( ):
[0081] Item 1: "Server boots up with a black screen" -> = [0.9, 0.1, 0.0, 0.0]
[0082] Item 2: "Power indicator light stays on" -> = [0.1, 0.9, 0.0, 0.0]
[0083] (2-2) Query aggregate vector ): [0.707, 0.707, 0.0, 0.0]
[0084] (2-3) Inquire about exclusionary evidence ( — Includes two indicators:
[0085] Exclusion Item 1: "Power error light on" -> = [0.0, 0.1, 0.9, 0.0]
[0086] Exclusion Item 2: "An alarm sound" -> = [0.0, 0.0, 0.0, 0.95];
[0087] Step 2: Preliminary Recall Phase Based on Aggregated Vectors. The system utilizes... Retrieve from the indicative vector database.
[0088] 1. Calculate the similarity Sim (short for Similarity, the same below) with Case A:
[0089]
[0090] Judgment: Sim > 0.50, recall Case A.
[0091] 2. Calculate the similarity with Case B:
[0092]
[0093] Judgment: Sim > 0.50, recall Case B.
[0094] Initial candidate set =
[0095] Step 3: Conflict Phase Based on Atom Vectors: System Extraction The vector list of cases is used for bidirectional logical conflict filtering with the user's two exclusion options.
[0096] 1. Perform conflict detection on Case B.
[0097] Detection Logic I: Exclusion Item Collision (User Exclusion vs. Case Indication)
[0098] Traversal 1: VS :
[0099]
[0100] Comparison :
[0101]
[0102] Conflict detected! No further testing required, Case B is removed.
[0103] 2. Perform conflict detection for Case A (memory failure).
[0104] Detection Logic I: Exclusion Item Collision (User Exclusion vs. Case Indication)
[0105] Traversal:
[0106] VS :
[0107]
[0108] VS :
[0109] [0.0,0.1,0.9,0.0]⋅ [0.1, 0.9, 0.0, 0.0]≈0.09<τ
[0110] VS :
[0111]
[0112] VS :
[0113]
[0114] Detection results: Neither of the two phenomena ruled out by the user appeared in the occurrence list of Case A. Detection logic I was passed.
[0115] Detection Logic II: Collision Occurrence (User Indication vs. Case Exclusion)
[0116] Traversal:
[0117] VS :
[0118]
[0119] VS :
[0120]
[0121] No conflict. Passed detection logic II.
[0122] Final result: Case A is retained.
[0123] Step 4: Output: Final candidate set: Contains only Case A. Output:
[0124] Q: The server screen is black when I turn it on, the power indicator light is always on, and there is no alarm sound.
[0125] A: Reseat the memory modules.
[0126] The system generated a response: "Based on the symptoms you provided (black screen, power light on) and the two features you explicitly ruled out (no power error light, no alarm sound), the system has matched you with a solution of 'poor memory contact.' We suggest you try reseating the memory modules."
Claims
1. A question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification, characterized in that, The steps are as follows: Step 1, Data Structuring: Parse the original question-answer pairs into a set of indicative evidence, a set of exclusionary evidence, and the answer text; Step 2, Vectorization Processing: Vectorize the two types of evidence sets to generate indicative vector lists and exclusionary vector lists respectively; aggregate the indicative vector lists to generate corresponding aggregated indicative vectors; the keyword list of the indicative evidence set is denoted as { }, concatenated into a coherent text sequence using semantic connectors. ; The keyword list for the exclusionary evidence set is denoted as { }; Step 3, Separate Storage: Establish three databases: an indicative aggregation vector database, a vector list database, and an answer database; the indicative aggregation vector database stores the indicative aggregation vectors of question-answer pairs, the vector list database stores the indicative vector lists and exclusionary vector lists, and the answer database stores the question-answer pair text; the three databases are linked by a unique identifier Case_ID; Step 4, Query Parsing: Receive user queries, parse them into indicative and exclusionary evidence sets, and generate corresponding indicative aggregate vectors, indicative vector lists, and exclusionary vector lists; Step 5, Initial Screening and Recall: Calculate the similarity between the indicative aggregate vector queried by the user and the vectors in the indicative aggregate vector library, filter out records that exceed the set threshold, and generate an initial candidate set containing an indicative vector list and an exclusion vector list by Case_ID; Step 6, Bidirectional Logical Conflict Filtering: Perform positive and negative conflict checks on the initial candidate set and eliminate conflicting records; Step 7, Output Results: The answers corresponding to the filtered candidate set Case_ID are output as the query results.
2. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 1, characterized in that, In step 1, the indicative evidence set is a list of keywords that correspond to a series of features confirmed to exist in the question description; the exclusionary evidence set is a list of keywords that correspond to a series of features confirmed not to exist in the question description; and the answer text is the corresponding question-answer pair text.
3. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 1, characterized in that, In step 2, the indicative evidence set { is generated using a word vector model. Each keyword in the list is converted into a word vector, resulting in a list of indicative vectors. ; A coherent textual sequence of indicative evidence. Convert to word vectors to obtain indicative aggregation vectors ; The exclusionary evidence set { Each keyword in the list is converted into a word vector, resulting in an exclusion vector list. ; These represent the number of keywords in the indicative evidence set and the exclusionary evidence set, respectively. All vectors mentioned above and below have been normalized.
4. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 1, characterized in that, In step 4, the user query is received, parsed into indicative and exclusionary evidence sets, and a corresponding query indicative aggregation vector is generated. Query the list of indicative vectors Query exclusion vector list ; The number of keywords in the indicative evidence set and the exclusionary evidence set, respectively.
5. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 1, characterized in that, In step 5, the similarity is the query indicative aggregation vector. Vectors in the indicative vector library Cosine similarity: ; Filter and query indicative aggregate vectors from the indicative aggregate vector library based on similarity greater than a threshold. The records are used to generate an initial candidate set containing an indicative vector list and an exclusion vector list, based on Case_ID. .
6. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 1, characterized in that, In step 6, the positive and negative conflict verification is as follows: Positive conflict verification: Calculate the pairwise similarity between the "indicative vector list" and the query "exclusionary vector list" of each record in the initial candidate set. If the maximum similarity exceeds the threshold, it is determined to be a conflict of evidence, and the record is removed from the initial candidate set. Negative conflict verification: Calculate the pairwise similarity between the "exclusionary vector list" and the query "indicative vector list" for each record in the initial candidate set. If the maximum similarity exceeds the threshold, it is determined to be a conflict of evidence, and the record is removed from the initial candidate set.
7. The question-answering pair retrieval enhancement generation method based on a three-database separation architecture and cross-vector conflict verification as described in claim 6, characterized in that, The positive and negative conflict verification process is as follows: For the initial candidate set Perform the following two conflict checks on the records to remove conflicting records: Detection Logic I: Exclusion Item Collision: Detect whether the "features explicitly excluded by the user" appear in the "indicative features corresponding to a certain record in the initial candidate set"; Suppose a list of exclusion vectors for user queries. ; set up The Middle List of record indicative vectors ; for The Middle The number of vectors in the indicative vector list of each record; Calculate two lists of indicative vectors and pairwise similarity between vectors ; ); Given threshold ,like If so, it is determined that there is a first type of logical conflict, that is, the user's exclusionary feature appears. No. From a certain indicative feature in a record, from C init Remove the record from the list; Detection Logic II: Indicator Collision: Detect whether the "feature confirmed by the user" appears in the "exclusionary feature corresponding to a record in the initial candidate set"; Let the list of user query indicative vectors be... ; set up The p-th exclusion vector list is , for The Middle The number of vectors in a list of record indicative vectors; Calculate two lists of indicative vectors and pairwise similarity between vectors ; ); like If so, it is determined that there is a second type of logical conflict, that is, the user's indicative feature appears No. Within a certain exclusionary feature of the record; From C init Remove the record from the list.