Answering and correcting method and device, computing device, storage medium and program product

By identifying the types of questions and answers, and then calling a dedicated answer grading model for grading, the problems of low grading accuracy and poor generalization ability in existing technologies are solved, and adaptive evaluation and efficient grading are achieved.

CN122287756APending Publication Date: 2026-06-26BEIJING YUANLI WEILAI SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-20
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing automatic grading methods have low accuracy and poor generalization ability when faced with different question types, and cannot adapt to the differences in judgment logic in complex scenarios.

Method used

After acquiring the questions and answers, the system identifies the types of questions and answers, calls a dedicated answer grading model for grading, uses the answer generation model to train sample answers to achieve adaptive evaluation, and improves the accuracy and efficiency of the model through reinforcement learning.

Benefits of technology

It improves the accuracy and cross-scenario adaptability of grading, solves the problem of scarce manually labeled data, avoids redundant output and illusions, and enhances the accuracy and efficiency of automatic grading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122287756A_ABST
    Figure CN122287756A_ABST
Patent Text Reader

Abstract

The answer grading method, apparatus, computing device, storage medium, and program product provided in this application; obtain a target question and a target answer to the target question; identify the type of the target question to obtain the target question type; call the answer grading model, and grade the target answer based on the target question type and the target question to obtain the answer grading result. The answer grading model is trained based on sample questions, sample question types, sample answers, and sample grading results. The sample answers are obtained by the answer generation model solving the sample questions. This achieves adaptive evaluation based on question type, improving the accuracy of grading and cross-scenario generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method for grading and correcting answers. This application also relates to a method for training an answer grading and correcting model, a method for training an answer generation model, an answer grading and correcting device, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In the internet field, for the technology of automatically grading questions in the education field, existing automatic grading methods usually use exact string matching or simple rule-based comparison, which is difficult to handle the diverse expressions under different question types. This results in low grading accuracy, poor generalization ability, and the inability to adopt differentiated judgment logic for different types, which limits the cross-scenario adaptability of the grading system.

[0003] Therefore, there is an urgent need for a method to enable the grading of answers to questions in complex scenarios. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method for correcting responses to address the technical deficiencies existing in the prior art. This application also relates to a method for training a response correction model, a method for training a response generation model, a response correction device, a computing device, a computer-readable storage medium, and a computer program product.

[0005] According to a first aspect of the embodiments of this application, a method for correcting responses is provided, including: Obtain the target question and the target answer to the target question; Type identification is performed on the target question to obtain the target question type; The answer grading model is invoked to grade the target answers based on the target question type and the target question, and the answer grading results are obtained. The answer grading model is trained based on sample questions, sample question types, sample answers and sample grading results. The sample answers are obtained by the answer generation model solving the sample questions.

[0006] According to a second aspect of the embodiments of this application, a method for training a response grading model is provided, comprising: Obtain sample data, which includes sample questions, sample question types, sample answers, and sample grading results. The sample answers are obtained by the answer generation model from the sample questions. The initial grading model is invoked, and the sample answers are graded based on the sample question type and sample question to obtain the predicted grading results; Based on the sample grading results and the predicted grading results, the parameters of the initial grading model are adjusted to obtain the trained answer grading model.

[0007] According to a third aspect of the embodiments of this application, a method for training a response generation model is provided, comprising: Obtain the grading results of the target answers, wherein the grading results are obtained by the grading model grading the sample answers, and the grading model is obtained based on the grading model training method described above; Based on the grading results, determine the target evaluation indicators for the answers; Based on the response evaluation metrics, reinforcement learning is performed on the response generation model to obtain a fully trained response generation model.

[0008] According to a fourth aspect of the embodiments of this application, a response grading device is provided, comprising: The acquisition module is configured to acquire the target question and the target answer to the target question. The identification module is configured to identify the type of the target question and obtain the type of the target question. The grading module is configured to call the answer grading model, grade the target answers based on the target question type and the target question, and obtain the answer grading results. The answer grading model is trained based on sample questions, sample question types, sample answers and sample grading results. The sample answers are obtained by the answer generation model solving the sample questions.

[0009] According to a fifth aspect of the embodiments of this application, a computing device is provided, including: a memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute computer programs / instructions. When the computer program / instructions are executed by the processor, they implement any of the above methods.

[0010] According to a sixth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores a computer program / instructions, which, when executed by a processor, implement any of the methods described above.

[0011] According to a seventh aspect of the embodiments of this application, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the above-described method.

[0012] The answer grading method provided in this application obtains the target question and its answer, and after identifying the type of the target question, calls a dedicated answer grading model for grading. This achieves adaptive evaluation based on question type. Question type identification provides the model with question category information, enabling the grading model to adopt appropriate evaluation logic according to different types, thereby improving the accuracy of grading and its cross-scenario generalization ability. At the same time, the answer grading model is trained on sample answers obtained by the answer generation model from sample question answers, which can automatically generate rich training data covering various forms of answers under different question types, solving the problem of scarce manually labeled data. Moreover, the model output is constrained to a stable binary label, avoiding redundant output and illusions of general models, and improving the accuracy, efficiency and automation of automatic grading. Attached Figure Description

[0013] Figure 1 This is a flowchart of a response correction method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the identification of question types provided in one embodiment of this application; Figure 3 This is a flowchart of a response grading model training method provided in one embodiment of this application; Figure 4 This is a flowchart of a response generation model training method provided in one embodiment of this application; Figure 5 This is a schematic diagram of the overall architecture of a response generation model trained by reinforcement learning, provided in one embodiment of this application. Figure 6 This is a schematic diagram of the structure of a response correction device according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a response correction model training device provided in one embodiment of this application; Figure 8 This is a schematic diagram of the structure of a response generation model training device provided in an embodiment of this application; Figure 9 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation

[0014] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0015] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.

[0016] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first.

[0017] First, the terms and concepts involved in one or more embodiments of this application will be explained.

[0018] Multimodal large models are capable of simultaneously understanding and processing information from multiple different data types. The most common modal combination is text (language) and images (visual), but their capabilities can be extended to other modalities such as audio, video, and 3D data.

[0019] A URL (Uniform Resource Locator) is an address string on the Internet used to identify and locate a specific resource (such as a webpage, image, or file). It typically contains information such as protocol, domain name, and path.

[0020] An API (Application Programming Interface) is a set of predefined rules and protocols used to enable different software to communicate and exchange data without needing to know the internal implementation details of the other.

[0021] Reinforcement learning is a branch of machine learning. It allows an agent to learn the optimal policy through trial and error interactions with its environment, receiving rewards or penalties: the goal is to maximize cumulative reward. Unlike supervised learning, reinforcement learning does not have a standard answer, but relies on delayed feedback signals.

[0022] This application provides a method for grading responses. It also relates to a method for training a response grading model, a method for training a response generation model, a response grading device, a computing device, a computer-readable storage medium, and a computer program product.

[0023] Figure 1 This is a flowchart of a response correction method provided in an embodiment of this application, which specifically includes the following steps: Step 102: Obtain the target question and the target answer to the target question.

[0024] The target question is the specific test question that needs to be graded. The target question can include information in various modalities such as question text, images, formulas, and charts. As the object and context for grading, the target question provides the problem background and evaluation criteria for subsequent answer grading. For example, the target question could be "Given that the two legs of a right triangle are 3 and 4, find the length of the hypotenuse"; for example, the target question could be an image containing a proof of a geometric figure; for example, the target question could be an English reading comprehension passage and questions.

[0025] The target answer is the response generated by the student or agent for the target question. It can be in the form of plain text, a mixture of text and images, or structured steps. The target answer is the object to be evaluated and its correctness needs to be determined. For example, the target answer can be "A"; for example, the target answer can be "Solution: According to the Pythagorean theorem, the hypotenuse is 5"; for example, the target answer can be a mathematical solution step that includes reasoning.

[0026] To obtain the target question and the target answer, one optional implementation is to read pre-entered question data from a question bank system or data storage, and read the corresponding student-submitted answer text or image; another optional implementation is to receive question images and handwritten answer images uploaded by front-end users in real time through an application programming interface, and convert them into structured data after optical character recognition or image preprocessing; yet another optional implementation is to extract the answer generated by the current round's answering model from the inference path generated by the agent, and associate it with the corresponding question. This step can be part of the reinforcement learning training process.

[0027] In one implementation of this manual, within an automated grading scenario on an online education platform, a middle school math problem is retrieved from a question bank database: "Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side." The student's submitted answer is then retrieved: "The length of the third side is 5 or 8." This answer is the target answer. The target question and target answer are used as input for subsequent grading processes, preparing for type recognition and model invocation.

[0028] In one implementation of this specification, in a reinforcement learning training environment, the agent generates a solution path for a physics problem: "According to Newton's second law, F=ma, substituting the data, we get a=2m / s²". This solution path is used as the target answer and is obtained together with the corresponding physics problem for subsequent answer grading model evaluation to generate a reward signal.

[0029] By acquiring the target questions and answers, the boundaries and sources of input data are established for the entire answer grading process. The raw data to be graded is standardized into a standardized format, providing a clear processing object for subsequent steps such as type identification and model invocation.

[0030] Step 104: Identify the type of the target question to obtain the target question type.

[0031] Type recognition is the automated process of determining the subject category, question type, or modal category of a target question. Its purpose is to provide a classification basis for subsequent answer grading, enabling the model to adopt differentiated grading strategies based on different question types, thereby improving grading accuracy and generalization ability. For example, type recognition could determine whether a question belongs to the sciences (mathematics, physics) or the humanities (Chinese, English); for example, it could distinguish whether a question is a calculation question, a proof question, or a subjective essay question; for example, it could identify whether a question is a pure text question or a multimodal question containing images.

[0032] The target question type is a classification label output after type identification. It is used to characterize the core attributes of the target question and can guide the grading model to select appropriate evaluation logic and constraint rules, ensuring that the grading strategy matches the characteristics of the question. For example, the target question type can be "science-calculation question"; it can be "humanities-open-ended essay question"; it can be "multimodal text and graphics combination question".

[0033] To identify the type of the target question, one possible approach is to extract feature words (such as "calculate", "prove", "briefly describe") from the question text based on a preset rule base or keyword matching for rapid classification; another possible approach is to call a lightweight classification model (such as a text classifier) ​​to perform semantic understanding of the question content and output the subject category and question type category; yet another possible approach is to analyze the features of both the question text and the image simultaneously using a multimodal model for questions containing images to identify whether the question relies on visual information for the answer.

[0034] In one implementation of this manual, applied to an online education platform for automatic grading, after obtaining the target question "Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side," the type of the question is identified. By extracting the keywords "side length" and "triangle" from the question and combining them with the context, the question is determined to belong to the "Science - Mathematics" subject category, and the question type is identified as "Calculation Problem." Finally, the target question type is output as "Science - Calculation Problem."

[0035] By identifying the type of the target questions, the original question content is transformed into structured classification labels, enabling the grading model to call appropriate evaluation strategies according to different question types. This improves the accuracy of grading and its ability to generalize across scenarios, laying the foundation for subsequent differentiated grading.

[0036] In one optional implementation of this specification, step 104 further includes: Obtain the standard answers to the sample questions; The initial grading model is invoked, and the sample answers are graded based on the sample question type, sample question, and sample standard answer to obtain the predicted grading results.

[0037] The subject to which the target question belongs refers to the knowledge domain or teaching subject category to which the target question belongs. It is used to distinguish the differences in the evaluation logic of different subjects, enabling the grading model to perform differentiated grading based on the equivalence rules of science subjects (such as mathematics and physics) or the semantic consistency rules of humanities subjects (such as Chinese and history). For example, the subject can be science subjects (mathematics, physics, chemistry); for example, the subject can be humanities subjects (Chinese, English, history, politics); for example, the subject can be engineering or interdisciplinary subjects.

[0038] The modality of a target question refers to the answer type feature corresponding to that question. It distinguishes the openness and uniqueness of the answers, enabling the grading model to employ precise comparison strategies for questions with unique answers (such as multiple choice, true / false, and fill-in-the-blank questions) and semantic matching or key point matching strategies for questions with multiple answers (such as subjective questions, open-ended essay questions, and some fill-in-the-blank questions). For example, a modality can be a unique answer type (including multiple choice, true / false, and fixed-answer fill-in-the-blank questions); a modality can be a multiple answer type (including subjective questions, short-answer questions, essay questions, and open-ended fill-in-the-blank questions); or a modality can be a semi-open type (such as calculation questions with a unique answer but diverse expressions).

[0039] Based on the subject to which the target question belongs, the question type is identified to obtain the question type. Specifically, this can be done by analyzing the text content or image information of the target question to determine whether it belongs to the science, humanities, or other subject categories, and outputting the corresponding subject type label to provide a subject-based classification basis for subsequent grading. One optional implementation method is to use a preset subject keyword database (such as "Pythagorean theorem" and "Newton's laws" for science, and "Lu Xun" for humanities) for matching and identification; another optional implementation method is to call a text classification model trained with multi-disciplinary data to perform semantic understanding of the question content and output the subject category.

[0040] Based on the modality of the target question, type identification is performed to obtain the target question type. Specifically, by analyzing the question type features or answer constraints of the target question, it is determined whether it belongs to the unique answer type or the multiple answer type, and the corresponding modality type label is output, providing a basis for the processing of the answer type dimension for subsequent grading. One optional implementation method is to perform rule matching based on explicit indicator words in the question (such as "select," "judgment," and "fill in the blank" corresponding to the unique answer type, and "brief description," "argument," and "analysis" corresponding to the multiple answer type); another optional implementation method is to call a question type classification model to perform semantic understanding of the question text and output the answer type identification result.

[0041] One possible implementation is to perform type identification based on both subject and modality dimensions to generate a composite type judgment result, such as "Science - Unique Answer" or "Humanities - Multiple Answers"; another possible implementation is to identify based only on subject, ignoring modality differences; or to identify based only on modality, ignoring subject differences.

[0042] Figure 2 This is a flowchart of a question type identification method provided in one embodiment of this application, which is another optional method for identifying question types. As shown in the figure, the completeness check of the target answer is performed first. If the check fails, it is directly judged as wrong and the subsequent identification is terminated. If the check passes, it is further identified as a unique answer type or a multiple answer type based on the answer type characteristics of the target question. Then, it is identified as a science or humanities subject based on the subject to which the target question belongs. For humanities questions, it is further identified as a humanities open-ended question or a humanities factual question. Subsequently, hierarchical composite type identification results can be generated, such as "unique answer type - science", "multiple answer type - humanities - open-ended question", or "unique answer type - humanities - factual question". Alternatively, the final level judgment result can be generated directly.

[0043] This specification describes an implementation of an online education platform's automatic grading scenario. It identifies the type of the target question, "Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side." In terms of subject, it matches the keywords "side length" and "triangle" to a science keyword database, classifying it as "Science - Mathematics." In terms of modality, it analyzes the question as a calculation problem with a unique answer (5 or 8, although two possibilities, belong to a fixed solution set), classifying it as "Unique Answer Type." Combining both dimensions, it outputs the target question type as "Science - Mathematics - Unique Answer Type," which is used by the subsequent grading model to call the precise comparison logic for unique answer types in the science category.

[0044] In one implementation process described in this manual, a comprehensive intelligent grading platform receives a history question: "Please briefly describe a historical event (at least two points)" and a student's answer: "A, B". First, a completeness check is performed: the question explicitly requires at least two points, and the student's answer lists "A" and "B", meeting the quantity requirement, and the check passes. Subsequently, based on the answer type characteristics, the question is identified as a "multiple-answer type" (subjective brief description question). Next, based on the question content, the subject is identified as "Humanities - History," and further determined to be "Humanities Factual Question" (requiring specific historical facts, not open-ended statements). Finally, a composite type label "Multiple Answers - Humanities - Factual Question" is generated. The subsequent answer grading model then uses the semantic equivalence judgment logic of humanities factual questions to check whether "A" in the student's answer corresponds to "a" in the standard answer, and "B" corresponds to "b," to determine semantic equivalence, and grades it as correct. If the question is "Discuss your views on xx historical event," it is first identified as a multiple answer question, then the subject is identified as humanities, and then it is determined to be "Humanities Open-ended Question," using the key point rationality assessment strategy rather than fact comparison.

[0045] In one implementation of this manual, a math multiple-choice question is received: "Which of the following options is a quadratic equation in one variable? A. x + 1 = 0 B. x² + 2x - 3 = 0 C. 2x - 1 = 0". The student answers "B". First, a completeness check is performed: multiple-choice questions only require one answer, and the student has already answered, so the check passes. Then, it is identified as a "unique answer type", and the subject is further identified as "Science - Mathematics". A composite type label "Unique Answer Type - Science" is generated. The answer grading model calls precise comparison logic to compare the student's answer "B" with the standard answer "B" and judges it as correct.

[0046] By identifying target questions based on subject and / or modality (answer type), the model achieves refined adaptation of grading strategies. Subject-based classification enables the model to flexibly evaluate equivalent values ​​and expressions for science questions, and to make flexible judgments on semantic consistency and openness for humanities questions, thus improving the accuracy of cross-disciplinary grading. Modality-based classification (unique answer type and multiple answer type) can automatically distinguish between objective questions that require precise comparison and subjective questions that require key point matching, and call the corresponding evaluation logic to avoid using the same standard to process different types of questions, further improving the generalization ability and robustness of the entire answer grading system.

[0047] Step 106: Call the answer grading model, grade the target answer based on the target question type and the target question, and obtain the answer grading result. The answer grading model is trained based on the sample question, sample question type, sample answer and sample grading result. The sample answer is obtained by the answer generation model solving the sample question.

[0048] The answer grading model is a specialized large language model trained under supervised fine-tuning. Based on the input question information, question type, and student answers, it can output binary or structured grading results. It can replace general-purpose large models for efficient and stable automatic grading, avoiding redundant output and illusions, and improving the quality of reward signals for downstream tasks such as reinforcement learning. For example, the answer grading model can be a model fine-tuned from a pre-trained large model using judgment data; for example, it can be a specialized model optimized for equivalence judgment in science and semantic consistency judgment in humanities; for example, it can be a visual language model supporting multimodal input.

[0049] The grading result is the judgment of whether a student's answer is correct or not, output by the grading model. It is usually presented in the form of binary labels (True / False) or structured scores. The grading result is the final feedback and can be directly used as a reward signal for reinforcement learning or to display the grading result to the student. For example, the grading result can be "True" indicating correctness and "False" indicating error; for example, the grading result can be a structured output containing a judgment of correctness and a brief reason; for example, the grading result can be a score or a grade.

[0050] The system invokes a response grading model to grade target responses based on the target question type and the target question. One possible implementation is to use the target question type as a system instruction or prompt prefix, concatenating it with the target question and target response according to a preset template, and then inputting it into the response grading model. The model outputs a binary label (True / False) as the grading result. Another possible implementation is to process the question image and text separately for multimodal questions (such as text-based questions) and then input them along with the question type into the multimodal response grading model. The model outputs a grading conclusion. A further possible implementation is to output a structured result, such as {"correct": true, "reason": "answer equivalent"}, for scenarios requiring fine-grained scoring.

[0051] The answer grading model is trained based on sample questions, sample question types, sample answers, and sample grading results. Specifically, during the training phase, a large number of questions covering different subjects and different answer types are collected. Student answers are generated by the answer generation model, and grading labels are generated after manual or rule-based verification to construct a training dataset. A supervised fine-tuning method is adopted, using the concatenation of sample questions, sample question types, and sample answers as input and the sample grading results as output to update the parameters of the pre-trained model, enabling it to learn to adapt the evaluation logic according to the question type.

[0052] In one optional embodiment of this specification, step 106 further includes: When the target question type is unimodal, input the target question and target answer into the answer grading model to obtain the answer grading results; When the target question type is multimodal, the target stored information of the target question is obtained, and the target stored information, the target question, and the target answer are input into the answer grading model to obtain the answer grading result.

[0053] A unimodal question type refers to a question that contains only textual information and whose meaning can be fully understood without relying on visual content such as images or formula pictures. For example, a unimodal question type can be a pure text multiple-choice question, fill-in-the-blank question, or short-answer question; for example, a unimodal question type can be a math word problem containing only textual descriptions; for example, a unimodal question type can be a language reading comprehension question.

[0054] Multimodal questions refer to questions that contain visual information such as images, handwriting, geometric figures, and tables, requiring the reader to combine the visual content with a complete understanding of the question. For example, a multimodal question could be a proof question containing geometric illustrations; a multimodal question could be a math problem containing function graphs; or a multimodal question could be a student's answer containing handwritten formulas or hand-drawn charts.

[0055] Target storage information refers to the storage address or access link of image files in multimodal problems, such as file paths in object storage services, pre-signed URLs, or local file system paths. Its purpose is to enable the model to dynamically load image data based on the storage information, avoiding the embedding of large amounts of image binary content into the training data. For example, target storage information could be "https: / / tos.example.com / images / ques_123.png"; for example, target storage information could be the local path " / data / images / ques_456.jpg"; for example, target storage information could be a combination of the bucket name and object key in object storage.

[0056] When the target question type is a single-modal type, the target question and target answer are input into the answer grading model to obtain the answer grading result. Specifically, when it is identified that the target question contains only text, the question and answer are directly concatenated in plain text form and input into the model. The model outputs the grading conclusion based on the semantics of the text.

[0057] When the target question type is multimodal, the target storage information of the target question is obtained, and the target storage information, the target question, and the target answer are input into the answer grading model to obtain the answer grading result. Specifically, when the target question is identified to contain an image, the storage address or pre-signed link corresponding to the image is read from the database or storage system, and this address, along with the question text and answer, is input into the model. The model loads the image based on the address, performs multimodal understanding, and outputs the grading conclusion. The core of this processing action lies in achieving asynchronous loading and alignment of images and text.

[0058] One optional implementation is to directly concatenate the target question text and the target answer text into a string according to a preset template in a single-modal type, and use it as the text input of the model. Another optional implementation is to first query the question metadata table to obtain the image storage key value, call the object storage service to generate a temporary access link, combine the link with the question text and the answer text to form a multimodal message list (including text type and image_url type), and then send it to the answer grading model that supports visual input. Yet another optional implementation is to obtain the storage information of each image for multimodal questions that contain both text and multiple images, and arrange them in the message list in the order in which the images appear in the question.

[0059] In one implementation of this manual, the problem is applied to an online education platform for automatic grading. The target question type is identified as a single-modal type (plain text math problem). The problem text "Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side" is directly concatenated with the student's answer "The length of the third side is 5 or 8" into a string, which is then input into the answer grading model. The model outputs "True".

[0060] In one implementation of this specification, in a grading scenario containing geometric proof questions, where the target question type is multimodal, the image storage path corresponding to the question is retrieved from the database, and a pre-signed URL is generated. The URL, along with the question text "As shown in the figure, given AB=AC, prove ∠B=∠C" and the student's answer "Proof: ∵AB=AC, ∴∠B=∠C", are used to construct a multimodal message list. This list can take the following form: [{"type":"text","text":"As shown in the figure, given AB=AC, prove that ∠B=∠C"}; {"type":"image_url","image_url":{"url":"https: / / ..."}}; {"type":"text","text":"Student's answer: Proof: ∵AB=AC,∴∠B=∠C"}).

[0061] Input the above message list into a vision-enabled multimodal answer grading model. The model combines the geometric positional relationships in the image to determine if the reasoning is correct and outputs "True". If the student's answer lacks key steps, the model outputs "False".

[0062] By dynamically selecting the input method based on the modality type of the target question, the grading model achieves adaptive adaptation to different types of questions, ensuring that visual information such as geometric relationships and handwritten content in the image can be correctly understood by the model, avoiding grading errors caused by modality loss, and thus improving the accuracy of grading results.

[0063] In one optional embodiment of this specification, before step 106, the method further includes: Obtain the target standard answer to the target question; The system invokes the answer grading model to grade the target answers based on the target question type and the target question, obtaining the grading results, including: The system calls upon the answer grading model to grade the target answer based on the target question type, the target question, and the target standard answer, thereby obtaining the answer grading results.

[0064] The target standard answer is the correct answer corresponding to the target question and serves as the evaluation benchmark. It can be derived from preset reference answers in the question bank or high-confidence answers that have undergone cross-validation. The target standard answer provides the evaluation basis for the answer grading model, enabling the model to compare students' answers with the standard answer and determine whether they are correct or not.

[0065] Obtaining the target standard answer for a given question can specifically involve retrieving standard answer data associated with the target question from a question bank system, database, or storage module. One optional implementation is to query the standard answer database based on the unique identifier of the target question (e.g., question ID) to obtain the corresponding reference answer text. Another optional implementation is to, for questions lacking pre-set standard answers, use existing large-scale visual or textual models to cross-validate the original question, and use the high-confidence result as the standard answer. Yet another optional implementation is to receive standard answers manually entered or uploaded by users (e.g., teachers) through an interface.

[0066] The answer grading model is invoked to grade target answers based on the target question type, target question, and target standard answer. Specifically, the target standard answer, target question type, target question, and target answer are input into the answer grading model together, allowing the model to make judgments with the standard answer as a reference. One optional implementation is to concatenate the standard answer, question, and answer into a format such as "[Standard Answer]...[Question]...[Student Answer]..." according to a preset prompt template and input it into the model. Another optional implementation is to explicitly state the authority of the standard answer in the grading constraint information, requiring the model to judge only based on that answer.

[0067] This specification describes an implementation scenario for automatic grading on an online education platform. Before calling the answer grading model, the corresponding standard answer is retrieved from the question bank database based on the question ID of the target question. In this case, the question is "Given that two sides of an isosceles triangle are 5 and 8, find the length of the third side." The standard answer is "5 or 8." After obtaining this standard answer, it is input into the answer grading model along with the target question type "Science - Unique Answer Type," the target question text, and the student's answer "The length of the third side is 5 or 8." The model uses the standard answer as a benchmark to determine if the student's answer matches the standard answer, outputting "True."

[0068] In one implementation of this manual, in a question grading scenario where a standard answer is missing or unreliable, an original question, "Please briefly describe the content of Newton's First Law," is obtained. However, the database does not store a standardized answer. An existing visual model is used to cross-validate and extract the answer, generating a high-confidence answer: "Any object will remain at rest or in uniform motion in a straight line unless compelled to change its state of motion by an external force." This result is used as the target standard answer. Subsequently, the standard answer, the question type "Humanities - Factual," the question content, and the student's answer are input into the grading model. The model determines that the student's answer, "An object remains at rest or in uniform motion in a straight line unless compelled to change its state of motion by an external force," is semantically consistent with the standard answer and outputs "True."

[0069] By obtaining the target standard answer before calling the answer grading model and using the standard answer as part of the input for grading, the explicit injection and dynamic updating of the evaluation benchmark are realized. This enables the model to make accurate comparisons rather than relying on its own knowledge inference, significantly reducing the risk of misjudgment caused by the model's prior knowledge bias.

[0070] In one optional embodiment of this specification, step 106 further includes: Based on the target question type, determine the grading constraints for the target answers; The system invokes the answer grading model, and based on the grading constraints and the target question, grades the target answer to obtain the grading result.

[0071] Grading constraint information consists of a series of rules and restrictions generated based on the target question type to guide the grading model in performing evaluation tasks. Different types of grading logic (such as completeness checks, subject equivalence judgments, and grading rules) can be encoded into prompts or instructions that the model can understand, ensuring that the model grades according to preset standards and avoiding subjective bias. For example, grading constraint information may include a completeness check rule that "the number of student answers must be checked to see if it meets the question requirements"; a flexible evaluation rule that "numerical equivalence and expression equivalence are considered correct in science questions"; and a grading rule that "the standard answer has absolute authority, and the model must not use its own knowledge to refute it."

[0072] Specifically, the completeness check constraint requires the model to first verify whether the student's answer meets the basic requirements of the question (such as the number of answers, necessary steps, and format specifications) before grading. If any omissions are found, the answer is directly judged as incorrect. Its purpose is to prevent students from being mistakenly judged as partially correct due to omissions, thus improving the rigor of grading. For example, the completeness check constraint could be "If the question requires two reasons, and the student only writes one, it is judged as incorrect"; or "If the question is a multiple-choice question, and the student does not select any option, it is judged as incorrect." Subject-specific and flexible evaluation constraints refer to constraints that adopt differentiated evaluation standards based on the subject (science or humanities) of the question. For example, science questions could follow the principle of "equivalent result is correct," allowing numerical equivalence, mathematical form equivalence, and unit conversion equivalence; humanities questions could be divided into factual questions (assessing core semantic consistency, allowing word order adjustments and synonym substitutions) and open-ended questions (the standard answer is downgraded to a reference example, and meeting the question constraints is considered correct). Its function is to enable the grading model to accurately identify diverse expressions in science and semantic consistency in humanities, thereby reducing the misjudgment rate. The ironclad rule of grading is a mandatory constraint that gives the standard answer absolute authority, requiring the model not to use its own prior knowledge to refute or correct the standard answer, and ensuring that the reward signal is strictly aligned with the set benchmark. Its function is to prevent large models from judging correct answers as wrong or wrong answers as correct due to their own knowledge bias, thereby ensuring the stability and reliability of the grading results.

[0073] Based on the target question type, the grading constraints for the target answer are determined. Specifically, this can be based on the subject information (science / humanities) and modal information (unique answer / multiple answer) of the target question type, selecting the corresponding constraint set from a pre-defined constraint rule base and dynamically assembling it into grading constraints. One optional implementation is to load corresponding flexible evaluation rules based on the subject tag in the target question type (equivalence rules for science, semantic consistency rules for humanities); and unconditionally load integrity check constraints and judgment rule constraints. Another optional implementation is to additionally load a "synonym substitution allowed" constraint for humanities-factual questions; and a "standard answer is for reference only" constraint for humanities-open-ended questions.

[0074] The answer grading model is invoked to grade the target answer based on the grading constraint information and the target question, and the grading result is obtained. Specifically, the grading constraint information, the target question, and the target answer are concatenated according to the preset prompt word template to form a complete model input, and then the answer grading model is invoked to generate the grading conclusion.

[0075] Based on the obtained target standard answer, the grading constraint information is combined with the target question, target standard answer, and target answer according to the preset prompt word template to form a complete model input. Then, the answer grading model is called to guide the model to generate grading conclusions according to the established logic.

[0076] One possible implementation is to construct system prompts, write grading constraint information into system instructions, and then submit the user input (question, answer; or question, standard answer, student answer) as dialogue content to the model. Another possible implementation is to embed the grading constraint information directly into the beginning of the user message and send it to the model along with the question content.

[0077] For example, the grading constraint information can be organized in the form of structured text, containing three parts: the first part is the completeness check rule, which requires the model to first verify the completeness of the answer, and if there is any omission, it is directly judged as wrong; the second part is the subject-specific and flexible evaluation rule, which selects the science equivalence judgment or the humanities semantic consistency judgment according to the question type; the third part is the ironclad rules of grading, which emphasizes the absolute authority of the standard answer. For different types of questions, the details of the flexible evaluation rule are dynamically adjusted, such as adding the explanation of "allowing equivalent expressions" in science questions and adding the explanation of "allowing word order adjustment and synonym substitution" in humanities fact questions.

[0078] This specification describes an implementation scenario for automatic grading on an online education platform. The target question type is "Science - Unique Answer Type," and the grading constraints are defined as follows: Completeness check: "Check if the student has provided a final answer"; Flexible evaluation rule: "In science questions, numerical equivalence (e.g., 5 vs. 5.0) and expression equivalence (e.g., √8 vs. 2√2) are considered correct"; The ironclad rule: "The standard answer is absolutely authoritative and cannot be questioned." These constraints are assembled into a system prompt: "You are a grading model. You must adhere to the following rules: 1. Completeness check: Check if the student has provided a final answer; if not, grade as False. 2. Flexible evaluation for science: Numerical equivalence and expression equivalence are considered correct. 3. Ironclad rule: The standard answer has absolute authority." The target question and student's answer are then input into the model, and the model outputs "True."

[0079] In one implementation of this manual, in a humanities factual question grading scenario, the target question is "Please write the author of 'Quiet Night Thoughts'," and the student answers "Li Bai," while the standard answer is "Li Bai (courtesy name Taibai)." The target question type is "Humanities - Unique Answer - Factual." Grading constraints are defined as follows: completeness check (already answered); flexible evaluation rules: "In humanities factual questions, synonym substitution and word order adjustment are allowed, as long as the core semantics match, such as 'Li Bai' and 'Li Bai (courtesy name Taibai)' are considered consistent"; and the ironclad rule of judgment: "The standard answer is absolutely authoritative." Based on the constraints, the model determines that "Li Bai" is consistent with the core semantics of the standard answer and outputs "True." If the student answers "Li Shangyin," then it outputs "False."

[0080] In one implementation of this manual, in a humanities open-ended question grading scenario, the target question is "Discuss your understanding of 'Do not do to others what you would not have them do to you,'" and the student answers, "Don't impose on others what you yourself dislike." The target question type is "Humanities - Multiple Answers - Open-ended." Grading constraints are defined as follows: completeness check (answer not empty); flexible evaluation rule: "In open-ended questions, the standard answer is for reference only; as long as the student's answer meets the question requirements, is grammatically correct, and logically sound, it is considered correct"; and the ironclad rule: "A reasonable answer cannot be negated based on the standard answer." Based on the constraints, the model determines that the student's answer is semantically reasonable and outputs "True."

[0081] By dynamically determining the grading constraints based on the target question type, the grading logic is made structured and configurable.

[0082] Sample questions, sample question types, sample answers, and sample grading results serve as supervised data for training the answer grading model. Sample questions and answers constitute the input, sample question types provide classification guidance, and sample grading results serve as the expected output labels. Their role is to enable the model to learn the mapping relationship from multi-dimensional inputs to correct grading conclusions. For example, sample grading results can be manually labeled True / False; for example, sample grading results can be verified comparison results with standard answers.

[0083] The sample answers are obtained by the answer generation model solving the sample questions. Specifically, the student answers in the training data are not submitted by real students, but are solution paths automatically generated by the answer generation model for the sample questions. This allows for the scalable generation of training samples covering various correct and incorrect patterns, improving the model's generalization ability. For example, the answer generation model can be a reinforcement learning policy model under training; for example, the answer generation model can be an auxiliary generation model specifically designed for data augmentation.

[0084] In one optional embodiment of this specification, before step 106, the following steps are also included: Obtain sample data, which includes sample questions, sample question types, sample answers, and sample grading results; The initial grading model is invoked, and the sample answers are graded based on the sample question type and sample question to obtain the predicted grading results; Based on the sample grading results and the predicted grading results, the parameters of the initial grading model are adjusted to obtain the trained answer grading model.

[0085] Sample data is a supervised dataset used to train the answer-grading model. Each sample contains four elements: sample question, sample question type, sample answer, and sample grading result. This provides the model with the correspondence between input and output, enabling the model to learn the mapping rules from question type, question content, and answer to grading conclusion by learning from these samples. For example, the sample data can cover various question types, such as single-answer questions in science subjects and multiple-answer questions in humanities subjects; for example, the sample data can contain positive and negative samples of correct and incorrect answers; for example, the sample data can be generated through manual annotation or automated verification.

[0086] The initial grading model is a basic model that has not yet been fine-tuned for a specific grading task. It is usually a pre-trained large language model or multimodal model. Its purpose is to serve as the starting point for training, and to acquire specific answer grading capabilities through subsequent parameter adjustments. For example, the initial grading model can be a model that has been fine-tuned with general instructions but has not been optimized for the grading task.

[0087] Predicted grading results are the conclusions output by the initial grading model after grading the sample answers based on the input sample question type and sample question. They are typically True / False binary labels. Their purpose is to compare them with the sample grading results (true labels) to calculate the loss and guide model parameter updates.

[0088] Based on the sample grading results and the predicted grading results, the parameters of the initial grading model are adjusted. Specifically, this can be done by calculating the difference between the predicted grading results and the sample grading results (such as cross-entropy loss), and updating the model parameters using the backpropagation algorithm, so that the model's predictions gradually approach the true labels. One possible implementation is to use mini-batch gradient descent, processing a batch of samples each time, calculating the average loss, and then updating the parameters. Another possible implementation is to set an initial learning rate and weight decay, gradually reducing the loss over multiple training rounds. Yet another possible implementation is to introduce a validation set during training, dynamically adjusting the learning rate or stopping training early based on the validation set performance.

[0089] One possible approach to obtaining sample data is to extract real students' answer data from a historical answer record database and construct a sample set by combining it with manually labeled grading results. Another possible approach is to use an answer generation model to answer sample questions in batches, generate sample answers covering multiple correct and incorrect patterns, and then generate grading labels through rules or manual verification.

[0090] Based on the sample correction results and the predicted correction results, the parameters of the initial correction model are adjusted. One possible implementation is to use the cross-entropy loss function to calculate the loss value between the predicted result and the true label, calculate the gradient through backpropagation, and use the optimizer to update the model parameters.

[0091] By constructing a supervised dataset containing sample questions, sample question types, sample answers, and sample grading results, and by adjusting the parameters of the initial grading model, specialized training of the answer grading model was achieved. After training, the answer grading model has the ability to generalize across disciplines and question types.

[0092] In one optional implementation of this specification, before calling the initial grading model and grading the sample answers based on the sample question type and sample question to obtain the predicted grading result, the following steps may also be included: Obtain the standard answers to the sample questions; The initial grading model is invoked, and the sample answers are graded based on the sample question type and sample question to obtain predicted grading results, including: The initial grading model is invoked, and the sample answers are graded based on the sample question type, sample question, and sample standard answer to obtain the predicted grading results.

[0093] The standard answer to the sample question is the correct answer that corresponds to the sample question and serves as the evaluation benchmark. It is used to provide a clear reference for the initial grading model during the training process, so that the model can establish a mapping relationship from the question, the standard answer, the student's answer to the grading conclusion during the learning phase, avoiding the model relying on its own knowledge to make inferences.

[0094] Obtaining sample standard answers for sample questions can be achieved during the training phase by reading standard answer data associated with the sample questions from a question bank system, a standard answer database, or manually annotated data. One possible implementation is to query the standard answer database based on the unique identifier of the sample question to obtain the corresponding reference answer; another possible implementation is to perform cross-validation using existing large-scale visual or textual models for questions whose original answers may be inaccurate, and use the high-confidence validation results as the sample standard answers; yet another possible implementation is for human annotators to simultaneously input the standard answers when constructing the training dataset.

[0095] In one optional implementation of this specification, obtaining the sample standard answers to the sample questions may further include the following steps: Obtain sample reference answers for sample questions; Based on the sample questions, the sample reference answers are verified to obtain the verification indicators of the sample reference answers; Based on the verification criteria, the standard answer for the sample is determined.

[0096] Sample answer keys are initial reference answers pre-stored in a question bank or data source that correspond to sample questions. They may come from teacher input, textbook supplements, or automatic generation. Their purpose is to serve as the basic source of standard answers, but they may contain inaccuracies, incompleteness, or non-standard formatting issues, requiring further verification.

[0097] Validation metrics are index values ​​obtained by quantifying or qualitatively evaluating the accuracy, completeness, and authority of sample reference answers through cross-validation or automated evaluation methods. Their purpose is to determine whether the reference answers can be directly used as standard answers, or whether they need to be corrected or replaced. For example, a validation metric can be a confidence score (between 0 and 1); for example, a validation metric can be a discrete level such as "high confidence," "medium confidence," or "low confidence"; for example, a validation metric can be the consistency rate obtained through multi-model voting.

[0098] Based on sample questions, the sample reference answers are validated to obtain validation metrics. Specifically, this can be achieved by independently parsing the sample questions using existing large-scale visual or text models, generating analytical answers, and comparing these answers with the sample reference answers to calculate the validation metrics based on the degree of matching. One optional implementation is to call a high-performance multimodal large-scale model to re-solve the sample questions, semantically matching the model's output with the sample reference answers, and calculating the similarity as a validation metric. Another optional implementation is to employ a multi-model voting mechanism, using multiple large-scale models to solve the sample questions, and statistically analyzing the consistency rate between each model's answer and the sample reference answer as a validation metric. A further optional implementation is to verify the accuracy of the reference answers for factual questions by comparing them with external knowledge bases (such as encyclopedias or dictionaries).

[0099] Based on the verification indicators, a sample standard answer is determined. Specifically, the decision can be made based on the level of the verification indicators, whether to use the sample reference answer as the standard answer, to use the reference answer after modification, or to completely replace it with a high-confidence verification result. One possible implementation is that if the verification indicator is higher than a preset threshold (e.g., confidence > 0.9), the sample reference answer is directly used as the sample standard answer. Another possible implementation is that if the verification indicator is lower than the preset threshold, the answer is regenerated using a large model, or it is manually reviewed and modified before being used as the standard answer. Yet another possible implementation is that, in cases where multiple models have inconsistent voting results, the majority vote is used as the standard answer, and the voting distribution is recorded as auxiliary verification information.

[0100] In one implementation of this specification, during the training data construction phase, a sample reference answer for a math problem is read from the question bank, which is "5". To verify the accuracy of this answer, a multimodal large model is invoked to independently solve the problem "Given that the two legs of a right triangle are 3 and 4, find the length of the hypotenuse". The model outputs "5", and the reference answer is compared with the model output. The semantic similarity is calculated to be 1.0, and the verification index is high confidence (>0.95). Based on this verification index, "5" is directly used as the sample standard answer.

[0101] In one implementation of this manual, in a historical question, "Briefly describe the significance of the xxx event," the sample reference answer was "overthrew xx." Three different large models were used to answer the question: Model A output "had xx impact on country x," Model B output "overthrew xx," and Model C output "established country xxx." Semantic matching of the reference answer with the outputs of the three models revealed a similarity of 0.9 with Model B, and low similarity with the other two models (0.4 and 0.3), resulting in an overall consistency rate of only 33%, with a low confidence level as the validation metric. This triggered a manual review process, where annotators integrated the core points of the three model outputs into "had xx impact on country x and established country xxx," which became the sample standard answer.

[0102] By introducing cross-validation and verification index mechanisms in the process of obtaining sample standard answers, the problem of the original reference answers being inaccurate, incomplete, or non-standard in format is solved.

[0103] The initial grading model is invoked to grade sample answers based on sample question type, sample question, and sample standard answer, and to obtain predicted grading results. Specifically, the sample standard answer, sample question type, sample question, and sample answer can be input into the initial grading model together, so that the model learns the logic of judging based on the standard answer during the training phase.

[0104] One optional implementation is to input the standard answer, question, and student's answer into the model in the format "[Standard Answer]...[Question]...[Student's Answer]..." according to a preset prompt template; another optional implementation is to explicitly require the model to make judgments based on the provided standard answer in the grading constraint information.

[0105] In one implementation of this specification, when constructing the training dataset, a corresponding standard answer is associated with each sample. For a math problem, "Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side," the sample standard answer is "5 or 8." During the training phase, after obtaining this sample standard answer, it is input into the initial grading model along with the sample question type "Science - Unique Answer," the sample question text, and the sample answer (e.g., "The length of the third side is 5"). The input format is: "[Standard Answer] 5 or 8 [Question Type] Science - Unique Answer [Question] Given that the lengths of two sides of an isosceles triangle are 5 and 8, find the length of the third side [Student Answer] The length of the third side is 5." The model uses the standard answer as a benchmark and outputs the predicted grading result "False" (due to the missing 8). By calculating the loss with the sample grading label (False), the model learns that it needs to accurately compare the student's answer with the standard answer.

[0106] In one implementation of this specification, in a training sample of a humanities factual question, the standard answer is "Li Bai (courtesy name Taibai)," the question type is "Humanities - Unique Answer - Factual," and the answer is "Li Bai." The standard answer, along with the question and answer, are input into the initial grading model, and the grading constraint information "allows synonym substitution and word order adjustment" is configured. The model outputs a predicted grading result of "True," consistent with the sample grading label. Loss calculations are used to enhance the model's ability to determine the semantic equivalence of humanities factual questions.

[0107] By incorporating sample standard answers as part of the model input during the training phase, the learning efficiency and judgment accuracy of the answer grading model are significantly improved. This enables the model to learn how to match student answers with standard answers, rather than relying on its own knowledge to infer correctness. This reduces the risk of misjudgment due to biases in the model's prior knowledge and allows the model to better generalize to answer variations not covered in the training data (such as equivalent expressions in science subjects and synonyms in humanities subjects). This results in a more consistent and reliable answer grading model after training.

[0108] In one optional embodiment of this specification, after step 106, the following is also included: Based on the grading results, determine the target evaluation indicators for the answers; Based on the response evaluation metrics, reinforcement learning is performed on the response generation model to obtain a trained response generation model.

[0109] Response evaluation metrics are numerical values ​​or signals derived from or calculated based on grading results, used to quantify the quality of student responses. They can serve as reward signals in reinforcement learning, guiding the strategy updates of the response generation model. For example, a response evaluation metric can be a binary reward signal (+1 for correct, -1 for incorrect); for example, a response evaluation metric can be a continuous score (e.g., a score between 0 and 1 based on correctness); for example, a response evaluation metric can be a dominance function value calculated based on grading results.

[0110] In an optional embodiment of this application, the answer generation model acts as an agent, and the grading model acts as an environment evaluator. The grading results are converted into reward signals, driving the answer generation model to optimize its problem-solving strategy. Its purpose is to enable the answer generation model to learn from the grading feedback and gradually improve its ability to generate correct answers.

[0111] The answer generation model is a model used to automatically generate student answers or problem-solving paths. It is a policy network in reinforcement learning that can explore different problem-solving paths during training and continuously optimize through feedback from grading the model, ultimately generating high-quality and diverse answers.

[0112] Determining the evaluation metric for the target answer based on the grading results means mapping the binary labels output by the grading model to specific reward values, which serve as the optimization objective of the answer generation model. One possible implementation is to award +1 if the grading result is True (correct) and -1 if it is False (incorrect). Another possible implementation is to calculate a continuous reward value between 0 and 1, combining the confidence level or partially correct information in the grading results, for scenarios requiring fine-grained feedback. Yet another possible implementation is to use a dominance function to compare the reward of the current answer with a baseline value (such as the historical average reward) to obtain a relative evaluation metric.

[0113] Based on the answer evaluation metric, reinforcement learning is applied to the answer generation model to obtain a trained answer generation model. Specifically, the answer evaluation metric can be used as a reward signal, and the parameters of the answer generation model can be updated through a reinforcement learning algorithm, enabling it to generate answers that are more likely to be correctly graded when faced with similar questions in the future. One optional implementation is to use a proximal policy optimization algorithm, substituting the reward value corresponding to the answer generated by the current policy of the answer generation model into the loss function, and updating the model parameters through gradient ascent. Another optional implementation is to periodically compare the output of the current answer generation model with the historical best policy during reinforcement learning training, and to prevent policy abrupt changes.

[0114] In one implementation of this specification, within a reinforcement learning training environment, the answer generation model generates the answer "5" for a math problem: "Given that the two legs of a right triangle are 3 and 4, find the length of the hypotenuse." The pre-trained answer correction model is then invoked, and based on the question type ("Science - Unique Answer"), the question text, and the standard answer "5," the correction result is True. This result is mapped to a reward value of +1, and the parameters of the answer generation model are updated. If the answer generation model generates "4," the correction result is False, the reward value is -1, and the model parameters are updated to reduce such errors.

[0115] By transforming the output of the answer-grading model into a reinforcement learning evaluation metric and using this metric to iteratively optimize the answer generation model, a closed-loop training system of "grading-generation" is constructed. This allows the answer generation model to learn autonomously from grading feedback, continuously adjusting its problem-solving strategies to improve accuracy, thus solving the problem of traditional supervised training relying on large-scale manually labeled data. Simultaneously, through closed-loop training, the answer generation model can gradually evolve, generating more accurate and diverse answers, providing richer sample data for subsequent judging model training, forming a positive cycle, and ultimately improving the performance and generalization ability of the entire intelligent grading system.

[0116] The answer grading method provided in this application obtains the target question and its answer, and after identifying the type of the target question, calls a dedicated answer grading model for grading. This achieves adaptive evaluation based on question type. Question type identification provides the model with question category information, enabling the grading model to adopt appropriate evaluation logic according to different types, thereby improving the accuracy of grading and its cross-scenario generalization ability. At the same time, the answer grading model is trained on sample answers obtained by the answer generation model from sample question answers, which can automatically generate rich training data covering various forms of answers under different question types, solving the problem of scarce manually labeled data. Moreover, the model output is constrained to a stable binary label, avoiding redundant output and illusions of general models, and improving the accuracy, efficiency and automation of automatic grading.

[0117] Corresponding to the answer grading method, this manual also provides a method for training the answer grading model. Figure 3 This is a flowchart of a response grading model training method provided in an embodiment of this application. See also... Figure 3 Specifically, it includes the following steps: Step 302: Obtain sample data, which includes sample questions, sample question types, sample answers, and sample grading results. The sample answers are obtained by the answer generation model from the sample questions. Step 304: Call the initial grading model, grade the sample answers based on the sample question type and sample question, and obtain the predicted grading results; Step 306: Based on the sample grading results and the predicted grading results, adjust the parameters of the initial grading model to obtain the trained answer grading model.

[0118] For explanations regarding sample data, sample answers, sample grading results, initial grading model, and predicted grading results, please refer to the relevant content on the above answer grading methods; they will not be repeated here.

[0119] In one implementation of this specification, the training process of a response grading model first involves acquiring sample data. 10,000 samples are extracted from historical response records, covering subjects such as mathematics, physics, Chinese, and history. Each sample includes the question, question type (e.g., "Science - Unique Answer"), student's answer (generated by a reinforcement learning agent), and a manually verified grading label (True / False). Then, the initial grading model is invoked. For each sample, the question type, question text, and student's answer are concatenated according to the template "[Question Type]...[Question]...[Student Answer]..." and input into the model. The model outputs a predicted grading result (True / False). The cross-entropy loss between the predicted result and the sample grading label is calculated. With a batch size of 16, five rounds of training are performed. After each round, the accuracy is evaluated on the validation set. Finally, the model parameters with the highest accuracy on the validation set are saved, resulting in the trained response grading model.

[0120] By constructing a supervised dataset containing sample questions, sample question types, sample answers, and sample grading results, and by adjusting the parameters of the initial grading model, specialized training of the answer grading model was achieved. The answer generation model was used to produce training samples on a large scale, solving the problem of scarce real labeled data. Through supervised fine-tuning, the general large model was transformed into a specialized judgment model with highly convergent output (binary labels), eliminating redundant interpretations and illusions that may occur when the general model is grading. After training, the answer grading model has the ability to generalize across disciplines and question types.

[0121] Corresponding to the answer grading method, this manual also provides a method for training the answer generation model. Figure 4 This is a flowchart of a response generation model training method provided in an embodiment of this application. See also... Figure 4 Specifically, it includes the following steps: Step 402: Obtain the grading results of the target answer, wherein the grading results are obtained by the grading model grading the sample answers, and the grading model is trained based on the grading model training method described above; Step 404: Based on the grading results, determine the evaluation indicators for the target answers; Step 406: Based on the response evaluation index, perform reinforcement learning on the response generation model to obtain the trained response generation model.

[0122] The explanations of the answer correction results, answer evaluation indicators, and answer generation model can be found in the explanations of the relevant terms in the above answer correction methods, and will not be repeated here.

[0123] In one implementation of this specification, within a reinforcement learning training environment, the answer generation model generates 5000 student answers in one round, covering both plain text questions and multimodal questions with images and text. An asynchronous concurrent request mechanism is employed, encapsulating these 5000 judging requests as independent API calls, which are concurrently sent to the answer grading model service using an asynchronous I / O framework. The maximum concurrency is set to 100, significantly improving batch processing throughput. Simultaneously, the inference module achieves seamless modality adaptation: for each request, the modality type is queried based on the question ID; plain text questions are routed to the text model branch; for image-text questions, the image storage path is automatically retrieved from the database, a pre-signed URL is dynamically generated, and appended to the multimodal request body, ensuring that visual information is correctly encoded. All requests are completed within 5 seconds, and the grading model returns a binary result (True / False). True is mapped to a reward of +1, and False to a reward of -1, yielding the answer evaluation metric. The advantage function is calculated using the reward signal, and the parameters of the answer generation model are updated.

[0124] In one implementation of this specification, in a scenario requiring the processing of large-scale mixed text and image problems, the answer generation model generates a large number of mathematical problem answers containing geometric figures. Through modal adaptation, it automatically recognizes the image input, dynamically generates image links, and asynchronously and concurrently calls the multimodal grading model branches. The grading results are returned in real time and mapped as reward signals to update the model. This closed-loop training enables the answer generation model to gradually learn to generate correct proof steps that conform to the geometric relationships of the images.

[0125] Figure 5 This is a schematic diagram of the overall architecture of a response generation model trained through reinforcement learning, as provided in one embodiment of this application. Figure 5As shown, this architecture demonstrates the complete data flow process of the answer generation model and the reinforcement learning training loop. First, questions are extracted from the original multimodal question bank, and authoritative answers are obtained through dynamic verification with standard answers. The agent (answer generation model) explores and generates student answers, combining the questions and standard answers to perform multimodal judgment data structure assembly, and injecting system prompts. Subsequently, the finely tuned dedicated judgment model (i.e., the answer generation model) outputs a binary judgment result (True / False), which is directly mapped to a reinforcement learning reward signal and fed back to the agent in the reinforcement learning training environment to update the answer generation model's strategy. The entire architecture forms a closed loop of "generation-grading-feedback-optimization," driving the continuous evolution of the answer generation model and improving the accuracy and diversity of problem-solving.

[0126] By transforming the output of the answer-grading model into a reinforcement learning evaluation metric and using this metric to iteratively optimize the answer generation model, a closed-loop training system of generation-grading-feedback is constructed. This allows the answer generation model to learn autonomously from grading feedback, continuously adjusting its problem-solving strategies to improve accuracy. Through this closed-loop training, the answer generation model can gradually evolve, generating more accurate and diverse answers, providing richer sample data for the continuous optimization of the judging model, forming a positive cycle, and ultimately improving the performance and generalization ability of the entire intelligent grading system.

[0127] Corresponding to the above method embodiments, this application also provides embodiments of a response correction device. Figure 6 This is a schematic diagram of a response correction device provided in one embodiment of this application. Figure 6 As shown, the device includes: The first acquisition module 602 is configured to acquire the target question and the target answer to the target question; The identification module 604 is configured to identify the type of the target question and obtain the type of the target question. The first batch of modified module 606 is configured to call the answer grading model, grade the target answer based on the target question type and the target question, and obtain the answer grading result. The answer grading model is trained based on the sample question, sample question type, sample answer and sample grading result. The sample answer is obtained by the answer generation model solving the sample question.

[0128] Optionally, the grading module is further configured to, when the target question type is unimodal, input the target question and target answer into the answer grading model to obtain the answer grading result; when the target question type is multimodal, obtain the target storage information of the target question, and input the target storage information, the target question and the target answer into the answer grading model to obtain the answer grading result.

[0129] Optionally, the grading module is further configured to determine the grading constraints of the target answer based on the target question type; call the answer grading model, and grade the target answer based on the grading constraints and the target question to obtain the answer grading result.

[0130] Optionally, the identification module is further configured to identify the type of the target question based on the subject to which the target question belongs, and to obtain the target question type; and / or to identify the type of the target question based on the modality of the target question, and to obtain the target question type.

[0131] Optionally, the answer grading device further includes a second acquisition module configured to acquire the target standard answer to the target question; Accordingly, the grading module is further configured to call the answer grading model, grade the target answer based on the target question type and the target question, and obtain the answer grading result, including: calling the answer grading model, grading the target answer based on the target question type, the target question, and the target standard answer, and obtaining the answer grading result.

[0132] Optionally, the answer grading device further includes a first training module, configured to acquire sample data, wherein the sample data includes sample questions, sample question types, sample answers, and sample grading results; invoke an initial grading model, grade the sample answers based on the sample question types and sample questions, and obtain predicted grading results; and adjust the parameters of the initial grading model according to the sample grading results and predicted grading results to obtain a trained answer grading model.

[0133] Optionally, the first training module is further configured to obtain the sample standard answers of the sample questions; call the initial grading model, and grade the sample answers based on the sample question type, sample question, and sample standard answers to obtain the predicted grading results.

[0134] Optionally, the first training module is further configured to obtain sample reference answers for the sample questions; Based on the sample questions, the sample reference answers are verified to obtain the verification indicators of the sample reference answers; based on the verification indicators, the sample standard answers are determined.

[0135] Optionally, the answer grading device further includes a second training module, configured to determine the answer evaluation index of the target answer based on the answer grading results; and to perform reinforcement learning on the answer generation model based on the answer evaluation index to obtain the trained answer generation model.

[0136] The answer grading device provided in this application acquires the target question and its answer, and after identifying the type of the target question, calls a dedicated answer grading model for grading. This achieves adaptive evaluation based on question type. Question type identification provides the model with question category information, enabling the grading model to adopt appropriate evaluation logic according to different types, thereby improving the accuracy of grading and its cross-scenario generalization ability. At the same time, the answer grading model is trained based on sample answers obtained by the answer generation model from sample question answers. It can automatically generate rich training data covering various forms of answers under different question types, solving the problem of scarce manually labeled data. Moreover, the model output is constrained to a stable binary label, avoiding redundant output and illusions of general models, and improving the accuracy, efficiency and automation of automatic grading.

[0137] Corresponding to the above method embodiments, this application also provides an embodiment of a response grading model training device. Figure 7 This is a schematic diagram of the structure of a response grading model training device provided in one embodiment of this application. Figure 7 As shown, the device includes: The second acquisition module 702 is configured to acquire sample data, wherein the sample data includes sample questions, sample question types, sample answers, and sample grading results, wherein the sample answers are obtained by the answer generation model from the answers to the sample questions; The second grading module 704 is configured to call the initial grading model, grade the sample answers based on the sample question type and sample question, and obtain the predicted grading results; The second training module 706 is configured to adjust the parameters of the initial grading model based on the sample grading results and the predicted grading results, so as to obtain the trained answer grading model.

[0138] By constructing a supervised dataset containing sample questions, sample question types, sample answers, and sample grading results, and by adjusting the parameters of the initial grading model, specialized training of the answer grading model was achieved. The answer generation model was used to produce training samples on a large scale, solving the problem of scarce real labeled data. Through supervised fine-tuning, the general large model was transformed into a specialized judgment model with highly convergent output (binary labels), eliminating redundant interpretations and illusions that may occur when the general model is grading. After training, the answer grading model has the ability to generalize across disciplines and question types.

[0139] Corresponding to the above method embodiments, this application also provides embodiments of a response generation model training device. Figure 8 This is a schematic diagram of the structure of a response generation model training device provided in one embodiment of this application. Figure 7 As shown, the device includes: The third acquisition module 802 is configured to acquire the answer correction result of the target answer, wherein the answer correction result is obtained by the answer correction model correcting the sample answer, and the answer correction model is trained based on the method as described in claim 10; Module 804 is configured to determine the evaluation indicators for the target answer based on the answer grading results. The third training module 806 is configured to perform reinforcement learning on the answer generation model based on the answer evaluation index to obtain the trained answer generation model.

[0140] By transforming the output of the answer-grading model into a reinforcement learning evaluation metric and using this metric to iteratively optimize the answer generation model, a closed-loop training system of generation-grading-feedback is constructed. This allows the answer generation model to learn autonomously from grading feedback, continuously adjusting its problem-solving strategies to improve accuracy. Through this closed-loop training, the answer generation model can gradually evolve, generating more accurate and diverse answers, providing richer sample data for the continuous optimization of the judging model, forming a positive cycle, and ultimately improving the performance and generalization ability of the entire intelligent grading system.

[0141] The above are illustrative schemes of the answer correction device, answer correction model training device, and answer generation model training device of this embodiment. It should be noted that the technical solutions of the above devices and the technical solutions of the above methods belong to the same concept. Details not described in detail in the technical solutions of the answer correction device, answer correction model training device, and answer generation model training device can be found in the descriptions of the technical solutions of the above answer correction method, answer correction model training method, and answer generation model training method. Furthermore, the components in the device embodiments should be understood as functional modules necessary to implement each step of the program flow or each step of the method; these functional modules are not actual functional divisions or separations. Device claims defined by such a set of functional modules should be understood as a functional module architecture that primarily implements the solution through the computer program described in the specification, and should not be understood as a physical device that primarily implements the solution through hardware.

[0142] Figure 9 A structural block diagram of a computing device 900 according to an embodiment of this application is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0143] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include PSTN (Public Switched Telephone Network), LAN (Local Area Network), WAN (Wide Area Network), PAN (Personal Area Network), or combinations of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., NIC (Network Interface Controller)), such as an IEEE 802.11 WLAN (Wireless Local Area Network) wireless interface, Wi-MAX (Worldwide Interoperability for Microwave Access) interface, Ethernet interface, USB (Universal Serial Bus) interface, cellular network interface, Bluetooth interface, and NFC (Near Field Communication).

[0144] In one embodiment of this application, the aforementioned components of the computing device 900 and Figure 9 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 9 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0145] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs (Personal Computers). The computing device 900 can also be a mobile or stationary server.

[0146] The processor 920 is used to execute computer-executable instructions for the above methods.

[0147] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solutions of the above-described method and the verification model training method. For details not described in detail in the technical solution of the computing device, please refer to the descriptions of the technical solutions of the above-described answer grading method, answer grading model training method, and answer generation model training method.

[0148] One embodiment of this application also provides a computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, is used for a response grading method, a response grading model training method, and a response generation model training method.

[0149] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the above-described answer grading method, answer grading model training method, and answer generation model training method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the above-described answer grading method, answer grading model training method, and answer generation model training method.

[0150] One embodiment of this application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, are used for a response grading method, a response grading model training method, and a response generation model training method.

[0151] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solutions of the above-mentioned answer grading method, answer grading model training method, and answer generation model training method. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solutions of the above-mentioned answer grading method, answer grading model training method, and answer generation model training method.

[0152] Computer programs / instructions include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in computer-readable media can be appropriately added to or removed according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0153] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0154] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0155] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to specific implementations. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for grading student answers, characterized in that, include: Obtain the target question and the target answer to the target question; The target question is identified by type to obtain the target question type; The answer grading model is invoked to grade the target answer based on the target question type and the target question, thereby obtaining the answer grading result. The answer grading model is trained based on sample questions, sample question types, sample answers, and sample grading results. The sample answers are obtained by the answer generation model solving the sample questions.

2. The method according to claim 1, characterized in that, The invoked answer grading model, based on the target question type and the target question, grades the target answer to obtain the answer grading result, including: When the target question type is a single-modal type, the target question and the target answer are input into the answer grading model to obtain the answer grading result; When the target question type is multimodal, the target storage information of the target question is obtained, and the target storage information, the target question, and the target answer are input into the answer grading model to obtain the answer grading result.

3. The method according to claim 1, characterized in that, The invoked answer grading model, based on the target question type and the target question, grades the target answer to obtain the answer grading result, including: Based on the target question type, the grading constraint information for the target answer is determined; The answer grading model is invoked, and the target answer is graded based on the grading constraint information and the target question to obtain the answer grading result.

4. The method according to claim 1, characterized in that, The step of identifying the type of the target question to obtain the target question type includes: Based on the subject to which the target question belongs, the target question is type-identified to obtain the target question type; and / or, Based on the modality of the target question, the target question is type-identified to obtain the target question type.

5. The method according to any one of claims 1 to 4, characterized in that, Before calling the answer grading model to grade the target answer based on the target question type and the target question, and obtaining the answer grading result, the method further includes: Obtain the target standard answer to the target question; The invoked answer grading model, based on the target question type and the target question, grades the target answer to obtain the answer grading result, including: The answer grading model is invoked to grade the target answer based on the target question type, the target question, and the target standard answer, thereby obtaining the answer grading result.

6. The method according to any one of claims 1 to 4, characterized in that, Before calling the answer grading model to grade the target answer based on the target question type and the target question, and obtaining the answer grading result, the method further includes: Obtain sample data, wherein the sample data includes the sample questions, the sample question types, the sample answers, and the sample grading results; The initial grading model is invoked, and the answers to the sample questions are graded based on the sample question type and the sample question to obtain the predicted grading results; Based on the sample grading results and the predicted grading results, the parameters of the initial grading model are adjusted to obtain the trained answer grading model.

7. The method according to claim 6, characterized in that, Before invoking the initial grading model and grading the sample answers based on the sample question type and the sample question, and obtaining the predicted grading result, the process also includes: Obtain the sample standard answer for the sample question; The process of invoking the initial grading model, grading the sample answers based on the sample question type and the sample question, and obtaining predicted grading results includes: The initial grading model is invoked to grade the sample answers based on the sample question type, the sample question, and the sample standard answer, thereby obtaining the predicted grading result.

8. The method according to claim 7, characterized in that, The process of obtaining the sample standard answers for the sample questions includes: Obtain the sample reference answer for the sample question; Based on the sample questions, the sample reference answers are verified to obtain the verification index of the sample reference answers; Based on the verification indicators, the standard answer for the sample is determined.

9. The method according to any one of claims 1 to 4, characterized in that, The method of calling the answer grading model, based on the target question type and the target question, grades the target answer and obtains the answer grading result, and then further includes: Based on the feedback results, the evaluation indicators for the target response are determined. Based on the aforementioned response evaluation metrics, reinforcement learning is performed on the response generation model to obtain the trained response generation model.

10. A method for training a response grading model, characterized in that, include: Obtain sample data, wherein the sample data includes sample questions, sample question types, sample answers, and sample grading results, wherein the sample answers are obtained by the answer generation model from the solutions of the sample questions; The initial grading model is invoked, and the answers to the sample questions are graded based on the sample question type and the sample question to obtain the predicted grading results; Based on the sample grading results and the predicted grading results, the parameters of the initial grading model are adjusted to obtain the trained answer grading model.

11. A method for training a response generation model, characterized in that, include: Obtain the grading result of the target answer, wherein the grading result is obtained by grading the answer of the sample by the grading model, and the grading model is trained based on the method as described in claim 10; Based on the feedback results, the evaluation indicators for the target response are determined. Based on the aforementioned response evaluation metrics, reinforcement learning is performed on the response generation model to obtain the trained response generation model.

12. A device for grading and correcting answers, characterized in that, include: The acquisition module is configured to acquire the target question and the target answer to the target question; The identification module is configured to identify the type of the target question and obtain the target question type. The grading module is configured to call the answer grading model, and grade the target answer based on the target question type and the target question to obtain the answer grading result. The answer grading model is trained based on sample questions, sample question types, sample answers and sample grading results. The sample answers are obtained by the answer generation model solving the sample questions.

13. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the method of any one of claims 1-11.

15. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method of any one of claims 1-11.