Question generation methods, devices, storage media, and electronic equipment
By introducing a chain-like self-checking long-chain approach and dynamic adjustment mechanism into the English exam question generation process, the problems of low accuracy and efficiency in existing technologies have been solved, achieving efficient and accurate question generation and reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CENTURY TAL EDUCATION TECH CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-26
Smart Images

Figure CN121480477B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a question generation method, apparatus, storage medium, and electronic device. Background Technology
[0002] In English exams, various question types are highly valued for assessing comprehensive thinking and language proficiency. With the emergence of automated question generation technology, leveraging the powerful generation capabilities of large-scale models, high-quality, multi-type questions can be efficiently produced. This reduces labor costs, enriches question bank resources, and provides test-takers with precise and abundant practice materials, helping them overcome preparation bottlenecks and improve their test-taking abilities. This represents an innovative solution for educational technology empowering exam preparation.
[0003] Currently, large-scale models are typically used to directly generate English exam questions. However, existing methods are prone to grammatical errors, insufficient distractors, or multiple solutions, requiring extensive manual review. This results in low accuracy and efficiency in generating English exam questions, while also increasing labor costs. Summary of the Invention
[0004] In view of this, this application provides a question generation method, apparatus, storage medium, and electronic device, which mainly improves the accuracy and generation efficiency of English test questions and reduces labor costs.
[0005] According to a first aspect of this application, a question generation method is provided, the method comprising:
[0006] Obtain English materials and types of English questions;
[0007] Based on the English materials and English question types, a large question generation model is used to generate corresponding question stems and options. When generating the question stems and options, a chain-like self-checking long-chain thinking guidance strategy guides the large question generation model.
[0008] If a failure signal is detected during the generation of the question stem or the options, a retry node is triggered. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer, and the question stem and options are regenerated using the question generation large model.
[0009] If the failure signal is not detected during the regeneration of the question stem or the options, then the English question is output based on the regenerated options and the question stem.
[0010] According to a second aspect of this application, a question generation apparatus is provided, the apparatus comprising:
[0011] The acquisition unit is used to acquire English materials and English question types;
[0012] The generation unit is used to generate corresponding question stems and options based on the English materials and English question types using a question generation model. When generating the question stems and options, the question generation model is guided by a chain-like self-checking long-chain thinking guidance strategy.
[0013] The retry unit is used to trigger a retry node if a failure signal is detected during the generation of the question stem or the options. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer, and the question stem and options are regenerated using the question generation large model.
[0014] An output unit is configured to output an English question based on the regenerated options and question stem if the failure signal is not detected during the regeneration of the question stem or options.
[0015] According to a third aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described problem generation method.
[0016] According to a fourth aspect of this application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described question generation method.
[0017] By employing the above technical solutions, this application provides a question generation method, apparatus, storage medium, and electronic device. Compared with existing technologies, this method introduces a chain-like self-checking long-chain approach to guide the question generation model during the generation of English questions. Furthermore, if an error occurs during the generation of the question stem and options, a retry node is triggered, dynamically adjusting the task template layer, the large model variable layer, and the process layer. The question stem and options are then regenerated using the large question generation model. This significantly improves the accuracy of the generated English questions. Moreover, since this application eliminates the need for extensive manual review, it increases the efficiency of English question generation and reduces labor costs.
[0018] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0020] Figure 1 A flowchart illustrating a question generation method provided in an embodiment of this application is shown;
[0021] Figure 2 This application provides a schematic diagram illustrating the English question types provided in its embodiments.
[0022] Figure 3 This illustration shows a diagram illustrating the generation of material comprehension questions provided in an embodiment of this application;
[0023] Figure 4 This illustration shows a diagram illustrating the generation of fill-in-the-blank questions based on an embodiment of this application.
[0024] Figure 5 This document illustrates a compliance testing process provided in an embodiment of this application.
[0025] Figure 6 A schematic diagram of another question generation device provided in an embodiment of this application is shown. Detailed Implementation
[0026] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0027] Existing methods are prone to grammatical errors, insufficient misleading distractors, or multiple solutions, requiring a large number of workers to work on them. This results in low accuracy and efficiency in generating English exam questions, while also increasing labor costs.
[0028] To address the aforementioned problems, embodiments of the present invention provide a question generation method, apparatus, storage medium, and electronic device, such as... Figure 1 As shown, the method includes:
[0029] Step 101: Obtain the English materials and the types of English questions.
[0030] Among them, English materials refer to articles, short passages, current affairs news, etc., used for English exam questions. English question types include material comprehension questions and material fill-in-the-blank questions. Material comprehension questions include English listening comprehension questions and English reading comprehension questions. Material fill-in-the-blank questions include cloze tests. English listening comprehension questions and English reading comprehension questions can be further divided into several specific question types, such as... Figure 2As shown, the scenarios include: notices and announcements, scene dialogues, and academic discussions. Notices and announcements specifically include questions about next steps, purpose, main idea, and implied meaning. Academic discussions specifically include questions about details, implied meaning, main idea, and rhetorical structures. Scene dialogues specifically include questions about reasons, details, inferring emotions, next steps, implied meaning, purpose, and main idea. Purpose and main idea questions are summary questions.
[0031] It should be noted that the embodiments of the present invention are mainly applicable to scenarios involving the automatic generation of English exam questions, such as generating English questions for the TOEFL Junior exam. The executing entity of the embodiments of the present invention is a device or equipment capable of generating English questions, which can be specifically located on the server side.
[0032] The overall architecture of this invention adopts a pluggable workflow engine (such as Apache Airflow, LangChain Expression Language, etc.). Based on this workflow engine, this invention breaks down the generation of English questions into nodes such as English material acquisition, question stem generation, option generation, randomization processing, and automatic verification. The nodes are connected in series through asynchronous messages or API calls.
[0033] In this process, the large model acts as the "question generator," producing a question stem based on the English materials and question types, along with an explanation of the thought process. For the option generation node, the large model generates correct and incorrect options, combining them into multiple candidate questions. For example, each candidate question may include one correct option and three incorrect options. For the randomization node, the options for each candidate question are shuffled, and the position of the correct option is recorded (i.e., which letter in AD is the correct answer). For the automatic verification node, the large model acts as the "test taker," answering multiple times in different shuffled orders. When the answer meets certain requirements, the candidate question is deemed compliant; for example, if a candidate question is answered correctly in all tests, it is considered compliant.
[0034] In this embodiment of the invention, in order to generate the question stem and options for English questions, the English material acquisition node can download some English materials from the Internet or directly obtain some English materials from the local machine as needed, which can be used as the source material for generating English questions. At the same time, it is also necessary to obtain the type of English questions to be generated by the user, for example, specifying that the type of English questions is a main idea question or a cloze test question in English listening comprehension.
[0035] Step 102: Based on the English materials and English question types, use the question generation model to generate the corresponding question stems and options.
[0036] In generating the question stem and the options, a long-chain self-checking approach is used. Chain of Thought (LCoT) guidance strategies guide the question generation model. Furthermore, the options include correct and incorrect options; for example, each question stem may correspond to one correct option and three incorrect options. This embodiment of the invention does not specifically limit the number of correct and incorrect options. The question generation model can be an LLM model, such as Deepseek v3, or other models; this embodiment of the invention does not specifically limit this.
[0037] To ensure the accuracy of the generated English questions, this embodiment of the invention introduces a chain-like self-checking long-chain reasoning guidance strategy. This strategy requires the question generation model to generate detailed intermediate reasoning steps step by step when generating the question stem and options, rather than jumping directly to the final answer. This guidance strategy enables the model to perform more coherent and in-depth logical reasoning, thereby significantly improving the accuracy and compliance of the output English questions.
[0038] When the English question type is a material comprehension question, such as Figure 3 As shown, step 102 specifically includes: determining the first task description template corresponding to the specific question type from the preset task description template library according to the specific question type involved in the material comprehension question; filling the first task description template according to the specific question type to obtain the filled task description template; inputting the filled task description template and the English material into the question generation model to generate the question stem; and generating the options using the question generation model based on the question stem and the English material.
[0039] The preset task description template library stores task description templates corresponding to different specific question types. A task description template specifically refers to a prompt, which is essentially a task description and contextual hint, guiding the large model to complete specific English question-generating tasks. Furthermore, material comprehension questions include English listening comprehension questions and English reading comprehension questions, which can be further divided into several specific question types, such as... Figure 2 As shown.
[0040] Specifically, to make the generated English questions more flexible, this embodiment of the invention uses different task description templates for different specific question types. First, task description templates for all specific question types are constructed. The template fields include question type, language level, test point, and output format. A mapping relationship exists between question types and test points. Then, the task description templates corresponding to all specific question types are stored in a preset task description template library. After obtaining the specific question type specified by the user, a task description template matching that specific question type is determined from the preset task description templates, i.e., the first task description template. Next, Workflow Engine fills in the task description template according to the specific question type to obtain the filled task description template, thereby achieving precise adaptation to different question formats such as main idea questions, detail questions, and reasoning questions. Further, the filled task description template and English materials are input into the question generation model to generate the question stem. Then, the question stem and English materials are input into the question generation model to generate the corresponding options.
[0041] This invention, through the introduction of a chain-like self-checking long-chain approach to guide the large model, ensures the accuracy of English question output. Furthermore, by implementing a node-based workflow and recording metadata for each generation, rollback, and retry, this invention facilitates quality tracking and continuous optimization. Moreover, this invention automatically matches the optimal task description template based on the question type, ensuring flexibility in question generation and enabling the generated questions to cover the patterns and scoring criteria of different question types in English exams.
[0042] When the English question type is a fill-in-the-blank question, such as Figure 4 As shown, step 102 specifically includes: obtaining the grammar points to be assessed; breaking down the grammar points to be assessed into grammar points that can be used to generate questions; configuring a second task description template based on the grammar points that can be used to generate questions; breaking down the English material into multiple sentences according to punctuation marks, and recording the multiple sentences into a corpus list; generating the question stem and the options using the question generation model based on the corpus list and the second task description template.
[0043] The second task description template is a generic prompt.
[0044] Figure 4The content within the green box details the process of generating question options. When generating options, the process first identifies the grammar points required by the official test, such as those required for the TOEFL Junior exam. These grammar points are then further refined into questionable grammar points. For example, if the official requirement is to test vocabulary usage, vocabulary usage is further refined into specific questionable grammar points such as tense usage and plural usage. Next, based on these questionable grammar points, a second task description template is configured. Simultaneously, because... Figure 4 The process primarily targets English cloze test questions, thus requiring the English materials to be processed by removing blanks to generate the corresponding question stems. Based on this, this embodiment of the invention splits the English materials into multiple sentences according to punctuation marks (such as periods), and records these sentences in a corpus list. Then, the corpus list and a second task description template are input into a large-scale question generation model for processing. The large-scale model, based on the second task description template, performs blank processing on each sentence in the corpus list to obtain the cloze test question stems. Simultaneously with generating the cloze test questions using the large-scale model, it is also necessary to generate the corresponding options for each question stem.
[0045] Furthermore, in this embodiment of the invention, when generating the question stem and options using a large question generation model based on the corpus list and the second task description template, the corpus list and the second task description template are input into the large question generation model to obtain the question stem to be detected, the options to be detected, the grammar points involved in the question stem to be detected, the grammar points involved in the options to be detected, and an identifier characterizing whether the question stem and the options to be detected are valid; a list of correct options is generated based on the options to be detected; the question stem and the options to be detected are detected based on the grammar points involved in the question stem to be detected, the grammar points involved in the options to be detected, the identifier, and the list of correct options; if the grammar points involved in the question stem to be detected are consistent with the grammar points involved in the options to be detected, the length of the list of correct options is unique, and the identifier is valid, then the question stem and the options to be detected are output as the question stem and the options, respectively.
[0046] Specifically, to ensure the compliance rate of the generated cloze test questions and options, this embodiment of the invention performs checks on the question stems and options output by the question generation model. During the process of generating question stems and options using the question generation model, in addition to outputting the question stems and options to be checked, the model also outputs the grammar points involved in the question stems and options, as well as an indicator of whether the question stems and options are valid. Correct options are recorded in a correct option list, and incorrect options are recorded in an incorrect option list. The indicator can specifically refer to the value output by the model; for example, a value of 1 indicates that the question stems and options are valid, and a value of 0 indicates that the question stems and options are invalid. This validity indicator is output by the model itself through logical reasoning, meaning that the model itself determines the validity of the generated question stems and options.
[0047] During the testing process, if the syntax points involved in the question stem and the options are consistent, the length of the correct list is unique (there is only one correct option), and the large model itself determines through logical reasoning that the generated question stem and options are error-free, then the generated question stem and options pass the test. If the syntax points involved in the question stem and the options are inconsistent, or the length of the correct list is not unique, or the large model itself determines through logical reasoning that the generated question stem and options are error-free, then the generated question stem and options fail the test. Question stems and options that pass the test will be output as qualified question stems and options.
[0048] This invention employs different question stem and option generation methods for material comprehension questions and material fill-in-the-blank questions, which can further improve the accuracy of English questions, ensure that the output English questions are more in line with the question type requirements, and greatly reduce the workload of manual review.
[0049] Step 103: If a failure signal is detected during the generation of the question stem or the option, a retry node is triggered. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer. The question stem and option are then regenerated using the question generation large model.
[0050] In this embodiment of the invention, during the process of generating question stems or options using the large question generation model, if the verification node detects failure signals such as syntax errors, multiple solutions, or unreasonable distractors, a retry node is immediately triggered. The retry node dynamically adjusts the task template layer, large model variable layer, and process layer based on the type of failure signal, and re-invokes the large model to generate question stems and options. If the regenerated question stems and options still have problems, the dynamic adjustments at the task template layer, large model variable layer, and process layer continue based on the type of failure signal. This process is repeated a preset number of times. If the generated question stems and options still have problems, they are marked as abnormal. The preset number of times can be set according to actual business needs. For example, setting the preset number to 3 times, after repeating the operation 3 times, if the generated question stems and options still have problems, they are marked as abnormal.
[0051] When dynamically adjusting the task template layer, large model variable layer, and process layer based on the type of failure signal, if it is determined that the adjustment strategies of the task template layer, large model variable layer, and process layer can be used simultaneously based on the type of failure signal, then the adjustment strategy of the task template layer is prioritized for dynamic adjustment, and the question stem and options are regenerated using the question generation large model; if the failure signal is detected during the regeneration of the question stem or options, then the adjustment strategy of the large model variable layer is used for dynamic adjustment, and the question stem and options are regenerated using the question generation large model; if the failure signal is detected during the regeneration of the question stem or options, then the adjustment strategy of the process layer is used for dynamic adjustment, and the question stem and options are continued to be generated using the question generation large model.
[0052] The types of failure signals include structured failure, semantic failure, verification instability, insufficient diversity, and runtime failure. Adjustment strategies at the task template layer include adding constraints to the task description template. Adjustment strategies at the large model variable layer include adjusting the decoding parameters of the large model for generating the problem. Adjustment strategies at the process layer include hierarchical retries and process additions.
[0053] Specifically, if it is determined that adjustment strategies of the task template layer, the large model variable layer, and the process layer can be used simultaneously based on the type of failure signal, then the adjustment strategy of the task template layer should be used first, followed by the adjustment strategy of the large model variable layer, and finally the adjustment strategy of the process layer. The above three layers are linked, but have different functions.
[0054] The adjustment strategy at the task template level refers to resolving issues with the output structure or meaning by modifying the task description template (prompt). For example, when the generated question stem or options have structural inconsistencies, the task description template can be modified to include "output only JSON, specify schema key names, and refer to positive and negative examples," along with examples of violations and corrective versions. When the generated question stem or options have semantically unanswerable issues, the task description template can be modified to include "cite evidence sentences or paragraph indexes from the material; if no evidence is available, the question stem will be automatically deemed invalid and rewritten." When the generated question stem or options are ambiguous or contain significant clues, the task description template can be constrained to ensure consistency in length, sentence structure, and parts of speech, and a phrase indicating the "distinguishing factor" can be provided for automatic review.
[0055] The adjustment strategy for the large model variable layer refers to improving the stability and diversity of questions by modifying parameters without changing the task definition. For example, when the generated question stems or options are structurally sensitive, the decoding parameters of the large model are adjusted, i.e., the temperature is reduced by 0.1–0.3, the n-best value is increased by 3–5, and the max_tokens value is relaxed; when the generated question stems or options do not meet the diversity requirements, the decoding parameters of the large model are adjusted, i.e., the temperature is moderated by 0.5–0.7, the top_p value is moderately increased, and multiple candidate questions are generated before selecting the best one; when the generated question stems or options are unstable in verification, the number of shuffling and retries is increased.
[0056] The process layer adjustment strategy includes hierarchical retry and process addition. It is activated when the adjustment strategies at the task template layer and the large model variable layer fail to solve the problem. Hierarchical retry means to regenerate the options first, and if it is still unstable, rewrite the question stem. Finally, switch the task description template. Process addition means to add "JSON repair reply", "evidence consistency verification" and "similarity deduplication" as strong constraint checkpoints.
[0057] In specific application scenarios, when failure signals such as parsing errors, missing keys, or text contamination are detected, the type of failure signal is determined to be a structured failure. At this time, adjustment strategies can be adopted at the task template layer, the large model variable layer, and the process layer. Specifically, when making adjustments, it is advisable to first add "Output is only in JSON format, refer to positive and negative examples" to the task description template. If the question stem and options regenerated by the question generation large model still have problems after adjustment, then modify the decoding parameters of the question generation large model, such as reducing the temperature, increasing `n`, and increasing `max_tokens`. If the question stem and options generated by the question generation large model still have problems after further adjustments, then take the previously problematic question stem and option generation results as a REG long text and communicate with the question generation large model to make it repair the long text into valid JSON.
[0058] When failure signals such as missing evidence or reliance on external knowledge are detected, the type of failure signal is identified as semantic failure. Adjustment strategies at the task template and process layers can be employed. Specifically, the task description template can be prioritized to require "citing evidence sentences or paragraph indexes from the materials; if no evidence is available, the question stem is automatically deemed invalid and rewritten." If the regenerated question stem and options from the large-scale question generation model still have issues after adjustment, an "evidence consistency check" should be added to the process. When failure signals where multiple shuffling attempts fail to consistently yield the correct answer are detected, the type of failure signal is identified as verification instability. Adjustment strategies at the large-scale model variable and process layers can be employed. Specifically, the number of shuffling and retries can be prioritized. If the regenerated question stem and options from the large-scale question generation model still have issues after adjustment, the question stem should be rewritten. When failure signals where the question stem or options are highly similar to historical samples are detected, the type of failure signal is identified as insufficient diversity. Adjustment strategies at the process layer can be employed. Specifically, a similarity filtering and deduplication process can be added. When failure signals such as timeout, missing fields in materials, or interface failure are detected, the type of failure signal is determined to be a running failure. At this time, dynamic adjustments can be made by using methods such as exponential backoff and cut-out, material downgrading, and segmented material processing.
[0059] This invention, through the detection of failure signals, employs corresponding adjustment strategies at the task template layer, large model variable layer, and process layer to ensure the success rate of retry nodes, thereby improving the accuracy of generated English questions.
[0060] Step 104: If the failure signal is not detected during the regeneration of the question stem or the options, then output the English question based on the regenerated options and the question stem.
[0061] In this embodiment of the invention, if the regenerated question stem and options at the retry node are problem-free, the regenerated options and question stem can be combined into multiple candidate questions. By performing compliance checks on these candidate questions and outputting the final English question based on the compliance check results, it can be ensured that the generated English question better meets exam requirements and has high accuracy, eliminating the need for manual review. Regarding the above compliance check process, as... Figure 5 As shown, the method specifically includes:
[0062] Step 1041: Generate multiple candidate questions based on the regenerated options and the question stem.
[0063] For example, the question generation model outputs two question stems, two correct options, and six incorrect options, which are then combined into two candidate questions.
[0064] Step 1042: Perform compliance checks on each of the multiple candidate questions and output the English question based on the compliance check results.
[0065] In this embodiment of the invention, during compliance testing, for any one of the multiple candidate questions, the position of the correct option is continuously changed, and the question generation model is used to answer the question. If the answer output by the question generation model meets the preset requirements, then any one of the candidate questions is output as the English question. If the answer output by the question generation model does not meet the preset requirements, then any one of the candidate questions is excluded.
[0066] The preset requirements can be set according to actual business needs.
[0067] For example, after continuously changing the position of the correct option, if the large model can make the correct choice every time, the candidate question is output as a qualified English question; if the large model fails to make the correct choice at any time, the candidate question is discarded.
[0068] This invention improves the accuracy and compliance rate of English questions by adding compliance verification nodes to perform compliance checks on candidate questions. Furthermore, this invention transforms compliance verification into a stability assessment task solvable by a large model, significantly reducing the workload of manual review.
[0069] Furthermore, as Figure 1 and Figure 5 The specific implementation of the method shown in this embodiment provides a question generation device, such as... Figure 6 As shown, the device includes: an acquisition unit 31, a generation unit 32, a retry unit 33, and an output unit 34.
[0070] The acquisition unit 31 can be used to acquire English materials and English question types.
[0071] The generation unit 32 can be used to generate corresponding question stems and options based on the English materials and English question types using a question generation model. When generating the question stems and options, the question generation model is guided by a chain-like self-checking long-chain thinking guidance strategy.
[0072] The retry unit 33 can be used to trigger a retry node if a failure signal is detected during the generation of the question stem or the option. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer, and the question stem and option are regenerated using the question generation large model.
[0073] The output unit 34 can be used to output an English question based on the regenerated options and the question stem if the failure signal is not detected during the process of regenerating the question stem or the options.
[0074] In some embodiments, when the English question type is a material comprehension question, the generation unit 32 can be specifically used to determine, according to the specific question type involved in the material comprehension question, a first task description template corresponding to the specific question type from a preset task description template library, wherein the preset task description template library stores task description templates corresponding to different specific question types; fill in the first task description template according to the specific question type to obtain a filled task description template; input the filled task description template and the English material into the question generation model to generate the question stem; and generate the options using the question generation model based on the question stem and the English material.
[0075] In some embodiments, when the English question type is a fill-in-the-blank question, the generation unit 32 includes an acquisition module, a splitting module, a configuration module, and a first generation module.
[0076] The acquisition module can be used to acquire the syntax points that need to be assessed.
[0077] The splitting module can be used to split the required grammar points into grammar points that can be used to generate questions.
[0078] The configuration module can be used to configure a second task description template based on the grammar points that can be used to generate questions.
[0079] The splitting module can also be used to split the English material into multiple sentences according to punctuation marks, and record the split sentences into a corpus list.
[0080] The first generation module can be used to generate the question stem and the options based on the corpus list and the second task description template using the question generation model.
[0081] In some embodiments, the first generation module may be specifically used to input the corpus list and the second task description template into the question generation model to obtain the question stem to be detected, the option to be detected, the grammar points involved in the question stem to be detected and the grammar points involved in the option to be detected, and an identifier representing whether the question stem to be detected and the option to be detected are valid; generate a list of correct options based on the option to be detected; detect the question stem to be detected and the option to be detected based on the grammar points involved in the question stem to be detected, the grammar points involved in the option to be detected, the identifier, and the list of correct options; if the grammar points involved in the question stem to be detected are consistent with the grammar points involved in the option to be detected, the length of the list of correct options is unique, and the identifier is valid, then output the question stem to be detected and the option to be detected as the question stem and the option, respectively.
[0082] In some embodiments, the retry unit 33 may be specifically configured to: if, based on the type of the failure signal, it is determined that the adjustment strategies of the task template layer, the large model variable layer, and the process layer can be used simultaneously, then prioritize the adjustment strategy of the task template layer for dynamic adjustment, and regenerate the question stem and options using the question generation large model; if the failure signal is detected during the regeneration of the question stem or the options, then dynamically adjust using the adjustment strategy of the large model variable layer, and regenerate the question stem and options using the question generation large model; if the failure signal is detected during the regeneration of the question stem or the options, then dynamically adjust using the adjustment strategy of the process layer, and continue to generate the question stem and options using the question generation large model.
[0083] In some embodiments, the types of failure signals include structured failure, semantic failure, verification instability, insufficient diversity, and runtime failure; the adjustment strategy of the task template layer includes adding constraints to the task description template; the adjustment strategy of the large model variable layer includes adjusting the decoding parameters of the large model for generating questions; and the adjustment strategy of the process layer includes hierarchical retries and process additions.
[0084] In some embodiments, the output unit 34 includes a second generation module and a detection module.
[0085] The second generation module can be used to generate multiple candidate questions based on the regenerated options and the question stem.
[0086] The detection module can be used to perform compliance checks on each of the multiple candidate questions and output the English question based on the compliance check results.
[0087] In some embodiments, the detection module may be specifically used to continuously change the position of the correct option for any one of the plurality of candidate questions, and use the question generation model to answer; if the answer output by the question generation model meets the preset requirements, then any one of the candidate questions is output as the English question; if the answer output by the question generation model does not meet the preset requirements, then any one of the candidate questions is excluded.
[0088] It should be noted that other corresponding descriptions of the functional units involved in the question generation device provided in this embodiment of the invention can be found in [reference]. Figure 1 and Figure 5 The corresponding descriptions in [the document] will not be repeated here.
[0089] Based on the above, Figure 1 and Figure 5 Accordingly, this embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method. Figure 1 and Figure 5 The question generation method shown.
[0090] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause an electronic device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0091] Based on the above, Figure 1 and Figure 5 The method shown, and Figure 6 To achieve the above objectives, the present application also provides an electronic device, specifically a personal computer, tablet computer, server, or other network device, as shown in the virtual device embodiment. This device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figure 1 and Figure 5 The question generation method shown.
[0092] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0093] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0094] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.
[0096] This invention introduces a chain-like self-checking long-chain approach to guide the generation of English questions using a large question generation model. Simultaneously, if an error occurs during the generation of the question stem and options, a retry node is triggered, dynamically adjusting the task template layer, the large model variable layer, and the process layer. The question stem and options are then regenerated using the large question generation model. This significantly improves the accuracy of the generated English questions. Furthermore, since this application eliminates the need for extensive manual review, it increases the efficiency of English question generation and reduces labor costs.
[0097] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0098] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for generating questions, characterized in that, include: Obtain English materials and types of English questions; Based on the English materials and English question types, a large question generation model is used to generate corresponding question stems and options. When generating the question stems and options, a chain-like self-checking long-chain thinking guidance strategy guides the large question generation model. If a failure signal is detected during the generation of the question stem or the options, a retry node is triggered. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer. The question stem and options are then regenerated using the question generation large model. The adjustment strategy at the process layer includes hierarchical retries and process additions. When at least one of the following signals is detected—parsing error, missing key, or text interference—the type of failure signal is determined to be a structured failure. The adjustment strategies at the task template layer, the large model variable layer, and the process layer are then applied. During adjustment, the task description template at the task template layer is prioritized to add an output format of only JSON. Referencing positive and negative examples, if the regenerated question stem and options still have problems after adjustment, the decoding parameters of the question generation large model in the large model variable layer are modified. If the regenerated question stem and options still have problems after further adjustment, the previously problematic question stem and options are generated as a REG long text in the process layer and interact with the question generation large model to process the REG long text. This fix uses valid JSON. When at least one of the following signals is detected: no evidence material found, or the answer relies on external knowledge, the failure signal is determined to be a semantic failure. Adjustment strategies at the task template layer and process layer are adopted. During adjustment, the task description template at the task template layer prioritizes requiring the citation of evidence sentences or paragraph indexes from the material. If no evidence is found, the question stem is automatically deemed invalid and rewritten. If the regenerated question stem and options still have problems after adjustment, an evidence consistency verification process is added at the process layer. When a signal is detected that multiple scrambling attempts fail to consistently select the correct answer, the failure signal is determined to be verification instability. Adjustment strategies at the large model variable layer and process layer are adopted. During adjustment, the number of scrambling and retries is increased at the large model variable layer. If the regenerated question stem and options still have problems after adjustment, the question stem is rewritten at the process layer. When a signal is detected that the question stem or options are highly similar to historical samples, the failure signal is determined to be insufficient diversity. Adjustment strategies at the process layer are adopted. During adjustment, a similarity filtering and deduplication process is added. If the failure signal is not detected during the regeneration of the question stem or the options, then the English question is output based on the regenerated options and the question stem. Based on a node-based workflow, metadata is recorded for each build, rollback, and retrieval to facilitate quality tracking and continuous optimization.
2. The method according to claim 1, characterized in that, When the English question type is a material comprehension question, the step of generating corresponding question stems and options based on the English material and the English question type using a large question generation model includes: Based on the specific question type involved in the material comprehension question, a first task description template corresponding to the specific question type is determined from the preset task description template library, wherein the preset task description template library stores task description templates corresponding to different specific question types; Based on the specific question type, the first task description template is filled in to obtain the filled task description template; The filled-in task description template and the English materials are input into the question generation model to generate the question stem; Based on the question stem and the English material, the options are generated using the question generation model.
3. The method according to claim 1, characterized in that, When the English question type is a fill-in-the-blank question, the process of generating corresponding question stems and options based on the English material and the English question type using a large question generation model includes: Obtain the grammar points required for the assessment; The grammar points to be tested are broken down into grammar points that can be used to generate questions; Configure the second task description template based on the grammar points that can be used to generate questions; The English material is split into multiple sentences according to punctuation marks, and the split sentences are recorded in the corpus list; Based on the corpus list and the second task description template, the question stem and the options are generated using the question generation model.
4. The method according to claim 3, characterized in that, The step of generating the question stem and the options using the question generation model based on the corpus list and the second task description template includes: The corpus list and the second task description template are input into the question generation model to obtain the question stem to be detected, the option to be detected, the grammar points involved in the question stem to be detected and the grammar points involved in the option to be detected, as well as the identifiers that characterize whether the question stem to be detected and the option to be detected are valid. Based on the options to be tested, generate a list of correct options; The question stem and the options to be tested are tested based on the grammar points involved in the question stem and the options to be tested, the identifier, and the list of correct options. If the syntax points involved in the question stem to be tested are the same as those involved in the option to be tested, the length of the correct option list is unique, and the identifier is valid, then the question stem to be tested and the option to be tested will be output as the question stem and the option, respectively.
5. The method according to claim 1, characterized in that, The dynamic adjustment based on the type of failure signal at the task template layer, large model variable layer, and process layer includes: If, based on the type of the failure signal, it is determined that the adjustment strategies of the task template layer, the large model variable layer, and the process layer can be used simultaneously, then the adjustment strategy of the task template layer shall be used first for dynamic adjustment, and the question stem and options shall be regenerated using the question generation large model. If the failure signal is detected during the regeneration of the question stem or the options, the adjustment strategy of the large model variable layer is used for dynamic adjustment, and the question stem and options are regenerated using the question generation large model. If the failure signal is detected during the regeneration of the question stem or the options, the adjustment strategy of the process layer is adopted for dynamic adjustment, and the question generation model is used to continue generating the question stem and options.
6. The method according to claim 5, characterized in that, The types of failure signals include structured failure, semantic failure, verification instability, insufficient diversity, and runtime failure; the adjustment strategy for the task template layer includes adding constraints to the task description template; the adjustment strategy for the large model variable layer includes adjusting the decoding parameters of the large model for generating questions; and the adjustment strategy for the process layer includes hierarchical retries and process additions.
7. The method according to claim 1, characterized in that, The process of outputting English questions based on the regenerated options and the question stem includes: Based on the regenerated options and the question stem, multiple candidate questions are generated; Perform compliance checks on each of the multiple candidate questions, and output the English question based on the compliance check results.
8. The method according to claim 7, characterized in that, The process of performing compliance checks on each of the plurality of candidate questions and outputting the English question based on the compliance check results includes: For any one of the multiple candidate questions, the position of the correct option is continuously changed, and a large model is generated using the question to provide an answer. If the answer output by the large model for generating the question meets the preset requirements, then any one of the candidate questions will be output as the English question. If the answer output by the large model for generating the question does not meet the preset requirements, then any of the candidate questions will be excluded.
9. A question generation device, characterized in that, include: The acquisition unit is used to acquire English materials and English question types; The generation unit is used to generate corresponding question stems and options based on the English materials and English question types using a question generation model. When generating the question stems and options, the question generation model is guided by a chain-like self-checking long-chain thinking guidance strategy. A retry unit is used to trigger a retry node if a failure signal is detected during the generation of the question stem or the options. Based on the type of the failure signal, dynamic adjustments are made at the task template layer, the large model variable layer, and the process layer. The question stem and options are then regenerated using the question generation large model. The adjustment strategy at the process layer includes hierarchical retry and process addition. When at least one of the following signals is detected—parsing error, missing key, or text interference—the type of failure signal is determined to be a structured failure. The adjustment strategy at the task template layer, the large model variable layer, and the process layer is then adopted. During adjustment, the task description template at the task template layer is prioritized to add an output format of only JSON. Referring to positive and negative examples, if the regenerated question stem and options still have problems after adjustment, the decoding parameters of the question generation large model in the large model variable layer are modified. If the regenerated question stem and options still have problems after further adjustment, the previously problematic question stem and option generation results are treated as REG long text in the process layer and interact with the question generation large model to make it read the REG text. EG long text is repaired to be valid JSON; when at least one of the following signals is detected: no evidence material is found, or the answer depends on external knowledge, the type of the failure signal is determined to be semantic failure. Adjustment strategies at the task template layer and process layer are adopted. During adjustment, the task description template at the task template layer is prioritized to require the citation of evidence sentences or paragraph indexes from the material. If no evidence is found, the question stem is automatically deemed invalid and rewritten. If the regenerated question stem and options still have problems after adjustment, an evidence consistency verification process is added at the process layer. When a signal is detected that multiple scrambling attempts cannot consistently yield the correct answer, the type of the failure signal is determined to be verification instability. Adjustment strategies at the large model variable layer and process layer are adopted. During adjustment, the number of scrambling and retries is prioritized at the large model variable layer. If the regenerated question stem and options still have problems after adjustment, the question stem is rewritten at the process layer. When a signal is detected that the question stem or options are highly similar to historical samples, the type of the failure signal is determined to be insufficient diversity. Adjustment strategies at the process layer are adopted. During adjustment, a similarity filtering and deduplication process is added. An output unit is configured to output an English question based on the regenerated options and question stem if the failure signal is not detected during the regeneration of the question stem or options. Recording units are used for node-based workflows, which record metadata for each build, rollback, and retrieval to facilitate quality tracking and continuous optimization.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.
11. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.