An adaptive fine-tuning intelligent question reasoning and feedback method and system
By employing a multi-agent collaborative architecture and LoRA fine-tuning mechanism, the dynamic adaptability and multimodal processing issues of intelligent grading systems are addressed. Detailed problem-solving approaches are provided, improving grading accuracy and personalization while reducing deployment costs, making it suitable for intelligent educational support systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUA DATA TECH (SHANGHAI) CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-07-21
AI Technical Summary
Existing intelligent grading systems cannot dynamically adjust according to the types of questions, difficulty distribution, and user habits in actual use scenarios, resulting in difficulty in continuously improving grading accuracy. They also lack detailed problem-solving strategies and personalized optimization, and have high deployment costs or limited performance, as well as insufficient multimodal processing capabilities.
It adopts an adaptive fine-tuning intelligent question reasoning and feedback method, and through a multi-agent collaborative architecture, including question parsing, problem-solving reasoning, answer comparison and feedback generation agents, it uses OCR model and large language model for multimodal input processing to generate problem-solving thought chain, and optimizes the model through LoRA fine-tuning mechanism, supporting PDF, image and handwriting input.
It achieves personalized optimization based on user data, provides detailed problem-solving ideas, improves grading accuracy and personalization, reduces deployment costs, can accurately process mathematical formulas and charts, supports multiple input formats, and features a semi-automatic interactive design that aligns with educational philosophies.
Smart Images

Figure CN121981285B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent text analysis technology, and in particular to an adaptive fine-tuning intelligent question reasoning and feedback method and system. Background Technology
[0002] With the rapid development of artificial intelligence technology, intelligent educational assistance systems are gradually being applied to teaching scenarios. Traditional homework grading methods are mainly divided into two categories: one is rule-based grading systems, which grade homework using preset rules and templates, but lack flexibility and learning ability; the other is grading using pre-trained large language models, which, although possessing a certain degree of intelligence, have fixed model parameters and cannot adaptively optimize according to the user's usage scenario and the style of the questions.
[0003] Existing intelligent grading systems have the following technical problems:
[0004] Static model problem: Existing systems mostly use fixed pre-trained models, which cannot be dynamically adjusted according to the question types, difficulty distribution and user habits in actual use scenarios, making it difficult to continuously improve the grading accuracy.
[0005] Lack of reasoning process: Existing systems usually give the answer directly or a simple right or wrong judgment, without providing detailed problem-solving ideas and reasoning processes, which is not conducive to cultivating students' problem-solving abilities.
[0006] Cost versus performance contradiction: Large-scale models have excellent performance but high deployment costs and require a lot of computing resources; while small-scale models have low cost but limited performance and are difficult to meet actual needs.
[0007] Insufficient multimodal processing: Existing systems have limited recognition and understanding capabilities when processing tasks containing complex content such as mathematical formulas and charts, especially in terms of the accuracy of processing LaTeX format formulas.
[0008] Lack of personalized adaptation: Existing systems cannot be personalized and optimized based on user data (such as question style preferences, difficulty level, etc.), making it difficult to realize the educational concept of "teaching according to aptitude".
[0009] Therefore, there is an urgent need for an intelligent job grading method that can automatically adapt, continuously optimize, provide a derivation process, and has controllable costs. Summary of the Invention
[0010] In view of the technical defects of existing technologies, such as static models, lack of reasoning process, contradiction between cost and performance, insufficient multimodal processing, and lack of personalized adaptation, the technical problem to be solved by the present invention is: how to provide an intelligent job grading method that can automatically adapt, continuously optimize, provide detailed reasoning process, and has low deployment cost.
[0011] In a first aspect, the present invention provides an adaptive fine-tuning intelligent problem reasoning and feedback method and system, comprising the following steps:
[0012] S1. System initialization, including: basic problem-solving model, OCR model, formula translation model and multi-agent system; the multi-agent system is constructed according to the functions of problem analysis, problem-solving reasoning, answer comparison, feedback generation and adaptive learning.
[0013] S2. Receive user input and extract the question text and mathematical formulas;
[0014] S3. Multimodal input processing: Convert mathematical formulas into LaTeX formulas and natural language descriptions, and integrate them with the question text to form structured data that serves as a framework for reasoning in the thought chain.
[0015] S4. Problem-solving mind chain generation: Analyze structured data to generate a problem-solving mind chain. The reasoning steps of the mind chain include the following link planning: problem understanding, step decomposition, step-by-step reasoning, and result verification.
[0016] S5. Answer Comparison and Evaluation: The semantic similarity calculation, step matching degree evaluation, and error step location results of the user-submitted answer and the problem-solving thought chain are performed. Based on these results, a comprehensive judgment is made according to the preset fusion strategy to obtain the answer's correctness conclusion and information on error steps, error types, and missing steps, thereby generating improvement suggestions.
[0017] S6. Feedback Output: Based on the structured results generated in step S5, output the feedback to the user in the form of text feedback, visual feedback, and / or voice feedback; step S6 no longer judges the answer;
[0018] S7. Adaptive Fine-Tuning: Based on data accumulation and performance changes, set trigger conditions to automatically trigger LoRA model fine-tuning to maintain grading quality and adapt the model to the user's question style and difficulty level.
[0019] Secondly, the present invention provides an adaptive fine-tuning intelligent problem reasoning and feedback system, wherein in the system, each module operates collaboratively to implement the steps of the method described in the first aspect, and the system structure includes:
[0020] Application layer: includes user-facing application modules;
[0021] The agent layer includes a question parsing agent, an adaptive learning agent, a problem-solving reasoning agent, an answer comparison agent, and a feedback generation agent.
[0022] Data processing layer: includes data collection module, data cleaning module, and data labeling module;
[0023] Model layer: LoRA fine-tuning module, model evaluation module, including OCR model, formula translation model, large language model, semantic understanding model;
[0024] Hardware layer: includes a single consumer-grade GPU;
[0025] Storage layer: includes training data storage module, model parameter storage module, and user data storage module.
[0026] Thirdly, the present invention provides a multi-agent cooperative architecture to implement the steps of the method described in the first aspect, comprising the following agents:
[0027] The question parsing agent is responsible for identifying question types, extracting key information, and converting questions into structured data. The question parsing agent uses an OCR model and natural language understanding technology.
[0028] Problem-solving reasoning agent: responsible for generating problem-solving thought chains, executing step-by-step reasoning, and providing problem-solving ideas; the problem-solving reasoning agent uses a fine-tuned large language model and thought chain prompting engineering.
[0029] Answer comparison agent: responsible for comparing user answers with standard approaches, identifying erroneous steps, and evaluating correctness; the answer comparison agent uses semantic similarity calculation, rule matching, and model judgment techniques.
[0030] Adaptive learning agent: responsible for monitoring data accumulation, triggering fine-tuning tasks, and optimizing model parameters; the adaptive learning agent uses LoRA fine-tuning, data management, and model version control technologies.
[0031] Feedback-generating agent: responsible for generating personalized feedback, visualizing errors, and providing improvement suggestions; the feedback-generating agent uses natural language generation and visualization rendering technologies.
[0032] The multi-agent collaboration process is as follows:
[0033] User input → Question parsing agent → Problem-solving reasoning agent → Answer comparison agent → Feedback generation agent → Output result;
[0034] The output results are input into the adaptive learning agent (running in the background and triggered periodically).
[0035] The agents communicate using a structured data format (JSON), and each agent's output includes a confidence score, supporting feedback loops between agents.
[0036] Fourthly, the present invention provides a computer program product that, when executed by a processor, implements the steps of the method described in the first aspect.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] 1. Adaptive optimization capability: Through an automatic fine-tuning mechanism, the model can continuously optimize based on user data, dynamically adapting to question styles and difficulty levels, significantly improving grading accuracy and personalization.
[0039] 2. Transparent reasoning process: Through the thought chain generation mechanism, not only are the grading results provided, but also detailed problem-solving ideas and reasoning processes are offered, which helps to cultivate students' problem-solving abilities and logical thinking.
[0040] 3. Low-cost deployment: Utilizing a large 3B-scale language model and LoRA fine-tuning method, it can run on a single consumer-grade GPU, significantly reducing deployment costs and making it suitable for small-scale educational institutions and individual developers.
[0041] 4. Multimodal processing capability: Through OCR and formula translation models, it can accurately identify and process tasks containing complex content such as mathematical formulas and charts, and supports multiple input formats such as PDF, images, and handwriting.
[0042] 5. Multi-agent collaboration: The system adopts a multi-agent architecture, with clear division of labor and efficient collaboration among agents, which improves the modularity and scalability of the system.
[0043] 6. Semi-automatic interactive design: Unlike fully automatic grading systems, this invention provides problem-solving strategies rather than direct answers. It adopts a semi-automatic interactive design where users upload assignments, the system grades them, and users modify them based on feedback. This design is more in line with educational philosophy and helps improve teaching effectiveness. Attached Figure Description
[0044] Figure 1 This is a flowchart of an intelligent problem reasoning and feedback method for adaptive fine-tuning disclosed in this invention;
[0045] Figure 2 This is a schematic diagram of a multi-agent collaborative architecture;
[0046] Figure 3 A flowchart of the adaptive fine-tuning mechanism;
[0047] Figure 4 This is a schematic diagram illustrating the process of generating a problem-solving thought process.
[0048] Figure 5 This is a schematic diagram of the multimodal input processing flow;
[0049] Figure 6 System technical architecture diagram;
[0050] Figure 7 A flowchart for multi-agent collaboration;
[0051] Figure 8 The answer is compared with the submodule diagram;
[0052] Figure 9 For specific data flow diagrams;
[0053] Figure 10 The geometric figure is the one described in Example 2. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Steps S1, S2… in the described embodiments of the present invention do not limit the scope of execution of the present invention; the various models, simulation environments, and software described in the present invention are not considered as the only limiting methods of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0055] In this invention, computer device / equipment / system refers to a related entity applied to a computer, such as hardware, a combination of hardware and software, software, or software in execution. More specifically, for example, software includes, but is not limited to, a process running on a processor, a processor, an object, executable software, an execution thread, a program, and / or a computer. Furthermore, an application program or script running on a server, and the server itself, can also be software. One or more software programs may be in an execution process and / or thread, and the software may be localized on one computer and / or distributed across two or more computers, and may be run on various computer-readable media.
[0056] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0057] In a first aspect, the present invention provides an embodiment of an adaptive fine-tuning intelligent problem reasoning and feedback method, such as... Figure 1 , Figure 9 As shown, the specific process can be as follows:
[0058] S1, System initialization;
[0059] Deploy a large language model based on the LLaMA-3B architecture, and perform initial fine-tuning using publicly available math problem sets (such as Kaggle's math datasets) to obtain a basic problem-solving model. Configure an OCR model (Nougat-small) and a formula translation model (fine-tuned based on T5-small).
[0060] Initialize a multi-agent system, including a problem-solving agent, a problem-solving reasoning agent, an answer comparison agent, an adaptive learning agent, and a feedback generation agent.
[0061] S2, Receive user input;
[0062] Users can upload electronic assignments via tablet or computer, supporting PDF, PNG, and JPG image formats, as well as handwriting or keyboard input.
[0063] The question-analysis agent receives input and uses the Nougat-small model or a similar optical character recognition model for OCR recognition to extract the question text and mathematical formulas.
[0064] For example, a user uploads an algebra problem:
[0065] Problem: Solve the equation 2x + 3 = 11;
[0066] S3: Multimodal input processing;
[0067] like Figure 5 As shown, the extracted mathematical formulas are converted into LaTeX format, and the formula translation model is used to convert the LaTeX formulas into natural language descriptions; the problem text, LaTeX formulas and natural language descriptions are integrated into structured data.
[0068] Specifically, the formula translation model is a formula translation model obtained by fine-tuning the T5-small model; the structured data includes the question ID, question text, LaTeX formula list, natural language description list of the formulas, answer area, and solution steps. The answer area is a pre-reserved area in the question, corresponding to a reference to the standard answer.
[0069] S4: Generation of problem-solving thought processes;
[0070] like Figure 4 As shown, the structured data is parsed based on a finely tuned large language model; the problem-solving thought chain includes multiple reasoning steps, each of which includes a reasoning process and intermediate results; the number of parameters in the large language model is 2B-5B, preferably 3B; the large language model is based on an LLaMA or T5 architecture.
[0071] Specifically, the process of generating the problem-solving thought chain includes:
[0072] Question comprehension: Convert questions into natural language descriptions and identify question types and key information;
[0073] Step-by-step breakdown: The problem-solving process is broken down into multiple ordered reasoning steps;
[0074] Step-by-step reasoning: Using mind chain hinting engineering, the reasoning process and intermediate results for each step are generated;
[0075] Result verification: Check the logical consistency of the reasoning process to ensure the integrity of the reasoning chain. Specifically, use a large language model to perform self-checks on the reasoning chain, and / or perform consistency checks through preset rules to ensure the integrity of the reasoning chain;
[0076] The format of the problem-solving thought process is as follows:
[0077] Title: [Title Description];
[0078] Step 1: [First step of reasoning process];
[0079] Step 2: [Second step of reasoning]; ...
[0081] Step N: [The reasoning process in step N];
[0082] Conclusion: [Final Answer].
[0083] S5. Answer comparison and evaluation;
[0084] like Figure 8 As shown, the user-submitted answer is compared with the problem-solving thought process chain, and a multi-dimensional evaluation and comprehensive judgment are performed to obtain a conclusion on the correctness of the answer and structured feedback information. The problem-solving thought process chain serves as a standard problem-solving approach and is used to compare with the user's answer. The comparison and evaluation process includes the following sub-steps.
[0085] S51. Input and Preprocessing;
[0086] Input includes: user answers Problem-solving mindset Where S is the sequence of steps obtained in step S4, and each step includes the reasoning process and intermediate results.
[0087] If the user's answer is a whole text, first use a step-by-step segmentation model or rule (such as segmenting by "step 1 / first step / then") to obtain (U); then normalize each step of (U) and (S) (remove spaces, unify symbols, standardize formulas, etc.) to facilitate subsequent matching and similarity calculation.
[0088] S52. Semantic similarity calculation;
[0089] Overall semantic similarity: Using a semantic understanding model (such as a sentence / paragraph encoding model based on BERT or similar architecture), the user's answer and the full text of the problem-solving thought process are encoded into vectors respectively, and the cosine similarity or inner product of the two vectors is calculated to obtain the overall semantic similarity. ).
[0090] Preferably, only the two conclusion parts can be encoded as vectors.
[0091] Step-level semantic similarity: Each step of the user's answer (U) and each step of the problem-solving thought process (S) are encoded and their similarity is calculated to obtain a step-level similarity matrix. Matrix elements... This represents the first [number]th ... The semantic similarity between step j and the solution thought process chain. The step-level similarity matrix is used for subsequent step alignment and error step location.
[0092] Output: Overall semantic similarity ( );
[0093] Alternatively, the step-level matrix can also be output as a preliminary alignment result of "which standard step is most similar to each step".
[0094] S53, Step matching degree evaluation;
[0095] Based on a step-level similarity matrix, the step sequence of the user's answer is aligned with the step sequence of the problem-solving thought chain. Alignment methods include dynamic programming sequence alignment (such as dynamic time warping or Needleman-Wunsch algorithms) or bipartite graph matching (such as the Hungarian algorithm). Under conditions allowing many-to-one, missing-step, or multi-step relationships, the user's steps are obtained. ) and standard procedures ( The set of correspondences of ) ).
[0096] Calculate the following metrics based on the alignment results:
[0097] (1) Step matching degree , defined as the proportion of correctly aligned steps to the total number of steps in the problem-solving thought chain;
[0098] Preferably, the step matching degree is the harmonic mean of precision and recall.
[0099] (2) Completeness of steps , is defined as the proportion of key steps in the problem-solving thought chain that are covered by the user's answer to the total number of key steps; where key steps are marked by key conclusions or preset rules in the problem-solving thought chain.
[0100] The alignment results are calculated to obtain: aligned user steps and standard steps, unmatched user steps (redundant or incorrect), and unmatched standard steps (missing steps).
[0101] S54. Error step location and error type determination;
[0102] For each pair of aligned user steps and standard steps ( If the step-level semantic similarity ( (Below the set threshold) If a user's step is marked as an error step if its conclusion (such as numerical value, formula, or logical conclusion) is inconsistent with the standard steps, or if it is determined by rules or models, then the user's step is marked as an error step.
[0103] User steps that are not aligned with the problem-solving thought process, or that contradict the standard conclusion or constitute redundant reasoning, will be marked as erroneous or redundant.
[0104] Steps in the problem-solving thought process that are not aligned with the user's answer are marked as missing steps.
[0105] Each user step marked as an error is categorized by error type. Error types include, but are not limited to: calculation errors (numerical or formulaic errors), misuse of formulas or theorems, logical reasoning errors (premise or reasoning chain errors), missing critical steps, and redundant or irrelevant steps.
[0106] Error types can be determined by combining rules (such as formula and numerical comparison) with a classification model (with user steps, corresponding standard steps and context as input), and outputting the location (which step) of the error step and the error type.
[0107] S55, Comprehensive Judgment and Fusion Strategy;
[0108] Based on semantic similarity, step matching degree, and erroneous step location results, a comprehensive judgment is made according to a preset fusion strategy.
[0109] Layered judgment strategy: If any step is identified as "calculation error", "misuse of formula or theorem" or "logical reasoning error", the whole step is judged as incorrect; if there are no errors as mentioned above but there are missing key steps, or the step matching degree or step completeness is lower than the preset threshold, the step is judged as partially correct or incomplete; if there are no errors and the step matching degree and step completeness are both higher than the preset threshold, and the overall semantic similarity is higher than the preset threshold, the step is judged as correct.
[0110] Optionally, a weighted fusion calculation can be used to determine the overall score:
[0111] ,
[0112] in, The severity is determined by the number of erroneous steps and the corresponding severity of the error type.
[0113] The conclusion is correct, partially correct, or incorrect based on the comparison between the score and the threshold.
[0114] The aforementioned stratified judgment and weighted fusion can be used alone or in combination. In one embodiment of the present invention, a preliminary conclusion that is partially correct is first obtained according to the stratification rules, and then the degree of partial correctness is refined using quantitative scores.
[0115] S56. Output and Improvement Suggestion Generation;
[0116] The output of the comprehensive judgment includes: final correctness conclusion (correct / partially correct / incorrect); structured feedback: erroneous steps and their locations and error types; and a list of missing steps.
[0117] Based on the erroneous steps, error types, and missing steps, improvement suggestions are generated: for calculation errors, formula misuse, or logical errors, modification prompts are generated pointing to specific steps; for missing steps, suggestions for completing the step are generated. Improvement suggestions can be generated through a pre-defined template mapping to error types, or generated by a natural language generation model. These improvement suggestions are used for the feedback output of step S6, presented to the user in text, visualization, and / or voice format.
[0118] S6. Feedback generation and output;
[0119] Based on the comprehensive judgment result of step S5, the correctness conclusion of the answer, the erroneous steps and their locations, the error type, the missing steps, and the corresponding improvement suggestions are output to the user. Step S6 does not perform additional correctness judgment on the user's answer, nor does it generate new error analysis or improvement suggestions. Instead, it presents and displays the structured results generated in step S5.
[0120] Specifically, feedback generation and output include at least one of the following: text feedback, visual feedback, and voice feedback. Text feedback is used to present the overall correctness conclusion, the error type of each erroneous step, and targeted improvement suggestions in natural language; visual feedback highlights erroneous steps or marks error types, missing step locations, and other information in the electronic assignment interface; voice feedback may optionally use a speech synthesis model to convert the above text feedback into speech output, allowing users to obtain the correction results auditorily.
[0121] Therefore, step S5 is responsible for completing the "judgment and generation" work, such as semantic similarity calculation, step matching degree evaluation, error step location and error type determination, and improvement suggestion generation. Step S6 is only responsible for presenting these results to the user in different forms, thereby decoupling the judgment logic from the display logic, which facilitates system implementation and expansion.
[0122] The feedback information is output to the user and can be exported as a PDF or shared to an educational platform.
[0123] S7, Adaptive fine-tuning mechanism;
[0124] like Figure 3 As shown, the model fine-tuning task is automatically triggered according to the preset triggering conditions;
[0125] Triggering conditions include at least one of the following:
[0126] (1) Time-triggered: Triggered periodically, with a triggering cycle of weekly, bi-weekly, or monthly;
[0127] (2) Data volume trigger: Triggered when the accumulated user job data volume reaches a preset threshold, wherein the threshold is preferably 500-2000 data entries, and more preferably 1000 data entries;
[0128] (3) Performance trigger: Triggered when the grading accuracy drops below a preset threshold, preferably 5%-10%; the accuracy is periodically evaluated from a sample set of “annotated / confirmed by teachers / standard answers in the question bank”, or a verification set is formed by random sampling and annotation;
[0129] (4) User-initiated triggering: Allows users to manually trigger fine-tuning tasks.
[0130] The system runs continuously, and the adaptive learning agent checks the model performance periodically (e.g., weekly), triggering fine-tuning based on data accumulation and performance changes to achieve continuous model optimization.
[0131] The adaptive fine-tuning process includes:
[0132] (1) Data collection: Collect the questions and corresponding solution steps uploaded by users, and use them together with the verified question-solution pairs obtained later as the training dataset;
[0133] (2) Data cleaning: Clean the training data to remove duplicate data, abnormal data and low-quality data;
[0134] (3) Data labeling: Label the training data, including labels such as question type, difficulty level, and solution steps;
[0135] (4) LoRA fine-tuning: The large language model is fine-tuned using the Low-Rank Adaptation (LoRA) method. The rank r of LoRA is preferably 8-32, and more preferably 16.
[0136] The goal of fine-tuning is to gradually adapt the model to the user's problem style (such as preference for algebra or geometry) and difficulty level; LoRA fine-tuning runs on a single consumer-grade GPU, including RTX 3090, RTX 4090, or equivalent performance GPUs.
[0137] (5) Model evaluation: The performance of the fine-tuned model is evaluated using the validation set. Evaluation metrics include correction accuracy, inference quality, and response speed.
[0138] (6) Model deployment: When the performance of the fine-tuned model meets the preset requirements, deploy the new model and replace the old model;
[0139] (7) Version Management: Manage model versions and support model rollback and version comparison.
[0140] Example 1:
[0141] S1: System initialization;
[0142] Deploy a large language model based on the LLaMA-3B architecture, and perform initial fine-tuning using publicly available math problem sets (such as Kaggle's math datasets) to obtain a basic problem-solving model. Configure an OCR model (Nougat-small) and a formula translation model (fine-tuned based on T5-small). Initialize a multi-agent system, including a problem parsing agent, a problem-solving reasoning agent, an answer comparison agent, an adaptive learning agent, and a feedback generation agent.
[0143] S2: Receive user input;
[0144] Users upload electronic versions of their assignments via tablets or computers, supporting formats such as PDF, PNG, and JPG. The problem-solving agent receives the input and uses the Nougat-small model for OCR recognition to extract the problem text and mathematical formulas.
[0145] For example, a user uploads an algebra problem:
[0146] Problem: Solve the equation 2x + 3 = 11;
[0147] S3: Multimodal processing;
[0148] The problem-solving agent converts the extracted mathematical formulas into LaTeX format:
[0149] 2x + 3 = 11;
[0150] Using a formula translation model to convert LaTeX formulas into natural language descriptions:
[0151] "Two x plus three equals eleven"
[0152] Generate structured data:
[0153] JSON:
[0154] {
[0155] "problem_id": "P001",
[0156] "problem_text": "Solve the equation 2x + 3 = 11",
[0157] "formulas": ["2x + 3 = 11"],
[0158] "formulas_nl": ["Two x plus three equals eleven"],
[0159] "answer_region": "",
[0160] "solution_steps": []
[0161] }
[0162] S4: Generate a problem-solving thought process chain;
[0163] The problem-solving reasoning agent receives structured data and uses a fine-tuned LLaMA-3B model to generate a problem-solving thought process:
[0164] Problem: Solve the equation 2x + 3 = 11;
[0165] Step 1: Understand the question;
[0166] This is a linear equation in one variable, and we need to find the value of the variable x.
[0167] Step 2: Move item operation;
[0168] Move the constant term to the right side of the equals sign: 2x = 11 – 3;
[0169] Step 3: Calculate the right side;
[0170] Calculate 11 - 3 = 8, then we get: 2x = 8;
[0171] Step 4: Solve for x;
[0172] Divide both sides by 2: x = 8 / 2 = 4;
[0173] Conclusion: The solution to the equation is x = 4;
[0174] S5: User answer comparison;
[0175] Suppose that after step segmentation, the user's answer step sequence is ( ),in Given x=4; the standard problem-solving thought process sequence is taken from S4, which is... These correspond to "understanding the question / transposing terms / simplifying / solving to get x=4". For ease of explanation, this embodiment illustrates the one-to-many alignment of the preceding steps of (U) and (S): aligning (U1) and (S4) (indicating that the user directly provides the final result), and (S1)~(S3) are missing in the user's answer.
[0176] S51: Semantic Similarity: Calculate the overall semantic similarity between the user's full answer and the full text of the problem-solving thought process (or the conclusion "x=4"), and obtain ( (Example value).
[0177] S52: Step-level similarity matrix (illustrated): The user steps and standard steps are encoded separately to obtain a (1×4) similarity vector (matrix illustration), where the similarity to the final solution steps is higher, and the other steps are "not covered" for those not written by the user.
[0178] S53: Sequence Alignment and Metrics: Alignment is performed based on similarity information to obtain a set of missing steps (S1, S2, S3). Key intermediate steps of the standard chain are not covered, therefore step completeness is considered (…). () Below the preset threshold (Example: () Step matching degree () ) Calculated by "Total number of aligned and deemed acceptable critical conclusion steps / standard steps" (Example: ( In this example, (U1) is consistent with the conclusion and does not trigger the "inconsistent conclusion" error step flag.
[0179] S54: Error Type and Synthesis Judgment: The error type judgment result is a missing critical step (not a calculation error); according to the hierarchical judgment strategy: there are no calculation error / theorem misuse / logic error steps, but there are missing critical steps and ( The answer is below the threshold, therefore it is judged as correct but the solution process is incomplete (partially correct / incomplete).
[0180] S55: Improvement suggestion generation: Generate suggestions based on the type of missing steps: "Please supplement the intermediate derivation steps from 2x+3=11 through rearranging and simplification to x=4".
[0181] S56: The above ( ), ( ), ( The value is for illustrative purposes only. In actual implementation, the system will calibrate the value according to the preset threshold and the distribution of training data.
[0182] Optionally, press ( Calculate the overall score; in this example ( This mainly reflects the penalty for "missing key steps", causing the score to fall into the "incomplete process" range, thus aligning with the stratified judgment conclusion.
[0183] S6: Generate feedback;
[0184] The feedback-generating agent generates feedback information:
[0185] Text feedback: "The answer is correct, but it is recommended to add the solution steps and show the reasoning process from 2x + 3 = 11 to x = 4."
[0186] Visual feedback: Mark "Answer correct" on the electronic page and suggest "Adding steps".
[0187] S7: Data collection and fine-tuning;
[0188] The adaptive learning agent monitors data accumulation. When the accumulated data reaches 1000 records, automatic fine-tuning is triggered.
[0189] Data collection: Collect 1000 questions and solutions;
[0190] Data cleaning: Remove duplicate and low-quality data, retaining 800 high-quality data entries;
[0191] LoRA fine-tuning: The LLaMA-3B model was fine-tuned using the LoRA method (r=16) and trained for 2 hours on an RTX 4090 GPU;
[0192] Model evaluation: Validation set accuracy improved from 85% to 92%;
[0193] Model Deployment: Deploy a new model to replace the old one.
[0194] S8: Continuous optimization;
[0195] The system runs continuously, and the adaptive learning agent checks the model performance regularly (weekly), triggering fine-tuning based on data accumulation and performance changes to achieve continuous model optimization.
[0196] Example 2:
[0197] The difference between this embodiment and Embodiment 1 is that a multi-agent collaborative architecture is used to handle complex mathematical problems. Specifically, this embodiment demonstrates the process of multi-agent collaboratively handling a complex geometry problem within the S2-S6 range of the main process.
[0198] S1: Receive complex questions;
[0199] The user uploaded the following geometry problem and their solution (OCR recognition):
[0200] Title: For example Figure 10 As shown, in triangle ABC, AB = AC, D is the midpoint of side BC, and E is a point on the extension of AD, with ∠BEC = 90°. If AB = 10 and BC = 12, find the length of BE.
[0201] User's answer:
[0202] Let DE = x, then AE = AD + DE = 8 + x;
[0203] Because ∠BEC = 90°, point E lies on the circle with BC as its diameter (the student misused the theorem).
[0204] Therefore, BE = CE = radius = 6;
[0205] Therefore, the answer is BE = 6.
[0206] S2: Multi-agent cooperative processing; specifically:
[0207] The problem analysis agent identifies the problem type as "plane geometry (isosceles triangle + inscribed angle theorem)," extracts 3 LaTeX formulas and 1 geometric description, and confirms that the problem contains implicit coordinate relationships and the properties of a circle.
[0208] Formula (LaTeX):
[0209] 1. AB = AC = 10;
[0210] 2. BC=12⇒BD=DC=6;
[0211] 3. By the Pythagorean theorem: ;
[0212] Description of the attached diagram: An isosceles triangle ABC has a horizontal base BC and A at the top; D is the midpoint of BC; E is below the extension of AD, such that ∠BEC is a right angle.
[0213] Problem-solving reasoning agent:
[0214] Generate the following 5 steps of a correct thought process:
[0215] 1. Given AB=AC=10 and BC=12, we can deduce that D is the midpoint of BC ⇒ BD=6;
[0216] 2. In right triangle ABD, ;
[0217] 3. Establish a coordinate system: Let B(-6,0), C(6,0), then D(0,0), A(0,8);
[0218] 4. Let E(0, -y) (since E lies on the extension of AD, x=0). From ∠BEC=90°⇒vector EB·EC=0;
[0219] The calculation yields: (-6,y)·(6,y)=-36+y²=0⇒y6;
[0220] 5. Therefore .
[0221] Answer comparison with the intelligent agent:
[0222] Compare the user's answer "BE=6" with the correct answer " The error was found in step 3 of the reasoning: the user mistakenly believed that "∠BEC=90°⇒E is on the circle with BC as the diameter" applies to any position, but ignored that E must satisfy this condition in the plane. Although the conclusion is correct in form, directly setting BE = radius = 6 is a logical jump and confuses the relationship between chord length and radius.
[0223] Feedback-generating agent: Generates the following feedback:
[0224] You have correctly identified the relationship between right angles and circles, but there is a key misunderstanding:
[0225] While ∠BEC = 90° does indicate that E lies on the circle with BC as its diameter (center D, radius 6), E must also lie on the extension of AD (i.e., the negative y-axis). Therefore, E is the intersection of the circle and the negative y-axis, with coordinates (0, 6). In this case, BE is not the radius, but rather the distance from B(-6, 0) to E(0, -6), which should be... Recommendation: Verify geometric conclusions using coordinate methods to avoid relying solely on the theorem name while ignoring positional constraints.
[0226] Adaptive learning agent:
[0227] Mark this question as "Common Mistake: Conflict between Inscribed Angle Theorem and Coordinate Constraints", record the user's error pattern (confusing radius and chord length) for subsequent personalized prompts and model fine-tuning.
[0228] S3: Output results;
[0229] The system output includes feedback information such as error location, improvement suggestions, and a complete solution, helping users understand the cause of the error and make improvements. The specific output results are as follows:
[0230] The system returns the following structured feedback to the user:
[0231] Problem type: Plane geometry (isosceles triangle + inscribed angle theorem + coordinate method);
[0232] Correct answer: ;
[0233] Your answer: 6 ×;
[0234] Error Analysis:
[0235] 1. You correctly applied the inscribed angle theorem of "right angle to diameter", but failed to consider the positional constraint of point E (it must be on the extension of AD);
[0236] 2. This leads to the mistaken assumption that BE is the radius of the circle, when in fact BE is the chord length from a point on the circle to the endpoint.
[0237] Suggestions for improvement:
[0238] 1. For geometry problems with multiple constraints, it is recommended to establish a coordinate system and transform the geometric conditions into algebraic equations;
[0239] 2. Verify whether each step simultaneously satisfies all the given conditions.
[0240] Extended Exercises:
[0241] If the condition is changed to "∠BED=90°", please recalculate the length of BE.
[0242] Secondly, the present invention provides an embodiment of an adaptive fine-tuning intelligent problem reasoning and feedback system, such as... Figure 6 As shown, in the system, each module or intelligent agent works collaboratively to implement the steps of the method described in the first aspect. The system specifically includes:
[0243] Application layer: includes user-facing application modules;
[0244] The agent layer includes a question parsing agent, an adaptive learning agent, a problem-solving reasoning agent, an answer comparison agent, and a feedback generation agent.
[0245] Data processing layer: includes data collection module, data cleaning module, and data labeling module;
[0246] Model layer: LoRA fine-tuning module, model evaluation module, including OCR model, formula translation model, large language model, semantic understanding model;
[0247] Hardware layer: includes a single consumer-grade GPU;
[0248] Storage layer: includes training data storage module, model parameter storage module, and user data storage module.
[0249] The functional layout of the system includes:
[0250] Application layer: Provides a user interface for intelligent homework grading, and uniformly calls various intelligent agents to complete the homework grading process.
[0251] Intelligent Agent Layer: Question parsing (identifying and understanding questions), problem-solving reasoning (generating problem-solving steps), answer comparison (comparing student answers with standard answers), feedback generation (generating grading feedback), and adaptive learning (continuously optimizing system performance).
[0252] Data processing layer: data collection (collecting training data), data cleaning (preprocessing), and data labeling (labeling training samples).
[0253] Model layer: LoRA fine-tuning (efficient fine-tuning of model parameters), model evaluation (performance evaluation), OCR (recognition of handwritten / printed questions), formula translation (conversion between mathematical formulas and text), large language model (reasoning and generation), semantic understanding (semantic analysis of answers).
[0254] Hardware layer: Provides computing resources for a single consumer-grade GPU (RTX 3090 / 4090), supporting model inference and LoRA fine-tuning.
[0255] Storage layer: Responsible for storing training data, model parameters, and user data in modules.
[0256] Thirdly, the present invention provides an embodiment of a multi-agent collaborative architecture, such as... Figure 2 As shown, the steps for implementing the method described in the first aspect include the following intelligent agent:
[0257] The question parsing agent is responsible for identifying question types, extracting key information, and converting questions into structured data. The question parsing agent uses an OCR model and natural language understanding technology.
[0258] Problem-solving reasoning agent: responsible for generating problem-solving thought chains, executing step-by-step reasoning, and providing problem-solving ideas; the problem-solving reasoning agent uses a fine-tuned large language model and thought chain prompting engineering.
[0259] Answer comparison agent: responsible for comparing user answers with standard approaches, identifying erroneous steps, and evaluating correctness; the answer comparison agent uses semantic similarity calculation, rule matching, and model judgment techniques.
[0260] Adaptive learning agent: responsible for monitoring data accumulation, triggering fine-tuning tasks, and optimizing model parameters; the adaptive learning agent uses LoRA fine-tuning, data management, and model version control technologies.
[0261] Feedback-generating agent: responsible for generating personalized feedback, visualizing errors, and providing improvement suggestions; the feedback-generating agent uses natural language generation and visualization rendering technologies.
[0262] like Figure 7 As shown, the multi-agent cooperation process is as follows:
[0263] User input → Question parsing agent → Problem-solving reasoning agent → Answer comparison agent → Feedback generation agent → Output result;
[0264] The output results are input into the adaptive learning agent (running in the background and triggered periodically).
[0265] The agents communicate using a structured data format (JSON), and each agent's output includes a confidence score, supporting feedback loops between agents.
[0266] Fourthly, the present invention provides a computer program product embodiment, which, when executed by a processor, implements the steps of the method described in the first aspect.
Claims
1. An adaptive fine-tuning intelligent problem reasoning and feedback method, characterized in that, Includes the following steps: S1. System initialization, including: basic problem-solving model, OCR model, formula translation model and multi-agent system; the multi-agent system is constructed according to the functions of problem analysis, problem-solving reasoning, answer comparison, feedback generation and adaptive learning. S2. Receive user input and extract the question text and mathematical formulas; S3. Multimodal input processing: Convert mathematical formulas into LaTeX formulas and natural language descriptions, and integrate them with the question text to form structured data that serves as a framework for reasoning in the thought chain. S4. Problem-solving mind chain generation: Analyze structured data to generate a problem-solving mind chain. The reasoning steps of the mind chain include the following link planning: problem understanding, step decomposition, step-by-step reasoning, and result verification. S5. Answer Comparison and Evaluation: The semantic similarity calculation, step matching degree evaluation and error step location are performed on the user-submitted answer and the problem-solving thought chain to obtain the corresponding results. Based on the results, a comprehensive judgment is made according to the preset fusion strategy to obtain the answer's correctness conclusion and information on error steps, error types and missing steps, thereby generating improvement suggestions. S6. Feedback Output: Based on the structured results generated in step S5, output the feedback to the user in the form of text feedback, visual feedback and / or voice feedback; S7. Adaptive Fine-Tuning: Based on data accumulation and performance changes, set trigger conditions to automatically trigger LoRA model fine-tuning to maintain grading quality and adapt the model to the user's question style and difficulty level. Semantic similarity calculation: Using a semantic understanding model, calculate the overall semantic similarity between the user's answer and the problem-solving thought process, as well as the step-level semantic similarity between each step of the user's answer and each step of the problem-solving thought process, forming a step-level similarity matrix; Step-by-step matching evaluation: Based on the step-level similarity matrix, the steps of the user's answer are aligned with the steps of the problem-solving thought chain to obtain the step alignment relationship; the step matching degree and step completeness are calculated based on the alignment relationship. Error step location and error type determination: Based on step alignment, step-level similarity, and conclusion consistency, identify erroneous and missing steps in the user's answer, and classify each erroneous step by error type; the error types include at least one of the following: calculation error, misuse of formula or theorem, logical reasoning error, missing key steps, and redundant or irrelevant steps; the conclusion consistency determination method is: extracting numerical values and LaTeX expressions through regular expressions or parsers, or extracting conclusions from a large language model according to a preset JSON format, and then judging through numerical tolerance, symbol equivalence simplification, or rule verification; Comprehensive Judgment: Based on semantic similarity, step matching degree, and error step location results, a comprehensive judgment is made according to a preset fusion strategy to obtain a conclusion on the correctness of the answer; the fusion strategy includes hierarchical judgment and / or weighted fusion; Improvement suggestion generation: Generate specific improvement suggestions and prompts based on the error steps, error types, and missing steps; In the semantic similarity calculation, the overall semantic similarity is the vector similarity between the user's answer and the full text or conclusion of the problem-solving thought chain; the step-level semantic similarity is calculated by the semantic understanding model after encoding each step of the user's answer and each step of the problem-solving thought chain respectively. In the step matching evaluation, the step sequence alignment adopts dynamic programming sequence alignment or bipartite graph matching method, and the correspondence between user steps and standard steps is obtained according to the step-level similarity matrix; the step matching degree is the proportion of the number of correctly aligned steps to the total number of steps in the problem-solving mind chain or the harmonic average based on it; the step completeness is the proportion of the number of covered key steps in the problem-solving mind chain to the total number of key steps. In the error step location and error type determination, for aligned user steps and standard steps, when the step-level similarity is lower than a set threshold or the conclusions are inconsistent, the user step is marked as an error step; user steps that are not aligned with the problem-solving thought chain are marked as errors or redundancies based on their consistency with the standard conclusion; problem-solving thought chain steps that are not aligned with the user's answer are marked as missing steps; the error type is determined by rules and / or classification models based on the step content and context. In the comprehensive judgment, the hierarchical judgment is as follows: if there is any of the following: calculation error, misuse of formula or theorem, or logical reasoning error, it is judged as incorrect; if there is no such error but there is a missing key step or the step matching degree or step completeness is lower than the threshold, it is judged as partially correct or incomplete; if there is no error and the step matching degree and step completeness are both higher than the threshold and the overall semantic similarity is higher than the threshold, it is judged as correct; the weighted fusion is to obtain a comprehensive score by weighting the overall semantic similarity, step matching degree, step completeness and error penalty item, and to obtain the correctness conclusion by comparing the comprehensive score with the threshold.
2. The method according to claim 1, characterized in that, In step S1 The basic problem-solving model is an LLaMA large language model with 3B parameters, fine-tuned using the Kaggle math dataset; The OCR model is the Nougat-small model; The formula translation model is based on T5-small fine-tuning; The multi-agent system includes: a problem-solving agent, a problem-solving reasoning agent, an answer comparison agent, an adaptive learning agent, and a feedback generation agent.
3. The method according to claim 1, characterized in that, In step S3, the structured data includes a question ID, question text, a list of LaTeX formulas, a list of natural language descriptions of the formulas, an answer area, and a solution step field; wherein the answer area is the reserved answer area in the question, corresponding to the reference of the standard answer; the solution step field is used to store the solution steps generated in step S4.
4. The method according to claim 1, characterized in that, In step S4, the reasoning steps of the thought chain specifically include: Question comprehension: Convert questions into natural language descriptions and identify question types and key information; Step-by-step breakdown: The problem-solving process is broken down into multiple ordered reasoning steps; Step-by-step reasoning: Using mind chain hinting engineering, the reasoning process and intermediate results for each step are generated; Results verification: The inference chain is self-checked using a large language model, and / or consistency is verified through preset rules to ensure the integrity of the inference chain; Each reasoning step includes the reasoning process and intermediate results.
5. The method according to claim 1, characterized in that, The triggering conditions in step S7 include: Time-triggered: Triggered periodically, with a trigger cycle of weekly, bi-weekly, or monthly; Data volume trigger: Triggered when the accumulated user job data volume reaches a preset threshold, the threshold being 500-2000 records; Performance trigger: Triggered when the grading accuracy drops below a preset threshold, which is 5%-10%; the accuracy is obtained based on a verification sample set with standard answers and / or manual sampling and labeling. User-initiated trigger: User manually triggers.
6. The method according to claim 1, characterized in that, The data volume trigger threshold is 1000 records.
7. The method according to claim 1, characterized in that, The model fine-tuning process in step S7 includes: Data collection: Collect user-uploaded questions and corresponding solution steps, which are then manually verified / reviewed by experts to form a training dataset; Data cleaning: Cleaning the training data to remove duplicate, outlier, and low-quality data; Data annotation: Annotate the training data with question types, difficulty levels, and solution steps; LoRA fine-tuning: The large language model in the basic problem-solving model is fine-tuned using the low-rank adaptation method. The rank r of LoRA is 8-32. Model evaluation: The performance of the fine-tuned model is evaluated using a validation set. Evaluation metrics include grading accuracy, inference quality, and response speed. Model Deployment: When the performance of the fine-tuned model meets the preset requirements, deploy the new model and replace the old model.
8. The method according to claim 7, characterized in that, LoRA has a rank r of 16, and LoRA fine-tuning runs on a single consumer-grade GPU.
9. An adaptive fine-tuning intelligent problem reasoning and feedback system, wherein the modules or agents in the system work collaboratively to implement the steps of the method described in any one of claims 1-8, and the system structure is as follows: Application layer: includes user-facing application modules; The agent layer includes a question parsing agent, an adaptive learning agent, a problem-solving reasoning agent, an answer comparison agent, and a feedback generation agent. Data processing layer: includes data collection module, data cleaning module, and data labeling module; Model layer: LoRA fine-tuning module, model evaluation module, including OCR model, formula translation model, large language model, semantic understanding model; Hardware layer: includes a single consumer-grade GPU; Storage layer: includes training data storage module, model parameter storage module, and user data storage module.
10. The system according to claim 9, characterized in that, The system's functional layout is as follows: Application layer: Provides a user interface and calls various intelligent agents in a unified manner based on the overall process; Intelligent Agent Layer: Identifies and understands questions, generates problem-solving reasoning steps, compares student answers with standard answers, generates grading feedback, and adaptively learns and continuously optimizes system performance; Data processing layer: collecting training data, cleaning and preprocessing data, and labeling training samples; Model layer: model parameter fine-tuning, model performance evaluation, recognition of handwritten / printed questions, conversion between mathematical formulas and text, reasoning and generation, semantic analysis of answers, and generation of voice feedback; Hardware layer: Provides single consumer-grade GPU computing resources, supporting model inference and LoRA fine-tuning; Storage layer: Stores cleaned and labeled data, fine-tuned model parameters, and user jobs and grading records.
11. A multi-agent cooperative architecture for implementing the steps of the method according to any one of claims 1-8, the multi-agent cooperative architecture comprising the following agents: Question parsing agent: Through OCR model and natural language understanding, it identifies question types, extracts key information, and converts questions into structured data; Problem-solving reasoning agent: Through fine-tuning of the large language model and thought chain prompting engineering, it generates problem-solving thought chains, performs step-by-step reasoning, and provides problem-solving ideas; Answer comparison agent: Through semantic similarity calculation, rule matching, and model judgment, it compares user answers with standard approaches, identifies erroneous steps, and evaluates correctness; Adaptive learning agent: Through LoRA fine-tuning, data management and model version control, it monitors data accumulation, triggers fine-tuning tasks and optimizes model parameters; Feedback-generated intelligent agents: Rendering, typesetting, speech synthesis, and interface presentation of S5 structured results.
12. The multi-agent cooperative architecture according to claim 11, characterized in that, Multi-agent collaboration methods include: The collaborative process is as follows: user input → question parsing agent → question solving and reasoning agent → answer comparison agent → feedback generation agent → output result; the output result is triggered by the input adaptive learning agent. The agents communicate using a structured data format, and each agent's output includes a confidence score, supporting feedback loops between agents.
13. A computer program product, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-8.