A method and terminal for automatically generating test papers

By extracting knowledge and retrieving vector databases in the test paper generation system, combined with large language models and quality assessment, the problem of uncontrollable quality and difficulty of test paper generation is solved, and efficient and accurate automatic test paper generation is achieved.

CN118313467BActive Publication Date: 2026-01-30FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410362912.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2026-01-30
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing test paper generation systems suffer from problems such as uncontrollable generation quality, unadjustable difficulty, and lack of in-depth knowledge in professional fields.

Method used

By receiving user input information, knowledge is extracted, test question samples are retrieved using a pre-set vector database, and test questions that meet the pre-set requirements are generated in a large language model. Combined with correctness and overall quality assessment, a test paper is generated.

Benefits of technology

It improves the quality and efficiency of test paper generation, accurately controls the difficulty of test papers, reduces manual intervention, and ensures that the generated test papers meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118313467B_ABST
    Figure CN118313467B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic test paper generation method and terminal. First, knowledge is extracted from the user's input information to obtain knowledge points. These knowledge points are then used to retrieve test question samples from a preset vector database. The test question samples are then input into a large language model, which outputs multiple test questions of different difficulties and types. Test questions that meet preset requirements are selected from these multiple questions and input back into the large language model to generate the test paper. These preset requirements include difficulty and type requirements. This method utilizes retrieval-enhanced generation technology to automatically generate test papers, greatly reducing the need for manual intervention and overcoming the shortcomings of large language models in terms of uncontrollable quality and difficulty. This effectively improves the quality and efficiency of test paper generation while accurately controlling the difficulty of the test papers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic test paper generation technology, and in particular to a method and terminal for automatically generating test papers. Background Technology

[0002] In the field of education, test paper generation is an important but tedious task. Traditional test paper generation methods often rely on manual operations by teachers, which is not only inefficient but also makes it difficult to guarantee the quality of the test papers.

[0003] In recent years, with the development of computer technology, some automatic test paper generation systems have begun to emerge, including:

[0004] 1) Rule-based test paper generation system. This type of system generates test papers based on a set of predefined rules. Rules may include question type (multiple choice, fill-in-the-blank, short answer, etc.), difficulty level, knowledge point coverage, etc. Teachers or test creators can set these parameters, and the system automatically selects questions that meet the conditions from the question bank.

[0005] 2) Intelligent algorithm generation. In recent years, test paper generation systems using artificial intelligence technologies, especially machine learning and natural language processing, have begun to emerge. These systems can intelligently recommend or generate test papers based on historical data and students' learning progress.

[0006] The two systems mentioned above primarily focus on test paper generation technology, using existing question banks to generate test papers. However, with the development of large-scale modeling technology, systems for automatic question generation and the creation of test papers using generated questions have begun to emerge.

[0007] However, using large models to automatically generate test questions and create test papers still has the following drawbacks:

[0008] Disadvantage 1: Due to the limitations of large model technology, there may be illusions, that is, due to the lack of relevant knowledge or internalization of incorrect knowledge in the training data, the large model may introduce incorrect information when generating test papers, resulting in uncontrollable quality of generated questions and test papers.

[0009] Disadvantage 2: Adjusting the difficulty level of questions is usually quite difficult. Existing systems may not be able to finely adjust the difficulty of generated questions, thus failing to control the overall difficulty of the entire paper to meet the needs of different student groups.

[0010] Disadvantage 3: Due to limitations in large-scale model technology and data, the generated test papers lack in-depth knowledge of professional fields. Summary of the Invention

[0011] The technical problem to be solved by the present invention is to provide an automatic test paper generation method and terminal, which can effectively improve the quality and efficiency of test paper generation, while accurately controlling the difficulty of the test paper.

[0012] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0013] A method for automatically generating exam papers, comprising the following steps:

[0014] Receive user input information and extract knowledge from the input information to obtain knowledge points;

[0015] The knowledge points are used to search a preset vector database to obtain sample test questions.

[0016] The test sample is input into the large language model, which outputs multiple test questions of different difficulty and type.

[0017] From the multiple test questions of different difficulty and type, test questions that meet the preset requirements are selected and input into the large language model to generate a test paper. The preset requirements include difficulty requirements and type requirements.

[0018] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:

[0019] An automatic test paper generation terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0020] Receive user input information and extract knowledge from the input information to obtain knowledge points;

[0021] The knowledge points are used to search a preset vector database to obtain sample test questions.

[0022] The test sample is input into the large language model, which outputs multiple test questions of different difficulty and type.

[0023] From the multiple test questions of different difficulty and type, test questions that meet the preset requirements are selected and input into the large language model to generate a test paper. The preset requirements include difficulty requirements and type requirements.

[0024] The beneficial effects of this invention are as follows: First, knowledge is extracted from the user's input information to obtain knowledge points. Then, the knowledge points are used to retrieve test questions from a preset vector database. Next, the test questions are input into a large language model, which outputs multiple test questions of different difficulties and types. From these multiple test questions of different difficulties and types, test questions that meet the preset difficulty and type requirements are selected and input into the large language model to generate a test paper. This method uses retrieval-enhanced generation technology to automatically generate test papers, greatly reducing the need for manual intervention and overcoming the shortcomings of large language models in terms of uncontrollable quality and difficulty. This effectively improves the quality and efficiency of test paper generation while accurately controlling the difficulty of the test paper. Attached Figure Description

[0025] Figure 1 This is a flowchart illustrating the steps of an automatic test paper generation method according to an embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of the structure of an automatic test paper generation terminal according to an embodiment of the present invention;

[0027] Figure 3 This is a flowchart illustrating the automatic test paper generation method according to an embodiment of the present invention. Detailed Implementation

[0028] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0029] Please refer to Figure 1 A method for automatically generating exam papers, comprising the following steps:

[0030] Receive user input information and extract knowledge from the input information to obtain knowledge points;

[0031] The knowledge points are used to search a preset vector database to obtain sample test questions.

[0032] The test sample is input into the large language model, which outputs multiple test questions of different difficulty and type.

[0033] From the multiple test questions of different difficulty and type, test questions that meet the preset requirements are selected and input into the large language model to generate a test paper. The preset requirements include difficulty requirements and type requirements.

[0034] As can be seen from the above description, the beneficial effects of the present invention are as follows: First, knowledge is extracted from the user's input information to obtain knowledge points. Then, the knowledge points are used to retrieve test questions from a preset vector database. Next, the test questions are input into a large language model, which outputs multiple test questions of different difficulties and types. Test questions that meet the preset difficulty and type requirements are selected from the multiple test questions of different difficulties and types and input into the large language model to generate test papers. In this way, the test papers are automatically generated using retrieval-enhanced generation technology, which greatly reduces the need for manual intervention and overcomes the shortcomings of uncontrollable quality and difficulty of large language models. This effectively improves the quality and efficiency of test paper generation while accurately controlling the difficulty of the test papers.

[0035] Furthermore, before receiving the user's input information, the process also includes:

[0036] The preset question bank is analyzed to obtain the knowledge points corresponding to each question in the preset question bank, and the difficulty level of the question is marked.

[0037] The knowledge points are vectorized using Embedding technology to obtain vectorized knowledge points.

[0038] Using the vectorized knowledge points as keys and the questions and difficulty levels as values, key-value pairs are obtained;

[0039] A preset vector database is generated based on all the key-value pairs;

[0040] The process of using the knowledge points to retrieve test sample questions from a preset vector database includes:

[0041] The knowledge points are transformed into high-dimensional vector representations using Embedding technology, and these high-dimensional vector representations are used as queries to retrieve data from the preset vector database, obtaining the corresponding values ​​as test question samples.

[0042] As described above, knowledge points are vectorized using Embedding technology and stored in a preset vector database, facilitating quick retrieval of knowledge points later.

[0043] Furthermore, after inputting the test sample into the large language model and outputting multiple test questions of different difficulties and types, the process further includes:

[0044] The correctness of the multiple test questions of different difficulty and type is evaluated to obtain the evaluation results;

[0045] Determine whether the evaluation result is passed. If not, feed back the failed questions to the large language model and return to the process of inputting the question sample into the large language model and outputting multiple questions of different difficulty and type until the evaluation result is passed.

[0046] As described above, after generating multiple test questions of different difficulty and type, their correctness is evaluated to ensure the quality of the generated test questions, thereby improving the quality of the final test paper.

[0047] Furthermore, after selecting questions that meet preset requirements from the multiple questions of different difficulties and types and inputting them into the large language model to generate the test paper, the process also includes:

[0048] An overall quality assessment of the test papers was conducted, and the assessment results were obtained.

[0049] Determine whether the evaluation result is passed. If not, the failed test paper is fed back to the large language model, and the process of selecting test questions that meet the preset requirements from the multiple test questions of different difficulty and type and inputting them into the large language model to generate test papers continues until the evaluation result is passed.

[0050] As described above, after the test paper is generated, an overall quality assessment is performed. If the test paper fails, it is regenerated until the assessment result is passed. This improves the quality of the generated test paper and ensures that the generated test paper meets the user's needs.

[0051] Furthermore, it also includes:

[0052] Update the test paper to the preset vector database.

[0053] As described above, the test papers are updated to the preset vector database, and the preset vector database is continuously expanded in order to generate test papers with more reliable difficulty and quality.

[0054] Please refer to Figure 2 An automatic test paper generation terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0055] Receive user input information and extract knowledge from the input information to obtain knowledge points;

[0056] The knowledge points are used to search a preset vector database to obtain sample test questions.

[0057] The test sample is input into the large language model, which outputs multiple test questions of different difficulty and type.

[0058] From the multiple test questions of different difficulty and type, test questions that meet the preset requirements are selected and input into the large language model to generate a test paper. The preset requirements include difficulty requirements and type requirements.

[0059] As can be seen from the above description, the beneficial effects of the present invention are as follows: First, knowledge is extracted from the user's input information to obtain knowledge points. Then, the knowledge points are used to retrieve test questions from a preset vector database. Next, the test questions are input into a large language model, which outputs multiple test questions of different difficulties and types. Test questions that meet the preset difficulty and type requirements are selected from the multiple test questions of different difficulties and types and input into the large language model to generate test papers. In this way, the test papers are automatically generated using retrieval-enhanced generation technology, which greatly reduces the need for manual intervention and overcomes the shortcomings of uncontrollable quality and difficulty of large language models. This effectively improves the quality and efficiency of test paper generation while accurately controlling the difficulty of the test papers.

[0060] Furthermore, before receiving the user's input information, the process also includes:

[0061] The preset question bank is analyzed to obtain the knowledge points corresponding to each question in the preset question bank, and the difficulty level of the question is marked.

[0062] The knowledge points are vectorized using Embedding technology to obtain vectorized knowledge points.

[0063] Using the vectorized knowledge points as keys and the questions and difficulty levels as values, key-value pairs are obtained;

[0064] A preset vector database is generated based on all the key-value pairs;

[0065] The process of using the knowledge points to retrieve test sample questions from a preset vector database includes:

[0066] The knowledge points are transformed into high-dimensional vector representations using Embedding technology, and these high-dimensional vector representations are used as queries to retrieve data from the preset vector database, obtaining the corresponding values ​​as test question samples.

[0067] As described above, knowledge points are vectorized using Embedding technology and stored in a preset vector database, facilitating quick retrieval of knowledge points later.

[0068] Furthermore, after inputting the test sample into the large language model and outputting multiple test questions of different difficulties and types, the process further includes:

[0069] The correctness of the multiple test questions of different difficulty and type is evaluated to obtain the evaluation results;

[0070] Determine whether the evaluation result is passed. If not, feed back the failed questions to the large language model and return to the process of inputting the question sample into the large language model and outputting multiple questions of different difficulty and type until the evaluation result is passed.

[0071] As described above, after generating multiple test questions of different difficulty and type, their correctness is evaluated to ensure the quality of the generated test questions, thereby improving the quality of the final test paper.

[0072] Furthermore, after selecting questions that meet preset requirements from the multiple questions of different difficulties and types and inputting them into the large language model to generate the test paper, the process also includes:

[0073] An overall quality assessment of the test papers was conducted, and the assessment results were obtained.

[0074] Determine whether the evaluation result is passed. If not, the failed test paper is fed back to the large language model, and the process of selecting test questions that meet the preset requirements from the multiple test questions of different difficulty and type and inputting them into the large language model to generate test papers continues until the evaluation result is passed.

[0075] As described above, after the test paper is generated, an overall quality assessment is performed. If the test paper fails, it is regenerated until the assessment result is passed. This improves the quality of the generated test paper and ensures that the generated test paper meets the user's needs.

[0076] Furthermore, it also includes:

[0077] Update the test paper to the preset vector database.

[0078] As described above, the test papers are updated to the preset vector database, and the preset vector database is continuously expanded in order to generate test papers with more reliable difficulty and quality.

[0079] The above-described method and terminal for automatically generating test papers according to the present invention can be applied to scenarios that require the generation of test papers. The following is a detailed description of the specific implementation method:

[0080] Please refer to Figure 1 and Figure 3 Embodiment 1 of the present invention is as follows:

[0081] A method for automatically generating exam papers, comprising the following steps:

[0082] S1. Analyze the preset question bank to obtain the knowledge points corresponding to each question in the preset question bank, and mark the difficulty level of the question.

[0083] S2. Use Embedding technology to vectorize the knowledge points to obtain vectorized knowledge points.

[0084] S3. Use the vectorized knowledge points as keys and the questions and difficulty levels as values ​​to obtain key-value pairs.

[0085] S4. Generate a preset vector database based on all the key-value pairs, such as... Figure 3 As shown.

[0086] S1-S3 can be completed offline.

[0087] S5. Receive user input information and extract knowledge from the input information to obtain knowledge points.

[0088] In one optional implementation, the input information includes courseware content, test papers, or specified knowledge points.

[0089] In one alternative implementation, a large language model is used to extract knowledge from the input information to obtain knowledge points.

[0090] S6. Using the aforementioned knowledge points, a search is performed in a preset vector database to obtain sample test questions, such as... Figure 3 As shown;

[0091] Specifically, the knowledge points are transformed into high-dimensional vector representations using Embedding technology, and these high-dimensional vector representations are used as queries to retrieve data from the preset vector database, obtaining the corresponding values ​​as test question samples.

[0092] S7. Input the test sample into the large language model and output multiple test questions of different difficulty and type.

[0093] S8. Evaluate the correctness of the multiple test questions of different difficulties and types, and obtain the evaluation results, such as... Figure 3 As shown.

[0094] S9. Determine whether the evaluation result is passed. If not, feed back the failed test questions to the large language model and return to execute S7 until the evaluation result is passed.

[0095] For example, failed questions are fed back to the large language model, which then deletes the failed questions and generates new questions.

[0096] S10. Select questions that meet the preset requirements from the multiple questions of different difficulty and type, input them into the large language model, and generate the test paper.

[0097] The preset requirements include difficulty requirements and type requirements, which are determined by the user in advance.

[0098] S11. Conduct an overall quality assessment of the test paper and obtain the assessment results.

[0099] Specifically, the test paper is evaluated as a whole according to the preset evaluation rules corresponding to the test paper, and the evaluation results are obtained.

[0100] The overall quality assessment includes the distribution of test question difficulty, coverage of knowledge points, and rationality of test paper structure. The preset assessment rules are set according to different assessment objects, such as assessment rules for primary school English test papers, assessment rules for high school English test papers, and assessment rules for primary school mathematics test papers.

[0101] S12. Determine whether the evaluation result is passed. If not, send the failed test paper back to the large language model and return to execute S10 until the evaluation result is passed.

[0102] S13. Update the test paper to the preset vector database.

[0103] Specifically, the test paper is added to the preset question bank; each question in the test paper is analyzed to obtain the knowledge points corresponding to each question, and the difficulty level of each question is marked; then, the knowledge points are vectorized using Embedding technology to obtain vectorized knowledge points; the vectorized knowledge points are used as keys, and the question and the difficulty level are used as values ​​to obtain key-value pairs; the key-value pairs are added to the preset vector database.

[0104] The Retrieval-Augmented Generation (RAG) technology used in this invention not only efficiently utilizes external resources such as documents, structured or unstructured databases, but also directly updates its retrieval knowledge base, making it particularly suitable for application in dynamically changing data environments. Compared with other algorithms, it has relatively lower requirements for data processing, greatly simplifying the data preprocessing process and reducing reliance on high-quality, large-scale training data. Furthermore, when RAG retrieves information from multiple data sources, it can typically trace back to the answer from a specific data source, providing users with a higher level of interpretability and traceability. Using RAG technology for exam paper generation makes the generation process both automated and efficient, greatly reducing the need for manual intervention and significantly improving work efficiency. Educators can generate a large number of high-quality exam papers more quickly, allowing them to devote more time and energy to teaching and student guidance. Moreover, to ensure the high quality of each exam paper, a quality assessment is introduced, enabling a comprehensive quality check of each exam paper after generation, further improving the overall quality of the exam papers.

[0105] Please refer to Figure 2 Embodiment two of the present invention is as follows:

[0106] An automatic test paper generation terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the automatic test paper generation method in Embodiment 1.

[0107] In summary, the automatic test paper generation method and terminal provided by this invention first extracts knowledge from the user's input information to obtain knowledge points. These knowledge points are then used to retrieve test question samples from a preset vector database. The test question samples are then input into a large language model, which outputs multiple test questions of different difficulties and types. From these multiple test questions, those meeting preset requirements are selected and input back into the large language model to generate the test paper. These preset requirements include difficulty and type requirements. This method utilizes retrieval-enhanced generation technology to automatically generate test papers, significantly reducing the need for manual intervention and overcoming the shortcomings of large language models in terms of uncontrollable quality and difficulty. This effectively improves the quality and efficiency of test paper generation while accurately controlling the difficulty of the test papers. Furthermore, after generating multiple test questions of different difficulties and types, their correctness is evaluated to ensure the quality of the generated test questions, thereby improving the quality of the final test paper. Finally, an overall quality evaluation is performed on the generated test paper. If a test paper fails, it is regenerated until the evaluation result is satisfactory, thus improving the quality of the generated test paper and ensuring that it meets the user's needs.

[0108] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A test paper automatic generation method characterized by comprising: The method comprises the steps of: receiving input information of a user, and performing knowledge extraction on the input information to obtain a knowledge point; performing retrieval on the knowledge point in a preset vector database to obtain a test question sample; inputting the test question sample into a large language model to output a plurality of test questions of different difficulties and types; selecting a test question meeting a preset requirement from the plurality of test questions of different difficulties and types, inputting the test question into the large language model, and generating a test paper, wherein the preset requirement comprises a difficulty requirement and a type requirement; before the receiving input information of a user, the method further comprises the steps of: analyzing a preset question bank to obtain a knowledge point corresponding to each question in the preset question bank, and labeling a difficulty level of the question; performing vectorization representation on the knowledge point by using an Embedding technology to obtain a vectorized knowledge point; taking the vectorized knowledge point as a key, and taking the question and the difficulty level as a value to obtain a key-value pair; generating a preset vector database according to all the key-value pairs; the performing retrieval on the knowledge point in a preset vector database to obtain a test question sample comprises the steps of: converting the knowledge point into a high-dimensional vector representation by using the Embedding technology, and performing retrieval on the high-dimensional vector representation in the preset vector database as a query to obtain a corresponding value as a test question sample; after the inputting the test question sample into a large language model to output a plurality of test questions of different difficulties and types, the method further comprises the steps of: performing correctness evaluation on the plurality of test questions of different difficulties and types to obtain an evaluation result; determining whether the evaluation result is passed, and if not, feeding back a test question not passed to the large language model, and returning to execute the inputting the test question sample into a large language model to output a plurality of test questions of different difficulties and types until the evaluation result is passed.

2. The method according to claim 1, wherein, after the selecting a test question meeting a preset requirement from the plurality of test questions of different difficulties and types, inputting the test question into the large language model, and generating a test paper, the method further comprises the steps of: performing overall quality evaluation on the test paper to obtain an evaluation result; determining whether the evaluation result is passed, and if not, feeding back a test paper not passed to the large language model, and returning to execute the selecting a test question meeting a preset requirement from the plurality of test questions of different difficulties and types, inputting the test question into the large language model, and generating a test paper until the evaluation result is passed.

3. The method according to claim 2, wherein, the method further comprises the step of: updating the test paper into the preset vector database.

4. A test paper automatic generation terminal comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, characterized in that, when the processor executes the computer program, the following steps are implemented: receiving input information of a user, and performing knowledge extraction on the input information to obtain a knowledge point; performing retrieval on the knowledge point in a preset vector database to obtain a test question sample; inputting the test question sample into a large language model to output a plurality of test questions of different difficulties and types; selecting a test question meeting a preset requirement from the plurality of test questions of different difficulties and types, inputting the test question into the large language model, and generating a test paper, wherein the preset requirement comprises a difficulty requirement and a type requirement; before the receiving input information of a user, the method further comprises the steps of: analyzing a preset question bank to obtain a knowledge point corresponding to each question in the preset question bank, and labeling a difficulty level of the question; The knowledge points are represented by vectors using an Embedding technology to obtain vectorized knowledge points; The vectorized knowledge points are used as keys, and the questions and the difficulty levels are used as values to obtain key-value pairs; A preset vector database is generated according to all the key-value pairs; The knowledge points are used to search in the preset vector database to obtain test question samples, including: The knowledge points are converted into high-dimensional vector representations using an Embedding technology, and the high-dimensional vector representations are used as queries to search in the preset vector database to obtain corresponding values as test question samples; After the test question samples are input into a large language model to output test questions of different difficulties and types, the method further includes: The test questions of different difficulties and types are evaluated for correctness to obtain evaluation results; It is judged whether the evaluation results are passed, and if not, the test questions that do not pass are fed back to the large language model, and the test question samples are input into the large language model to output test questions of different difficulties and types until the evaluation results are passed.

5. The test paper automatic generation terminal according to claim 4, wherein After the test questions that meet the preset requirements are selected from the test questions of different difficulties and types and input into the large language model to generate test papers, the method further includes: The test papers are evaluated for overall quality to obtain evaluation results; It is judged whether the evaluation results are passed, and if not, the test papers that do not pass are fed back to the large language model, and the test questions that meet the preset requirements are selected from the test questions of different difficulties and types and input into the large language model to generate test papers until the evaluation results are passed.

6. The test paper automatic generation terminal according to claim 5, wherein Further including: The test papers are updated in the preset vector database.

Citation Information

Patent Citations

  • Intelligent test paper composition method and system based on question bank and storage medium

    CN116263782A

  • Wrong question analysis and test question recommendation system and method based on large language model

    CN117150151A