Coaching dialogue generation system and method for long-term learning

Through the cognitive skill extraction and emotional state perception modules, combined with the large language model, the problem of neglecting long-term learning trajectories in the existing tutoring system is solved, personalized long-term learning tutoring is achieved, and the accuracy and consistency of teaching guidance are improved.

CN120654808APending Publication Date: 2025-09-16ZHEJIANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510634584.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing tutoring systems focus on short-term interactions and ignore students' long-term learning trajectories. In addition, large language models have difficulty maintaining coherence and contextual consistency in long-term conversations, leading to misunderstandings of the current context.

Method used

The cognitive skill extraction module and the emotional state perception module are adopted, and the conversation history between students and teachers is saved through the memory storage and retrieval sub-modules. The student's learning status is evaluated by combining semantic similarity and concept overlap scores. The large language model is used to generate personalized teaching guidance, and the conversation style is adjusted based on the personality characteristics of students and teachers.

Benefits of technology

It provides personalized guidance that conforms to the evolution of students' learning process. By integrating long-term memory and emotional state, it ensures that the teaching content matches the students' current emotions and context, improving the tutoring effect of long-term learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654808A_ABST
    Figure CN120654808A_ABST
Patent Text Reader

Abstract

The invention discloses a tutoring dialogue generation system and method for long-term learning. In a cognitive skill extraction module, historical dialogues between students and teachers are abstracted and coded and then are stored in a memory bank as historical memory along with timestamps for a long time; based on the semantic similarity, the concept overlapping score and the time decay weight, retrieving the most relevant historical memory from the memory bank as a memory retrieval result; in the emotional state sensing module, storing recent historical dialogues and timestamps thereof in a context cache, and inputting current newest student speaking and memory retrieval results, the context cache, a student personality feature library and a teacher personality feature library into a dialogue agent constructed based on a large language model; and generating teaching guidance and taking the teaching guidance as a teacher's speech in the next round of dialogue. According to the invention, by integrating two dimensions of cognition and emotion, personalized guidance conforming to the evolution of the learning process of students can be provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of generative language models, and in particular relates to a system and method for generating tutoring dialogues for long-term learning. Background Art

[0002] In recent years, the rapid development of large language models has revolutionized the landscape of intelligent education systems. These systems have not only become more sophisticated and user-friendly, but have also made significant progress in personalized learning for students. Leveraging the power of large language models, these intelligent systems can now reach a wider audience, alleviating the imbalance in educational resources.

[0003] Tutoring systems based on large language models, which can simulate teacher-student interactions, have become powerful tools in educational settings. These systems can more accurately analyze the teaching and learning process, providing in-depth insights into teachers' teaching methods and students' learning progress. Furthermore, dialogue systems powered by large language models are increasingly adopting advanced teaching strategies such as scaffolding and Socratic questioning, leveraging the models' extensive knowledge and reasoning capabilities to support student learning.

[0004] However, existing tutoring systems typically focus on short-term interactions and often overlook students' long-term learning trajectories. These systems assess students' knowledge and provide guidance based on a single conversation, failing to consider the cumulative impact of previous interactions or cross-disciplinary performance. Furthermore, due to the limited memory capacity of large language models, maintaining coherence in long conversations remains a major challenge. Long conversation intervals, diverse contexts, and changes in language style further complicate the model's ability to effectively integrate past interactions, potentially leading to misunderstandings of the current context. Summary of the Invention

[0005] The purpose of the present invention is to solve the above-mentioned technical problems existing in the prior art and to provide a system and method for generating tutoring dialogues for long-term learning.

[0006] The specific technical solutions adopted in the present invention are as follows:

[0007] In a first aspect, the present invention provides a tutoring dialogue generation system for long-term learning, which includes a cognitive skill extraction module and an affective state perception module;

[0008] The cognitive skill extraction module includes a memory storage submodule and a memory retrieval submodule;

[0009] The memory storage submodule is used to encode the speech content summary in the historical conversation between the student and the teacher and store it in the memory bank along with the timestamp as historical memory for a long time;

[0010] The memory retrieval submodule is used to calculate the semantic similarity and concept overlap score of the latest student speech with the speech content summary corresponding to each historical memory in the memory bank after receiving the latest student speech, and extract the historical memories with the highest concept overlap score after time decay from all historical memories with semantic similarity exceeding a first threshold as the memory retrieval result;

[0011] The emotional state perception module includes a context cache submodule, a two-way personality extraction submodule, and a teaching guidance generation submodule;

[0012] The context cache submodule is configured to store historical conversations and their timestamps whose time intervals do not exceed a second threshold in the context cache, and to transfer historical conversations and their timestamps whose time intervals exceed the second threshold to the memory storage submodule for long-term storage in a memory bank;

[0013] The bidirectional personality extraction submodule is used to extract the personality characteristics of students and teachers based on historical conversations and store them in a student personality characteristic library and a teacher personality characteristic library respectively;

[0014] The teaching guidance generation submodule is used to input the latest student speech, memory retrieval results, context cache, student personality feature library and teacher personality feature library into the dialogue agent built based on the large language model, generate teaching guidance and use it as the teacher speech in the next round of dialogue.

[0015] As a preferred embodiment of the above-mentioned first aspect, after receiving the historical conversation and its timestamp transferred by the context cache submodule, the memory storage submodule needs to generate summary sentences for the teacher's speech and the student's speech in the historical conversation through the large language model respectively. Each summary sentence is encoded through the text encoder and stored in the memory bank together with the speech timestamp as historical memory.

[0016] As a preferred embodiment of the above-mentioned first aspect, the semantic similarity is calculated as follows: the student speech is encoded into a first embedding vector, the speech content summary is encoded into a second embedding vector, and the cosine similarity between the two embedding vectors is calculated as the semantic similarity between the student speech and the speech content summary.

[0017] As a preferred embodiment of the above-mentioned first aspect, the concept overlap score is calculated as follows: all nouns are extracted from the student's speech to form a first noun set, and all nouns are extracted from the speech content summary to form a second noun set, and the ratio of the number of intersection elements of the two noun sets to the total number of elements in each set is calculated, and the logarithmic values ​​of the two ratios are averaged and the negative value is taken as the concept overlap score between the student's speech and the speech content summary.

[0018] As a preferred embodiment of the first aspect mentioned above, the bidirectional personality extraction submodule is implemented using a large language model. The student speeches and teacher speeches in each round of historical dialogue are respectively fed into the large language model to identify the personality characteristics of the students and teachers and update the student personality characteristic library and the teacher personality characteristic library based on the identification results.

[0019] In a second aspect, the present invention provides an evaluation method for the tutoring dialogue generation system described in any one of the solutions of the first aspect, comprising:

[0020] S1. Based on the interactive teaching data of teachers and students on the online education platform, we extract the code submitted by students for the same programming problem in multiple rounds. We use code difference analysis tools to analyze the differences between the two rounds of code submissions. At the same time, we input the problem into the large language model for analysis, and generate analysis results and step-by-step solutions.

[0021] S2. Construct a teacher agent, a student agent, and a dean agent for reconstructing the teacher-student interaction, traverse the codes submitted in all rounds in order, extract the codes submitted in the previous and next rounds and the corresponding code differences in turn, and input them into the teacher agent, student agent, and dean agent together with the analysis results and step-by-step solutions. First, the teacher agent generates teaching guidance to guide students to identify problems and make necessary modifications to the code. Then, the student agent generates a response to the teaching guidance given by the teacher agent, thereby continuously generating teacher-student tutoring dialogues that are consistent with the code changes submitted in all rounds. During the entire teacher-student tutoring dialogue generation process, the dean agent supervises whether the teaching guidance given by the teacher agent is consistent with the dialogue context. If not, the teacher agent is required to regenerate the teaching guidance.

[0022] S3. Use the teacher-student tutoring dialogue data obtained by reconstructing the problem as an evaluation data set to evaluate the tutoring dialogue generation system.

[0023] As a preferred embodiment of the second aspect above, the teacher agent, student agent and dean agent are all constructed based on a large language model.

[0024] In a third aspect, the present invention provides a computer program product comprising a computer program / instruction, which, when executed by a processor, can implement a tutoring dialogue generation system for long-term learning as described in any one of the schemes of the first aspect, or implement an evaluation method as described in the second aspect.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the system for generating tutoring dialogues for long-term learning as described in any one of the schemes in the first aspect above is implemented, or the evaluation method as described in the second aspect above is implemented.

[0026] In a fifth aspect, the present invention provides a computer electronic device comprising a memory and a processor;

[0027] The memory is used to store computer programs;

[0028] The processor is configured to implement the tutoring dialogue generation system for long-term learning as described in any one of the solutions of the first aspect, or implement the evaluation method as described in the second aspect, when executing the computer program.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] The present invention provides a tutoring dialogue generation system for long-term learning. The system uses two modules, cognitive skill extraction and emotional state perception, to comprehensively diagnose students' historical learning progress, focusing on long-term and short-term memory in the dialogue. These two modules can provide key references for generating appropriate teaching guidance by evaluating students' learning status and emotional state. Specifically, the cognitive skills module in the system of the present invention uses memory-based storage and retrieval to select relevant information from past dialogues to help accurately evaluate students' long-term learning progress. The emotional state module in the system of the present invention ensures that the generated guidance content matches the students' current emotions and context, and adjusts the corresponding dialogue style according to their respective personality traits. By integrating the two dimensions of cognition and emotion, the present invention can provide personalized guidance that conforms to the evolution of students' learning process. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of the module composition of a tutoring dialogue generation system for long-term learning;

[0032] Figure 2 This is a schematic diagram of the submodule composition of the cognitive skills extraction module;

[0033] Figure 3 This is a schematic diagram of the submodule composition of the emotional state perception module;

[0034] Figure 4 is a schematic diagram of an exemplary interaction process of the entire system;

[0035] Figure 5 This is a schematic diagram of the dean-teacher-student multi-agent framework;

[0036] Figure 6 This is a schematic diagram of the structure of computer electronic equipment. DETAILED DESCRIPTION

[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The technical features in the various embodiments of the present invention can be combined accordingly without conflicting with each other.

[0038] In the description of the present invention, it should be understood that when an element is considered to be "connected" to another element, it can be directly connected to the other element or indirectly connected, that is, there are intermediate elements. On the contrary, when an element is said to be "directly" connected to another element, there are no intermediate elements.

[0039] In the description of the present invention, it should be understood that the terms "first" and "second" are used solely for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly specifying the number of technical features being described. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one of such features.

[0040] In a preferred embodiment of the present invention, a tutoring dialogue generation system for long-term learning is provided. Figure 1 As shown in Figure 2, the system includes two key modules: cognitive skill extraction module and emotional state perception module. Figure 2 As shown. The above cognitive skill extraction module includes a memory storage submodule and a memory retrieval submodule. Figure 3 As shown in the figure, the above-mentioned emotional state perception module includes a context cache submodule, a bidirectional personality extraction submodule, and a teaching guidance generation submodule. The system uses the cognitive skill extraction and emotional state perception modules to comprehensively diagnose students' historical learning progress, focusing on long-term and short-term memory in the conversation. The exemplary interaction process of the entire system is shown in the figure. Figure 4 As shown in Figure 2, it can be seen that these two modules can provide key references for generating appropriate teaching guidance by evaluating students' learning status and emotional state. The specific functional implementation of each sub-module within the two modules is described in detail below.

[0041] The main function of the cognitive skills extraction module is to use the students' mastery of relevant knowledge concepts in historical conversations on other issues to assess their understanding of the current problem. This method can provide a more fine-grained diagnosis of the students' cognitive state. Specifically, in the cognitive skills extraction module, the memory storage submodule is used to encode the summary of the speech content in the historical conversation between the student and the teacher and store it in the memory bank as historical memory for a long time along with the timestamp. The memory retrieval submodule is used to calculate the semantic similarity and concept overlap score between the latest student speech and the speech content summary corresponding to each historical memory in the memory bank after receiving it, and extract the historical memory with the highest concept overlap score after time decay from all historical memories whose semantic similarity exceeds the first threshold as the memory retrieval result.

[0042] In an embodiment of the present invention, the cognitive skill extraction module actually adopts a memory retrieval mechanism designed for long-term event extraction and preservation. Specifically, the mechanism includes two main processes: memory storage and memory retrieval.

[0043] In the memory storage submodule, for each round of historical dialogue, a summary of the speech content of the dialogue is first generated. The focus of the summary is to highlight the core content of the dialogue while reducing storage costs. This process is completed using the summary and reasoning capabilities of LLM, expressed as s = S(u), where s represents the summary of the current dialogue, S(·) represents the summary process of LLM, and u∈{a, g} represents the speeches of teachers and students. After the summary is generated, the summary result s is stored. In order to facilitate storage and subsequent retrieval, the summary content will be encoded and its corresponding timestamp t will be stored in the memory bank. This storage method significantly improves the efficiency of subsequent retrieval. The storage process is defined as follows:

[0044] M={(E(u i ),t i )}

[0045] Where E(·) represents the text encoder, i∈{1, 2, ..., l} represents the i-th memory in the memory bank M, and l represents the length of M.

[0046] In the memory retrieval submodule, the retrieval process primarily relies on semantic similarity to improve the accuracy of related events. Furthermore, because these events reflect a student's mastery of knowledge, and their influence may decay over time, the present invention also considers concept overlap and time decay during the retrieval process.

[0047] Therefore, this paper defines a method for calculating the semantic similarity between a student's speech and the speech content summary in the memory bank as follows: encode the student's speech into a first embedding vector, encode the speech content summary into a second embedding vector (the memory bank itself stores the encoded embedding vector, so it can be directly called), and calculate the cosine similarity between the two embedding vectors as the semantic similarity between the student's speech and the speech content summary.

[0048] In addition, the calculation method of the concept overlap score between the student speech and the speech content summary in the memory bank is defined as follows: all nouns are extracted from the student speech to form a first noun set, and all nouns are extracted from the speech content summary to form a second noun set. The proportion of the number of elements in the intersection of the two noun sets to the total number of elements in each set is calculated, and the logarithm of the two proportions (converted by log) is averaged and the negative number is taken as the concept overlap score between the student speech and the speech content summary.

[0049] In an embodiment of the present invention, the student speech in the latest input dialogue can be used as a query, and the speech content summary in the memory database can be used as a query.

[0050] Semantic similarity x sem The semantic similarity between the query (student speech in the input dialogue) and the speech content summary (key value) stored in the memory bank is calculated. Concept overlap is measured by calculating the degree of noun overlap between the query and the key value. The specific concept overlap score x over The calculation is as follows:

[0051]

[0052] Among them, L q and L k The noun sets representing the query and key values ​​are the first and second noun sets mentioned above respectively; “||” indicates the size of the calculated set, i.e. the number of elements in the set, and log represents the logarithm calculation with base 10. The time decay weight λ is defined as:

[0053] λ=e -Δt / τ ,

[0054] Where Δt represents the time interval between the query and the key value, and τ is the time decay constant. Finally, a time-decayed concept overlap score x is calculated as the comprehensive score, and the calculation formula is as follows:

[0055] x=λx over .

[0056] During the retrieval process, when a new student feedback a′ is received, the semantic similarity x between a′ and the speech content summary corresponding to each historical memory in the memory bank M needs to be calculated. semand concept overlap fraction x over , and calculate the corresponding time decay weight λ at the same time, and then get the comprehensive score x. A pre-set threshold γ is used to filter the retrieval range from the memory library M. Only when the semantic similarity score x sem When it is greater than γ, the historical memory will be considered for retrieval. Then, using the calculated comprehensive score x as the retrieval criterion, the k historical memories m with the highest scores within the retrieval range of the memory library M are selected as the memory retrieval results, where k is a hyperparameter. The entire retrieval process is defined as:

[0057] m=R(M,x,γ).

[0058] In addition, the role of the emotional state perception module is to assist in judging the student's cognitive level, emotions, and attitudes during the learning process by analyzing the cached recent conversations. In addition, the module also uses the personality characteristics of students and teachers in the conversation context to construct a more accurate conversation scene, making the conversation content more contextual. Specifically, in the emotional state perception module, the context cache submodule is used to store historical conversations and their timestamps whose time interval does not exceed the second threshold in the context cache, and transfer historical conversations and their timestamps whose time interval exceeds the second threshold to the memory storage submodule for long-term storage through the memory bank. After receiving the historical conversations and their timestamps transferred by the context cache submodule, the memory storage submodule needs to generate summary sentences for the teacher's and student's speeches in the historical conversations respectively through the large language model. Each summary sentence is encoded by the text encoder and stored in the memory bank together with the speech timestamp as historical memory.

[0059] The bidirectional personality extraction submodule is used to extract the personality characteristics of students and teachers based on historical conversations and store them as student personality characteristic libraries and teacher personality characteristic libraries respectively.

[0060] The teaching guidance generation submodule is used to input the latest student speech, memory retrieval results, context cache, student personality feature library and teacher personality feature library into the dialogue agent built based on the large language model to generate teaching guidance and use it as the teacher's speech in the next round of dialogue.

[0061] In the embodiment of the present invention, the memory update strategy is actually adopted in the emotional state perception module to realize short-term context management, and the personality extraction method is combined to perceive the emotional state of the student. Specifically, for the short-term context, the context cache submodule of the present invention constructs a context cache C = {(u i , t i)}, used to collect the speech u of the current conversation (both student speeches and teacher speeches need to be collected) and its timestamp t, where i∈{1, 2, ..., j} represents the i-th context in the context cache C, and j represents the length of the cache. When a new student or teacher's speech u′ appears, the context cache submodule first calculates the time interval between the timestamp of u′ and each record in the context cache C. If the time interval between the context (u, t) and u′ in the context cache C exceeds the threshold θ, the context cache submodule will transfer the context (u, t) to the memory bank M for long-term storage. For the specific storage method, please refer to the method in the aforementioned memory storage submodule. It is necessary to generate and encode the content of the speech in the conversation, and then store it as historical memory together with the timestamp, and then update the memory bank M. The update process of the memory bank is defined as follows:

[0062] M′=M∪{(E(S(u)),t)},

[0063] Where M′ represents the updated memory. At the same time, the context cache C will add the new speech u′ and its timestamp t′. The update process is defined as:

[0064] C′=C∪{(u′,t′)}.

[0065] This ensures that the cache always reflects the latest utterances and their corresponding timestamps.

[0066] In addition to perceiving emotional states from short-term contexts, the present invention also uses the personality traits implicit in the conversation to further infer the student's emotional state. This not only helps to understand the student's emotional changes, but also maintains the consistency of the teacher and student's personality during the conversation. Specifically, the present invention uses a large language model as a bidirectional personality extractor in the bidirectional personality extraction module to extract the personality traits of the teacher and the student in the conversation respectively. The extracted personality traits are stored in the corresponding feature library: s represents the student's personality trait library, P t Represents the teacher's personality trait library. If no obvious personality traits are identified during the conversation, no information will be stored in the trait library.

[0067] It should be noted that the bidirectional personality extractor can be implemented using a large language model. The student speech and teacher speech in each round of historical dialogue are respectively fed into the large language model to identify the personality characteristics of the student and teacher and update the student personality characteristic library and teacher personality characteristic library based on the identification results. The personality characteristics of teachers and students refer to the personality characteristics labels displayed by teachers and students during the learning process. For example, Figure 4In the example shown, the teacher's personality traits might be labeled "guiding and encouraging" or "detail-oriented mentor," while the student's personality traits might be labeled "analytical thinker" or "active learner." Of course, these are just a few examples of personality traits. The large language model will analyze and extract specific traits based on actual conversations. Alternatively, a tag library or vocabulary can be constructed for the large language model to select from.

[0068] After extracting students’ cognitive skills and affective states, whenever new student feedback a′ arrives, the teacher agent (LLM) integrates information from all modules and generates the final teaching guidance g. The process is as follows:

[0069]

[0070] Therefore, based on the above-mentioned tutoring dialogue generation system, the present invention can integrate the two dimensions of cognition and emotion to provide personalized guidance that conforms to the evolution of students' learning process.

[0071] In addition, the present invention also provides an evaluation method for the above-mentioned tutoring dialogue generation system. Due to the lack of attention paid to the long-term learning process of students in different problems and courses in existing research, dialogue tutoring datasets that can effectively describe this process are very scarce. In order to address this limitation, the present invention needs to first construct an evaluation dataset. During the construction of this dataset, the learning process of students is first constructed by identifying and analyzing the differences in the codes submitted by students in multiple rounds; then, the "Dean-Teacher-Student" framework is used to simulate the interaction between teachers and students to ensure that the generated dialogue can reflect the learning process demonstrated by students in multiple rounds of submissions.

[0072] In another embodiment of the present invention, the specific implementation steps of the evaluation method for the above-mentioned tutoring dialogue generation system include:

[0073] S1. Based on the teacher-student interactive teaching data of the online education platform, the code submitted by students for the same problem in multiple rounds during the programming learning process is extracted. The code difference analysis tool is used to analyze the differences between the two rounds of code submissions. At the same time, the problem is input into the large language model for analysis to generate analysis results and step-by-step solutions.

[0074] S2. Construct a teacher agent, a student agent, and a dean agent for reconstructing the teacher-student interaction, traverse the codes submitted in all rounds in order, extract the codes submitted in the previous and next rounds and the corresponding code differences in turn, and input them into the teacher agent, the student agent, and the dean agent together with the analysis results and the step-by-step solution. The teacher agent first generates teaching guidance to guide students to identify problems and make necessary modifications to the code. The student agent then generates a response to the teaching guidance given by the teacher agent, thereby continuously generating teacher-student tutoring dialogues that are consistent with the code changes submitted in all rounds. During the entire teacher-student tutoring dialogue generation process, the dean agent supervises whether the teaching guidance given by the teacher agent is consistent with the dialogue context, for example, judging whether the teacher always follows the teaching syllabus for guidance. If it is inconsistent, the teacher agent is required to regenerate the teaching guidance.

[0075] S3. Use the teacher-student tutoring dialogue data obtained by reconstructing the problem as an evaluation data set to evaluate the tutoring dialogue generation system.

[0076] It should be noted that the teacher agent, student agent, and dean agent can all be built based on a large language model. The following describes the specific implementation process of the above evaluation method with a specific example.

[0077] In one example of the present invention, the teacher-student interactive teaching data for an online education platform is derived from PTADisc. This dataset records the actual multi-round submissions of students on the online education platform PTA. Therefore, by analyzing the differences in multi-round submissions for programming problems, we can understand the student learning process. Based on this, the present invention simulates teacher-student interactions and uses these interactions to construct a tutoring dialogue dataset. Because some students have submission records in all three courses, the constructed tutoring dialogue dataset also supports cross-curricular research.

[0078] In order to simulate the tutoring process, a multi-agent framework is proposed to construct a complete dialogue following the Dean-Teacher-Student structure, such as Figure 5 In addition, the framework can also be used to introduce teaching strategies during the tutoring process.

[0079] See also Figure 5 As shown in Figure 1, the multi-agent framework consists of three agents: a dean, a teacher, and a student. The dean oversees the conversation, ensuring that the teacher's guidance remains consistent with the context. Crucially, the teacher ensures that the teacher consistently adheres to the syllabus. The teacher analyzes the student's continuous submission history to infer their knowledge and provide targeted guidance, simulating a real-world teaching process. The student evaluates the differences in their code submissions to determine their learning progress and responds accordingly, completing the conversation.

[0080] During dataset construction, the problem (in this case, a programming problem) must first be described in detail based on a large language model and the problem-solving process analyzed. This step leverages the problem-solving capabilities of the large language model to generate problem analysis results and step-by-step solutions. Subsequently, Code Diff (a method for identifying differences between two code segments) is used to identify differences between students' code submissions for the programming problem over multiple rounds. These code differences reflect the student's evolving understanding of the problem and their learning state over the course of multiple submissions, thereby capturing their learning trajectory. By analyzing the changes in each submission, the student's learning progress can be simulated. Furthermore, the present invention incorporates teacher guidance and utilizes agents to simulate teacher-student interaction, ultimately achieving the construction of a tutoring dialogue. Specifically, the present invention uses teacher and student agents to reconstruct teacher-student interaction. Through problem analysis and code difference assessment, it simulates how a teacher guides students to identify problems and make necessary code modifications. Students then respond based on the teacher's guidance, forming a complete dialogue. Throughout the tutoring process, the dean agent monitors the dialogue to ensure that the teacher's guidance remains consistent with the context.

[0081] Inspired by scaffolding theory, the teacher agent's guidance is divided into four distinct teaching actions: inspiration, introduction, guidance, and summary. Each teaching action is clearly labeled when generating teacher guidance. Inspiration and introduction guide students through critical thinking and exploration. Guidance provides necessary clarification or prompts when students are unable to independently arrive at an answer. Summary reinforces and reviews key learning points.

[0082] The dataset constructed using the above method can then be used to automatically evaluate the teaching instructions generated by the tutoring dialogue generation system. During the specific evaluation, each student's conversation can be processed into a multi-turn conversation format, following the method used to construct a multi-turn conversation dataset. Since the first round of conversation lacks historical dialogue, the first round can be used as the historical dialogue, and the tutoring dialogue generation system can be evaluated on rounds 2 through 4.

[0083] It should be noted that the method steps and system modules shown in the above embodiments can essentially be implemented in the form of computer programs.

[0084] Therefore, based on the same inventive concept, Figure 6 As shown, the present invention also provides a computer electronic device, which includes a memory and a processor;

[0085] The memory is used to store computer programs;

[0086] The processor is configured to implement the aforementioned tutoring dialogue generation system for long-term learning or the aforementioned evaluation method when executing the computer program.

[0087] Furthermore, the logic instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention.

[0088] Therefore, based on the same inventive concept, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it can implement the tutoring dialogue generation system for long-term learning as described above, or implement the evaluation method as described above.

[0089] Therefore, based on the same inventive concept, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, can implement the tutoring dialogue generation system for long-term learning as described above, or implement the evaluation method as described above.

[0090] It is understood that the storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Furthermore, the storage medium may be any medium capable of storing program code, such as a USB flash drive, a mobile hard drive, a magnetic disk, or an optical disk.

[0091] It is understandable that the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0092] It should also be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the various embodiments provided in this application, the division of steps or modules in the system and method is only a logical function division. In actual implementation, there may be other division methods, for example, multiple modules or steps can be combined or integrated together, and a module or step can also be split.

[0093] The present invention will further illustrate the detailed implementation process and technical effects of the above-mentioned tutoring dialogue generation system for long-term learning and the above-mentioned evaluation method on a specific data set through a specific embodiment, so as to facilitate understanding of the essence of the present invention.

[0094] Example

[0095] The steps in this embodiment are identical to those in the aforementioned tutoring dialogue generation system for long-term learning and the aforementioned evaluation method, so we will not repeat them here. Instead, we will focus on the specific dataset, some specific parameter settings, and implementation results of this embodiment. For ease of description, the tutoring dialogue generation system for long-term learning proposed in this invention will be referred to as the LTDAgent framework.

[0096] To verify the effectiveness of the proposed tutoring dialogue generation system for long-term learning, this example first automatically evaluates the generated teaching guidance on three programming courses using the dataset construction method described in the evaluation method above. This example uses PyTorch to implement the baseline method and the LTDAgent framework proposed in this invention. The hyperparameters τ and γ are set to 1×10 -7 and 1.5. The retrieval hyperparameter k is set to 5. According to the construction method of the multi-round dialogue dataset, this embodiment processes each student's dialogue into a multi-round conversation format. For each course, 50 students were randomly selected to form the test set. Due to the lack of historical dialogue in the first round of conversation, the first round of conversation was used as the historical dialogue, and different model frameworks were evaluated in the second to fourth rounds of conversation. Finally, the performance comparison results of the LTDAgent framework proposed in this invention and the baseline model are shown in Table 1.

[0097] Experimental results show that our LTDAgent framework achieves significant improvements over the baseline approach. In particular, in Session 3 and Session 4, our approach significantly outperforms the baseline approach, highlighting its effectiveness in capturing students’ long-term learning processes.

[0098] Table 1: Experimental results of automatic evaluation of guidance generation on the LTDialogue dataset

[0099]

[0100]

[0101] Furthermore, because this experiment uses a zero-shot setting and requires no additional data for fine-tuning, the proposed method achieves significant improvements over multiple baseline models. Meanwhile, EduChat and SocraticLM, due to their smaller base models, perform poorly in terms of generalization. This further demonstrates the wide applicability of the proposed method, enabling personalized teaching in diverse educational scenarios.

[0102] The embodiments described above are merely some preferred implementations of the present invention and are not intended to limit the present invention. Persons skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent substitution or equivalent transformation falls within the scope of protection of the present invention.

Claims

1. A tutoring dialogue generation system for long-term learning, characterized by: It includes cognitive skill extraction module and affective state perception module; The cognitive skill extraction module includes a memory storage submodule and a memory retrieval submodule; The memory storage submodule is used to encode the speech content summary in the historical conversation between the student and the teacher and store it in the memory bank along with the timestamp as historical memory for a long time; The memory retrieval submodule is used to calculate the semantic similarity and concept overlap score of the latest student speech with the speech content summary corresponding to each historical memory in the memory bank after receiving the latest student speech, and extract the historical memories with the highest concept overlap score after time decay from all historical memories with semantic similarity exceeding a first threshold as the memory retrieval result; The emotional state perception module includes a context cache submodule, a two-way personality extraction submodule, and a teaching guidance generation submodule; The context cache submodule is configured to store historical conversations and their timestamps whose time intervals do not exceed a second threshold in the context cache, and to transfer historical conversations and their timestamps whose time intervals exceed the second threshold to the memory storage submodule for long-term storage in a memory bank; The bidirectional personality extraction submodule is used to extract the personality characteristics of students and teachers based on historical conversations and store them in a student personality characteristic library and a teacher personality characteristic library respectively; The teaching guidance generation submodule is used to input the latest student speech, memory retrieval results, context cache, student personality feature library and teacher personality feature library into the dialogue agent built based on the large language model, generate teaching guidance and use it as the teacher speech in the next round of dialogue.

2. The system for generating tutoring dialogues for long-term learning according to claim 1, wherein: After receiving the historical conversation and its timestamp transferred by the context cache submodule, the memory storage submodule needs to generate summary sentences for the teacher's speech and the student's speech in the historical conversation through the large language model respectively. Each summary sentence is encoded by the text encoder and stored in the memory bank together with the speech timestamp as historical memory.

3. The system for generating tutoring dialogues for long-term learning according to claim 1, wherein: The semantic similarity is calculated as follows: encoding the student speech into a first embedding vector, encoding the speech content summary into a second embedding vector, and calculating the cosine similarity between the two embedding vectors as the semantic similarity between the student speech and the speech content summary.

4. The system for generating tutoring dialogues for long-term learning according to claim 1, wherein: The concept overlap score is calculated as follows: all nouns are extracted from the student's speech to form a first noun set, and all nouns are extracted from the speech content summary to form a second noun set, and the ratio of the number of elements in the intersection of the two noun sets to the total number of elements in each set is calculated, and the logarithm of the two ratios is averaged and the negative value is taken as the concept overlap score between the student's speech and the speech content summary.

5. The system for generating tutoring dialogues for long-term learning according to claim 1, wherein: The bidirectional personality extraction submodule is implemented using a large language model. The student speeches and teacher speeches in each round of historical dialogue are respectively fed into the large language model to identify the personality characteristics of the students and teachers and update the student personality characteristic library and the teacher personality characteristic library based on the identification results.

6. An evaluation method for the tutoring dialogue generation system according to claims 1 to 5, characterized in that: include: S1. Based on the interactive teaching data of teachers and students on the online education platform, we extract the code submitted by students for the same programming problem in multiple rounds. We use code difference analysis tools to analyze the differences between the two rounds of code submissions. At the same time, we input the problem into a large language model for analysis, and generate analysis results and step-by-step solutions. S2. Construct a teacher agent, a student agent, and a dean agent for reconstructing teacher-student interaction. Sequentially traverse the code submitted in all rounds, extract the code submitted in the previous and next rounds, and the corresponding code differences. These differences, along with the analysis results and step-by-step solutions, are input into the teacher agent, the student agent, and the dean agent. The teacher agent first generates teaching guidance to guide students in identifying problems and making necessary code modifications. The student agent then generates responses to the teaching guidance provided by the teacher agent, thereby continuously generating teacher-student tutoring dialogues that are consistent with the code changes submitted in all rounds. During the entire process of generating the teacher-student tutoring dialogue, the dean agent supervises whether the teaching guidance given by the teacher agent is consistent with the dialogue context. If not, the teacher agent is required to regenerate the teaching guidance. S3. Use the teacher-student tutoring dialogue data obtained by reconstructing the problem as an evaluation data set to evaluate the tutoring dialogue generation system.

7. The evaluation method according to claim 6, wherein: The teacher agent, student agent and dean agent are all constructed based on a large language model.

8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, it can implement the tutoring dialogue generation system for long-term learning as described in any one of claims 1 to 5, or implement the evaluation method as described in claim 6 or 7.

9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the tutoring dialogue generation system for long-term learning as described in any one of claims 1 to 5, or implements the evaluation method as described in claim 6 or 7.

10. A computer electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is configured to implement the tutoring dialogue generation system for long-term learning according to any one of claims 1 to 5, or implement the evaluation method according to claim 6 or 7, when executing the computer program.

Citation Information

Cited By

  • Automatic memory management method based on context awareness and hierarchical routing

    CN121092650A