A method and related device for answering questions and providing tutoring
By combining pre-training of large models and supervised fine-tuning training with subject functional plug-ins, problems with limited resources and low accuracy in answering complex questions in traditional Q&A tutoring methods are solved, and efficient and accurate Q&A tutoring effects are achieved.
Patent Information
- Application Number
- CN202510473658.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The traditional Q&A tutoring methods have problems such as limited resources, uneven teaching levels, and low accuracy in answering complex questions. Especially, large-scale auxiliary learning tools are prone to errors when solving complex problems, and the training data relies on manual annotation to lead to high costs and low efficiency.
By pre-training and supervising fine-tuning training of the first large model, combining multiple subject functional plug-ins, high-quality Q&A tutoring dialogue data is generated, and subject functional plug-ins are used to handle student problems, improving the accuracy and reliability of the model.
It improves the accuracy and reliability of Q&A tutoring, meets students' needs anytime and anywhere, reduces training costs, and improves the overall effect of Q&A tutoring.
Smart Images

Figure CN119992899B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a question-answering tutoring method and related devices. Background Art
[0002] During the learning process, students often encounter various problems that require timely and effective Q&A and guidance. Traditional Q&A and guidance methods include manual tutoring (primarily including face-to-face tutoring by teachers and online tutoring platforms) and traditional intelligent tutoring (such as simple intelligent tutoring software and large-scale model-based learning tools). Traditional intelligent tutoring methods often use dialogue systems to simulate human conversations to provide students with Q&A and guidance.
[0003] However, traditional question-answering tutoring methods have many limitations. Among them, in manual tutoring methods, teachers’ face-to-face tutoring resources are limited, making it difficult to meet the needs of a large number of students anytime and anywhere; online tutoring platforms often rely on the online time of manual teachers, and there may be problems with uneven teacher quality. In traditional intelligent tutoring methods, although intelligent tutoring software can provide a certain degree of automated question answering, it is difficult to give accurate and comprehensive answers to complex and diverse free dialogue questions, especially those involving logical reasoning and calculation processes. Learning assistance tools based on large models often cannot guarantee that every step in the problem-solving process is accurate, especially when it comes to solving complex problems. The errors of the large model may accumulate, and ultimately affect the accuracy of the answer. Therefore, learning assistance tools based on large models also have certain problems.
[0004] Therefore, how to provide an intelligent question-answering and tutoring method to improve the accuracy and reliability of answers, and thus improve the effect of question-answering and tutoring, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the Invention
[0005] In view of the above problems, this application provides a question-answering tutoring method and related devices to achieve the purpose of improving the accuracy and reliability of answers, thereby improving the effectiveness of question-answering tutoring. The specific solution is as follows:
[0006] The first aspect of the present application provides a question-answering tutoring method, comprising:
[0007] Get student questions;
[0008] The question-answering tutoring model is called to process the student question and obtain the answer corresponding to the student question. The question-answering tutoring model is obtained by pre-training and supervised fine-tuning the first model in sequence using the question stem, answer, analysis and question-answering tutoring dialogue data corresponding to the question sample. The question-answering tutoring model is connected to multiple subject function plug-ins, and each subject function plug-in corresponds to a functional requirement of a subject.
[0009] In a possible implementation, for each question sample, the Q&A tutoring dialogue data corresponding to the question sample is generated by the second large model according to the question stem and analysis corresponding to the question sample.
[0010] In a possible implementation, the generation method of the Q&A tutoring dialogue data corresponding to the question sample includes:
[0011] Obtain a preset Q&A tutoring dialogue data generation Prompt template, where the Q&A tutoring dialogue data generation Prompt template contains Q&A tutoring dialogue data generation task description information, a question stem filling slot, and an analysis filling slot;
[0012] Fill the question stem of the question sample into the question stem filling slot, and fill the analysis of the question sample into the analysis filling slot to obtain a Q&A tutoring dialogue data generation Prompt;
[0013] Input the Q&A tutoring dialogue data generation Prompt into the second large model to obtain the Q&A tutoring dialogue data corresponding to the question sample generated by the second large model.
[0014] In a possible implementation, the training method of the Q&A tutoring model includes:
[0015] Use the question stem and answer corresponding to the question sample to pre-train the first large model to obtain a pre-trained first large model;
[0016] Use the question stem, analysis, and Q&A tutoring dialogue data corresponding to the question sample to perform supervised fine-tuning training on the pre-trained first large model to obtain the Q&A tutoring model.
[0017] In a possible implementation, the process of calling the Q&A tutoring model to process the student's question to obtain the answer corresponding to the student's question includes:
[0018] Perform semantic analysis on the student's question to extract the subject characteristics of the student's question;
[0019] Call the target subject function plug-in to process the student's question to obtain a plug-in processing result; the target subject function plug-in is the subject function plug-in that matches the subject characteristics of the student's question among the multiple subject function plug-ins;
[0020] Call the Q&A tutoring model to generate the answer according to the plug-in processing result.
[0021] In a possible implementation, the process of calling the target subject function plug-in to process the student's question to obtain a plug-in processing result includes:
[0022] Perform semantic analysis on the student's question, and extract the key knowledge points and calculation requirement information of the student's question;
[0023] Transmit the key knowledge points and calculation requirement information of the student's question to the target subject function plugin, so that the target subject function plugin processes the student's question based on the key knowledge points and calculation requirement information of the student's question;
[0024] Obtain the plugin processing result returned after the target subject function plugin processes the student's question.
[0025] The second aspect of this application provides a question answering and tutoring device, including:
[0026] An acquisition unit, configured to acquire a student's question;
[0027] An answering unit, configured to call a question answering and tutoring model to process the student's question to obtain an answer corresponding to the student's question. The question answering and tutoring model is obtained by performing pre-training and supervised fine-tuning training on a first large model in sequence using the question stem, answer, analysis, and question answering and tutoring dialogue data corresponding to the question samples. The question answering and tutoring model is connected to multiple subject function plugins, and each subject function plugin corresponds to a function requirement of a subject.
[0028] In a possible implementation, for each question sample, the question answering and tutoring dialogue data corresponding to the question sample is generated by a second large model according to the question stem and analysis corresponding to the question sample.
[0029] In a possible implementation, the device further includes: a question answering and tutoring dialogue data generation unit;
[0030] The question answering and tutoring dialogue data generation unit is specifically configured to:
[0031] Obtain a preset question answering and tutoring dialogue data generation Prompt template, where the question answering and tutoring dialogue data generation Prompt template includes question answering and tutoring dialogue data generation task description information, a question stem filling slot, and an analysis filling slot;
[0032] Fill the question stem of the question sample into the question stem filling slot, and fill the analysis of the question sample into the analysis filling slot to obtain a question answering and tutoring dialogue data generation Prompt;
[0033] Input the question answering and tutoring dialogue data generation Prompt into the second large model to obtain the question answering and tutoring dialogue data corresponding to the question sample generated by the second large model.
[0034] In a possible implementation, the device further includes: a question answering and tutoring model training unit;
[0035] The question answering and tutoring model training unit is specifically configured to:
[0036] Use the question stem and answer corresponding to the question sample to pre-train the first large model, and obtain the pre-trained first large model;
[0037] Use the question stem, analysis, and question answering and tutoring dialogue data corresponding to the question sample to perform supervised fine-tuning training on the pre-trained first large model, and obtain the question answering and tutoring model.
[0038] In a possible implementation, the answering unit includes:
[0039] A semantic analysis unit, configured to perform semantic analysis on the student's question and extract the subject characteristics of the student's question;
[0040] A plug-in processing unit, configured to call a target subject function plug-in to process the student's question and obtain a plug-in processing result; the target subject function plug-in is the subject function plug-in that matches the subject characteristics of the student's question among the multiple subject function plug-ins;
[0041] An answer generation unit, configured to call the question answering and tutoring model to generate the answer according to the plug-in processing result.
[0042] In a possible implementation, the plug-in processing unit is specifically configured to:
[0043] Perform semantic analysis on the student's question and extract the key knowledge points and calculation requirement information of the student's question;
[0044] Transmit the key knowledge points and calculation requirement information of the student's question to the target subject function plug-in, so that the target subject function plug-in processes the student's question based on the key knowledge points and calculation requirement information of the student's question;
[0045] Obtain the plug-in processing result returned by the target subject function plug-in after processing the student's question.
[0046] The third aspect of this application provides a computer program product, including computer-readable instructions, which when running on an electronic device, enable the electronic device to implement the question answering and tutoring method in the first aspect or any implementation manner of the first aspect.
[0047] The fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, where:
[0048] The memory is used to store a computer program;
[0049] The processor is used to execute the computer program, so that the electronic device can implement the question answering and tutoring method in the first aspect or any implementation manner of the first aspect as described above.
[0050] The fifth aspect of the present application provides a computer-readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the question answering and tutoring method in the first aspect or any implementation manner of the first aspect as described above.
[0051] By means of the above technical solutions, the present application provides a question answering and tutoring method and related devices. In this solution, the first large model is pre-trained by using the question stem, answer, analysis and question answering and tutoring dialogue data corresponding to the question samples. After the pre-training, it is further optimized through supervised fine-tuning training, which greatly improves the training effect of the question answering and tutoring model. Moreover, the question answering and tutoring model is connected with multiple subject function plug-ins, and each subject function plug-in corresponds to a function requirement of a subject. By calling the question answering and tutoring model to process the student's question and obtain the answer corresponding to the student's question, the accuracy and reliability of the answer can be improved, and thus the effect of question answering and tutoring can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Combined with the drawings and referring to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the original components and elements are not necessarily drawn to scale.
[0053] Figure 1 It is a schematic flowchart of a question answering and tutoring method provided by an embodiment of the present application;
[0054] Figure 2 It is a schematic flowchart of a method for generating question answering and tutoring dialogue data corresponding to question samples provided by an embodiment of the present application;
[0055] Figure 3 It is a schematic flowchart of a training method for a question answering and tutoring model provided by an embodiment of the present application;
[0056] Figure 4 It is a schematic flowchart of a method for calling a question answering and tutoring model to process a student's question and obtain the answer corresponding to the student's question provided by an embodiment of the present application;
[0057] Figure 5 It is a schematic structural diagram of a question answering and tutoring device provided by an embodiment of the present application;
[0058] Figure 6 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0059] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the implementation manners part of the present application are only used to explain the specific embodiments of the present application, rather than intended to limit the present application.
[0060] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0061] The terms "first", "second", etc. in the description and claims of the present application and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing objects with the same attributes when describing the embodiments of the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device comprising a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0062] During the learning process, students often encounter various problems and need timely and effective question answering and tutoring. Traditional question answering and tutoring methods include manual tutoring methods (mainly including face-to-face tutoring by teachers, online tutoring platforms, etc.) and traditional intelligent tutoring methods (such as some simple intelligent tutoring software, auxiliary learning tools based on large models, etc.). Traditional intelligent tutoring methods mostly use dialogue systems to provide question answering and tutoring for students by simulating human conversations.
[0063] A dialogue system is a computer system based on artificial intelligence and natural language processing (NLP) technology, aiming to interact with users through natural language. It can understand the user's input and generate corresponding responses, simulating human conversations.
[0064] As an important research direction in the field of artificial intelligence, dialogue systems have a wide range of applications in real life and technical fields. First of all, dialogue systems can provide natural and intuitive human-computer interaction methods. The main way of communication between people in real life is also through natural language conversations; secondly, dialogue systems have important applications in the fields of personal assistants, intelligent customer service, and personalized education. In addition, dialogue systems can enrich the ways for users to obtain knowledge and retrieve information, providing accurate and real-time answers and solutions for users; finally, the development of dialogue systems has also promoted the progress of artificial intelligence technology.
[0065] However, the traditional question-and-answer tutoring method has many limitations.
[0066] Among them, in the manual tutoring method, teachers' face-to-face tutoring resources are limited, which makes it difficult to meet the needs of a large number of students anytime and anywhere; online tutoring platforms often rely on the online time of manual teachers, and there may be problems with uneven teacher quality.
[0067] In traditional intelligent tutoring methods, although intelligent tutoring software can provide a certain degree of automated answering, it is difficult to give accurate and comprehensive answers to complex and diverse free dialogue questions, especially those involving logical reasoning and calculation processes.
[0068] Intelligent tutoring software usually uses rule-based expert systems or simple machine learning models. Rule-based expert systems require manual coding of a large number of rules to deal with different types of problems, such as writing specific problem-solving algorithm rules for mathematical problems and specific application rules for physical formulas. The advantage of this method is that it can provide relatively accurate answers to specific types of questions and is highly explanatory. However, its disadvantages are also very obvious. The workload of writing rules is huge and it is difficult to cover all possible problem scenarios. It cannot flexibly respond to new problems or expressions, and its scalability is poor. Simple machine learning models collect a certain amount of answered question data as a training set, and train the model to predict the answers to new questions. However, due to the limited amount of training data and insufficient data feature extraction, this model often has a low accuracy rate when facing complex problems, especially those involving multi-step reasoning and calculations.
[0069] In recent years, with the rapid development of artificial intelligence (AI) technology, the application of large models in education has gradually become a research hotspot. The emergence of large models has brought new opportunities for question-answering and tutoring. Currently, learning assistance tools based on large models have been widely used in educational scenarios across various disciplines, such as large-model-based problem-solving assistants for mathematics and physics. Although large models have powerful language understanding and generation capabilities and can handle a variety of natural language questions, in question-answering and tutoring applications, large models often cannot guarantee the accuracy of every step in the problem-solving process. Especially when solving complex problems, large model errors can accumulate, ultimately affecting the accuracy of the answer.
[0070] To improve the performance of learning tools based on large models, some currently integrate specific plug-ins to enhance the model's computational capabilities. This is particularly true for mathematical problems, where plug-ins are used to calculate complex mathematical formulas. However, these plug-ins are highly dependent on other tools and lack overall integration with the model, which can easily lead to inconsistencies between computational results and model reasoning.
[0071] In addition, due to the lack of a large number of real intelligent tutoring datasets that do not require manual annotation, many current large models still rely on manual annotation in the process of generating training datasets. Therefore, many current large model-based tutoring tools rely on manually annotated training datasets for training, which may not only lead to biases in the training datasets, but also make the model training process costly and inefficient.
[0072] Therefore, there are still certain problems with the accuracy and reliability of large model-based tutoring tools.
[0073] To solve the above problems, the embodiments of the present application provide a question answering and tutoring method. The question answering and tutoring method of the embodiments of the present application will be introduced in detail below with reference to the accompanying drawings.
[0074] Refer to Figure 1 , Figure 1 which is a schematic flowchart of a question answering and tutoring method provided by an embodiment of the present application. As Figure 1 shown, a question answering and tutoring method provided by an embodiment of the present application may include the following steps, which will be described in detail below.
[0075] S101: Obtain student questions;
[0076] Student questions can be questions in any subject. In one implementable manner, student questions can be questions in science subjects (such as mathematics, physics, chemistry, etc.).
[0077] S102: Invoke a question answering and tutoring model to process the student questions to obtain answers corresponding to the student questions. The question answering and tutoring model is obtained by pre-training and supervised fine-tuning training of a first large model using the question stems, answers, analyses, and question answering and tutoring dialogue data corresponding to the question samples. The question answering and tutoring model is connected with a plurality of subject function plugins, and each subject function plugin corresponds to a function requirement of a subject.
[0078] In the present application, a large number of exercise questions, exam questions, etc. can be collected from a question bank in advance as question samples. The question types can be any question types, including but not limited to multiple-choice questions, fill-in-the-blank questions, short-answer questions, etc. The subjects covered can be any subjects (such as mathematics, physics, chemistry, etc.). The question stems, answers, and analyses corresponding to the question samples can also be obtained from a preset question bank. The question answering and tutoring dialogue data corresponding to the question samples can be manually constructed or automatically constructed based on the question stems, answers, and analyses corresponding to the question samples. The present application does not make any limitations in this regard.
[0079] In the present application, the first large model can be any existing large model, and the present application does not make any limitations in this regard.
[0080] In this application, the Q&A tutoring dialogue data includes n rounds of dialogue between the roles of "teacher" and "student", where n is an integer greater than or equal to 1. For example:
[0081] Student Question 1: xxx;
[0082] Teacher reply 1: xxx;
[0083] Student Question 2: xxx;
[0084] Teacher reply 2: xxx;
[0085] ...;
[0086] Student question n: xxx;
[0087] The teacher replied n: xxx.
[0088] To improve the performance of learning tools based on large models, some integrate specific plug-ins to enhance the model's computational capabilities. This is particularly true for mathematical problems, where plug-ins are used to calculate complex mathematical formulas. However, these plug-ins are highly dependent on other tools and lack overall integration with the model, which can easily lead to inconsistencies between computational results and model reasoning.
[0089] To address this, in this application, corresponding subject function plug-ins can be developed for different disciplines and their different functional requirements. For example, in mathematics, a calculation plug-in can be developed that can parse mathematical expressions and perform precise numerical calculations, symbolic operations, and formula derivations. In physics, a physical quantity unit conversion plug-in and a physical formula calculation plug-in can be developed to handle various calculation and unit conversion requirements in physical problems.
[0090] In this application, the subject function plug-ins can adopt a modular design concept, with each plug-in independently encapsulating a specific function, which has good scalability and maintainability. Furthermore, a dedicated plug-in interface can be designed to connect each subject function plug-in with the question-answering and tutoring model. In addition, an efficient communication protocol must be configured between each subject function plug-in and the question-answering and tutoring model to ensure accurate data transmission.
[0091] This embodiment provides a question-answering tutoring method. In this solution, the first large model is pre-trained using the question stem, answer, analysis and question-answering tutoring dialogue data corresponding to the question sample. After pre-training, it is optimized through supervised fine-tuning training, which greatly improves the training effect of the question-answering tutoring model. In addition, the question-answering tutoring model is connected to multiple subject function plug-ins, each subject function plug-in corresponds to a functional requirement of a subject. The question-answering tutoring model is called to process student questions and obtain answers corresponding to student questions, which can improve the accuracy and reliability of the answers, thereby improving the effect of question-answering tutoring.
[0092] In the real question answering and tutoring scenario, due to the lack of a large number of real intelligent tutoring data sets that do not require manual annotation, many current large models still rely on manual annotation in the process of generating training data sets. Therefore, many current learning assistance tools based on large models rely on manually annotated training data sets for training, which may not only lead to biases in the training data sets, but also make the training process of the models costly and inefficient. In this application, the language generation ability of the large model itself can be used to generate a large number of question answering and tutoring dialogue data.
[0093] In one possible implementation, for each question sample, the question answering and tutoring dialogue data corresponding to the question sample is generated by a second large model according to the question stem and analysis corresponding to the question sample.
[0094] In this application, the second large model can be any existing large model. The first large model and the second large model can be the same large model or different large models, and this application does not make any limitations in this regard.
[0095] In another embodiment of this application, the generation method of the question answering and tutoring dialogue data corresponding to the question sample is described in detail.
[0096] Refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for generating question answering and tutoring dialogue data corresponding to a question sample provided by an embodiment of this application. The method may include the following steps:
[0097] S201: Obtain a preset prompt template for generating question answering and tutoring dialogue data. The prompt template for generating question answering and tutoring dialogue data includes task description information for generating question answering and tutoring dialogue data, a question stem filling slot, and an analysis filling slot;
[0098] In this application, a prompt template for generating question answering and tutoring dialogue data can be preset. The prompt template for generating question answering and tutoring dialogue data includes task description information for generating question answering and tutoring dialogue data, a question stem filling slot, and an analysis filling slot.
[0099] For ease of understanding, an embodiment of this application provides an example of a prompt template for generating question answering and tutoring dialogue data, which is specifically as follows:
[0100] "Please, based on the question stem of the question and the corresponding analysis, and around the knowledge points related to the question, from different question types and different difficulty levels, with the goal of simulating a dialogue between a 'teacher' and a'student' to answer the student's questions, generate N groups of dialogues.
[0101] The stem of the question is [xxx], and the corresponding analysis of the question is [xxx]."
[0102] Preferably, the Prompt template for generating Q&A tutoring dialogue data may further include a filling slot for Q&A tutoring dialogue data examples.
[0103] For ease of understanding, an embodiment of the present application provides another example of a Prompt template for generating Q&A tutoring dialogue data, which is as follows:
[0104] "Please, based on the stem of the question and the corresponding analysis, around the knowledge points related to the question, from different question types and different difficulty levels, with the goal of a teacher answering a student's question in a dialogue, simulate the two dialogue roles of "teacher" and "student" to generate a dialogue, and output N groups of dialogues.
[0105] The stem of the question is [xxx], the corresponding analysis of the question is [xxx], and the dialogue example is [xxx]."
[0106] S202: Fill the stem of the question sample into the stem filling slot, and fill the analysis of the question sample into the analysis filling slot to obtain a Prompt for generating Q&A tutoring dialogue data;
[0107] S203: Input the Prompt for generating Q&A tutoring dialogue data into the second large model to obtain the Q&A tutoring dialogue data corresponding to the question sample generated by the second large model.
[0108] In a possible implementation, the format of the Q&A tutoring dialogue data generated by the large model may specifically be n rounds of dialogues with the dialogue roles of "teacher" and "student", where n is an integer greater than or equal to 1. For example:
[0109] Student's question 1: xxx;
[0110] Teacher's reply 1: xxx;
[0111] Student's question 2: xxx;
[0112] Teacher's reply 2: xxx;
[0113] ……;
[0114] Student's question n: xxx;
[0115] Teacher's reply n: xxx.
[0116] For example, in the field of mathematics, the Q&A tutoring dialogue data generated by the large model may be:
[0117] Student's question: Please provide an example of an application problem regarding [mathematical knowledge point, such as function derivative] and give a detailed solution process.
[0118] Teacher's reply: xxxx.
[0119] For another example, for thought-provoking questions, the Q&A tutoring dialogue training data generated by the large model can be as follows:
[0120] Student's question: I have no idea about this problem. Can you help me?
[0121] Teacher's reply: Your thinking is very good, classmate. Let's take a look at the complete problem-solving idea of this question together: xxxx (describe the problem-solving idea of this question).
[0122] For another example, for detailed explanation questions, the Q&A tutoring dialogue training data generated by the large model can be as follows:
[0123] Student's question: What does xxxx (concept, formula, meaning, etc.) mean?
[0124] Teacher's reply: xxxx is xxxx (further explanation of the concept, formula, meaning, etc.).
[0125] In this application, although the Q&A tutoring dialogue data is generated by the large model, due to being based on a specific Prompt template and centered around knowledge points, it has high authenticity and practicality. Moreover, by using the Q&A tutoring dialogue data to generate the Prompt template, a hierarchical and categorized Q&A tutoring dialogue data structure can be realized. Therefore, comprehensive and rich unlabeled Q&A tutoring dialogue data can be obtained.
[0126] In another embodiment of this application, the training method of the Q&A tutoring model is described in detail.
[0127] Refer to Figure 3 , Figure 3 which is a schematic flowchart of a training method for a Q&A tutoring model provided by an embodiment of this application. The method may include the following steps:
[0128] S301: Use the stem and answer corresponding to the question sample to pre-train the first large model to obtain the pre-trained first large model;
[0129] During the pre-training process, the first large model learns how to understand the intention of the question, extract key information, and try to give reasonable answers. For example, for the pre-training task of math multiple-choice questions, the first large model needs to learn to analyze the differences between options and make reasoning and judgment based on the question conditions; for the pre-training task of physics short-answer questions, the first large model needs to learn how to organize physical principles and formulas to answer the question clearly.
[0130] Using the stem and answer corresponding to the question sample, pre-train the first large model, that is, adopt the multi-question answering task learning method to enable the first large model to simultaneously learn the answering skills and knowledge application methods of different disciplines and different question types. In this way, the first large model is initially equipped with the foundation of knowledge understanding and answering ability, laying a good foundation for subsequent supervised fine-tuning (SFT) training.
[0131] S302: Use the stem, analysis, and question-and-answer tutoring dialogue data corresponding to the question sample to perform supervised fine-tuning training on the pre-trained first large model to obtain the question-and-answer tutoring model.
[0132] During the supervised fine-tuning training process, use the stem, analysis, and student questions as inputs, and the teacher's answer as the expected output. Adopt a loss function calculation method similar to traditional supervised learning, such as the cross-entropy loss function, to adjust the parameters of the pre-trained first large model. Through multiple iterative trainings, the pre-trained first large model gradually adapts to the task requirements of free dialogue-style question-and-answer tutoring, improving its accuracy and logic when dealing with student questions. For example, when dealing with a student's free question about the explanation of a physical experiment phenomenon, the model can combine the physical knowledge learned in the pre-training stage and the optimization of natural language expression in the supervised fine-tuning training to give a detailed, accurate, and easy-to-understand answer.
[0133] In this application, through this method of combining pre-training and supervised fine-tuning training, the comprehensive performance of the model in question-and-answer tutoring can be gradually improved, including the accuracy, logic, integrity of the answer, and interactivity with students.
[0134] Based on the above content, another embodiment of this application illustrates the specific implementation manner of using the question-and-answer tutoring model to process the student question and obtain the answer corresponding to the student question.
[0135] Refer to Figure 4 , Figure 4 FIG. is a schematic flowchart of a method for using a question-and-answer tutoring model to process a student question and obtain the answer corresponding to the student question provided by an embodiment of this application. The method may include the following steps:
[0136] S401: Perform semantic analysis on the student question to extract the subject characteristics of the student question;
[0137] In this application, the question-and-answer tutoring model can be called to perform semantic analysis on the student question to extract the subject characteristics of the student question.
[0138] S402: Invoke the target subject function plugin to process the student question and obtain the plugin processing result; the target subject function plugin is the subject function plugin that matches the subject characteristics of the student question among the multiple subject function plugins;
[0139] In this application, it is possible to automatically invoke the corresponding plugin for processing according to the subject characteristics of the student question. For example, when it is recognized that the question is about rounding in mathematics, the mathematical calculation plugin is invoked, the number to be rounded is substituted into the selected plugin for solution, and the result is returned to the question answering and tutoring model.
[0140] In a possible implementation, the invoking the target subject function plugin to process the student question and obtain the plugin processing result includes: performing semantic analysis on the student question, extracting the key knowledge points and calculation requirement information of the student question; transmitting the key knowledge points and calculation requirement information of the student question to the target subject function plugin, so that the target subject function plugin processes the student question based on the key knowledge points and calculation requirement information of the student question; obtaining the plugin processing result returned after the target subject function plugin processes the student question.
[0141] In this application, the question answering and tutoring model can be invoked to perform semantic analysis on the student question and extract the key knowledge points and calculation requirement information of the student question.
[0142] In this application, the question answering and tutoring model can be invoked to transmit the key knowledge points and calculation requirement information of the student question to the target subject function plugin in a specific format, so that the target subject function plugin processes the student question based on the key knowledge points and calculation requirement information of the student question.
[0143] In this application, after the target subject function plugin processes the student question based on the key knowledge points and calculation requirement information of the student question to obtain the plugin processing result, the plugin processing result can be returned to the question answering and tutoring model in the above specific format.
[0144] S403: Invoke the question answering and tutoring model to generate the answer according to the plugin processing result.
[0145] In this application, the question answering and tutoring model can integrate the plugin processing result into a natural language answer and generate an answer to feedback to the user.
[0146] In this application, the Q&A tutoring model combines multiple subject function plugins to achieve Q&A tutoring. The use of multiple subject function plugins is dynamic. The Q&A tutoring model will automatically select the corresponding plugin according to the type of the question. The Q&A tutoring model plays a core role in question understanding, context association, and natural language generation, while the subject function plugins focus on professional calculation and processing. The two cooperate with each other to further improve the accuracy and reliability of the answer, and further enhance the effect of Q&A tutoring.
[0147] The above introduces a Q&A tutoring method provided by an embodiment of this application. The following will introduce the device for executing the above Q&A tutoring method.
[0148] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a Q&A tutoring device provided by an embodiment of this application. As Figure 5 shown, the Q&A tutoring device includes:
[0149] An acquisition unit 11, configured to acquire student questions;
[0150] An answering unit 12, configured to call the Q&A tutoring model to process the student question and obtain an answer corresponding to the student question. The Q&A tutoring model is obtained by pre-training and supervised fine-tuning training of a first large model in sequence using the question stem, answer, analysis, and Q&A tutoring dialogue data corresponding to the question samples. The Q&A tutoring model is connected with multiple subject function plugins, and each subject function plugin corresponds to a function requirement of a subject.
[0151] In a possible implementation, for each question sample, the Q&A tutoring dialogue data corresponding to the question sample is generated by a second large model according to the question stem and analysis corresponding to the question sample.
[0152] In a possible implementation, the device further includes: a Q&A tutoring dialogue data generation unit;
[0153] The Q&A tutoring dialogue data generation unit is specifically configured to:
[0154] Obtain a preset Q&A tutoring dialogue data generation Prompt template, where the Q&A tutoring dialogue data generation Prompt template includes Q&A tutoring dialogue data generation task description information, a question stem filling slot, and an analysis filling slot;
[0155] Fill the question stem of the question sample into the question stem filling slot, and fill the analysis of the question sample into the analysis filling slot to obtain a Q&A tutoring dialogue data generation Prompt;
[0156] Generate a Prompt from the Q&A tutoring dialogue data and input it into the second large model to obtain the Q&A tutoring dialogue data corresponding to the question samples generated by the second large model.
[0157] In a possible implementation, the device further includes: a Q&A tutoring model training unit;
[0158] The Q&A tutoring model training unit is specifically configured to:
[0159] Use the question stem and answer corresponding to the question sample to pre-train the first large model to obtain a pre-trained first large model;
[0160] Use the question stem, analysis, and Q&A tutoring dialogue data corresponding to the question sample to perform supervised fine-tuning training on the pre-trained first large model to obtain the Q&A tutoring model.
[0161] In a possible implementation, the answering unit includes:
[0162] A semantic analysis unit, configured to perform semantic analysis on the student's question and extract the subject characteristics of the student's question;
[0163] A plugin processing unit, configured to call a target subject function plugin to process the student's question to obtain a plugin processing result; the target subject function plugin is a subject function plugin in the multiple subject function plugins that matches the subject characteristics of the student's question;
[0164] An answer generation unit, configured to call the Q&A tutoring model to generate the answer according to the plugin processing result.
[0165] In a possible implementation, the plugin processing unit is specifically configured to:
[0166] Perform semantic analysis on the student's question and extract the key knowledge points and calculation requirement information of the student's question;
[0167] Transmit the key knowledge points and calculation requirement information of the student's question to the target subject function plugin, so that the target subject function plugin processes the student's question based on the key knowledge points and calculation requirement information of the student's question;
[0168] Obtain the plugin processing result returned by the target subject function plugin after processing the student's question.
[0169] This application embodiment also provides an electronic device. Refer to Figure 6As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and the like. Figure 6 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0170] As Figure 6 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 into the random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0171] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 it shows an electronic device having various devices, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0172] The embodiments of the present application also provide a computer program product including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device is enabled to implement any one of the question-and-answer tutoring methods provided by the embodiments of the present application.
[0173] The embodiments of the present application also provide a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device is enabled to implement any one of the question-and-answer tutoring methods provided by the embodiments of the present application.
[0174] It should be further noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in this application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
[0175] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware, including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits, or dedicated circuits. However, for this application, software program implementation is a better implementation method in more cases. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.
[0176] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0177] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
Claims
1. A question-and-answer tutoring method, characterized in that, Including: Obtain student questions; Invoke an answering tutoring model to process the student questions to obtain answers corresponding to the student questions. The answering tutoring model is obtained by pre-training and supervised fine-tuning training of a first large model in sequence using the question stems, answers, analyses, and answering tutoring dialogue data corresponding to question samples. For each question sample, the answering tutoring dialogue data corresponding to the question sample is generated by a second large model according to the question stem and analysis corresponding to the question sample. The answering tutoring dialogue data includes n rounds of conversations between a teacher and a student, where n is an integer greater than or equal to 1. The answering tutoring model is connected with multiple subject function plugins, and each subject function plugin corresponds to a function requirement of a subject.
2. The method according to claim 1, characterized in that, The generation method of the answering tutoring dialogue data corresponding to the question sample includes: Obtain a preset answering tutoring dialogue data generation Prompt template, where the answering tutoring dialogue data generation Prompt template contains answering tutoring dialogue data generation task description information, a question stem filling slot, and an analysis filling slot; Fill the question stem of the question sample into the question stem filling slot, and fill the analysis of the question sample into the analysis filling slot to obtain an answering tutoring dialogue data generation Prompt; Input the answering tutoring dialogue data generation Prompt into the second large model to obtain the answering tutoring dialogue data corresponding to the question sample generated by the second large model.
3. The method according to claim 1, characterized in that, The training method of the answering tutoring model includes: Use the question stem and answer corresponding to the question sample to pre-train the first large model to obtain a pre-trained first large model; Use the question stem, analysis, and answering tutoring dialogue data corresponding to the question sample to perform supervised fine-tuning training on the pre-trained first large model to obtain the answering tutoring model.
4. The method according to claim 1, wherein The step of invoking the answering tutoring model to process the student questions to obtain answers corresponding to the student questions includes: Perform semantic analysis on the student questions to extract the subject characteristics of the student questions; Invoke the target subject function plugin to process the student questions to obtain a plugin processing result; the target subject function plugin is the subject function plugin among the multiple subject function plugins that matches the subject characteristics of the student questions; Invoke the answering tutoring model to generate the answer according to the plugin processing result.
5. The method according to claim 4, characterized in that, The step of invoking the target subject function plugin to process the student questions to obtain a plugin processing result includes: Perform semantic analysis on the student questions to extract the key knowledge points and calculation requirement information of the student questions; Transmit the key knowledge points and calculation requirement information of the student questions to the target subject function plugin, so that the target subject function plugin processes the student questions based on the key knowledge points and calculation requirement information of the student questions; Obtain the plugin processing result returned after the target subject function plugin processes the student questions.
6. An answering and tutoring device, characterized in that, Including: An acquisition unit for obtaining student questions; An answering unit, configured to call a Q&A tutoring model to process the student question and obtain an answer corresponding to the student question. The Q&A tutoring model is obtained by successively performing pre-training and supervised fine-tuning training on a first large model using the question stem, answer, analysis, and Q&A tutoring dialogue data corresponding to the question samples. For each question sample, the Q&A tutoring dialogue data corresponding to the question sample is generated by a second large model according to the question stem and analysis of the question sample. The Q&A tutoring dialogue data includes n rounds of conversations between a teacher and a student, where n is an integer greater than or equal to 1. The Q&A tutoring model is connected with multiple subject function plugins, and each subject function plugin corresponds to a function requirement of a subject.
7. A computer program product, characterized in that, It includes computer-readable instructions that, when running on an electronic device, enable the electronic device to implement the Q&A tutoring method according to any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer programs so that the electronic device can implement the Q&A tutoring method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, can enable the electronic device to implement the Q&A tutoring method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Question answering method, model training method and device, and program product
CN114003693A
Auxiliary learning method and device, equipment and storage medium
CN117037553A
Oral medicine hospital guide method and system based on plug-in instruction fine tuning and enlarging model
CN118230985A
Virtual teacher interaction method and system driven by big education model fused with knowledge graph
CN119761482A