A long document question and answer data generation method based on double-layer anchor point constraint
By employing a question-and-answer data generation method based on dual-layer anchor point constraints and multi-perspective generation, the problems of topic drift and insufficient automated quality control in long document scenarios are solved. This method generates high-quality, traceable question-and-answer data, which is applicable to various long document scenarios such as news, technical documents, reports, official documents, legal texts, and medical texts.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV OF SCI & TECH
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to maintain global thematic consistency, local evidence traceability, and high-quality question-and-answer results simultaneously in long document scenarios. In particular, they are prone to deviating from the document's main theme during the generation process, and their automated quality control capabilities are insufficient.
A method based on two-layer anchor constraints is adopted, which combines anchor constraints at the document layer and text block layer with candidate answer-driven multi-perspective generation and dual-gated screening to generate high-quality question-answering data. This includes cleaning, segmentation, sentence segmentation, length control, document summarization and keyword extraction, candidate answer extraction, multi-perspective question generation, semantic consistency screening, and failure memory iterative optimization.
It achieves global topic consistency and local evidence traceability for long document question-and-answer data. The generated question-and-answer pairs have a strong correspondence with the original evidence blocks, avoiding deviation of the generated results from the main theme and improving the reliability of question-and-answer data and the ability of automated quality control.
Smart Images

Figure CN122432289A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing technology, specifically to a method for generating long document question-and-answer data based on two-layer anchor constraints. Background Technology
[0002] In recent years, large language models have made significant progress in tasks such as question answering, summarizing, translation, and knowledge augmentation. However, in vertical fields such as law, healthcare, and engineering, model performance still heavily relies on high-quality, traceable training data. Especially in long document scenarios, question answering data not only needs to maintain topic consistency but also needs to possess clear evidence correspondences to support subsequent model fine-tuning and downstream task deployment. Compared to manual annotation, automated construction of long document question answering data offers advantages such as low cost, high efficiency, and strong scalability, thus becoming an important direction for constructing large-scale model data in these domains.
[0003] Existing methods for generating automated question-answering data typically include methods that first generate questions and then complete the answers, methods that generate questions based on candidate answers or knowledge points, and methods that emphasize content support or diversity. These methods can achieve certain results with short or medium-length texts, but they still face significant difficulties in long document scenarios. For example, the generated results are prone to deviating from the document's main theme, questions and answers are difficult to consistently correspond to specific evidence blocks, automated quality control capabilities are insufficient, and while increasing diversity, they can easily introduce off-topic or illusionary questions, thus affecting the usability and reliability of the final data.
[0004] Especially in long documents and cross-text block semantic scenarios, how to simultaneously maintain global topic consistency, local evidence traceability, high-quality generated results, and appropriate diversity of question-and-answer formats has become a key issue that existing technologies struggle to address. Summary of the Invention
[0005] This invention provides a method for generating long document question-and-answer data based on dual-layer anchor point constraints. It can jointly constrain the global topic and local evidence of the document, and realize automated quality screening and error avoidance, thereby generating more accurate, traceable and scalable question-and-answer data.
[0006] The technical solution of this invention is as follows: This invention discloses a method for generating long document question-and-answer data based on two-layer anchor point constraints, comprising the following steps: S1. Clean, segment, sentence, and length control the input long document; S2. Extract document summary and document keyword set from the entire long document to construct document-level anchor points; extract block summary and block keyword set from each text block to construct text block-level anchor points; S3. Extract information units with question-and-answer value from each text block as candidate answers; S4. Based on the same candidate answer, generate multiple candidate questions from multiple perspectives by combining document-level anchors, text block-level anchors, and keywords related to the candidate answer. S5. For each candidate question, generate one or more answers within the evidence range of the corresponding text block and construct candidate question-answer pairs; S6. First, screen the consistency between candidate answers and generated answers, and then conduct further quality assessment on the candidate question-answer pairs that pass the semantic consistency screening. S7. Summarize all question-answer pairs that have passed the dual-gated screening to form a high-quality question-answer dataset.
[0007] As a further improvement of the present invention, it also includes a failure memory and iterative optimization step: storing the questions or question-answer samples that fail the screening into the failure memory bank, calculating the maximum similarity between the newly generated question and the historical failed questions in the failure memory bank, and when the similarity exceeds a preset threshold, performing a question perspective switch or terminating the current round, and performing an early stop judgment based on the number of target samples and the continuous failure situation.
[0008] As a further improvement of the present invention, in S2, document-level anchors are used to represent the core thematic semantics of the entire long document, and the construction of document-level anchors includes: For documents Extract its document summary Document keyword set Construct document-level anchors: .
[0009] As a further improvement of the present invention, in S2, the text block layer anchor point is used to represent the local semantic content of the current text block, and the construction of the text block layer anchor point includes: for text blocks Extract block summary and block keyword set Construct text block layer anchor points: .
[0010] As a further improvement of the present invention, in S6, the consistency between the candidate answer and the generated answer is screened, including: For candidate answers With generating answers Semantic consistency can be defined as: ; in, Indicates similarity at the keyword level. Indicates semantic similarity between sentences. These are the weight parameters.
[0011] As a further improvement of the present invention, in S6, the candidate question-answer pairs that have passed the semantic consistency screening are further evaluated for quality, and their comprehensive score is expressed as follows: ; in, , , , These represent the accuracy score, completeness score, question-answer matching score, and topic relevance score, respectively. , , , These are the corresponding weight parameters.
[0012] As a further improvement to the present invention, for newly generated problems The formula for calculating the maximum similarity between a newly generated problem and historical failed problems in the failure memory is: ; in, Represents a set of failed memories. This represents a text encoding function. This represents the cosine similarity.
[0013] As a further improvement of the present invention, S1 includes: receiving the original long document, first performing initial segmentation according to paragraph boundaries and sentence boundaries, then recursively splitting the excessively long text segments, and sequentially merging the excessively short segments, thereby obtaining a text block sequence suitable for question-and-answer generation.
[0014] This invention also discloses a long document question-answering data generation system based on two-layer anchor point constraints. This system is applicable to the above-mentioned method and includes: The long document preprocessing and two-layer anchor construction module is used to clean, segment, sentence and length control the input long document to obtain a text block sequence that retains the original document's sequential structure information, and to construct the document layer anchor point corresponding to the whole document and the text block layer anchor point corresponding to each text block respectively. The candidate answer-driven multi-perspective question-answer generation module is used to extract candidate answers from each text block, generate multi-perspective candidate questions around the same candidate answer by combining document-level anchors, text block-level anchors and candidate answer-related keywords, and generate answers for each candidate question within the evidence range of the corresponding text block, forming a set of candidate question-answer pairs; The dual-gated screening module is used to calculate the semantic consistency between candidate answers and generated answers to filter out low consistency samples, and to perform multi-dimensional quality scoring on samples that pass the consistency screening to filter out low-scoring samples. The results output module is used to summarize all question-answer pairs that have passed the dual-gated screening and generate a high-quality question-answer dataset containing question text, answer text, text block number, anchor information, and quality score information.
[0015] As a further improvement of the present invention, it also includes an iterative self-improvement module, which is used to store the questions or question-answer samples that fail the screening into a failure memory bank, and to perform perspective switching or iteration termination based on the similarity between the newly generated questions and the failure samples.
[0016] The present invention has the following beneficial effects: 1. In this invention, global topic consistency constraints are achieved through document layer anchors, and local evidence constraints are achieved through text block layer anchors. This effectively reduces the risk of topic drift in long document scenarios, and the generated question-answer pairs have a stronger correspondence with the original evidence blocks, significantly improving traceability.
[0017] 2. In this invention, a multi-perspective question generation mechanism driven by candidate answers is used to enrich the form of question expression while ensuring the association between questions and answers and evidence blocks. This avoids the illusion and off-topic problems caused by unconstrained generation and balances the diversity of questions and answers with semantic accuracy.
[0018] 3. In this invention, a hierarchical filtering mechanism of semantic consistency screening and discriminative scoring screening is used to automatically remove low-quality samples that are irrelevant, lack correctness, lack completeness, or have weak topic relevance, thus ensuring the overall quality of the output dataset without the need for large-scale manual annotation.
[0019] 4. In this invention, by recording historical failure patterns and avoiding the repeated generation of invalid samples, the computational power consumption is reduced. Combined with an early stopping strategy, the system stability and generation efficiency are further improved. It can be applied on a large scale to the construction of question-and-answer data for massive long documents. Attached Figure Description
[0020] Figure 1 This is a system architecture diagram for generating long document question-and-answer data based on dual-layer anchor point constraints according to the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of this specification will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of this specification and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of this specification.
[0022] To facilitate understanding of this invention, the background of its development will now be further explained: While existing methods for generating long document question-and-answer data have made some progress in automated construction, they still struggle to simultaneously ensure topic stability and question-and-answer format diversity under long contexts, thus failing to meet the practical application needs of vertical domains for high-quality question-and-answer data construction. To address these technical issues, this invention proposes a long document question-and-answer data generation method based on dual-layer anchor constraints. By simultaneously introducing document-level semantic constraints and text block-level semantic constraints during the generation process, and combining candidate-answer-driven multi-perspective generation, dual-gated screening, and a failure memory iteration mechanism, high-quality long document question-and-answer data can be automatically constructed. Example 1
[0023] Please see Figure 1 As shown, a method for generating long document question-and-answer data based on two-layer anchor point constraints includes the following steps: S1. Clean, segment, sentence, and length control the input long document.
[0024] After receiving the original long document, the system cleans, segments, divides into sentences, and controls its length. Specifically, it first performs initial segmentation based on paragraph and sentence boundaries, then recursively splits excessively long text fragments and sequentially merges excessively short fragments to obtain a text block sequence suitable for question-and-answer generation. This processing method preserves the sequential structure information of the original document while improving the integrity of local semantic units, providing a foundation for subsequent evidence tracking and question-and-answer generation.
[0025] For example, the system cleans the input "Software Development Contract," removing headers, footers, page numbers, and special format characters, and uniformly encodes it into UTF-8 format; it performs initial segmentation based on paragraph boundaries, resulting in 32 initial paragraphs; it performs length detection on each paragraph, recursively splitting paragraphs exceeding 1500 words according to sentence boundaries, and sequentially merging adjacent paragraphs with less than 200 words, ultimately obtaining 18 semantically complete text blocks with lengths between 200 and 1500 words. At the same time, it records the start and end position indices of each text block in the original document for subsequent evidence location.
[0026] S2. Extract the document summary and document keyword set from the entire long document to construct document-level anchor points; extract the block summary and block keyword set from each text block to construct text block-level anchor points.
[0027] After the system extracts global topic semantic information from the entire document, it then... Extract its document summary Document keyword set And construct document layer anchors: ; Among them, document layer anchors are used to represent the core topic semantics of the entire long document and provide global consistency constraints in the subsequent question generation and answer generation process to reduce the risk of topic drift in long document scenarios.
[0028] After the system extracts local evidence semantic information from each text block, for each text block... Extract block summary and block keyword set And construct text block layer anchor points: ; In this invention, text block-level anchors are used to represent the local semantic content of the current text block, imposing fine-grained evidentiary constraints on subsequently generated questions and answers. Through the joint construction of document-level anchors and text block-level anchors, this invention forms a two-layer anchor constraint system, thereby simultaneously achieving coordinated control over both global themes and local evidence.
[0029] For example, the system calls the large language model to generate a document summary of about 200 words for the entire contract, extracts 22 document keywords such as "software development, contract term, payment method, liability for breach of contract, and intellectual property", and constructs document layer anchor point G(d); for each text block, it generates a block summary of about 50 words, extracts 3-5 block keywords, and constructs text block layer anchor point L(c). All anchor point information is stored in structured JSON format for subsequent generation steps.
[0030] S3. Extract information units with question-and-answer value from each text block as candidate answers.
[0031] Specifically, for text blocks Its candidate answer set can be represented as: ; in, This indicates the number of candidate answers in the text block. The candidate answers can be entities, terms, key factual phrases, time and location information, conclusive descriptions, or other information suitable as a question-and-answer center. By first determining the candidate answers and then generating questions around them, this invention can narrow the question generation search space and reduce unconstrained divergence.
[0032] For example, a named entity recognition model combined with rule extraction is used to extract candidate answers from each text block, including entities (such as the name of Party A, the name of Party B, the contract amount, and the delivery date), terms (such as "agile development" and "acceptance criteria"), and key fact phrases (such as "overdue payment penalty of 0.05% per day"), resulting in a total of 96 candidate answers. Each candidate answer is labeled with the text block number to which it belongs.
[0033] S4. Based on the same candidate answer, generate multiple candidate questions from multiple perspectives by combining document-level anchors, text block-level anchors, and keywords related to the candidate answer.
[0034] Specifically, during the question generation process, document-level anchors, text block-level anchors, and candidate answer-related keywords are simultaneously introduced to ensure that the generated questions neither deviate from the main theme of the entire document nor deviate from the semantics of the current evidence block. The multiple perspectives include definitional, mechanistic, application-based, and comparative approaches. Through this multi-perspective question generation mechanism, this invention enhances the richness of question expression while maintaining the stability of the question-and-answer evidence support relationship.
[0035] For example, around each candidate answer, combining document-level anchors, text block-level anchors, and relevant keywords of the candidate answer, questions are generated from three perspectives: definitional, mechanistic, and application-based. Definitional questions include "What is the definition of Agile development in this contract?", mechanistic questions include "What are the rules for calculating late payment penalties stipulated in the contract?", and application-based questions include "If Party B delivers the software late, what rights can Party A claim under the contract?". Each candidate answer generates 3 questions, resulting in a total of 288 candidate questions.
[0036] S5. For each candidate question, generate one or more answers within the evidence range of the corresponding text block and construct candidate question-answer pairs.
[0037] Specifically, for each generated question, one or more answers are generated within the corresponding text block evidence range, forming candidate question-answer pairs together with the question. Since both the question and the answer revolve around fixed candidate answers and specific text blocks, the candidate question-answer pairs generated by this invention have strong evidence traceability and semantic consistency, providing a high-quality candidate foundation for subsequent automatic screening.
[0038] For example, for each candidate question, the content of the corresponding text block is used as the context input to the large language model to generate two answers, forming 576 candidate question-answer pairs. Each question-answer pair is labeled with the corresponding text block number and candidate answer identifier.
[0039] S6. First, screen the consistency between candidate answers and generated answers, and then conduct further quality assessment on the candidate question-answer pairs that pass the semantic consistency screening.
[0040] Specifically, the consistency between candidate answers and generated answers is screened, including: for candidate answers With generating answers Its semantic consistency can be defined as: ; in, Indicates similarity at the keyword level. Indicates semantic similarity between sentences. This refers to the weighting parameter. By setting a consistency threshold, low-quality samples whose generated answers deviate significantly from the semantics of the candidate answers can be filtered out.
[0041] Further quality assessment is conducted on candidate question-answer pairs that pass the semantic consistency screening. The assessment dimensions include correctness, completeness, question-answer matching degree, and topic relevance. The comprehensive score is expressed as follows: ; in, , , , These represent the accuracy score, completeness score, question-answer matching score, and topic relevance score, respectively. , , , These are the corresponding weight parameters. By setting a scoring threshold, this invention can further eliminate question-and-answer samples that are insufficiently correct, incomplete, or weakly relevant to the topic, thereby improving the overall reliability of the final output dataset.
[0042] For example, first perform semantic consistency filtering and set... =0.6, consistency threshold 0.7. The semantic consistency between each candidate answer and the generated answer is calculated. 132 question-answer pairs with a consistency lower than 0.7 are removed, leaving 444. Then, a discriminative scoring process is performed, setting weights... =0.3、 =0.2、 =0.2、 =0.3, the scoring threshold is 0.8, each question-answer pair is scored in four dimensions, 156 question-answer pairs with scores below 0.8 are removed, leaving 288. For multiple answers to the same question, the version with the highest score is kept, and finally 192 question-answer pairs remain.
[0043] It also includes failure memory and iterative optimization steps: questions or question-answer samples that fail the screening are stored in a failure memory database; the maximum similarity between newly generated questions and historical failed questions in the failure memory database is calculated; for newly generated questions... The formula for calculating the maximum similarity between a newly generated problem and historical failed problems in the failure memory is: ; in, Represents a set of failed memories. This represents a text encoding function. This represents cosine similarity. When the similarity exceeds a preset threshold, the system either switches the problem perspective or stops the current round to avoid repeatedly entering known low-quality generation regions. This unit can also be combined with an early stopping strategy to terminate the iteration when the target number of samples is reached or when no new qualified samples are generated for several consecutive rounds, thereby improving automatic generation efficiency and system stability.
[0044] For example, the questions corresponding to the 384 question-answer pairs that failed the screening are stored in the failure memory. The failure similarity threshold is set to 0.8. When the maximum similarity between the newly generated question and the question in the failure memory exceeds 0.8, the question generation perspective is automatically switched. The early stop condition is set to no new qualified question-answer pairs generated for two consecutive rounds, or to reach the target output requirement of 200. After generating 192 qualified question-answer pairs, if no new qualified samples are generated for two consecutive rounds, the early stop is triggered and the iteration is terminated.
[0045] S7. Summarize all question-answer pairs that have passed the dual-gated screening to form a high-quality question-answer dataset.
[0046] For example, all 192 question-answer pairs that passed the screening were aggregated, and the text block position index, anchor information, and quality score of each question-answer pair were supplemented. The output was a high-quality question-answer dataset in structured JSON format. After sampling and manual verification, the accuracy rate reached 96.8% and the topic relevance reached 98.2%, which met the data requirements for fine-tuning of large models. Example 2
[0047] This invention also discloses a long document question-answering data generation system based on two-layer anchor point constraints. This system is applicable to the above-mentioned method and includes: The long document preprocessing and two-layer anchor construction module is used to clean, segment, sentence and length control the input long document to obtain a text block sequence that retains the original document's sequential structure information, and to construct the document layer anchor point corresponding to the whole document and the text block layer anchor point corresponding to each text block respectively. The candidate answer-driven multi-perspective question-answer generation module is used to extract candidate answers from each text block, generate multi-perspective candidate questions around the same candidate answer by combining document-level anchors, text block-level anchors and candidate answer-related keywords, and generate answers for each candidate question within the evidence range of the corresponding text block, forming a set of candidate question-answer pairs; The dual-gated screening and iterative self-improvement module is used to calculate the semantic consistency between candidate answers and generated answers to filter low consistency samples, perform multi-dimensional quality scoring on samples that pass the consistency screening to filter low-scoring samples, and store questions or question-answer samples that fail the screening into the failure memory bank. It performs perspective switching or iteration termination based on the similarity between newly generated questions and failed samples. The results output module is used to summarize all question-answer pairs that have passed the dual-gated screening and generate a high-quality question-answer dataset containing question text, answer text, text block number, anchor information, and quality score information.
[0048] Compared to existing technologies, this invention introduces both global topic constraints and local evidence constraints during the question-and-answer generation process by constructing document-level anchors and text block-level anchors. This effectively reduces the deviation of generated content from the original document's main theme in long document scenarios and enhances the correspondence between generated questions, generated answers, and original evidence blocks. Since both candidate questions and answers revolve around candidate answers and specific text blocks, the generated results have stronger evidence traceability and semantic consistency, which is beneficial for improving the interpretability and reliability of the automatic construction process of long document question-and-answer data.
[0049] Furthermore, this invention constructs a dual-gated automatic quality control mechanism by setting semantic consistency filtering and discriminative scoring filtering. This mechanism can perform hierarchical filtering on generated candidate question-answer pairs, thereby reducing the probability of low-quality samples being mixed into the final dataset. Simultaneously, by introducing a failure memory and iterative scheduling mechanism, historical failure patterns can be recorded and avoided, reducing the computational cost of repeatedly generating invalid samples and improving the stability and efficiency of the automatic generation process. Moreover, this invention enhances the richness of question-answer expression forms while maintaining topic consistency and evidence support by generating questions from multiple perspectives around the same candidate answer. Therefore, this invention is well-suited for the automatic construction of question-answer data in various long document scenarios, such as news, technical documents, reports, official documents, legal texts, and medical texts.
[0050] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Any modifications and improvements made by those skilled in the art to the technical solutions of this specification without departing from the spirit of this specification should fall within the protection scope defined by the claims of this specification.
Claims
1. A method for generating long document question-and-answer data based on double-layer anchor point constraints, characterized in that, Includes the following steps: S1. Clean, segment, sentence, and length control the input long document; S2. Extract a document summary and a set of document keywords from the entire long document to construct document-level anchor points; Extract block summaries and block keyword sets for each text block, and construct text block layer anchors; S3. Extract information units with question-and-answer value from each text block as candidate answers; S4. Based on the same candidate answer, generate multiple candidate questions from multiple perspectives by combining document-level anchors, text block-level anchors, and keywords related to the candidate answer. S5. For each candidate question, generate one or more answers within the evidence range of the corresponding text block and construct candidate question-answer pairs; S6. First, screen the consistency between candidate answers and generated answers, and then conduct further quality assessment on the candidate question-answer pairs that pass the semantic consistency screening. S7. Summarize all question-answer pairs that have passed the dual-gated screening to form a high-quality question-answer dataset.
2. The method for generating long document question-and-answer data based on dual-layer anchor point constraints according to claim 1, characterized in that, It also includes failure memory and iterative optimization steps: storing questions or question-answer samples that fail the screening into the failure memory bank, calculating the maximum similarity between the newly generated question and the historical failed questions in the failure memory bank, and when the similarity exceeds the preset threshold, performing a question perspective switch or terminating the current round, and performing early stop judgment based on the number of target samples and the continuous failure situation.
3. The method for generating long document question-and-answer data based on dual-layer anchor point constraints according to claim 1, characterized in that, In S2, document-level anchors are used to represent the core thematic semantics of the entire long document. The construction of document-level anchors includes: For documents Extract its document summary Document keyword set Construct document-level anchors: 。 4. The method for generating long document question-and-answer data based on double-layer anchor point constraints according to claim 1, characterized in that, In S2, text block layer anchors are used to represent the local semantic content of the current text block. The construction of text block layer anchors includes: for text blocks Extract block summary and block keyword set Construct text block layer anchor points: 。 5. The method for generating long document question-and-answer data based on double-layer anchor point constraints according to claim 1, characterized in that, In S6, the consistency between candidate answers and generated answers is filtered, including: For candidate answers With generating answers Semantic consistency can be defined as: ; in, Indicates similarity at the keyword level. Indicates semantic similarity between sentences. These are the weight parameters.
6. The method for generating long document question-and-answer data based on dual-layer anchor point constraints according to claim 5, characterized in that, In S6, the candidate question-answer pairs that pass the semantic consistency screening are further evaluated for quality, and their comprehensive score is expressed as follows: ; in, , , , These represent the accuracy score, completeness score, question-answer matching score, and topic relevance score, respectively. , , , These are the corresponding weight parameters.
7. The method for generating long document question-and-answer data based on double-layer anchor point constraints according to claim 2, characterized in that, Regarding the newly generated question The formula for calculating the maximum similarity between a newly generated problem and historical failed problems in the failure memory is: ; in, Represents a set of failed memories. This represents a text encoding function. This represents the cosine similarity.
8. The method for generating long document question-and-answer data based on double-layer anchor point constraints according to claim 1, characterized in that, S1 includes: The system receives the original long document, performs initial segmentation according to paragraph and sentence boundaries, recursively splits excessively long text segments, and sequentially merges excessively short segments to obtain a text block sequence suitable for question-and-answer generation.
9. A long document question-answering data generation system based on dual-layer anchor point constraints, the system being applicable to the method of any one of claims 1-8, characterized in that, include: The long document preprocessing and two-layer anchor construction module is used to clean, segment, sentence and length control the input long document to obtain a text block sequence that retains the original document's sequential structure information, and to construct the document layer anchor point corresponding to the whole document and the text block layer anchor point corresponding to each text block respectively. The candidate answer-driven multi-perspective question-answer generation module is used to extract candidate answers from each text block, generate multi-perspective candidate questions around the same candidate answer by combining document-level anchors, text block-level anchors and candidate answer-related keywords, and generate answers for each candidate question within the evidence range of the corresponding text block, forming a set of candidate question-answer pairs; The dual-gated screening module is used to calculate the semantic consistency between candidate answers and generated answers to filter out low consistency samples, and to perform multi-dimensional quality scoring on samples that pass the consistency screening to filter out low-scoring samples. The results output module is used to summarize all question-answer pairs that have passed the dual-gated screening and generate a high-quality question-answer dataset containing question text, answer text, text block number, anchor information, and quality score information.
10. The long document question-and-answer data generation system based on dual-layer anchor point constraints according to claim 9, characterized in that, It also includes an iterative self-improvement module, which stores questions or question-answer samples that fail the screening into a failure memory, and performs perspective switching or iteration termination based on the similarity between newly generated questions and failure samples.