Test question content structured cleaning processing method based on generative AI technology

By obtaining the question structure of the test paper, constructing prompts and cleaning rules, and processing the test question text generated by the large language model, the problem of irregular test question structure is solved, efficient structured cleaning of the test question content is achieved, and the quality and standardization of the test paper are ensured.

CN118550984AActive Publication Date: 2024-08-27知学云(北京)科技股份有限公司
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410601107.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-08-27
Estimated Expiration
2044-05-15

AI Technical Summary

Technical Problem

It is difficult for existing technology to effectively process test question texts generated by large language models and ensure that their format and content meet user expectations, resulting in irregular test question structures and affecting quality.

Method used

By obtaining the question structure of each question type in the test paper, prompts are constructed to guide the large language model to generate questions that conform to the structure, and key markers are used to clean the text, identify and replace format modifiers, and ensure that the questions meet the structural requirements.

Benefits of technology

It realizes the structured cleaning of the test question content, ensures the quality and standardization of the questions, ensures the uniform format of the test papers, and improves the efficiency and accuracy of generating test questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550984A
    Figure CN118550984A
Patent Text Reader

Abstract

The embodiment of the invention discloses a test question content structured cleaning processing method based on a generative AI technology. The test question content structured cleaning processing method comprises the steps of obtaining a question structure of each question type in a test paper to be generated; prompting the large language model to generate questions according to the question structures; and according to the key identifier of each topic structure, carrying out content cleaning on a text returned by the large language model to extract topics meeting each topic structure. According to the embodiment, the content returned by the large model can be cleaned, and the expected test questions are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method for structured cleaning of test content based on generative AI technology. Background Art

[0002] With the development of generative AI technology, it has become a trend to use large language models to generate test questions. However, the texts returned by large language models are diverse, and their formats and contents may not fully meet user expectations. How to clean the text content and obtain the expected test question structure and content is an urgent problem to be solved. Summary of the invention

[0003] An embodiment of the present invention provides a method for structured cleaning of test content based on generative AI technology to solve the above-mentioned technical problems.

[0004] In a first aspect, an embodiment of the present invention provides a method for structured cleaning of test content based on generative AI technology, comprising:

[0005] Get the question structure of each question type in the test paper to be generated;

[0006] Prompt the large language model to generate questions based on the structure of each question;

[0007] According to the key identifiers of each topic structure, the text returned by the large language model is cleaned to extract topics that meet each topic structure.

[0008] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0009] one or more processors;

[0010] a memory for storing one or more programs,

[0011] When the one or more programs are executed by the one or more processors, the one or more processors implement the structured test question content cleaning processing method based on generative AI technology as described in any embodiment.

[0012] In summary, the embodiments of the present invention provide a method for structured cleaning of test content based on generative AI technology, which generates prompts according to the structure of test questions, prompts the large language model to generate questions that meet the requirements as much as possible, and cleans the text returned by the large language model according to the question structure to ensure the quality and standardization of the questions. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 It is a flow chart of a method for structured cleaning of test content based on generative AI technology provided by an embodiment of the present invention;

[0015] Figure 2 is a schematic diagram of a context matching model provided by an embodiment of the present invention;

[0016] Figure 3 is a schematic diagram of predicting contextual coordination provided by an embodiment of the present invention;

[0017] Figure 4 is a schematic diagram of a style detection model provided by an embodiment of the present invention;

[0018] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0020] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0021] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0022] Figure 1 This is a flow chart of a method for structured cleaning of test questions based on generative AI technology provided by an embodiment of the present invention. This method is applicable to the case where a large language model is used to generate test questions and compile test papers, and is executed by an electronic device. Figure 1 As shown, the method specifically includes:

[0023] S110, obtaining the question structure of each question type in the test paper to be generated.

[0024] Question type refers to the question type, which can be pre-defined or input by the user. Common question types include multiple choice questions, fill-in-the-blank questions, short answer questions, essay questions, calculation questions, audio-visual questions, etc. When generating the test paper, this step first obtains which question types need to be included in the test paper, as well as the question structure of each question type, as the basis for generating and cleaning test questions.

[0025] Exemplarily, the structure of the multiple-choice question may be:

[0026] Title: {This is a question or indicative sentence in the title}

[0027] Option A, {This is the option in the question}

[0028] Option B, {This is another option in the question}

[0029] Option C, {This is another option in the question}

[0030] …

[0031] Answer: {This is the correct answer}

[0032] Difficulty: {Here is the difficulty of the question}

[0033] Knowledge point: {Here are the knowledge points tested in this question}

[0034] Analysis: {Here is the analysis of this question}

[0035] Easy mistakes: {Here are the easy mistakes and correction strategies for this question}

[0036] The following is an explanation of the elements of the question structure in conjunction with the above examples. In a specific embodiment, the question structure of each question type includes two types of key identifiers, one of which is a required key identifier, called a necessary identifier, including: a necessary identifier for guiding the question stem, such as the "title" in the above example; a necessary identifier for guiding the various parts arranged in sequence within the question stem, such as the above exemplary "option A", "option B", "option C"; and a necessary identifier for guiding the correct answer, such as the "answer" in the above example. These three identifiers are necessary elements of multiple-choice questions. If any one of them is missing, the question does not meet the requirements. For the sake of ease of distinction and description, the above three necessary identifiers are referred to as the first necessary identifier, the second necessary identifier, and the third necessary identifier, respectively, where there can be multiple second necessary identifiers, corresponding to the various parts within the question stem (such as the various options of the multiple-choice question).

[0037] The other category is personalized labels used to enrich the structure of questions and facilitate the use of questions, including: personalized labels used to guide the difficulty of questions, such as the "difficulty" in the above example; personalized labels used to guide the knowledge points to be tested, such as the "knowledge points" in the above example; personalized labels used to guide the analysis of test questions, such as the "analysis" in the above example; and personalized labels used to guide easy-to-make mistakes and correction strategies, such as "easy-to-make mistakes". These labels make the content of questions richer and more convenient to use, and they can exist, not exist, or partially exist.

[0038] S120, prompting the large language model to generate questions according to the structures of each question.

[0039] This embodiment constructs prompts based on the question structure to instruct the large language model to generate questions that basically conform to the question structure. Optionally, for the question structure of the above multiple-choice questions, the following prompts can be generated:

[0040] “<Question Requirements>:

[0041] 1. The object of this test is: {training0bject}

[0042] 2. The assessment goal to be achieved in this question: {trainingGoal}

[0043] 3. The test questions should closely focus on the knowledge points and combine with other key elements in the <Test Materials> to accurately reflect the content intention: Proofread the test questions when generating them to ensure that the questions are correct, meet the question setting standards, avoid repetition, and have differentiation.

[0044] 4. Avoid introducing information or concepts outside the "question material" in the test questions. All knowledge points involved should be clearly mentioned in the content. If the question needs to involve multiple knowledge points, make sure the relationship between these knowledge points is mentioned in the content.

[0045] 5. Try to avoid socially sensitive words in the output results, and when sensitive words are encountered, they must be filtered before continuing to generate test questions.

[0046] 6. Ensure that the language of the test questions is accurate, the logic is clear, and does not violate the overall intention of the content.

[0047] <Questioning strategy>

[0048] …

[0049] You are a professional and rigorous test question expert. Please first study and understand the above content, and strictly implement the <Question Requirements>, generate test questions according to the <Question Strategy>, and require that low-difficulty questions match low-difficulty question-setting strategies, medium-difficulty questions match medium-difficulty question-setting strategies, and high-difficulty questions match high-difficulty question-setting strategies.

[0050] Please output the question list strictly according to the following <Question Structure>.

[0051] <Topic Structure>

[0052] Title: {This is a question or indicative sentence in the title}

[0053] Option A, {option here}

[0054] Option B, {Another option here}

[0055] Option C, {Another option here}

[0056] …

[0057] Answer: {This is the correct answer}

[0058] Difficulty: {Here is the difficulty of the question}

[0059] Knowledge point: {Here are the knowledge points tested in this question}

[0060] Analysis: {Here is the analysis of this question}

[0061] Easy mistakes: {Here are the easy mistakes and correction strategies for this question}”

[0062] S130: After the large language model returns the text, the returned text is cleaned according to the key identifiers of each question structure to extract questions that meet the question structure.

[0063] Given the strong language comprehension capabilities of the large language model, the text it returns can contain most of the content in the above title structure, but there will still be some redundant content, format modifiers, or missing content. For example, the text returned by the large language model is as follows:

[0064] "Hello, here is the list of test questions I output: / / This is redundant content

[0065] [Topic] xxx / / This must end with a colon / period / question mark + line break, otherwise it is incomplete

[0066] [Option A] xxx / / This must end with a line break, otherwise it is incomplete

[0067] [Option B] xxx / / This must end with a line break, otherwise it is incomplete

[0068] [Option C] xxx / / This must end with a line break, otherwise it is incomplete

[0069] [Answer] xxx / / This must end with a line break, otherwise it is incomplete

[0070] [Difficulty] xxx / / This must end with a line break, otherwise it is incomplete

[0071] [Knowledge point] xxx / / This must end with a period or a period + line break, otherwise it is incomplete

[0072] [Analysis] xxx / / This must end with a period or a period + line break, otherwise it is incomplete

[0073] [Easy to make mistakes] xxx / / This needs to end with a period or a period + line break, otherwise it is incomplete. I hope the above content is helpful to you, thank you. / / This is redundant content"

[0074] Among them, "xxx" represents omitted text; the content after " / / " is a commentary statement used to explain this embodiment, and is not the text returned by the large language model. In this text, the first and last sentences are redundant content, and "[" and "]" are format modifiers, which are not specified in the question structure. Similar format modifiers include {,}, [, ], {,}, -, --, etc. Each time the large language model is prompted to generate a question, the format modifiers that appear in the returned text are not necessarily the same, which is not conducive to the unification of the test paper format.

[0075] In order to overcome the above problems, this embodiment stores the format modifiers returned by the large language model each time in the modifier library for unified cleaning. With the continuous use of the large language model, the types of format modifiers in the library continue to increase; and the key identifiers in the title structure are used to construct regularized cleaning rules to identify the complete content or paragraphs guided by specific identifiers in specific texts to extract the title content that meets the requirements. In a specific implementation, the process may include the following steps:

[0076] Step 1: In the text returned by the large language model, identify the complete content guided by the first essential identifier; if the identification is successful, continue to identify whether there are in-library format modifiers before and / or after the first essential identifier. Optionally, the ending rules set in the above example can be used as the basis for judging whether the content guided by each key identifier is complete. Taking "

Question

[0077] Step 2: If there are in-library format modifiers before and / or after the first essential identifier, combine the in-library format modifiers with each key identifier into a specific structure, and replace each specific structure in the text with the combination of the corresponding key identifier and its unified format modifier. Taking the first essential identifier "

Question

and

Option A

Option B

Answer

[0078] Step 3: Delete the text content before the combination of the first essential identifier and its unified format modifier, that is, delete the redundant content "Hello, the following is the test question list I output:" before "Question:" in the above example.

[0079] Step 4: In the remaining text, identify in order the complete content guided by each second essential identifier, the complete content guided by the third essential identifier, and the complete content guided by the personalized identifier. Similarly, the ending rules set in the above example can be used as a basis for judging whether the content guided by each key identifier is complete. During this period, for each second essential identifier, the third essential identifier, and any key identifier among the personalized identifiers, if the complete content guided by any key identifier is successfully identified, continue to identify whether there is a library format modifier before and / or after any key identifier; if so, combine the library format modifier with any key identifier and the remaining key identifiers to be identified into a new specific structure, and replace the full text of each new specific structure with a combination of the corresponding key identifier and its unified format modifier in the remaining text; if not, directly enter the recognition link of the next identifier.

[0080] Step 5. After the identification is completed, if the contents guided by the above-mentioned key identifiers are complete, the entire text content starting from the combination of the first essential identifier and its unified format modifier to the end of the paragraph guided by the personalized identifier will be used as a question that meets the structure of the question. If the contents guided by the second essential identifiers and the third essential identifier are complete, and the contents guided by the personalized identifier are incomplete, the essential elements of the question are complete, and the current question text can be barely used. The entire text content starting from the combination of the first essential identifier and its unified format modifier to the end of the paragraph guided by the third essential identifier can be used as a question that meets the structure of the question. Otherwise, if the content guided by any essential identifier is incomplete, the question text generated by the large language model is considered unqualified, the cleaning process of the entire text is terminated, and the question is regenerated.

[0081] Optionally, the above-mentioned one-by-one identification operation can be written as a regularized cleaning rule corresponding to the question structure. When the regularized cleaning rule is run, the content guided by each key identifier is automatically identified in sequence, providing a basis for question quality judgment and content cleaning. For example, the regularized cleaning rule under a certain question structure is as follows. In actual applications, the rule forms in different programming environments will be different:

[0082]

[0083]

[0084] The above is the process of structured cleaning of test content for specific question structures. It can be seen that both the generation and cleaning of questions are carried out around the question structure, and the predetermined determination of the question structure is the basis for executing the entire method. However, in actual applications, as the personalized needs for generating test papers gradually increase, the types of questions and question structures required by different test papers gradually increase. Some users are even unable to explain the specific question structure and only give some vague demand descriptions. To this end, the present embodiment provides a method to automatically determine the question structure, and automatically adjust the large language model prompts and regularized cleaning rules to adapt to the personalized needs of users, while avoiding the manual re-writing of prompts and regularized cleaning rules under different question structures. In a specific embodiment, the method may include the following steps:

[0085] Step 1: Obtain various question types that need to be included in the test paper to be generated.

[0086] Step 2: For each question type, prompt the large language model to generate multiple question structures for the current question type, and select at least one preferred question structure that best matches the test context. Optionally, first take the audio-visual question type as an example, and construct the following prompt:

[0087] "Audio-visual questions refer to a type of question that comprehensively tests the observation, listening and comprehension abilities of candidates through video materials, audio materials or audio-visual materials. (Detailed description of question types and question structure)

[0088] As an exam question design expert, please combine online resources to provide a variety of question structures for audio-visual questions. "

[0089] Among them, the specific description of the question type and question structure can also be customized according to user needs, making full use of the natural language processing and search engine capabilities of the large language model to generate multiple question structures of a certain question type.

[0090] After the large language model returns multiple question structures, several preferred question structures can be selected from them through the test context. The test context here can be understood as the language environment that the test paper will use, which is related to the language, region, test type, and examination field. Among them, the languages ​​include Chinese, English, and minority languages, and the test types include admissions exams (college entrance exams, high school entrance exams), qualification exams (judicial exams, teacher qualification exams), recruitment exams (civil servant exams, corporate recruitment exams), and grade exams (music grade exams). The examination fields include advanced mathematics, Chinese, and computers. There are differences in the question structure and language habits of different exams. If the question structure and key tags provided by the large model are too different from the desired test context, it will be difficult for the large language model to fully understand the question requirements and it will be difficult to generate high-quality questions that meet the requirements. The simplest one is that in the Chinese context, if the English question structure is used, the large language model may have a deviation in understanding the prompts for generating questions, and the question text returned by it will have more errors than the question text returned based on the Chinese question structure, which increases the difficulty of obtaining qualified questions and content cleaning. Therefore, this embodiment screens the question structure provided by the big model through the test context. It is worth mentioning that the big language model used to provide the question structure here can be the same as or different from the big language model used to generate the question in S120, and this embodiment does not impose any special restrictions.

[0091] Optionally, first, the content about the examination context can be extracted from the examination outline of the test paper. The examination outline usually includes relevant requirements about the examination object, examination content, and examination questions. If the examination outline text is not too long, the examination outline as a whole can be used as the content about the examination context; if the examination outline is a long text, the paragraphs about the examination question requirements can be extracted as the content about the examination context. Then, the content about the examination context and a question structure are input into a trained context matching model to obtain the matching degree between the question structure and the examination context. Exemplarily, the context matching model is as follows: Figure 2As shown, it includes two branches, each branch includes a transformer self-attention encoder and a pooling layer (the number of parameters in the layer can be flexibly set as needed). After the content of the test context and the question structure are vectorized respectively, they are respectively input into the self-attention encoders of the two branches to obtain two paths of joint coding information containing context information; after the two paths of joint coding information pass through the two pooling layers respectively, the deep semantic features of the test context and the deep semantic features of the question structure (i.e., deep features) are obtained respectively; the correlation (or similarity) of the two deep semantic features is calculated by the matching calculation layer, and the matching degree between the question structure and the test context can be obtained, and the higher the matching degree, the better. By analogy, the content about the test context is combined with each question structure respectively, and input into the trained context matching model respectively, the matching degree between each question structure and the test context can be obtained.

[0092] Furthermore, before performing the above operations, the context matching model needs to be trained in advance. Optionally, samples can be constructed based on sets of test papers that have been used (taken) in different contexts. The content about the test context and the question structure of each question type that belong to the same set of test papers are used as positive samples, and the content about the test context and the question structure of each question type that do not belong to the same set of test papers are used as negative samples, and the matching degree of each sample is marked to complete the model training.

[0093] Step three: extract one from at least one preferred question structure of each question type, and the question structures extracted from each question type together constitute a set of test paper structures; after extracting multiple times, multiple sets of test paper structures are obtained.

[0094] Step 4: Check the contextual coordination and / or style coordination of each set of test paper structure respectively, and determine the optimal test paper structure according to the coordination. Contextual coordination refers to whether the context between the question structures of each question type is coordinated. Although the question structure of each question type has maintained a high degree of matching with the overall context of the test paper through the previous steps, context fluctuations may still occur between the question structures of each question type. The contextual coordination can further constrain the contextual conditions. Style coordination refers to whether the test styles between the question structures of each question type are coordinated. The test styles here include traditional scoring type, open type, divergent type, etc., which are the style embodiment of the question structure designed by the question setter. In practical applications, it is found that when the test style changes greatly, the average test scores of the candidates usually decline significantly. Therefore, the test style is also an important aspect that affects the test paper structure, and the test style of each question type in the same test paper should be known as much as possible. In this embodiment, the optimal test paper structure can be selected from multiple sets of test paper structures by one or two of the above-mentioned vector coordination. The higher the coordination, the better the test paper structure.

[0095] Optionally, in order to use a unified context standard, this embodiment reuses part of the structure in the above-mentioned context matching model to calculate context coordination. Specifically, for the question structure of each question type in any set of test paper structures, after inputting it together with the content about the test context into the trained context matching model in step 2, the question features before the last layer of the model, that is, the deep features of the question structure before the matching degree calculation layer, are recorded respectively; and the deep features of the question structure corresponding to each question type are input into the context coordination degree calculation layer to obtain the context coordination degree of the entire test paper, such as Figure 3 As shown ( Figure 3 ( ) Only two question types are shown as examples.) Accordingly, in the case of reuse, when training the context matching model, the question structure of each question type from the same test paper can be used as a positive sample, and the question structure of each question type that does not belong to the same test paper can be used as a negative sample, and the sample context coordination degree is annotated. On the basis of the training process described in step 2, the training of context coordination degree is added (through joint training of the annotated matching degree and context coordination degree), so that the model is more accurate in predicting both context matching degree and context coordination degree.

[0096] Alternatively, style coordination can also be predicted by a neural network-based style detection model with a structure such as Figure 4 As shown, since the definitions of the test context and the test style in this embodiment are not exactly the same, it is not appropriate to reuse them. Figure 2 and Figure 3 Instead of using the model parameters in the example, another set of samples is constructed for the test style to train an independent style detection model. As described above, when the test style of the same test changes dramatically, the average test score will decline. Therefore, this embodiment uses the test papers when the historical test scores have declined significantly as test papers of different styles. From the test paper structures of different styles, the question structures of each question type under different styles are extracted respectively, and assembled into test paper structures with different styles of each question type as negative samples; at the same time, the test paper structures of the same set of test papers are used as positive samples, and the style coordination of each sample is marked. The style detection model is trained using the positive and negative samples, so that after a set of test paper structures are input into the model, the model can output the style coordination of the test paper structure.

[0097] Optionally, the matching degree calculation layer, the context coordination degree calculation layer and the matching degree calculation layer in the above-mentioned models may adopt a fully connected layer or a vector correlation calculation method, which is not specifically limited in this embodiment.

[0098] Through the above steps, this embodiment can automatically generate a personalized question structure according to the test context in S110. Correspondingly, when prompting the large language model to generate questions according to each question structure in S120, fixed prompts are no longer manually written, but the question structure part in the original prompt is replaced with a variable question structure slot, and a variable symbol is added to the question structure slot; and an extraction statement is generated to extract the question structure of any question type from the optimal test paper structure, and an assignment statement is generated to assign the extracted question structure to the variable symbol, so that the question structure of any question type is automatically updated to the prompt when each statement is run. At the same time, when the text returned by the large language model is cleaned in S130, regularized cleaning rules are no longer manually written, but the identifier to be identified in the original regularized cleaning rules is replaced with a variable identifier slot, and a variable symbol is added to the identifier slot; and an extraction statement is generated to extract key identifiers from the question structure of any question type, and an assignment statement is generated to assign the extracted key identifiers to the variable symbol, so that the new key identifiers are automatically updated to the regularized cleaning rules when each statement is run. Through this slot association method, the question structure can be automatically updated according to user needs, and prompts and regularized cleaning rules that match the question structure can be automatically generated, thereby improving the flexibility and efficiency of questions and test papers in responding to user needs.

[0099] In summary, the embodiment of the present invention provides a method for structured cleaning of test content based on generative AI technology, which generates prompts according to the structure of the test paper title, prompts the large language model to generate a title that meets the requirements as much as possible, and cleans the text returned by the large language model according to the title structure to ensure the quality and standardization of the title. Specifically, in the cleaning of structured content, this embodiment first accumulates the return format of the large language model, builds a format modifier library that covers a variety of situations as much as possible, and uniformly replaces the modifiers in the library to keep the form of the title uniform; then, through the regularization cleaning rules matching the title structure, the partial title structure is identified in sequence, the title content is accurately located, and unqualified titles are discarded. In addition, according to the user's personalized needs for the title structure, this embodiment generates the title structure through the large language model, and selects the optimal title structure according to the test context and the coordination of the test paper; through the variable slot association, the prompts and cleaning rules matching the optimal title structure are automatically generated to improve the response effect and efficiency of the title and test paper to user needs.

[0100] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 5A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0101] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the structured cleaning processing method for test content based on generative AI technology in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the structured cleaning processing method for test content based on generative AI technology.

[0102] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0103] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.

[0104] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements the structured test content cleaning processing method based on generative AI technology in any embodiment.

[0105] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0106] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0107] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0108] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.

Claims

1. A method for structured cleaning of test content based on generative AI technology, characterized in that: include: Get the question structure of each question type in the test paper to be generated; Prompt the large language model to generate questions based on the structure of each question; According to the key identifiers of each topic structure, the text returned by the large language model is cleaned to extract topics that meet each topic structure.

2. The method according to claim 1, characterized in that The key identifiers of any question structure include a first essential identifier for guiding the question stem, a second essential identifier for guiding the parts arranged in sequence within the question stem, a third essential identifier for guiding the correct answer, and a personalized identifier for guiding at least one of the difficulty of the question, the knowledge points tested, the analysis of the question, and the easy-to-make mistakes. The text returned by the large language model is cleaned according to the key identifiers of each topic structure to extract topics that meet the topic structure, including: In the text returned by the large language model, the complete content introduced by the first essential identifier is identified; if the identification is successful, the format modifier is further identified before and / or after the first essential identifier; If it exists, the format modifier is combined with each key identifier into a specific structure, and each specific structure in the text is fully replaced with the corresponding key identifier; if it does not exist, directly proceed to the next step; Delete the text content before the first essential mark; identify the complete content of each second essential mark, the complete content of the third essential mark, and the complete content of the personalized mark in the remaining text in order; If all are successfully identified, the entire text content of the paragraph from the first required identifier to the personalized identifier is used as a question that meets the question structure.

3. The method according to claim 2, characterized in that The format modifiers include at least one of {,}, [, ], {,}, -, --, all of which are stored in a modifier library; the tags in the library are continuously updated according to the types of format modifiers in the text returned by the large language model.

4. The method according to claim 2, characterized in that: The step of sequentially identifying the complete content of each second essential identification guide, the complete content of the third essential identification guide, and the complete content of the personalized identification guide in the remaining text includes: For each of the second essential identifiers, the third essential identifier and any key identifier of the personalized identifier, if the complete content identification guided by any key identifier is successful, continue to identify whether there is a format modifier before and / or after any key identifier; If it exists, the format modifier is combined with any key identifier and the remaining key identifiers to be identified into a new specific structure, and the entire text of each new specific structure is replaced with the corresponding key identifier in the remaining text; if it does not exist, directly enter the identification link of the next identifier.

5. The method according to claim 1, characterized in that The step of obtaining the question structure of each question type in the test paper to be generated includes: Obtain multiple question types that need to be included in the test paper to be generated; For each question type, the large language model is prompted to generate multiple question structures of the current question type, and at least one preferred question structure that best matches the test context is selected; Extract one from at least one preferred question structure of each question type, and the question structures extracted from each question type together form a set of test paper structures; after multiple extractions, multiple sets of test paper structures are obtained; The contextual coordination and style coordination of each set of test paper structures are examined respectively, and the optimal test paper structure is determined based on the coordination.

6. The method according to claim 5, characterized in that The test context is a comprehensive reflection of at least one of the language, region, test type, and examination field, wherein the test type includes at least one of the admission test, qualification test, and employment test; The step of selecting at least one preferred question structure that best matches the test context includes: Extracting content about the examination context from the examination syllabus of the examination paper; The contents about the test context are respectively input into the trained context matching model together with each question structure to obtain the matching degree between each question structure and the test context.

7. The method according to claim 6, characterized in that The contextual coordination of each test paper structure is tested separately, including: For each question type in any set of test paper structures, after inputting the structure and the content about the test context into the trained context matching model, the question features before the last layer of the model are recorded respectively; The question features corresponding to each question type are input into the context coordination degree calculation layer to obtain the context coordination degree of the test paper structure.

8. The method according to claim 5, characterized in that Before the contextual coordination and style coordination of each set of test paper structure are checked respectively, it also includes: Filter different styles of test paper structures through historical test scores, and use the test paper structure of the same set of test papers as positive samples; Extracting question structures of each question type from the test paper structures of different styles respectively, and assembling them into test paper structures with different question types as negative samples; The style detection model is trained using the positive samples and negative samples, so that after a set of test paper structures are input into the model, the model can output the style coordination degree of the test paper structure.

9. The method according to claim 5, characterized in that The prompt large language model generates questions according to each question structure, including: replacing the question structure in the original prompt with a question structure slot, and adding a variable symbol in the question structure slot; generating an extraction statement for extracting the question structure of any question type from the optimal test paper structure, and an assignment statement for assigning the extraction result to the variable symbol, so that the question structure of any question type is automatically updated to the prompt when each statement is run; The content cleaning of the text returned by the large language model is performed according to the key identifiers of each question structure, including: replacing the identifier to be identified in the original regularized cleaning rule with the identifier slot, and adding a variable symbol in the identifier slot; generating an extraction statement for extracting the key identifier from the question structure of any question type, and an assignment statement for assigning the extraction result to the variable symbol, so that the key identifier is automatically updated to the regularized cleaning rule when each statement is run; wherein, when the regularized cleaning rule is run, it is used for the complete content or paragraph guided by a specific identifier in a specific text.

10. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for structured cleaning of test content based on generative AI technology as described in any one of claims 1-9.

Citation Information

Patent Citations

  • A designer and a design method for a test question and a test paper structure

    CN109241508A

  • Intelligent anti-cheating self-service examination system without invigilation

    CN113313168A

  • Intelligent strategy test paper composition method, device and equipment based on natural language processing

    CN114036266A

  • Question and answer generation method and device based on knowledge graph and automatic examination question generation system

    CN114492803A

  • Exercise generation method and device based on language model and medium

    CN116561260A