Knowledge tracking method based on large language model for joint modeling of students and questions
By constructing student feature and question semantic recognition modules and using a large language model to generate structured semantic vectors, the problems of individual differences, semantic understanding and cold start in existing knowledge tracing models are solved. This enables joint modeling and dynamic prediction of students and questions, improving the accuracy and interpretability of knowledge tracing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-27
AI Technical Summary
Existing knowledge tracing models have shortcomings in modeling individual differences, understanding the semantics of questions, cold start, and interpretability, making it difficult to accurately depict the dynamic interaction between students and questions.
By constructing a student feature recognition module and a question semantic difficulty recognition module, and using a large language model to generate structured semantic vector representations, which are then embedded into a knowledge tracing model, the joint modeling and dynamic prediction of student learning status and question difficulty can be achieved.
It improves the prediction accuracy, stability, and semantic interpretability of knowledge tracing tasks, and can provide reasonable knowledge representations for new students and new questions in the absence of historical data, thereby enhancing the model's predictive ability and the basis for teaching decisions.
Smart Images

Figure CN121327154B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence, specifically relating to a knowledge tracking method based on joint modeling of students and questions using a large language model. Background Technology
[0002] Knowledge tracing is one of the core technologies in intelligent education systems. Its goal is to dynamically assess students' mastery of knowledge points and predict their future performance by analyzing historical interaction data between students and questions. Existing knowledge tracing methods have primarily evolved from statistical modeling to deep learning. An early representative model is the Bayesian knowledge tracing model proposed in 1995. This method uses latent variables to represent the probability of students' knowledge mastery and combines this with Bayesian update rules for state estimation. While such models are simple in structure and highly interpretable, they struggle to handle complex learning behaviors, multidimensional knowledge point relationships, and nonlinear dynamic changes.
[0003] With the development of deep learning technology, researchers have proposed a variety of knowledge tracing models based on neural networks. For example, the deep knowledge tracing model proposed in Reference 1 (Deep Knowledge Tracing) is the first to use recurrent neural networks to model the temporal dependencies of student answer sequences, which significantly improves the prediction accuracy.
[0004] Subsequently, the dynamic key-value memory network proposed in Reference 2 (Dynamic Key-Value Storage Network for Knowledge Tracking) explicitly represents knowledge points by introducing an external memory structure; another example is the self-attention knowledge tracking model proposed later, which achieves better performance on multiple datasets by learning the correlation between questions based on the attention mechanism and proposing an attention-enhanced knowledge tracking model.
[0005] Despite significant progress in prediction accuracy, existing deep knowledge tracing models still face the following key challenges:
[0006] 1. Insufficient modeling of individual differences: Traditional knowledge tracing models mainly rely on answer accuracy and sequence features, which makes it difficult to capture individual differences among students in terms of learning stability, reaction speed, knowledge preferences and error patterns.
[0007] 2. Insufficient semantic understanding of questions: Most knowledge tracking models only take question ID or knowledge point number as input, ignoring semantic features such as question text, knowledge point description and cognitive level, resulting in insufficient ability of the model to perceive the difficulty and semantic differences of questions.
[0008] 3. The cold start problem is prominent: When there is a lack of historical interaction data for new students or new questions, the model cannot provide reliable predictions.
[0009] 4. Limited interpretability: Deep models typically output probability values, lacking the ability to explain why students have mastered knowledge and the source of the difficulty of questions, thus limiting their application in actual teaching decisions.
[0010] In recent years, large language models have demonstrated powerful reasoning capabilities in semantic understanding and generation. Models such as GPT-4, ChatGLM, Qwen, and DeepSeek have shown excellent performance in text analysis, knowledge extraction, and logical reasoning. The academic community has begun to explore the application of large language models in knowledge tracing tasks. For example, generative large language models are used as trackers of students' knowledge states, formalizing the knowledge tracing task as a natural language processing problem. By fine-tuning the formatted student response history, the model can effectively infer students' knowledge levels even in data-scarce scenarios. A unified framework for knowledge tracing based on large language models has been proposed, integrating the powerful language understanding and reasoning capabilities of large language models with traditional sequence interaction models. This framework utilizes cue word engineering alignment mechanisms to enhance the model's adaptability to knowledge tracing targets. By constructing inserted contexts and sequences, it achieves compressed representation of historical behavioral information and inserts specific tokens at the question and concept level to capture finer-grained representations of learning paths. Furthermore, to overcome the limitations of traditional knowledge tracing models' binary "correct or incorrect" modeling, the Large Language Model-Weighted Knowledge Tracing (LOKT) introduces the concept of "option weights," focusing not only on whether a student answered incorrectly but also on which specific incorrect option they chose. This method is based on an important observation: different incorrect options may correspond to different comprehension biases, reflecting specific misunderstandings in the student's cognitive structure. Therefore, LOKT transforms students' answers into ordered categories of textual expression and models and quantifies the "misleading degree" of each option through a large language model, thereby achieving a more granular estimation of knowledge state. In addition, existing research has further expanded the boundaries of knowledge tracing tasks. This work addresses the practical needs of teachers in real-world teaching scenarios who often conduct cognitive assessments and provide feedback to students with limited data, proposing a new task setting: "interpretable few-sample knowledge tracing." Leveraging the powerful reasoning and language generation capabilities of large language models, it not only achieves effective modeling of knowledge state with only a small amount of student behavioral data but also generates explanatory feedback in natural language form.
[0011] While the aforementioned studies have preliminarily demonstrated the potential of large language models in knowledge tracing tasks, existing technologies still have significant limitations. Current methods often only apply large language models to text generation or natural language description of knowledge states, lacking structured extraction and quantitative modeling of student behavioral characteristics and question semantic features. Student feature identification remains at the level of answer accuracy and sequence patterns, failing to reflect individual differences such as learning stability, reaction speed, and error types. Regarding question modeling, most studies still treat questions as discrete identifiers or short text inputs, failing to fully capture the semantic difficulty, knowledge complexity, and cognitive level of the questions. Furthermore, the combination of existing large language models and knowledge tracing models is usually loose, failing to achieve joint modeling of students and questions in a unified feature space, resulting in the model's inability to accurately depict the dynamic interaction between learners and learning content. When faced with new students or new questions lacking historical data, the model also struggles to rely on semantic priors for cold-start inference, limiting both predictive performance and interpretability. Summary of the Invention
[0012] To address the shortcomings of existing technologies, this invention provides a knowledge tracing method based on joint modeling of students and questions using a large language model. By constructing a student feature recognition module and a question semantic difficulty recognition module, a structured semantic vector representation is generated using a large language model and embedded into the temporal modeling process of the knowledge tracing model. This enables joint modeling and dynamic prediction of student learning status and question difficulty, thereby improving the prediction accuracy, stability, and semantic interpretability of the knowledge tracing task. This provides an efficient solution for personalized learning analysis in intelligent education systems.
[0013] To achieve the above-mentioned objectives, this invention provides a knowledge tracing method based on joint modeling of students and questions using a large language model, comprising the following steps:
[0014] Collect student answer behavior data, question text, and knowledge point related information, and preprocess them to form an input dataset;
[0015] Based on the input dataset, prompt templates based on student answering behavior and prompt templates based on question comprehension are constructed. These templates guide the large language model to analyze the semantic information of students' historical answering behavior sequences and question texts, and identify student features and question features.
[0016] Based on the identified student features, question features, and the original answer information in the input dataset, feature fusion is performed through an adaptive gating feature fusion mechanism.
[0017] Using the fused features as input, the student's probability of answering the next question correctly and the corresponding structured semantic results as output, a knowledge tracking model is jointly modeled and trained to obtain the trained joint model.
[0018] When applied, the system takes any collected interaction data between students and questions as input, and predicts the probability of students answering questions correctly through a trained joint model. It then provides the knowledge mastery change curve and the question difficulty distribution results, and triggers the explanation generation module to generate explanation text.
[0019] In one embodiment, the student answering behavior data includes at least: student ID, question ID, answer result, answering time or time interval, number of prompts, number of retries, and the corresponding knowledge point ID; wherein, the answer result is either correct or incorrect;
[0020] The question text and related knowledge point information mentioned above include at least: question number, knowledge point number, question text content, and knowledge point text.
[0021] Optionally, the preprocessing includes: cleaning, formatting, and reconstructing the time series of the collected data, filtering outliers, and forming an input dataset; wherein the outliers include extremely short response times and missing items.
[0022] In one embodiment, constructing a prompt template based on student response behavior includes:
[0023] Enter the student's historical sequence of correct and incorrect answers in the fact description layer, supplement the corresponding answer time information, record the number of times answer prompts were used and the number of answer retry situations, explain the distribution of knowledge points involved in the answer sequence, and introduce reference information on individual student performance and group average level;
[0024] The reasoning guidance layer sets instructions to guide the large language model to analyze learning stability, knowledge mastery tendency, reaction speed type, and error type. At the same time, the output constraint layer specifies that the large language model should output the analysis results in a formatted manner and limits the value range of the output indicators including learning stability, knowledge mastery tendency, reaction speed type, and error type, thus completing the construction of a prompt template based on student response behavior.
[0025] Furthermore, the learning stability value ranges from 0 to 1 as a continuous value; the knowledge mastery tendency value is a discrete level {strong, medium, weak}; the reaction speed type value is a category {fast, medium, slow}; and the error type value is a category {carelessness, conceptual confusion, logical deviation}.
[0026] In one embodiment, constructing the question comprehension prompt template includes:
[0027] Enter the complete question text in the fact description layer, list the text content of all options, clarify the knowledge points tested by the question and their descriptions, and attach the average accuracy rate and average answering time of history students;
[0028] In the reasoning guidance layer, instructions are set to guide the large language model to make a comprehensive judgment on the semantic difficulty level, knowledge point complexity, cognitive level, and semantic ambiguity of the question. At the same time, in the output constraint layer, the large language model is required to output the analysis results in a formatted manner, and the range of values of the output indicators including semantic difficulty level, knowledge point complexity, cognitive level, and semantic ambiguity is limited, thus completing the construction of the question comprehension prompt template.
[0029] Furthermore, the semantic difficulty level is defined as {easy, medium, difficult}; the knowledge point complexity is defined as {low, medium, high}; the cognitive level is defined as {memory, understanding, application, analysis}; and the semantic ambiguity is a continuous value between 0 and 1.
[0030] In one embodiment, the feature fusion via an adaptive gating feature fusion mechanism includes:
[0031] The enhanced features are obtained by concatenating the input student features, question features, and original answer information from the input dataset.
[0032] An adaptive gating feature fusion mechanism is used to adaptively adjust the contribution of student features and question features. The calculation formula is as follows:
[0033] ,
[0034] ,
[0035] in, For adaptive gate value, For activation function, The weight matrix is a learnable matrix. For student characteristics, As a characteristic of the question, For student index variables, Number the questions. For the answer result, For the title index variable, For vector concatenation operators, Features after adaptive adjustment;
[0036] After adaptive adjustment, temporal location information is embedded to obtain fused features.
[0037] In one embodiment, the joint modeling of the knowledge tracing model includes:
[0038] Obtain the historical fusion feature sequence from time step 1 to t, where each historical fusion feature sequence contains the student features, question features, and original answer information from the input dataset at the corresponding time step;
[0039] The historical fusion feature sequence is input into the semantic coding layer for sequence encoding to obtain the dynamic student state sequence of the entire learning history of the student.
[0040] The semantic interaction layer is input together with the student's current state sequence and the question features of the next time step. The layer analyzes the degree of matching between the student's current knowledge state and the question requirements, and outputs the context vector after the interaction.
[0041] The context vector after the interaction is input into the prediction and interpretation layer, which outputs the probability that the student answers the next question correctly and the interpretation text.
[0042] In one embodiment, the semantic coding layer uses an attention mechanism or memory unit to capture the dependencies between different time steps, thereby obtaining a dynamic sequence of student states throughout the student's entire learning history.
[0043] In one embodiment, the semantic interaction layer interacts with the student's current state sequence and the question features of the next time step, uses an attention mechanism to calculate the relevance weight between the student's historical state and the current question, and outputs the context vector after the interaction.
[0044] In one embodiment, a total loss function including a prediction loss term and a consistency regularization term is established to train the knowledge tracking model of the joint modeling to obtain the trained joint model.
[0045] The prediction loss uses the cross-entropy loss function, which measures the difference between the model's output probability of correct answer and the actual answer result by minimizing the error between the predicted probability and the true label.
[0046] The consistency regularization term uses KL divergence as a constraint index. It minimizes the difference between the semantic distribution of the jointly modeled knowledge tracing model and the semantic distribution generated by the large language model. This constrains the distribution of student semantic features and question semantic features generated by the jointly modeled knowledge tracing model to be consistent with the semantic priors provided by the large language model.
[0047] The present invention also provides a knowledge tracking device based on student-question joint modeling of a large language model, comprising a memory and a processor. The memory is used to store a computer program, and the processor is used to implement the knowledge tracking method based on student-question joint modeling of a large language model when the computer program is executed.
[0048] Compared with the prior art, the beneficial effects of the present invention include at least the following:
[0049] (1) In view of the problem that the existing KT model is difficult to distinguish individual differences among students, this invention uses a large language model to perform semantic analysis on students’ answering behavior, and identifies multi-dimensional features such as learning stability, knowledge mastery level, reaction speed, and error patterns, thereby realizing the automatic identification and modeling of student features.
[0050] (2) In view of the problem that the existing KT model cannot accurately obtain the difficulty and semantic features of the question, this invention uses a large language model to understand and reason about the question text, extract indicators such as the semantic difficulty, cognitive level and knowledge point complexity of the question, and realize the automatic identification of question features.
[0051] (3) To address the performance degradation of the KT model in the cold start scenario, this invention uses the semantic vectors of students and questions generated by LLM as prior feature inputs. Even in the absence of historical interaction data, it can establish reasonable initial knowledge representations for new students and new questions, significantly improving the predictive ability of the model.
[0052] (4) In view of the problem of insufficient interpretability of existing deep KT models, this invention combines semantic feature labels with quantization vectors to enable the output results of KT models to have clear educational semantics, providing an understandable and traceable basis for teaching decisions. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0054] Figure 1 This is a flowchart illustrating the knowledge tracking method based on joint modeling of students and questions using a large language model, as provided in this invention.
[0055] Figure 2 This is a schematic diagram of the structure for joint modeling of students and questions based on a large language model, provided as an example. Detailed Implementation
[0056] 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 below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and given in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0057] This invention provides a knowledge tracing method based on joint modeling of students and questions using a large language model (LLM). It integrates the semantic understanding and feature generation capabilities of the LLM with the temporal reasoning mechanism of the knowledge tracing model, thereby achieving an organic combination of individual student modeling and question semantic understanding, thus enhancing the predictive performance and interpretability of the knowledge tracing model.
[0058] like Figure 1 and 2 As shown in the embodiment, a knowledge tracking method based on joint modeling of students and questions using a large language model is provided. The method comprises five main parts: an input layer, a large language model layer, a feature fusion layer, a knowledge tracking layer, and an output layer. These layers are sequentially connected to form a complete process from semantic feature generation to knowledge state prediction. Specifically, the method includes the following steps:
[0059] S1. Collect student answer behavior data, question text, and relevant knowledge point information, and preprocess them to form an input dataset.
[0060] In this embodiment, the input layer includes a student behavior input branch and a question information input branch, which respectively collect and preprocess the original interaction data between students and questions, providing independent input for the subsequent large language model layer.
[0061] (1) Student behavior input branch: Collect student answer behavior data from the learning platform or intelligent teaching system. The data should include at least: student ID. Question Number Answer results (Correct / Incorrect), response time or time interval Number of prompts, number of retries, and the corresponding knowledge point number. .
[0062] (2) Question Information Input Branch: Collects question text and related knowledge points. The data includes: question number. Knowledge point number Question text content Knowledge Point Text .
[0063] The outputs of the two branches mentioned above are preprocessed. The preprocessing steps include: data cleaning, outlier removal (extremely short answer times and missing items), formatting, and time series reconstruction. The final student answer behavior data, question text, and knowledge point related information that represent the student's answer trajectory and learning dynamic characteristics are obtained, and an input dataset is established.
[0064] S2. Based on the input dataset, construct prompt templates based on student answering behavior and prompt templates for question comprehension, respectively, to guide the large language model to analyze the semantic information of students' historical answering behavior sequences and question texts, and identify student features and question features.
[0065] The input dataset is fed into the student feature recognition module (LLM-S) and the question difficulty recognition module (LLM-Q) in the large language model layer, respectively.
[0066] (1) The student feature recognition module (LLM-S) uses a large language model to analyze the student's historical answer behavior sequence and identify student features, as follows:
[0067] In the student feature identification stage, to enable the large language model to analyze and summarize student learning behaviors, this invention proposes a structured prompt template design method. By constructing a prompt template based on student response behavior and inputting it into the large language model, the method guides the model to analyze the student's historical response behavior sequence, analyzing the student's learning ability, stability, forgetting trend, and error patterns to identify student characteristics. This template, by explicitly describing the student's historical response behavior, learning pace, and response characteristics, guides the LLM to automatically identify student characteristics based on natural language understanding.
[0068] The design of this prompt template mainly takes the following factors into consideration:
[0069] Answer sequence characteristics include students' consecutive answer results (correct / incorrect sequence) over a period of time, answer time intervals, number of prompts and number of retries, etc., which are used to reflect learning stability, forgetting trends and short-term fluctuations.
[0070] Knowledge point dimension features: including the knowledge point number, knowledge point category, breadth of knowledge point coverage, and frequency of recurrence of the question, used to assess students' knowledge mastery tendency and proficiency;
[0071] Behavioral dynamic characteristics: including average answering time, time fluctuation range, and changes in reaction speed under different question types (multiple choice, calculation, and word questions), used to characterize students' concentration and strategy stability.
[0072] Error type characteristics: By combining the semantic descriptions of students' incorrect answers with the differences in the question options, LLM inferences are used to determine the reasons for students' errors (such as carelessness, conceptual confusion, or logical deviations) in order to characterize the differences in their thinking patterns.
[0073] Group comparison features: The average accuracy and average time taken by a group under the same knowledge point are introduced as a reference to guide LLM to generate a judgment on the relative performance of students (higher / lower than the group average), thereby enhancing the comparative analysis ability and objectivity of the model.
[0074] Based on the above design factors, the prompt template of this invention adopts a layered structure of "fact description layer + reasoning guidance layer + output constraint layer":
[0075] Fact Description Layer: This layer comprehensively presents information about students' raw learning behaviors, providing the contextual factual basis for LLM reasoning. This layer includes, in sequence:
[0076] Behavioral sequence description: Explicitly provide the order and correctness of the student's most recent answers, for example: "The student's answers to the function knowledge point are: Correct, Incorrect, Incorrect, Correct, Correct, Incorrect, Correct, Correct, Correct, Incorrect."
[0077] Time information: Supplement the time interval between each response and the average time taken, for example: "The average time is 28 seconds, the shortest is 15 seconds, and the longest is 4 seconds."
[0078] Hints and Retry Records: This section describes the frequency of hint usage and retry details, such as: "Hints were used 3 times in this answer, with 2 of those attempts followed by a retry."
[0079] Knowledge point context: Explain the distribution of knowledge points, such as: "This sequence involves 3 knowledge points: linear functions, quadratic functions, and function graphs."
[0080] Group reference information: Provide comparative data, such as: "This student's average accuracy rate for this knowledge point is 0.7, while the group average accuracy rate is 0.6."
[0081] The combination of these factual elements enables LLM to observe three dimensions simultaneously at the semantic level: "individual behavioral trajectory + knowledge structure + group comparison," thus providing a foundation for learning pattern recognition.
[0082] Reasoning guidance layer: used to clarify the analysis task based on factual descriptions, such as: "Please analyze the student's learning stability, knowledge mastery tendency, reaction speed type and error pattern, and comprehensively judge their current learning status."
[0083] Output constraint layer: Used to specify the format and numerical range of the model's generated results, making the output results structured and quantifiable.
[0084] This invention sets the following four core indicators and their value ranges: Learning stability: a continuous value from 0 to 1, reflecting the degree of fluctuation in answer performance; Knowledge mastery tendency: discrete level {strong, medium-weak}; Reaction speed type: category {fast, medium, slow}; Error type: category {carelessness, conceptual confusion, logical deviation}.
[0085] Through the aforementioned hierarchical prompt template, this invention enables large language models to automatically extract high-level semantic features from students' original behavioral texts, achieving a closed-loop mapping from "behavioral facts - semantic reasoning - feature quantification".
[0086] This prompt template design significantly enhances the model's ability to perceive individual student differences, enabling LLM to possess comprehensive reasoning capabilities such as "stability judgment - mastery level estimation - reaction speed analysis - error pattern attribution," providing high-quality semantic feature input for subsequent knowledge tracing modeling.
[0087] For example, given a sequence of student behavior, a natural language prompt template is constructed: "The student's recent answers to {knowledge point sequence} are {correct / incorrect sequence}. Please analyze their learning ability, stability, forgetting trend, and error patterns." The large language model outputs a set of semantic labels. Through semantic parsing and quantization functions Transform into student feature vectors:
[0088] ,
[0089] in, The semantic label set output by the large language model is a prompt template based on student response behavior. For students' learning ability, For the stability of students' learning, To forget trends and error patterns, For dimensions.
[0090] To further ensure the stability of the results, multiple generation and self-consistency verifications were performed. A KL divergence constraint was used, and the minimum value was taken as the final student feature output, calculated as follows:
[0091] ,
[0092] in, For consistency verification loss, and These represent the student feature distributions generated independently in two separate instances.
[0093] (2) The question feature module (LLM-Q) uses a large language model to perform semantic analysis on the question text and identify question features, as follows:
[0094] In the semantic and difficulty identification stage, to enable the large language model to understand and reason about the structure of the question text and the complexity of the knowledge points, this invention proposes a question comprehension prompt template design method. By constructing a question comprehension prompt template and inputting it into the large language model, the method guides the large language model to analyze the semantic information of the question text and identify question features. This template, through explicit descriptions of the question text, option features, knowledge point associations, and answer statistics, guides the LLM to automatically identify features such as the semantic difficulty, knowledge point complexity, cognitive level, and semantic ambiguity of the question.
[0095] The design of this prompt template mainly takes the following factors into consideration:
[0096] The question text provides complete information about the question stem, guiding LLM learners to understand the knowledge points involved, the clarity of semantic expression, and the logical complexity.
[0097] Option text content: Includes all option text, guiding LLM analysis to determine the semantic differences and degree of confusion between distractor options and correct options, thereby judging the discriminative power and distraction strength of the question;
[0098] Knowledge point text information: Provides the name and brief description of the knowledge point corresponding to the question, helping LLM understand the knowledge basis and examination level of the question;
[0099] Historical student performance: Input the average accuracy rate, average answer time, and hint usage rate of questions in real learning data to guide LLM to combine semantic analysis with learning behavior characteristics and improve the objectivity of difficulty judgment.
[0100] Based on the above design factors, the prompt template of this invention adopts a layered structure of "fact description layer + reasoning guidance layer + output constraint layer":
[0101] Fact description layer: Used to present key information about the question, providing the model with sufficient semantic and statistical context. Content includes:
[0102] Question text: Directly presents the text content of the question;
[0103] Option text: Fully display each option and its semantic features, such as "Option A..., Option B...";
[0104] Knowledge point text: Explains the knowledge point to which the question belongs and its brief definition;
[0105] Answer statistics: Displays the average accuracy rate and average answering time of history students, for example: "The average accuracy rate is 0.63, and the average answering time is 32 seconds."
[0106] This information collectively forms the basis for the model to judge the difficulty and cognitive level of the question, enabling LLM to perceive the degree of semantic interference and actual answer performance while understanding the question.
[0107] Reasoning Guidance Layer: This layer clarifies the LLM's analytical task and guides the model to perform multi-dimensional reasoning on the questions. For example: "Please comprehensively analyze the semantic difficulty, knowledge point complexity, cognitive level, and semantic ambiguity of the above questions, and explain the basis for your judgment."
[0108] Output constraint layer: To ensure the results are structured and quantifiable, the output layer limits the format and value range of the model-generated results.
[0109] Semantic difficulty levels: {Easy, Medium, Hard};
[0110] Knowledge point complexity: {low, medium, high};
[0111] Cognitive levels: {memory, comprehension, application, analysis};
[0112] Semantic ambiguity: The continuous interval [0,1] represents the clarity of the semantics of the question stem.
[0113] For example, given a sequence of question information, a question comprehension prompt template is constructed: "Please analyze the semantic difficulty, cognitive level, and knowledge point complexity of the following questions, and provide the question difficulty level." The large language model then outputs a set of semantic labels: Through semantic parsing and quantization functions Transform into the feature vector of the problem:
[0114] ,
[0115] in, This is a set of semantic tags output by a large language model based on a prompt template for understanding the question. The semantic difficulty of the question. As a cognitive level, For the complexity of knowledge points, For dimensions.
[0116] Furthermore, through multiple generation and consistency verifications, the stability of the results is ensured. KL divergence constraints are adopted, and the minimum result, i.e. the result with the highest confidence, is taken as the question feature. After manual sampling verification and expert alignment, the final question features are obtained, ensuring semantic stability.
[0117] Furthermore, large language models can employ instruction fine-tuning (SFT) or low-rank adaptation (LoRA) for education-specific fine-tuning to enhance the model's accuracy in understanding student behavior and question semantics. The output is generated and voted on multiple times through a self-consistency mechanism to select stable feature vectors. For new students or new questions, semantic prior features generated by the LLM are directly utilized. and As an initial input, the KT model still has preliminary predictive ability even in the absence of historical data, thus significantly alleviating the cold start problem.
[0118] S3. Based on the identified student features, question features, and original answer information in the input dataset, feature fusion is performed through an adaptive gating feature fusion mechanism.
[0119] In this embodiment, the student feature recognition module reflects individual differences, and the question semantic recognition module reflects content differences. In order to achieve joint modeling of student features and question features in the same feature space, this invention designs an adaptive gating feature fusion mechanism based on the output of the large language model, which is used to generate an enhanced input sequence and serve as the input of the knowledge tracing model.
[0120] Specifically, the feature fusion layer receives the following information: student feature vector. Generated by the student feature recognition module, it reflects semantic features such as students' learning stability, knowledge mastery tendency, reaction speed, and error patterns; question feature vector. Generated by the question semantics and difficulty recognition module, it includes attributes such as the semantic difficulty level of the question, the complexity of the knowledge points, the cognitive level, and the semantic ambiguity; the original answer information includes the question number. Answer results (Correct or Incorrect), time of answer and relevant knowledge point number Basic behavioral data, etc.
[0121] Next, feature vectors from different sources are dimensionally aligned and semantically mapped, enabling student features, question features, and answer information to interact within the same feature space. These three types of features are then concatenated and combined to form an enhanced input.
[0122] .
[0123] To achieve adaptive weighting, this invention employs a gated fusion mechanism, introducing gate weights to adaptively adjust the contribution of student features and question features. The calculation formula is as follows:
[0124] ,
[0125] ,
[0126] in, For adaptive gate value, For activation function, The weight matrix is a learnable matrix. For student characteristics, As a characteristic of the question, For student index variables, Number the questions. For the answer result, For the title index variable, For vector concatenation operators, These are the features after adaptive adjustment.
[0127] When student characteristics and question characteristics are highly semantically correlated, the weight of student characteristics is automatically increased; otherwise, the focus is more on the semantic signals of the question, thereby dynamically balancing individual differences and content differences.
[0128] To maintain the order of answering questions and the temporal dependency, this invention embeds time location information into the fusion features, enabling the model to identify the dynamic changing trends of students' learning status.
[0129] The resulting fusion feature sequence retains both the students' learning behavior characteristics and the semantic attributes of the questions, becoming a unified representation of the input layer of the knowledge tracing model.
[0130] By adopting an adaptive gating feature fusion mechanism, the following technical advantages are achieved: Enhanced semantic complementarity: Student semantic features reflect individual differences, while question semantic features reflect task difficulty. The joint fusion of the two enables the model to more accurately model the interaction between students and questions.
[0131] Dynamic weight adjustment: The gating mechanism automatically adjusts the weight ratio of student features and question features at different times, so that the model focuses on the features that have the greatest influence on the current prediction.
[0132] Improved robustness and interpretability: The fused features contain clear semantic labels for students and questions, allowing for the traceability of the prediction results and providing a basis for teaching diagnosis and model interpretation.
[0133] Through this feature fusion design, the present invention achieves semantic alignment and dynamic weighting of student features and question features, providing a unified, rich, and educationally semantic input representation for the subsequent knowledge tracing and modeling stage.
[0134] S4. Using the fused features as input, the student's probability of answering the next question correctly and the corresponding structured semantic results as output, jointly model a knowledge tracking model and train it to obtain the trained joint model.
[0135] After completing feature fusion, this invention proposes a Large Language Model based Joint Knowledge Tracing (LM-JKT) model for students and questions. This model uses semantically fused features as its core input, combining time-series learning and consistency regularization mechanisms to achieve dynamic tracking and interpretable prediction of students' learning states. Specifically:
[0136] 1. Overall Model Design: The LLM-JKT model uses the fused feature sequence output by S3 as input. The features at each time step simultaneously contain the semantic vector of the student, the semantic vector of the question, and the answering behavior information, forming a unified "student-question-behavior" representation.
[0137] The knowledge tracking model structure of the joint modeling is divided into three layers: Semantic encoding layer: Sequence encoding of fused features to capture the pattern of changes in students' knowledge status over time. The semantic encoding layer uses attention mechanism or memory unit to capture the dependency relationship between different time steps to obtain the dynamic student state sequence of the entire learning history.
[0138] Semantic Interaction Layer: This layer interacts with the student's current state sequence and the question features of the next time step. It establishes a dynamic association mechanism between student semantics and question semantics, employs an attention mechanism to calculate the relevance weights between the student's historical state and the current question, and outputs a context vector after the interaction. This allows the model to understand the interaction logic of "the student facing this question," rather than solely relying on the question number or accuracy rate. The attention mechanism is calculated as follows:
[0139] , , ,
[0140] ,
[0141] ,
[0142] in, Let T be the time step and T be the total time. For query vector, For key sequences, For value sequences, As a feature of fusion, , and These are the learnable query, key, and value mapping matrices, respectively. The Softmax function is used to calculate the relevance weights between the current student's semantics and the semantics of historical questions, and outputs the context vector after the interaction. It is used to capture the dynamic relationship between students' current knowledge status and the semantic features of the questions.
[0143] Prediction and Explanation Layer: Predicts the probability that a student will answer the next question correctly based on the current state. , As weight, To activate the function and generate readable semantic explanations for teaching feedback, the predicted probability can be generated using a knowledge-tracking generative structure based on a large language model, and output directly within the same model, for example: "Prediction accuracy: 0.74; Report: This student has a good grasp of function application problems and a stable level of understanding."
[0144] Unlike traditional deep knowledge tracing models and attention-enhanced knowledge tracing models, the LLM-JKT model processes student and question information directly at the semantic level, no longer relying on discrete IDs or embedded indexes, thus possessing stronger semantic understanding and transfer capabilities.
[0145] 2. Feature stitching and modeling process
[0146] The knowledge tracing model of the joint modeling receives a historical fusion feature sequence from time step 1 to t, where each historical fusion feature sequence contains student features, question features, and original answer information from the input dataset at the corresponding time step.
[0147] The knowledge tracing model of joint modeling maps these feature vectors to a unified semantic space during the input phase and captures the dependencies between different time steps through attention mechanisms or memory units, thereby forming a dynamic representation of the student's knowledge state.
[0148] In each prediction, the jointly modeled knowledge tracing model simultaneously references the student's historical semantic patterns and the semantic features of the current question to calculate the degree of matching, thereby determining whether the student has the ability to answer the question correctly.
[0149] This design makes the model's reasoning process closer to real learning logic: it takes into account both the continuity of the student's learning curve and the immediate impact of changes in the semantics of the questions on the student's state.
[0150] 3. Training and Optimization Strategies
[0151] The LLM-JKT model is trained in an end-to-end manner, using a joint optimization strategy to improve both prediction accuracy and semantic consistency.
[0152] The training process includes the following steps:
[0153] The model inputs multiple students' answer sequences in chronological order, progressively learning the evolution of their knowledge mastery. The predicted probability output at each time step is compared with the actual answer result to minimize prediction error. Simultaneously, the model calculates the semantic representations of students and questions generated internally, ensuring consistency with the prior semantic vectors provided by the large language model, thus constraining the model's semantic stability. Gradient updates are performed by combining the two types of loss results, achieving a balance between prediction accuracy and semantic consistency. After multiple iterations, the model can maintain high prediction performance while outputting interpretable features with educational semantics.
[0154] 4. Loss Function and Consistency Regularization
[0155] To simultaneously optimize prediction performance and semantic stability, a composite loss function is designed in the LLM-JKT model of this invention, which consists of two parts: "prediction loss" and "consistency regularization term".
[0156] The prediction loss measures the difference between the model's output probability of a correct answer and the actual answer. This part uses the cross-entropy loss function to improve the model's prediction accuracy in knowledge tracing tasks by minimizing the error between the predicted probability and the true label.
[0157] The consistency regularization term is used to constrain the distribution of student semantic features and question semantic features generated internally by the model, ensuring consistency with the semantic priors provided by the large language model. This part uses KL divergence as a constraint metric, minimizing the difference between the semantic distribution internal to the model and the semantic distribution generated by the LLM, thus ensuring that the semantic space learned by the model is consistent with the knowledge representation of the LLM and preventing semantic drift.
[0158] This composite loss function design achieves the dual goals of "improving prediction accuracy" and "preserving semantic consistency." Specifically, the cross-entropy term ensures that the model's prediction results are correct and reliable, while the KL divergence regularization term ensures that the model does not deviate from the semantic expression of the large language model during training, making the prediction results both accurate and interpretable.
[0159] Unlike traditional knowledge tracing models that only optimize prediction error, the LLM-JKT model introduces consistency regularization constraints based on KL divergence to stabilize the joint modeling of students and questions at the semantic level, thus forming an innovative structure that emphasizes both prediction performance and semantic interpretation ability.
[0160] 5. Model Output Design
[0161] After completing semantic modeling and consistency optimization, the LLM-JKT model of this invention not only outputs the probability of a student answering the next question correctly, but also simultaneously generates structured semantic results that reflect changes in learning status and semantic features of the questions.
[0162] The model output includes the following three categories: Prediction results: The main output of the model is the probability that the student will answer the next question correctly, which is used to assess their mastery of the target question in the current learning state. This probability can be directly used for knowledge mastery curve plotting, learning path recommendation, or personalized practice arrangement;
[0163] Semantic state representation: During the prediction process, the model dynamically updates the student's semantic state vector, representing the student's mastery trend and learning stability across different knowledge points. This vector integrates student characteristics, question characteristics, and behavioral information, and can be further mapped to interpretable labels, such as "improved mastery," "decreased fluctuations," or "maintained stability," for learning process analysis and individual modeling.
[0164] Structured semantic labels: In addition to predicting probabilities, the model also outputs semantic labels that can be directly used by the large language model, including: the student's current stability and mastery tendency; the semantic difficulty level and cognitive level of the questions; and the learning change trend (rising, stable, or falling) obtained by the model's inference. These semantic labels provide input support for the results output and report generation stages, and can be further used to generate natural language learning diagnosis and teaching feedback reports through prompt templates from the large language model.
[0165] S5. When applied, the system takes the interaction data between students and questions collected at will as input, predicts the probability of students answering questions correctly through the trained joint model, provides the knowledge mastery change curve and the question difficulty distribution results, and triggers the explanation generation module to generate explanation text.
[0166] After completing the knowledge tracing model, this invention further designs a result output and interpretation generation module to transform the prediction results and semantic features of the LLM-JKT model into readable feedback information for teachers and students. This step automatically generates learning reports, knowledge mastery curves, and question difficulty analyses by calling the large language model a second time and using prompt templates, thus achieving an interpretable presentation of the prediction results.
[0167] Input content: Receive three types of outputs from the LLM-JKT model: the probability of the student's correct prediction of the next question; the student's semantic state vector and the trend of knowledge mastery; and the semantic labels of the questions (difficulty level, cognitive level, knowledge point complexity, etc.).
[0168] These results collectively form the basis for interpreting the generated input, providing contextual information for large language models.
[0169] Prompt Template Design: To enable large language models to generate educational and linguistically consistent feedback, this invention constructs a structured explanation generation prompt template.
[0170] The template design follows a three-layer logic: "fact input layer - task guidance layer - output constraint layer". The fact input layer explicitly provides the model with the numerical prediction results and semantic labels of LLM-JKT. For example: "The student's latest prediction accuracy on the knowledge point 'linear function' is 0.78, learning stability is 0.82, knowledge mastery tendency is 'above average', and recent performance on 'high-difficulty application problems' is average."
[0171] Task guidance layer: Instructs the model on the generation goal, such as: "Based on the above information, please generate a brief learning diagnosis and improvement suggestion, describing the student's current status and subsequent learning direction in natural language";
[0172] Output constraint layer: limits the output format and content length to ensure that the generated results are concise, structured and quantifiable. For example: "Please output two sentences: the first sentence summarizes the student's current learning status; the second sentence provides suggestions for improvement."
[0173] Using the templates described above, the large language model can generate textual reports that are both interpretable and educational, while ensuring consistency between the content logic and language.
[0174] The final output includes three types of results: Natural Language Learning Report: Automatically generates a textual description of the student's learning status and areas for improvement, such as: "This student's mastery of function knowledge is relatively stable, and they perform well on medium-difficulty questions, but they have some conceptual confusion in high-difficulty application questions. It is recommended to increase comprehensive question practice in training"; Knowledge Mastery Visualization Curve: Based on the prediction results of continuous time steps, a trend chart of the student's knowledge mastery is drawn, showing their learning progress or fluctuation range; Question Difficulty and Performance Analysis Chart: Combining the semantic features of the questions and the prediction accuracy, a question difficulty distribution chart and a student performance comparison chart are generated for teaching analysis and question bank optimization.
[0175] Based on this, the present invention achieves automatic conversion from model prediction results to instructional explanation text, enabling the knowledge tracking model not only to determine students' correct answer rates but also to generate understandable and traceable semantic learning reports. This design has the following advantages: Integrated prediction and explanation: The semantic results output by the same model support both prediction and language generation, ensuring consistent explanation; Combination of visualization and linguistics: Student learning trajectories are displayed through both numerical curves and natural language descriptions; Strong usability for instruction: The output content can be directly used for teacher assessment, student feedback, and intelligent instructional recommendations, achieving a complete closed loop from learning behavior analysis to personalized instructional feedback.
[0176] Based on the same inventive concept, the embodiment also provides a knowledge tracking device based on student-question joint modeling of a large language model, including a memory and a processor. The memory is used to store a computer program, and the processor is used to implement the knowledge tracking method based on student-question joint modeling of a large language model when the computer program is executed.
[0177] In summary, the knowledge tracing method based on joint modeling of students and questions using a large language model provided by this invention has the following technical advantages:
[0178] (1) Automated student feature recognition: This invention uses a large language model to perform semantic analysis on students’ historical answering behavior, which can automatically identify students’ learning stability, knowledge mastery tendency, reaction speed, error patterns and other multi-dimensional features, avoiding the problem of traditional KT model relying on manual rules or statistical feature design, and realizing the automation and intelligence of individualized student modeling.
[0179] (2) Intelligent identification of question difficulty: This invention uses a large language model to understand and reason about the question text and knowledge point description, and can automatically identify the semantic difficulty, cognitive level and knowledge point complexity of the question. This overcomes the problem that traditional models cannot directly utilize the semantic information of the question, and enables the knowledge tracking model to obtain richer input features.
[0180] (3) Enhanced knowledge tracking model: This invention embeds the vectorized results of student features and question features into the input layer of the knowledge tracking model. The semantic features and temporal features are integrated through the attention mechanism, making the model more accurate in predicting students' future answer results and able to reflect individual differences and question differences.
[0181] (4) Improved cold start adaptability: In the case of new students or new questions lacking historical interaction data, this invention uses prior features generated by a large language model as input, so that the knowledge tracking model can still make reasonable predictions, significantly alleviating the cold start problem.
[0182] (5) Enhanced interpretability of results: The student and question feature labels output by this invention are readable semantic descriptions. The model prediction results can be converted into "student knowledge mastery report" and "question difficulty analysis report", providing teachers with understandable and traceable diagnostic basis.
[0183] (6) The model is highly scalable: The method of this invention is compatible with mainstream knowledge tracing architectures and can be extended to multimodal data input or multi-agent collaborative systems, with good versatility and engineering feasibility.
[0184] Furthermore, the terms "upper," "lower," "inner," "outer," "front," and "rear" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Unless otherwise specifically stated, the relative steps, numerical expressions, and values of components and steps described in these embodiments do not limit the scope of the invention. Of course, the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of the invention. All equivalent changes or modifications made to the structures, features, and principles described in the claims of this invention should be included within the scope of the claims of this invention.
[0185] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A knowledge tracing method based on joint modeling of students and questions using a large language model, characterized in that, Includes the following steps: Collect student answer behavior data, question text, and knowledge point related information, and preprocess them to form an input dataset; Based on the input dataset, prompt templates based on student answering behavior and prompt templates based on question comprehension are constructed. These templates guide the large language model to analyze the semantic information of students' historical answering behavior sequences and question texts, and identify student features and question features. Based on the identified student features, question features, and the original answer information in the input dataset, feature fusion is performed through an adaptive gating feature fusion mechanism. Using the fused features as input, the student's probability of answering the next question correctly and the corresponding structured semantic results as output, a knowledge tracking model is jointly modeled and trained to obtain the trained joint model. When applied, the system takes any collected interaction data between students and questions as input, and predicts the probability of students answering questions correctly through a trained joint model. It then provides the knowledge mastery change curve and the question difficulty distribution results, and triggers the explanation generation module to generate explanation text.
2. The knowledge tracing method based on student and question joint modeling according to claim 1, characterized in that, The student answering behavior data includes at least: student ID, question ID, answer result, answering time or time interval, number of prompts, number of retries, and the corresponding knowledge point ID; wherein, the answer result is either correct or incorrect; The question text and related knowledge point information mentioned above include at least: question number, knowledge point number, question text content, and knowledge point text.
3. The knowledge tracing method based on student and question joint modeling according to claim 1, characterized in that, The construction of the prompt template based on student answering behavior includes: Enter the student's historical sequence of correct and incorrect answers in the fact description layer, supplement the corresponding answer time information, record the number of times answer prompts were used and the number of answer retry situations, explain the distribution of knowledge points involved in the answer sequence, and introduce reference information on individual student performance and group average level; The reasoning guidance layer sets instructions to guide the large language model to analyze learning stability, knowledge mastery tendency, reaction speed type, and error type. At the same time, the output constraint layer specifies that the large language model should output the analysis results in a formatted manner and limits the value range of the output indicators including learning stability, knowledge mastery tendency, reaction speed type, and error type, thus completing the construction of a prompt template based on student response behavior.
4. The knowledge tracing method based on joint modeling of students and questions using a large language model according to claim 3, characterized in that, The learning stability value ranges from 0 to 1 as a continuous value; the knowledge mastery tendency value is a discrete level {strong, medium, weak}; the reaction speed type value is a category {fast, medium, slow}; and the error type value is a category {carelessness, conceptual confusion, logical deviation}.
5. The knowledge tracking method based on joint modeling of students and questions using a large language model according to claim 1, characterized in that, The aforementioned construction of a question comprehension hint template includes: Enter the complete question text in the fact description layer, list the text content of all options, clarify the knowledge points tested by the question and their descriptions, and attach the average accuracy rate and average answering time of history students; In the reasoning guidance layer, instructions are set to guide the large language model to make a comprehensive judgment on the semantic difficulty level, knowledge point complexity, cognitive level, and semantic ambiguity of the question. At the same time, in the output constraint layer, the large language model is required to output the analysis results in a formatted manner, and the range of values of the output indicators including semantic difficulty level, knowledge point complexity, cognitive level, and semantic ambiguity is limited, thus completing the construction of the question comprehension prompt template.
6. The knowledge tracing method based on joint modeling of students and questions using a large language model according to claim 5, characterized in that, The semantic difficulty level is defined as {easy, medium, difficult}; the knowledge point complexity is defined as {low, medium, high}; the cognitive level is defined as {memory, understanding, application, analysis}; and the semantic ambiguity is a continuous value between 0 and 1.
7. The knowledge tracing method based on joint modeling of students and questions using a large language model according to claim 1, characterized in that, The aforementioned feature fusion through an adaptive gating feature fusion mechanism includes: The enhanced features are obtained by concatenating the input student features, question features, and original answer information from the input dataset. An adaptive gating feature fusion mechanism is used to adaptively adjust the contribution of student features and question features. The calculation formula is as follows: , , in, For adaptive gate value, For activation function, The weight matrix is a learnable matrix. For student characteristics, As a characteristic of the question, For student index variables, Number the questions. The result is the answer; the question index variable is the variable; and [·;·] are vector concatenation operators. Features after adaptive adjustment; After adaptive adjustment, temporal location information is embedded to obtain fused features.
8. The knowledge tracing method based on joint modeling of students and questions using a large language model according to claim 7, characterized in that, Jointly modeled knowledge tracing models include: Obtain the historical fusion feature sequence from time step 1 to t, where each historical fusion feature sequence contains the student features, question features, and original answer information from the input dataset at the corresponding time step; The historical fusion feature sequence is input into the semantic coding layer for sequence encoding to obtain the dynamic student state sequence of the entire learning history of the student. The semantic interaction layer is input together with the student's current state sequence and the question features of the next time step. The layer analyzes the degree of matching between the student's current knowledge state and the question requirements, and outputs the context vector after the interaction. The context vector after the interaction is input into the prediction and interpretation layer, which outputs the probability that the student answers the next question correctly and the interpretation text.
9. The knowledge tracing method based on joint modeling of students and questions using a large language model according to claim 1, characterized in that, A total loss function, including prediction loss and consistency regularization term, is established to train the knowledge tracking model of the joint modeling to obtain the trained joint model. The prediction loss uses the cross-entropy loss function, which measures the difference between the model's output probability of correct answer and the actual answer result by minimizing the error between the predicted probability and the true label. The consistency regularization term uses KL divergence as a constraint index. It minimizes the difference between the semantic distribution of the jointly modeled knowledge tracing model and the semantic distribution generated by the large language model. This constrains the distribution of student semantic features and question semantic features generated by the jointly modeled knowledge tracing model to be consistent with the semantic priors provided by the large language model.
10. A knowledge tracking device based on student-question joint modeling using a large language model, comprising a memory and a processor, wherein the memory is used to store computer programs, characterized in that, The processor is configured to implement the knowledge tracking method based on student and question joint modeling according to any one of claims 1 to 9 when executing the computer program.
Citation Information
Patent Citations
Knowledge tracking cold start optimization method and system based on large language model
CN119441508A
Large model knowledge tracking method based on plug-and-play instruction
CN119938869A