Structured constraint and evidence anchored reading test question generation method, device and medium
Patent Information
- Application Number
- CN202611155101.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]有鉴于此,本发明提供一种结构化约束与证据锚定的阅读试题生成方法、设备及介质,以解决现有阅读理解试题生成方法中存在的控制条件缺乏机器可读的统一结构、证据依据难追溯、错误定位困难、修订无边界以及生成过程缺少可追溯的中间状态记录的问题
第一方面,通过构建结构化维度控制资源和任务级控制包,将教学评价规范转换为机器可读的确定性控制信号,解决了控制条件缺乏统一机器可读结构的问题;
Smart Images

Figure CN123013865A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of reading test text processing and generation technology, specifically to a method, device, and medium for generating reading test questions with structured constraints and evidence anchoring. Background Technology
[0002] The automatic reading comprehension question generation system requires, based on the given reading material, to generate question stems, options or scoring points, reference answers, and explanations, ensuring that each output field is consistent with the locatable information in the material. For tasks that need to assess multiple target dimensions simultaneously, simply generating semantically coherent text is insufficient; it is also necessary to machine-express control conditions, supporting evidence, result structure, and verification status.
[0003] Existing methods typically input reading materials and natural language instructions directly into the generation model, which then outputs questions and answers in one go. The main drawbacks of this approach are: control conditions exist in unstructured natural language, lacking unified field definitions, resource identifiers, and version information, making them difficult for programs to reliably retrieve, combine, and reuse; there is a lack of computable correlation between the material evidence and the question fields, resulting in the inability to automatically verify the material basis for answers and explanations; the intermediate processing is invisible, and when errors occur in the generated results, the entire process must be regenerated, making it impossible to pinpoint the source of the error and perform targeted revisions; the revision process lacks an upper limit on the number of rounds, easily leading to unbounded loops; question evaluation mixes the quality of expression with the hit rate of the target dimension, failing to distinguish between different types of questions; and the generation process lacks records of resource versions, processing rounds, and intermediate states, making it difficult to verify results and locate anomalies.
[0004] Traditional manual test question processing typically includes question design planning, question creation, question review, duplication checks, test administration, marking and scoring, and post-exam analysis and evaluation. When problems are found during question review, the question creators need to recreate or modify the questions based on the review comments. The review comments, scope of modifications, and content before and after modifications in this process usually rely on manual document transmission, making it difficult to directly generate computer-readable related fields, input paths, and revision cycle records. Summary of the Invention
[0005] In view of this, the present invention provides a method, device and medium for generating reading comprehension test questions with structured constraints and evidence anchoring, in order to solve the problems existing in the current reading comprehension test question generation methods, such as the lack of a machine-readable unified structure for control conditions, difficulty in tracing evidence, difficulty in locating errors, lack of bounded revisions and lack of traceable intermediate state records in the generation process.
[0006] To achieve the above objectives, the technical solution created by this invention is implemented as follows: A method for generating reading comprehension questions based on structured constraints and evidence anchoring includes: S1: Obtain input reading materials and task requests, standardize the input reading materials and establish a material location index, and generate material records and task records; S2: Obtain the target dimension identifier set and resource version information from the task record, and read the corresponding structured control resources from the dimension control resource library based on the target dimension identifier and resource version information; S3: Extract preset fields from structured control resources, call preset assembly rules according to their type and combination requirements, and write the processed fields into the structured control package; S4: Based on the material records, target dimension identifier set and structured control package, extract evidence fragments from the input reading material and generate evidence anchor point identifiers, record the position intervals to form evidence anchor point set; S5: Input the material record, structured control package and evidence anchor set into the natural language generation model, and constrain the generation process through the structured control package to obtain the structured test question record; S6: Perform deterministic structure validation and semantic consistency validation on the structured test question records, and generate corresponding violation codes for the validation items that fail; S7: When all checks fail, determine if the current revision round is less than the maximum revision round limit; if it is less, determine the return step based on the return path in the violation code, increment the revision round by one, regenerate only the content corresponding to the fields associated with the violation code in the return step, and freeze the unassociated fields; if the current revision round has reached or exceeded the maximum revision round limit, stop automatic revision, record the rejection status and violation code, and end the current task. S8: After all checks are passed, perform general test quality evaluation and target dimension hit evaluation respectively; S9: Output the final structured test question record, verification record, general test question quality evaluation record, target dimension hit evaluation record, and audit log as the generated results.
[0007] Furthermore, the standardization process includes unifying the character encoding of the input reading materials, organizing blank symbols, and dividing the paragraph structure. The target dimension identifier is a unique search key for the user-specified assessment capability level, used to retrieve the corresponding dimension definition and design constraints from the dimension control resource library; Each structured control resource in the dimensional control resource library shall include at least: dimensional identifier, dimensional name, applicable question type, design constraints, evidence requirements, prohibition conditions, and scoring rules; A structured control package should include at least: control package identifier, target dimension identifier set, test item design constraints, evidence selection rules, prohibition conditions, result acceptance rules, structured output mode, and resource version information; The structured control package imposes constraints on the generation process through test item design constraints, evidence selection rules, and prohibition conditions; The offending code includes the code identifier, issue category, triggering condition, associated fields, and return path; The structured test record includes the question stem, options, answer, explanation, scoring points, evidence anchor markers, target dimension markers, and processing status, and the answer, scoring points, or explanation content is associated with at least one evidence anchor marker; The audit log should record at least the task identifier, material identifier, processing stage, revision round, resource version, processing status, and violation code; The verification log should include at least the verification result, the violation code, and the verification status; General test item quality assessment is used to evaluate the quality of expression and the reasonableness of the answer, while target dimension hit assessment is used to evaluate how well the test item covers the target dimension set.
[0008] Furthermore, in S3, when multiple target dimensions exist, the structured control resources corresponding to each target dimension are sequentially subjected to field deduplication, compatibility checks, conflict resolution, and output mode solidification to assemble a structured control package; the preset assembly rules for the structured control package are expressed as follows: ; in, This represents a structured control packet for the current task; Representing the perspective of teaching knowledge Next The target dimension set of each test question generation unit; Indicates resource level; Indicates resource read mapping; This indicates a deterministic assembly, which sequentially includes field deduplication, compatibility checking, conflict resolution, and output mode fixing. Indicates the identifier for any target dimension. According to resource level Read the corresponding structured control resources.
[0009] Furthermore, the evidence anchor record also includes the association dimension and the type of supporting relationship; the type of supporting relationship is used to indicate that the evidence anchor supports at least one of the question stem, reference answer, answer analysis, or scoring point.
[0010] Furthermore, deterministic structure validation includes at least: validation of required fields, validation of field types, validation of the number of options, validation of answer attribution, and validation of evidence location range exceeding limits; Semantic consistency verification includes at least: consistency between the question stem and the answer, consistency between the answer and the explanation, validity of the target dimension constraints, semantic alignment of the evidence anchor with the answer and the explanation, and field evidence coverage verification; field evidence coverage is calculated as follows: ; in, This represents the set of fields that require supporting evidence. For indicator functions; This represents the set of evidence anchors bound to the field. Indicates support status; The judgment condition is ; in, This refers to any field to be verified from the set of fields that require supporting evidence.
[0011] Furthermore, in S7, regeneration is performed using bounded revisions, which include: When a violation code indicates incorrect evidence, return to S4 to re-extract; If the dimension is incorrect, return to S5 to regenerate; If the structure or answer is incorrect, return to S5 for targeted revision; Targeted revisions use the associated fields in the violating code as the smallest unit of modification, and freeze unassociated fields; When returning to S4, only the violation anchor and reference relationship are updated; when returning to S5, only the violation field is updated, and S1 and S2 are not re-executed. The termination criteria for bounded revisions are the current round, the verification result, and the maximum round. A decision is expressed as: ; in, Automatic processing will terminate when the value equals 1.
[0012] Furthermore, general test item quality assessment evaluates at least one of the following: answerability, uniqueness of answer, clarity of expression, completeness of explanation, operability of scoring, or suitability of difficulty; the general test item quality assessment score is calculated using the following formula: ; in, For the first The general quality assessment score of each test item. This is a set of quality dimensions applicable to the current question type. For dimension weights, For the first Each question in the quality dimension Aggregated score on; The weights are read from the preset evaluation configuration, and the default is an equal-weight configuration, i.e. ; Each evaluation module in the general test quality assessment outputs a level 1 to 5 rating and maps it to 20 to 100 points. The aggregated score of multiple modules is calculated based on module weight normalization or equal weighting.
[0013] Furthermore, the target dimension hit evaluation includes: obtaining the predicted dimension set and comparing it with the target dimension identifier set, and calculating the precision for each. Recall rate and harmonic mean The calculation formula is:
[0014] in, From the perspective of teaching knowledge; The number of target dimensions that were correctly hit; The number of dimensions that are predicted but not part of the target set; The number of unrealized dimensions in the target set; Evaluation records are saved simultaneously The original count and , , Three indicators; The predicted dimension set is obtained by the dimension determination module performing binary determination on candidate dimensions and aggregating them according to the strict majority rule when multiple modules are involved. The strict majority rule is: when multiple dimension decision modules make decisions, if the number of modules that hit a certain dimension exceeds half of the total number of modules, then that dimension is written into the prediction dimension set. Generally, test item quality evaluation records and target dimension hit rate evaluation records are stored separately.
[0015] An electronic device, comprising: At least one processor; and Memory that is communicatively connected to at least one processor; The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to execute a reading test question generation method based on structured constraints and evidence anchoring.
[0016] A computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for generating reading test questions with structured constraints and evidence anchoring.
[0017] Compared with the prior art, the present invention can achieve the following beneficial effects: Firstly, by constructing structured dimensional control resources and task-level control packages, the teaching evaluation standards are transformed into machine-readable deterministic control signals, thus solving the problem of the lack of a unified machine-readable structure for control conditions. By establishing evidence anchors with location indexes and binding their identifiers to the question stem, answer, explanation, and scoring points, a program-level mapping between question fields and original text locations was achieved, solving the problem that evidence is difficult to be automatically verified by computers. By using a directional return path driven by the violation code and the maximum revision round, the problems of difficulty in error location and lack of execution boundaries in the revision process were solved. By recording task identifiers, resource versions, processing rounds, and violation codes in the audit log, the problem of lacking locatable records in the generation process was solved. Secondly, control resources can be retrieved, combined, and reused by the program according to the identifier, and the control conditions on which the generated results are based can be traced through the resource version, ensuring the consistency of control signals at the program level between different generation tasks; the computable association between evidence anchors and test question fields enables the computer to automatically verify the material basis of the answers and explanations during the execution verification stage, reducing the reliance on manual verification. Thirdly, by setting up a structured data model to transfer data between processing units, it ensures that intermediate results such as material records, control packages, evidence anchors, test question records, and verification records are all saved with fixed fields and data types, reducing the risk of field loss or object confusion caused by cross-module data parsing, facilitating the programmatic access and reuse of intermediate results, and improving the data reading efficiency of subsequent calculation units. Fourthly, by classifying errors through non-compliant code, the system directs the code back to the corresponding processing stage for revision, limiting the scope of modification to local related fields and avoiding re-execution of the entire process due to local errors. The maximum number of revision rounds serves as a termination limit, preventing processing delays and result drift caused by unbounded loops and giving the generation verification process clear execution boundaries. Fifthly, by performing general quality evaluation and target dimension hit evaluation separately and saving the evaluation results separately, it is possible to distinguish between two different situations at the program level: "good quality but no target hit" and "target hit but poor quality". This makes it easier to locate the defect type within the computer program and trigger the matching processing branch. Attached Figure Description
[0018] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of the method flow for generating reading test questions based on structured constraints and evidence anchoring as described in the embodiments of the present invention; Figure 2 A schematic diagram illustrating the execution process of the reading test question generation method with structured constraints and evidence anchoring as described in the embodiments of the present invention; Figure 3 A functional block diagram of the reading test question generation system with structured constraints and evidence anchoring as described in the embodiments of the present invention; Figure 4 A schematic diagram of the process architecture involving dual-perspective audit evaluation provided for embodiments of the present invention; Figure 5 A schematic diagram illustrating the correspondence between reading material excerpts, scoring points, target dimensions, and test question outputs as described in the embodiments of this invention; Figure 6 A schematic diagram of the traditional manual reading test question creation, test question review, duplication check, test implementation, marking and scoring, and analysis and evaluation process in existing technologies; Figure 7 This is a schematic diagram of the interface for extracting a set of evidence anchor points from input reading materials in an embodiment of the present invention; Figure 8 This is a schematic diagram of the interface for triggering a bounded revision process based on illegal code in an embodiment of the present invention.
[0019] Explanation of reference numerals in the attached figures: 100. Task orchestration and generation layer; 101. Input preprocessing module; 102. Task planning module; 103. Control assembly module; 104. Evidence Anchoring Module; 105. Question Generation Module; 200. Verification and Control Layer; 201. Deterministic Structure Verification Module; 202. Semantic consistency verification module; 203. Bounded revision control module; 300. Output and Audit Layer; 301. Dual-Perspective Evaluation Module; 302. Audit Log Module; 303. Result Output Module. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0022] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0023] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0024] The invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] (I) This method specifically includes the following steps S1 to S9, see reference. Figure 1 and Figure 2 As shown; Step S1: Input material normalization and location index establishment; The system acquires input reading materials and task requests generated from test questions, performs standardization processing on the input reading materials, establishes a material location index, and generates material records and task records. The standardization processing includes character encoding unification, whitespace and paragraph structure organization, and the establishment of a material location index.
[0026] It receives reading materials uploaded, pasted, or selected from a preset material library by users, assigns material identifiers to the reading materials, performs format cleaning, character standardization, and paragraph division on the material content, and establishes material location indexes according to paragraph, sentence, or character positions; The material location index includes information such as material identifier, standardized text, paragraph number, sentence number, and character start and end positions. It is used to relocate the evidence on which the test questions are based to the specific location in the input reading material during subsequent evidence anchoring, answer verification, and audit review. The core fields and verification methods of the material record and task record are shown in Table 1. Table 1: Core fields of material records and task records;
[0027] The task record includes at least the task identifier, question type, output mode, and maximum revision round. In one implementation, the task record also includes a material identifier, a set of target dimension identifiers, the number of questions, the task status, the creation time, and the resource version used.
[0028] When a task requires the generation of multiple test questions, the task is split into multiple candidate test question generation units, and the processing status of each test question generation unit is maintained.
[0029] After receiving the reading materials and task parameters submitted by the user, the system first checks whether the input content meets the task creation conditions. The checks include: whether the reading material is empty, whether the length of the material is within the preset processing range, whether the target dimension identifier exists, whether the question type belongs to the question type supported by the system, whether the number of questions is a valid value, and whether the parameters are complete; If the input does not meet the preset requirements, the corresponding input error message will be returned and the task will not be created.
[0030] Step S2: Obtain the target dimension set and read the structured control resources; Obtain the target dimension identifier set and resource version information from the task record. Based on the target dimension identifier and resource version information, read the corresponding structured control resources from the pre-established dimension control resource library.
[0031] The dimensional control resource library is used to store established and verified control resources. Each dimensional control resource is stored according to its dimensional identifier and includes at least the dimensional name, dimensional definition, applicable question type, design constraints, evidence requirements, acceptable conditions, prohibited conditions, scoring rules, and dimensional conflict rules.
[0032] By storing the above content as structured records, corresponding resources can be retrieved directly based on the target dimension selected by the user, without the need to re-analyze or reorganize teaching specifications in each online task generation.
[0033] The data structure definition for dimension-controlled resources is shown in Table 2. Table 2: Data structure for dimensional control resources;
[0034] The supported set of teaching knowledge perspectives is as follows: ; In the formula, This represents the set of optional teaching knowledge perspectives available to the system. This represents the perspective of the college entrance examination evaluation system. This represents the perspective of the curriculum standards.
[0035] Given perspective Select the target dimension set of the current task from the entire set of dimensions from this perspective: ; In the formula, the subscript Indicates the first Each question generation unit, superscript This represents the perspective of teaching knowledge. This represents all dimensions from that perspective. This represents the set of target dimensions specified for this task; When there is a combination relationship between multiple target dimensions, the corresponding combination constraints, compatibility rules, or conflict handling rules are further read.
[0036] Table 2A: Examples of Target Dimension Identification and Control Clues;
[0037] The dimension identifiers in Table 2A serve as unique retrieval keys in the dimension control repository; dimension names and control clues are saved along with the resource version. The above content is only an excerpt of the executable dimension list and does not constitute a limitation on the number, name, or encoding method of dimensions.
[0038] Combination Figure 5 GK15, GK16, CS11, and CS17 are example display values for dimension identifiers; Dimension identifiers are used to retrieve the corresponding dimension definition, applicable question types, task actions, evidence requirements, prohibition conditions, and acceptance rules, rather than simply serving as display tags; Figure 5 The dimension list on the right is an excerpt from the dimension control resource library and does not imply that this application can only use the illustrated code, nor does it limit the number of dimensions.
[0039] Step S3: Assemble the structured control package; Extract preset fields from the read structured control resources, and call the corresponding preset assembly rules according to the type and combination requirements of the preset fields, and write the processed preset fields into the structured control package; The structured control package serves as a unified machine-readable input for subsequent processing steps.
[0040] The structured control package includes: a control package identifier, associated task identifiers, a set of target dimension identifiers, question design constraints, evidence selection rules, prohibited conditions, result acceptance rules, a specified structured output pattern, and information on the versions of the resources invoked. The structured control package imposes constraints on the natural language generation model's generation process through its question design constraints, evidence selection rules, and prohibited conditions.
[0041] The structured control package does not simply concatenate multiple dimension descriptions into a long text; instead, it sequentially performs resource retrieval, version fixing, field deduplication, compatibility checks, conflict resolution, and output pattern fixing. When multiple target dimensions exist, the above processes are performed sequentially on the structured control resources corresponding to each target dimension. The preset assembly rules are as follows: ; in, This represents a structured control packet for the current task; Representing the perspective of teaching knowledge Next The target dimension set of each test question generation unit; Indicates resource level; Indicates resource read mapping; This indicates a deterministic assembly, which sequentially includes field deduplication, compatibility checking, conflict resolution, and output mode fixing. In the formula, Indicates the first from the perspective of current teaching knowledge. The identifier of any target dimension in the target dimension set of each question generation unit; Given a dimension identifier and resource level, a unique version of the structured control resource is returned. Then, a deterministic assembly operation sequentially performs version fixing, field deduplication, compatibility checking, conflict resolution, and output mode fixing.
[0042] The symbolic relationships are as follows: ; If priority rules are configured, the merges will be performed according to the preset priority. If compatibility rules are configured, joint constraints will be formed according to the compatibility rules; If there are conflicts that cannot be resolved automatically, a dimension conflict code is generated, and the task is marked as pending manual confirmation. Through control package assembly, the generation module and the verification module of this task use the same set of constraints, thereby reducing the problem of inconsistency between generation conditions and verification standards.
[0043] Step S4: Extract and register evidence anchor points; Based on the material records, the target dimension identifier set, and the structured control package, evidence fragments related to the target dimension are extracted from the input reading material. An evidence anchor identifier is generated for each evidence fragment, and an evidence anchor record containing its position range in the input reading material is generated, resulting in an evidence anchor set.
[0044] The evidence anchor record also includes the association dimension and the supporting relationship type; the supporting relationship type is used to indicate that the evidence anchor supports at least one of the following: question stem, reference answer, answer analysis, or scoring point.
[0045] Evidence anchor records may also include excerpts from the original text or summaries of those excerpts.
[0046] Evidence anchors are not positionless copies of the original content, but rather associate candidate evidence with the location of the material, enabling the system to reread the corresponding material fragments in subsequent verification stages.
[0047] In one implementation, a summary value of the evidence fragment can also be recorded to verify whether the content of the material has changed. The core field definitions of the evidence anchor are shown in Table 1.
[0048] Specifically, in this invention, the evidence anchor point serves both as the set of permissible evidence before generation and as the basis for review after generation, rather than simply as an additional and saved explanatory information after the test questions are generated. The evidence anchoring module filters candidate fragments in the material location index based on the target dimensions, task actions, and evidence selection rules in the structured control package, and writes the anchor points that pass the filter into the anchor point whitelist for this task.
[0049] Before calling the question generation module, the system maps the structured control package, anchor whitelist, and specified output mode into a generation request: converting the question design constraints into mandatory task actions; Convert prohibited conditions into content conditions that must not appear; Transform evidence requirements into mandatory anchor_refs rules for answer, parsing, or score point fields; Convert the anchor whitelist into a set of allowed values for the anchor_refs field.
[0050] Therefore, the generation module can only select evidence identifiers within the registered anchor point range and must explicitly return the reference relationship between fields and anchor points in the structured test question record.
[0051] After the candidate questions are returned, the verification module rereads the input reading material according to the anchor point identifier and position range recorded in anchor_refs, and verifies the material identifier, character boundaries, fragment summary value and field support relationship; If a field references an anchor point outside the whitelist, the anchor point content is inconsistent with the current position, or the anchor point cannot support the corresponding answer, explanation, or scoring point, then an E01, E02, or E03 violation code will be generated, and the associated field will be redirected back to the evidence anchoring module or the question generation module.
[0052] like Figure 5 As shown, markers ① and ② in the reading material represent candidate material fragments that can support subsequent test question fields. They do not simply save the circle numbers shown in the figure, but generate a globally or task-specific unique evidence anchor point identifier for each material fragment, and simultaneously save the material identifier, paragraph identifier, start and end character positions, original text fragment or summary value, association dimension, and supported field types.
[0053] Figure 5 The scoring points 1 and 2 are the evidence content or scoring basis displayed to the user. The scoring point field is distinguished from the evidence anchor record. The scoring point is used to describe the content contained in the answer, and the evidence anchor is used to record the locatable basis of the content in the input material. The two are linked through anchor_refs and support relationship type.
[0054] The same evidence anchor can support at least one of the answer, analysis, or scoring points, and the same field can also be associated with one or more evidence anchors.
[0055] Figure 5 The connection from the material fragment to the GK / CS dimension represents the association between the evidence fragment and the target dimension. This association is not just a line drawn in the image, but is written into the dimension_refs field of the evidence anchor record. The connection from related dimensions to short-answer or multiple-choice questions indicates that the control package translates dimension requirements into task actions and output field patterns for the corresponding question type.
[0056] Figure 5 The two question formats at the bottom illustrate that different question types can use different field patterns: short answer questions record the question stem, reference answer, scoring points, explanation, and anchor_refs; multiple choice questions record the question stem, set of options, unique answer, explanation, and anchor_refs. The fields omitted in the diagram for ease of illustration are still written into the structured test question records according to the structure shown in Table 1. Therefore, the omission in the diagram does not mean that the system does not save answer analysis, processing status, resource version or audit identifier.
[0057] Step S5: Generate structured test question records; The material record, structured control package, and evidence anchor set are input into a pre-built natural language generation model. The generation process is constrained by the structured control package to obtain a structured test question record. The structured test question record includes the question stem, options, answer, explanation, scoring points, evidence anchor identifiers, target dimension identifiers, and processing status. The answer, scoring points, or explanation content are associated with at least one evidence anchor identifier.
[0058] For multiple-choice questions, the question record includes the question stem, a set of options, a unique answer, and explanations. For short-answer questions, the question record includes the question stem, a reference answer, scoring points, and explanations. For question types that do not require options or scoring points, the corresponding fields are empty.
[0059] Compared to directly outputting a piece of natural language text, structured test record saves the question stem, answer, explanation, scoring points, target dimensions and evidence separately, so that subsequent modules can check the completeness of the fields, the correctness of the format and the correspondence between the fields. The core field definitions of structured test record are shown in Table 1.
[0060] The natural language generation model referred to in this solution is a pre-configured model that can receive reading materials, machine-readable constraints, and output field patterns, and generate natural language content or structured fields.
[0061] The model can be called through a local deployment interface or a remote service interface. It can handle various processing modules for the same model, or handle evidence extraction, question generation, and semantic verification for different models respectively. This invention does not require retraining or modifying model parameters as a necessary condition.
[0062] The structured control package constraint generation process described in this specification includes at least input-side constraint mapping and output-side executable verification.
[0063] The input side writes the control package fields into role instructions, task actions, allowed evidence, prohibited conditions, acceptance rules and output field modes according to the preset template, instead of splicing all resources as free text without field distinction; The output side rejects candidate records that do not meet the constraints through field pattern parsing, required field checks, enumeration value checks, anchor whitelist checks, and acceptance rule checks.
[0064] In implementations that support structured output constraints in generative models, JSON Schema, function call parameter patterns, or syntax constraints can be used to decode and limit field names, field types, and enumerated values. In implementations where the generative model does not support the above constraints, the output parser converts the model-returned content into structured test question records, and then achieves equivalent field constraints through deterministic structure verification and bounded revision driven by violation code.
[0065] Step S6: Perform hybrid verification; Deterministic structure validation and semantic consistency validation are performed on the structured test question records. The validation results are written to the validation record, and corresponding violation codes are generated for the validation items that fail. The violation codes include code identifier, question category, triggering condition, associated fields and return path.
[0066] Deterministic structure validation includes at least: validation of required fields, field types, enumerated values, the number of options, whether the answer belongs to the option set, and whether the evidence location range exceeds the bounds. The checks include: whether required fields are missing, whether field types are correct, whether the number of questions meets the task requirements, whether the number of options meets the question type requirements, whether the reference answer belongs to the option set, whether the answer format conforms to preset rules, whether evidence anchor points exist, whether the material location exceeds the input material range, and whether the question record conforms to the preset structure pattern. After the structure validation passes, the system then sends the candidate questions to the semantic consistency validation module to avoid performing unnecessary semantic judgments on questions with incomplete structures.
[0067] Semantic consistency verification includes at least the following: consistency verification between the question stem and the answer, consistency verification between the answer and the explanation, validity verification of the target dimension constraints, semantic alignment verification between the evidence anchor and the answer and explanation, and field evidence coverage verification.
[0068] Semantic consistency verification also includes checking whether the question stem introduces facts outside the input reading material, and whether there are unresolved conflicts between multiple target dimensions. The results of structural verification, semantic consistency verification, target dimension constraint validity verification, and evidence support are recorded respectively.
[0069] Field evidence coverage is calculated using the following formula: ; in, This represents the set of fields that require supporting evidence. This is an indicator function that takes the value 1 if the field is bound to a valid evidence anchor, and 0 otherwise.
[0070] In the above formula, It represents any field in the set of fields that require supporting evidence; This represents the set of evidence anchor identifiers to which the field is bound; This indicates the anchor's valid support status for this field.
[0071] The support status is determined by the validity of the location interval, the consistency of the material summary, and the semantic support relationship; this field is counted as valid coverage only if the following conditions are met: ; When a field is not bound to an anchor or the anchor does not support the field, the field is not counted as valid coverage.
[0072] The violation code is used to indicate the reason for the test question verification failure and to determine which module needs to be returned or which field needs to be modified.
[0073] The specific definitions of the violation codes are shown in Table 3. Through step S6, hybrid verification was achieved.
[0074] Table 3: Illustrated List of Violation Codes;
[0075] Step S7: Perform bounded revision or reject processing based on the violating code. When a structured test question record fails all validations, determine whether the current revision round is less than the preset maximum revision round limit. If so, determine the returned processing step based on the correspondence between the pre-set return path and processing steps in the violation code, increment the revision round by one, and regenerate the content corresponding to the field associated with the violation code in the data object output by that step.
[0076] Specifically: when a violation code indicates incorrect evidence location, mismatched evidence content, or missing evidence association, return to step S4 to re-extract or adjust the evidence anchor point; when a violation code indicates missing target dimensions, insufficient target dimension coverage, or incorrect dimension implementation, return to step S5 to regenerate or modify the structured test question record. In one implementation, it can also return to step S3 to reassemble the control package; when a violation code indicates incorrect field structure, incorrect answer, inconsistency between the answer and the option, or inconsistency between the explanation and the answer, return to step S5 for targeted revision. Each revision generates a targeted revision record, and the core field definitions for the verification and revision records are shown in Table 1.
[0077] The targeted revision involves a partial rerun rather than a full rerun. The system reads the associated fields `repair_fields` and the return module `return_stage` from the offending code, and copies the unassociated fields from the previous round of structured test questions as the frozen fields `frozen_fields`.
[0078] When returning to the evidence anchoring module, only the record of the violation anchor and the anchor_refs that reference the anchor are updated; when returning to the question generation module, only the question stem, options, answer, explanation or scoring points specified in repair_fields are updated, and other fields retain the values of the previous round.
[0079] The revision request must include at least the original structured test question record, the violation code, the associated fields, a summary of the frozen fields, a list of fields that can be modified, and a whitelist of anchor points. After the revision result is returned, the system compares the field summaries before and after the revision; if a frozen field changes, a structured violation code is generated and the revision result for this round is rejected.
[0080] Step S6 can perform incremental validation on the revised field and its dependent fields, or it can re-execute all validations, but without rebuilding the task record, material location index, and unchanged structured control package.
[0081] After the revision is complete, perform the mixed verification in step S6 again. The system has a preset maximum number of revisions. The termination conditions for bounded revisions are the current revision round, the verification results, and the maximum revision round limit. Joint decision: ; In the formula, A value of 1 indicates termination of automatic processing; after termination, the status changes based on the last verification state, resulting in a passed, rejected output, or pending manual processing state. When the maximum revision round is reached and the process still fails, revision stops, the rejection state, violation code, revision round, and process log are recorded, and the current task ends. This avoids unlimited repeated generation and the resulting processing delays and result drift. Through step S7, bounded revision is achieved.
[0082] Step S8: Separate the general quality assessment and the target dimension hit assessment; Once all structured test questions have passed all validations, a general test question quality evaluation and a target dimension hit evaluation are performed respectively. The general test question quality evaluation is used to evaluate the quality of the test question's expression and the reasonableness of the answer, while the target dimension hit evaluation is used to evaluate the test question's coverage of the target dimension set. The two types of evaluation results are saved separately to distinguish between two different types of generated questions: those that are of acceptable quality but do not hit the target dimension and those that hit the target dimension but are of insufficient quality.
[0083] General test item quality assessment evaluates at least one of the following: test item answerability, uniqueness of answer, clarity of expression, completeness of explanation, operability of scoring, and suitability of difficulty.
[0084] The general test item quality evaluation score is calculated using the following formula: ; in, Indicates the first The general quality assessment score of each test item. This represents the set of quality dimensions applicable to the current question type. Indicates dimensional weights. Indicates the first Each question in the quality dimension The aggregated score.
[0085] The quantitative implementation method is as follows: The evaluation configuration pre-saves a set of quality dimensions, level descriptions, level-score mappings, and dimension weights.
[0086] The evaluation module outputs a rating of 1 to 5 for each applicable quality dimension. The system maps the ratings of 1 to 5 to 20, 40, 60, 80 and 100 points respectively, and obtains the corresponding numerical scores.
[0087] When the same quality dimension is evaluated independently by multiple evaluation modules, the aggregate score for that quality dimension is first calculated according to the following formula. : ; In the formula, Indicates the first The set of evaluation modules that successfully return evaluation results for each test question; Indicates the first The preset module weights for each evaluation module; when no module weights are configured, each evaluation module is treated as having equal weight. Indicates the first The evaluation module evaluates the first... Each question in the quality dimension The numerical score given above; Represents the set of evaluation modules The numerical scores given by each evaluation module are aggregated according to the module weights to obtain the [number of]th [item / item]. Each question in the quality dimension The aggregated score.
[0088] Then follow the previous formula ( ) Calculate the first The general test quality evaluation score for each test item.
[0089] In the default equal-weight configuration, the weight of each applicable quality dimension is determined according to the number of applicable dimensions: ; When using manually pre-configured, non-equal-weighted initial values, normalization is first performed according to the following formula, and then the normalized dimension weights are used for general test item quality evaluation: ; In the formula, This indicates the current quality dimension in the evaluation configuration. Pre-set initial dimension weights before normalization; This indicates iterating through the set of quality dimensions applicable to the current test question. The summation index is used to correlate with the quality dimension of the current weight to be calculated. Distinguish between phases; Indicates the summation index The initial dimension weights for the current corresponding quality dimension; all initial dimension weights are non-negative, and the set... The sum of the initial dimension weights of all applicable quality dimensions is greater than 0; the normalized result is... Used for general test item quality assessment, and the sum of the normalized weights of all applicable quality dimensions is equal to 1.
[0090] The weights of the evaluation modules, the initial dimensional weights, and the normalized dimensional weights mentioned above are not inferred temporarily by the generative model, but are read from the evaluation configuration. The evaluation record synchronously saves the original level, mapped score, evaluation module weight, dimension weight, and aggregation result, so that the same input and the same configuration can be repeatedly calculated to obtain the same score.
[0091] The target dimension hit evaluation is used to obtain the set of predicted dimensions corresponding to the test item, and compare the set of predicted dimensions with the target dimension set specified by the task to determine whether the test item meets the predetermined assessment requirements.
[0092] Calculate precision, recall, and harmonic mean separately: ; in, This represents the perspective of teaching knowledge; Indicates the number of target dimensions that were correctly hit; This indicates the number of dimensions that are predicted but not part of the target set; Indicates the number of dimensions in the target set that have not been achieved; Evaluation records are saved simultaneously The original count and , , Three indicators; The set of predicted dimensions is obtained by the dimension decision module. Each dimension decision module receives the structured test question record to be evaluated, the corresponding evidence anchor, the complete list of dimensions from the perspective of the current teaching knowledge, and the decision rules for each dimension, and outputs a binary decision and decision basis for each candidate dimension.
[0093] Binary decision variable The value of is defined as follows, where 1 represents the first . The dimension judgment module determines the first Each test question implementation dimension 0 indicates that it has not been implemented: ; Let the first The set of dimension judgment modules that successfully returned judgment results for each question is as follows: Strict majority threshold Determined according to the following formula: ; Predictive Dimension Set It is formed according to the following formula: ; In the formula, This represents the complete set of candidate dimensions from the perspective of current teaching knowledge. Only candidate dimensions that receive at least a strict majority threshold of hits are written into the prediction dimension set.
[0094] When there is only one valid judgment module, the strict majority threshold is 1; when there are two valid judgment modules, both must be able to determine a hit.
[0095] The evaluation record saves the original judgment, judgment basis, aggregation threshold, module version, and final predicted dimension set for each dimension.
[0096] Generally, test quality evaluation records and target dimension hit evaluation records are stored separately and are not merged into a single total score.
[0097] General test item quality evaluation records and target dimension hit evaluation records are stored separately and not merged into a single total score. The two types of evaluations are saved separately, rather than being directly compressed into a single score, so that users can distinguish between different situations such as "the overall quality of the test items is good but the target dimension is not hit" and "the test items hit the target dimension but there are general quality problems". Through step S8, the dual-perspective evaluation is completed.
[0098] Step S8 is a necessary processing step. When the user interface does not need to display the evaluation results, general test item quality evaluation and target dimension hit evaluation can still be performed, and the corresponding evaluation records can be associated and saved with the audit log; the evaluation records may not be displayed on the user interface, but their generation and storage are not omitted.
[0099] Figure 6 The marking, scoring, and analysis shown belong to the traditional examination administration and post-examination stages, and are not the same process as the evaluation of the generated results in step S8 of this invention. Step S8 is executed after the candidate questions have passed through steps S6 and S7 and before the output of step S9. Its inputs are structured question records, target dimension identifier sets, evidence anchors, and evaluation rules. It does not require the input of student answer sheets, actual test scores, or examination statistics.
[0100] When the actual exam generates answer data, it can be executed separately by the external exam administration system. Figure 6 The marking and post-exam analysis shown are external processing steps that are not necessary for the online test question generation method of this invention. They are used for explanation only and do not affect the generation of general test question quality evaluation records and target dimension hit evaluation records.
[0101] Step S9: Output the test question record, evaluation record, and audit log; The final structured test question record, verification record, general test question quality evaluation record, target dimension hit evaluation record, and audit log will be output as the results. The final structured test question record includes test questions and answers. The audit log shall at least record the task identifier, material identifier, processing stage, revision round, resource version, processing status, and violation code.
[0102] The core fields of the audit log are defined as shown in Table 1. The audit log module records the stages from task creation, including control package assembly, evidence anchoring, question generation, structural validation, semantic validation, targeted revision, evaluation, and result output. Each audit log entry includes a log identifier, task identifier, processing stage, processing round, resource version used, input / output summary, execution status, time information, and exception information. Through the association between the task identifier, question identifier, and evidence anchor identifier, reviewers can query which version of the dimension control resource a question used, which parts of the reading material the question referenced, what validations the question underwent, which violation codes were triggered during validation, which fields the system revised, and the final status of the question.
[0103] The results output module reads the structured test question records that have passed verification based on the task status and displays or exports the question stem, options, reference answer, answer explanation, scoring points, target dimensions, and corresponding evidence to the user. For tasks where some questions pass and some fail, the system displays the passed questions and the questions awaiting manual processing, and prompts the user with the violation code or reason for failure for the failed questions. Users can choose to export only the question content, or export the answers, explanations, scoring rules, evidence locations, and evaluation information simultaneously. The specific export format can be a structured file, a table file, a document file, or other formats supported by the system. When a user queries historically generated tasks, the system retrieves the corresponding records based on the task identifier, task time, material identifier, or task status, and restores the test question results, verification results, revision records, and audit information for that task.
[0104] (ii) Implementation methods of electronic devices; The present invention also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods S1 to S9.
[0105] In the implementation of the electronic device, the dimensional control resources and template rule version information can be stored in the memory or read by the processor from an external data storage subsystem via a communication interface; the input reading materials can be stored in the reading material library or received directly via the input interface. Therefore, the electronic device executing the method of the present invention does not necessarily require that the reading material library, the dimensional control resource library, and the template rule version library be deployed locally.
[0106] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the methods S1 to S9.
[0107] (III) Implementation methods of a reading test generation system based on structured constraints and evidence anchoring; like Figure 3 As shown, this system includes a static resource layer, a task orchestration and generation layer 100, a verification and control layer 200, and an output and audit layer 300; the static resource layer includes a reading material library, a dimension control resource library, and a template rule version library.
[0108] Figure 4 It further illustrates the stage relationship between static teaching resource construction, multi-agent collaborative generation, and dual-perspective audit evaluation.
[0109] exist Figure 3 In the system implementation shown, the static resource layer is the data storage subsystem of this system, and it is connected to the generation layer 100 through the data access interface and task orchestration. The dimensional control resource library is used for step S2 to read structured control resources and is the source of control data for the online generation process; the template rule version library is used to store control package assembly templates, generation request templates, structured output modes, verification rules, violation code-return path mappings and their version information.
[0110] The reading material library stores optional reading materials along with their source, genre, and version information. In implementations where users directly upload or paste reading materials, the input preprocessing module may not need to call the reading material library; therefore, the reading material library is an optional system component. The template rule version library can be stored in the device's memory or provided by an external configuration server. exist Figure 4 In the embodiment shown, it is incorporated into the system as a component of the static resource layer, and the resource version information ensures that historical tasks can be verified.
[0111] Task orchestration and generation layer 100 includes: The input preprocessing module 101 is used to obtain the input reading materials and the task request for generating test questions, to standardize the input reading materials and to establish a material location index, and to generate material records and task records. Task planning module 102 is used to obtain the target dimension identifier set and resource version information from material records and task records; The control assembly module 103 is used to read the corresponding structured control resources from the dimension control resource library based on the target dimension identifier set and resource version information, extract preset fields, and call the corresponding preset assembly rules according to the type and combination requirements of the preset fields, and write the processed preset fields into the structured control package. The evidence anchoring module 104 is used to extract evidence fragments related to the target dimension from the input reading material based on the material record, the target dimension identifier set and the structured control package, generate evidence anchor point identifiers for each evidence fragment, and generate evidence anchor point records containing its position range in the input reading material to obtain the evidence anchor point set. The question generation module 105 is used to input the material record, the structured control package and the evidence anchor set into the pre-built natural language generation model, and to obtain the structured question record by constraining the generation process through the structured control package. The evidence anchoring module 104 is also used to generate an anchor whitelist and field support relationships; the question generation module 105 is also used to map task actions, prohibition conditions, anchor whitelist and output mode into generation requests according to the structured control package, and perform structured parsing on the results returned by the natural language generation model so that the answer, parsing or scoring point fields only reference anchor identifiers in the anchor whitelist.
[0112] Verification and control layer 200 includes: The deterministic structure verification module 201 is used to perform deterministic structure verification on the structured test question records; Semantic consistency verification module 202 is used to perform semantic consistency verification on structured test question records that have passed deterministic structure verification. The bounded revision control module 203 is used to write the verification results into the verification record and generate corresponding violation codes for the failed verification items. When the structured test question record fails all verifications, it determines whether the current revision round is less than the preset maximum revision round limit. If so, it redirects the processing back to the corresponding module in the control assembly module 103, evidence anchoring module 104, or test question generation module 105 according to the pre-set return path in the violation code. After incrementing the revision round by one, it regenerates the content corresponding to the field associated with the violation code in the data object output by the module. Output and audit layer 300, including: The dual-perspective evaluation module 301 is used to perform general test quality evaluation and target dimension hit evaluation respectively after the structured test question record has passed all verifications, and save the two types of evaluation results separately to generate general test quality evaluation record and target dimension hit evaluation record. Audit log module 302 is used to record audit logs that include at least the task identifier, material identifier, processing stage, revision round, resource version, processing status, and violation code; The result output module 303 is used to output the final structured test question record, verification record, general test question quality evaluation record, target dimension hit evaluation record, and audit log as the generated results.
[0113] (iv) Examples Example 1: A single user generates reading comprehension test questions. (1) Users enter the reading comprehension test question generation system, upload or paste a reading material on the test question generation interface, and select the target assessment dimension, question type and number of questions according to the interface prompts, while setting the maximum number of revisions allowed; (2) After the user completes the parameter settings, click the Generate button. The system first checks whether the reading material and task parameters are complete. If the material is empty, the target dimension is not selected, or the parameters do not meet the requirements, the user is prompted to re-enter them. If the check passes, a task record is created, and a material identifier and paragraph and sentence position index are established for the reading material. (3) Based on the target dimension selected by the user, the system reads the corresponding dimension definition, question requirements, evidence requirements, and acceptance rules from the established dimension control resources. If the user selects multiple target dimensions at the same time, the system checks whether there are conflicts in question types, evidence requirements, or prohibition conditions between the dimensions; if there are conflicts that cannot be automatically handled, the system prompts the user to adjust the target dimensions; if there are no conflicts, the system assembles a structured control package for this task. (4) After the control package is assembled, the system locates the text fragments that can support the question stem, reference answer, analysis or scoring points in the material according to the location index and target dimension requirements of the reading material, and registers the corresponding text fragments as evidence anchors; (5) The system generates candidate questions based on reading materials, control packages and evidence anchors, and writes the question stem, question type, options, reference answer, answer explanation, scoring points, target dimensions and evidence anchors into the structured question record respectively; (6) After the candidate questions are generated, the system first checks whether the question fields are complete, whether the answer format is correct, and whether the evidence position is valid. Then it checks whether the question stem, answer, explanation, scoring point and evidence anchor point are consistent, and judges whether the generated questions reflect the target examination dimension selected by the user. (7) If, during the verification process, the answer is found to lack supporting materials, the explanation is inconsistent with the answer, or the target dimension is not reflected, the system will generate a corresponding violation code and return the problematic fields to the corresponding module for targeted revision. After the revision is completed, the system will re-execute the verification until the question passes the verification or the preset revision limit is reached; (8) After the test question passes the verification, the system displays the question stem, reference answer, answer analysis, scoring rules and corresponding evidence fragments in the results interface. Users can view or export the generated results. At the same time, the system saves the control resource version, evidence anchor point, verification results, revision record and audit log used in this task. (9) If the question still fails the verification after reaching the maximum number of revisions, the system will stop revising and set the question as failed or pending manual review, while displaying the main issues and corresponding violation codes to the user.
[0114] Example 2: Targeted Revision of Incorrect Multiple-Choice Question Answers (1) In the test question generation interface, the user selects to generate single-choice questions, sets the target assessment dimension and the number of questions, and clicks the generate button. The system generates candidate test questions containing a question stem, four options, a unique reference answer and answer explanation according to the question type requirements in the control package. (2) The system verifies the candidate questions. If the number of options and the answer format meet the requirements, but the evidence fragments cited in the reference answer and the answer analysis are inconsistent, the system generates a violation code for the answer class or evidence support class; (3) The verification and revision module determines the content that needs to be modified based on the violation code, and only returns the reference answer, answer analysis or evidence binding relationship to the test question generation module for revision, without re-establishing the task record, material location index and structured control package; (4) After revision, the system checks again whether the reference answer belongs to the option set, whether the answer and the explanation are consistent, and whether the evidence anchor can support the answer. If the verification passes, the revised test question is output; if it still fails, targeted revision continues within the maximum number of revisions. (5) After the test questions pass the final verification, the system saves the field summaries before and after the revision, the violation codes, the revision rounds and the final test results, so that users can view the revision process later.
[0115] Example 3: Evidence Anchor Constraints, Field-Level Targeted Revisions, and Audit Output Examples In a verifiable execution instance, the user submits reading material M001 and task T001. The material excerpt reads: “Clear expression first requires explicit meaning. Explanatory text should prioritize clarity, avoiding the use of metaphorical language to obscure specific action requirements. Appropriate titles should also reflect the central idea, enabling readers to quickly grasp the key points.” The task parameters are one multiple-choice question, target dimensions GK15 and CS17, and a maximum of three revision rounds.
[0116] The system establishes a left-closed, right-open character position index, registering "Clear expression first requires clear meaning" as A001, with position P2[0,12); and registering "An appropriate title should also reflect the central meaning" as A002, with position P2[45,58). Both anchor points are associated with the target dimension, and answer and explanation are registered as supporting fields.
[0117] Control package P001 transforms the target dimension into an observable task action of "summarizing the central idea of the paragraph and drafting a title," includes "no facts outside the material may be introduced" as a prohibition condition, and includes "answers and explanations must be bound to anchor points, answers must be unique and consistent with the original text" as acceptance rules, while fixing the output mode for multiple-choice questions. The generation request only exposes the two anchor point identifiers, A001 and A002, to the generation model.
[0118] The generation module obtains candidate question I001: The question stem is "Which is the most appropriate title for the above paragraph?"; Option A is "clearly express the main points", Option B is "the level of explanation", Option C is "the general rules of rhetoric", and Option D is "the four standards of a title"; The reference answer is A; The target dimensions are GK15 and CS17; Anchor_Refs are [A001, A002].
[0119] The parsed field for the candidate records in round 0 only states "The answer is A as can be seen from the original text," without explaining how A001 and A002 support the answer. The deterministic structure check passed, but the semantic consistency check generated an E03 evidence support violation code, with the associated field being `explanation` and the return path being S5. The system froze the material records, control packages, question stems, options, and answers, only regenerating the `explanation` field.
[0120] The first round of parsing updates the fields to: "A001 indicates that the paragraph's theme is clearly expressed, and A002 indicates that the title should reflect the central idea, so A can summarize the paragraph's meaning; the other options are too broad or deviate from the material." The system reads back the original text according to the position range of A001 and A002 and checks the summary value. After confirming that both the parsing and the answer are effectively supported, the status is written as accepted.
[0121] The audit logs sequentially record the events of task creation, control package assembly, anchor registration, candidate generation, round 0 E03 violation, round 1 targeted revision, verification pass, and result output. Each event at least saves the task_id, resource_version, anchor_id, violation code, associated fields, revision round, and input / output field summary, thus enabling the reconstruction of this partial revision process.
[0122] Figure 5 This is a visualization example that uses the same field binding method as this embodiment to show the relationship between material fragments, evidence scoring points, target dimensions, and different question types. Figure 5 The specific dimension codes and question texts appearing in the text are for illustrative purposes only and are not required to be exactly the same as those used in Task T001 in terms of dimension combination or question type.
[0123] As with Figure 6 The difference between the manual feedback methods shown is that in this embodiment, the issue in the 0th round of review is recorded as the E03 violation code, and the scope of modification is limited to the explanation field through return_stage and repair_fields; thus, the "return command after review" in the manual process is further transformed into an executable, round-limited, and targeted revision process that can save the field summary before and after modification. Figure 7 The document visualizes the location range of materials, original text excerpts, anchor point identifiers, and usage status, enabling transparent registration and screening of evidence anchor points. Figure 8 The code shows the violation code triggered by evidence and analysis quality issues in the 0th round of candidate questions, as well as the status of the 1st round of candidate questions that passed the verification after targeted revision.
[0124] (v) Explanation of technical terms in this field; To enable those skilled in the art to better understand the technical solution of this application, the relevant technical terms and concepts involved in the specific implementation are explained in a unified manner as follows, and please refer to Table 4 for details; Table 4: Glossary of Terms
[0125] (vi) Contribution of this application to the prior art 6.1 Regarding unstructured control conditions; Existing methods use unstructured natural language for control conditions, lacking unified field definitions, resource identifiers, and version information. This makes it difficult for the same evaluation dimension to be stably retrieved, combined, and reused across different tasks. This invention constructs a dimension control resource library, storing each structured control resource according to its dimension identifier, including at least the dimension definition, applicable question type, design constraints, evidence requirements, acceptance rules, and resource version. Based on the target dimension identifier and resource version information in the task record, the corresponding structured control resource is retrieved and assembled into a structured control package according to preset assembly rules, serving as a unified machine-readable input for subsequent processing units. This makes control conditions searchable, combinable, and reusable, and allows for traceability through resource versions.
[0126] 6.2 Regarding the difficulty in tracing the source of evidence; Existing methods do not preserve the location of cited evidence within the input material, nor do they establish association markers between evidence fragments and the question stem, answer, and explanation. This results in the subsequent system being unable to automatically verify the material basis of the answer and explanation. This invention extracts evidence fragments related to the target dimension from the input reading material, generates evidence anchor markers for each evidence fragment, and records its position range in the material, obtaining a set of evidence anchor markers. In the generated structured test question record, the answer, scoring point, or explanation content is associated with at least one evidence anchor marker. This establishes a calculable association between the test question content and the material evidence, enabling the computer to automatically verify the material basis.
[0127] 6.3 Regarding the invisibility of intermediate results and the difficulty in locating errors; Existing methods output all content from the model at once, with intermediate processing invisible. When errors occur in the generated results, the entire system must be regenerated, making it impossible to pinpoint the source of the error. This invention divides the question generation process into multiple processing stages, each generating independent data objects such as material records, control packages, evidence anchor sets, structured question records, and verification records. After performing deterministic structure and semantic consistency checks on the question records, corresponding violation codes are generated for failed checks. These violation codes include a code identifier, question category, triggering condition, associated fields, and input path. This allows intermediate results to be viewed and verified independently, and errors can be located to specific fields and processing stages.
[0128] 6.4 Regarding revisions without boundaries; Existing methods lack a unified classification of error types and a targeted return path, causing errors of different natures to trigger a complete rewrite. Furthermore, the lack of a maximum revision limit easily leads to unbounded loops. To address this issue, this invention determines the returned processing steps for targeted revision based on the pre-defined correspondence between the return path and processing steps in the violation code. When an evidence-related violation occurs, the method returns to re-extract evidence anchors; when a dimensional violation occurs, it returns to regenerate or modify the test record; and when a structure or answer-related violation occurs, it returns to perform targeted revision. A maximum revision cycle limit is also set, stopping revision once the limit is reached. This avoids re-executing the entire process due to localized errors, as well as processing delays and result drift caused by unbounded loops.
[0129] 6.5 Regarding the mixing of evaluation dimensions; Existing methods calculate general quality indicators and target dimension hit rates together, failing to distinguish between "quality met but target not hit" and "target hit but quality insufficient." This invention, after all questions pass verification, performs separate evaluations: a general question quality assessment and a target dimension hit rate assessment. The general question quality assessment evaluates the quality of the wording and the reasonableness of the answer, while the target dimension hit rate assessment evaluates the coverage of the target dimension set. The results of both assessments are saved separately. This allows the computer to differentiate between different types of generated questions, facilitating targeted diagnosis and revision.
[0130] 6.6 Regarding the non-auditability of processes; Existing methods only save the final result and do not record resource version, processing round, stage status and intermediate input and output, which makes it difficult to interpret the difference in the result and difficult to locate the anomaly.
[0131] To address this issue, this invention outputs an audit log along with the generated results. The audit log records at least the task identifier, material identifier, processing stage, revision round, resource version, processing status, and violation code. This makes the question generation process verifiable, and abnormal results can be pinpointed to the specific processing stage.
[0132] 6.7 Regarding inconsistent data formats across processing units; Existing methods use free text to transfer intermediate results between different processing modules, resulting in inconsistent field names and data type definitions. This easily leads to missing fields, object confusion, and the inability to reuse intermediate results. This invention sets fixed fields and data types for the inputs and outputs of each processing stage, such as material records, control packages, evidence anchors, structured test question records, and verification records. Each processing unit exchanges information according to a predetermined unified data model. This reduces information loss and object confusion during cross-processing unit transmission and facilitates the storage, verification, and reuse of intermediate results.
[0133] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0134] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating reading comprehension questions based on structured constraints and evidence anchoring, characterized in that, include: S1: Obtain input reading materials and task requests, standardize the input reading materials and establish a material location index, and generate material records and task records; S2: Obtain the target dimension identifier set and resource version information from the task record, and read the corresponding structured control resources from the dimension control resource library based on the target dimension identifier and resource version information; S3: Extract preset fields from the structured control resources, call preset assembly rules according to their type and combination requirements, and write the processed fields into the structured control package; S4: Based on the material record, target dimension identifier set and structured control package, extract evidence fragments from the input reading material and generate evidence anchor point identifiers, and record the position intervals to form an evidence anchor point set; S5: Input the material record, structured control package and evidence anchor set into the natural language generation model, and constrain the generation process through the structured control package to obtain the structured test question record; S6: Perform deterministic structure verification and semantic consistency verification on the structured test question record, and generate corresponding violation codes for the verification items that fail; S7: If all checks fail, determine if the current revision round is less than the maximum revision round limit; If the number is less than the limit, the return step is determined based on the return path in the violation code. After incrementing the revision round by one, only the content corresponding to the fields associated with the violation code in the return step is regenerated, and unassociated fields are frozen. If the current revision round has reached or exceeded the maximum revision round limit, automatic revision is stopped, the rejection status and violation code are recorded, and the current task is terminated. S8: After all checks are passed, perform general test quality evaluation and target dimension hit evaluation respectively; S9: Output the final structured test question record, verification record, general test question quality evaluation record, target dimension hit evaluation record, and audit log as the generated results.
2. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 1, characterized in that: The standardization process includes unifying character encoding, organizing blank symbols, and dividing paragraph structures in the input reading material; The target dimension identifier is a unique retrieval key for the assessment capability level specified by the user, used to retrieve the corresponding dimension definition and design constraints from the dimension control resource library; Each structured control resource in the dimensional control resource library includes at least: dimensional identifier, dimensional name, applicable question type, design constraints, evidence requirements, prohibition conditions, and scoring rules; The structured control package includes at least: control package identifier, target dimension identifier set, test item design constraints, evidence selection rules, prohibition conditions, result acceptance rules, structured output mode, and resource version information; The structured control package imposes constraints on the generation process through question design constraints, evidence selection rules, and prohibition conditions; The violation code includes a code identifier, issue category, triggering condition, associated fields, and return path; The structured test record includes the question stem, options, answer, explanation, scoring points, evidence anchor markers, target dimension markers, and processing status, and the answer, scoring points, or explanation content are associated with at least one evidence anchor marker; The audit log shall record at least the task identifier, material identifier, processing stage, revision round, resource version, processing status, and violation code; The verification record includes at least the verification result, the violation code, and the verification status; The general test item quality assessment is used to evaluate the quality of the statements and the reasonableness of the answers, while the target dimension hit assessment is used to evaluate the coverage of the test items to the target dimension set.
3. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 2, characterized in that, In S3, when there are multiple target dimensions, the structured control resources corresponding to each target dimension are sequentially subjected to field deduplication, compatibility check, conflict resolution and output mode solidification to assemble the structured control package. The preset assembly rules for the structured control package are expressed as follows: ; in, This represents a structured control packet for the current task; Representing the perspective of teaching knowledge Next The target dimension set of each test question generation unit; Indicates resource level; Indicates resource read mapping; This indicates a deterministic assembly, which sequentially includes field deduplication, compatibility checking, conflict resolution, and output mode fixing. Indicates the identifier for any target dimension. According to resource level Read the corresponding structured control resources.
4. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 2, characterized in that, The evidence anchor record also includes the association dimension and supporting relationship type; The support relationship type is used to indicate that the evidence anchor supports at least one of the following: the question stem, the reference answer, the answer explanation, or the scoring point.
5. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 2, characterized in that, The deterministic structure verification includes at least: mandatory field verification, field type verification, option quantity verification, answer attribution verification, and evidence location range out-of-bounds verification; The semantic consistency verification includes at least: consistency between the question stem and the answer, consistency between the answer and the explanation, validity of the target dimension constraints, semantic alignment of the evidence anchor with the answer and the explanation, and field evidence coverage verification; the field evidence coverage is calculated as follows: ; in, This represents the set of fields that require supporting evidence. For indicator functions; This represents the set of evidence anchors bound to the field. Indicates support status; The judgment condition is ; in, This refers to any field to be verified from the set of fields that require supporting evidence.
6. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 2, characterized in that, In S7, the regeneration is performed using a bounded revision method, and the bounded revision includes: When a violation code indicates incorrect evidence, return to S4 to re-extract; If the dimension is incorrect, return to S5 to regenerate; If the structure or answer is incorrect, return to S5 for targeted revision; The targeted revision uses the associated fields in the violating code as the smallest unit of modification, and freezes the unassociated fields; When returning to S4, only the violation anchor and reference relationship are updated; when returning to S5, only the violation field is updated, and S1 and S2 are not re-executed. The termination condition for the bounded revision is determined by the current round, the verification result, and the maximum round. A decision is expressed as: ; in, Automatic processing will terminate when the value equals 1.
7. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 2, characterized in that, The general test item quality assessment is used to evaluate at least one of the following: answerability, uniqueness of answer, clarity of expression, completeness of explanation, operability of scoring, or difficulty suitability; the general test item quality assessment score is calculated according to the following formula: ; in, For the first The general quality assessment score of each test item. This is a set of quality dimensions applicable to the current question type. For dimension weights, For the first Each question in the quality dimension Aggregated score on; The weights are read from the preset evaluation configuration, and the default is an equal-weight configuration, i.e. ; Each evaluation module of the general test quality evaluation outputs a level 1 to 5 evaluation and maps it to 20 to 100 points. The aggregated score of multiple modules is calculated based on module weight normalization or equal weighting.
8. The method for generating reading comprehension questions based on structured constraints and evidence anchoring according to claim 7, characterized in that, The target dimension hit evaluation includes: obtaining the predicted dimension set and comparing it with the target dimension identifier set, and calculating the accuracy of each. Recall rate and harmonic mean The calculation formula is: ; in, From the perspective of teaching knowledge; The number of target dimensions that were correctly hit; The number of dimensions that are predicted but not part of the target set; The number of unrealized dimensions in the target set; Evaluation records are saved simultaneously The original count and , , Three indicators; The predicted dimension set is obtained by the dimension determination module performing binary determination on the candidate dimensions and aggregating them according to the strict majority rule when multiple modules are involved. The strict majority rule is as follows: when multiple dimension judgment modules make judgments, if the number of modules that hit a certain dimension exceeds half of the total number of modules, then that dimension is written into the prediction dimension set. The general test item quality evaluation record and the target dimension hit evaluation record are stored separately.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the reading test question generation method of structured constraints and evidence anchoring as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the reading test question generation method with structured constraints and evidence anchoring as described in any one of claims 1 to 8.
