Retrieval enhanced generation teaching data classification method, system, device and medium

By adopting search enhancement generation technology in classroom teaching scenarios, and using the verification mechanism of question-and-answer library and large language model combined with discriminant model, the flexibility of data classification and resource consumption problems are solved, significantly improving the classification efficiency and accuracy of classroom teaching data sex.

CN117688424BActive Publication Date: 2025-01-10GUANGZHOU ZHILU ZHIJIAO TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311596575.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2025-01-10
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

In the automatic data classification of classroom teaching scenarios, the discriminant model requires a large amount of labeled data and has limited flexibility. Although the generative model does not require a large amount of labeling, it consumes a lot of computing resources and time and is prone to pattern crashes, making it difficult to effectively improve data classification. accuracy and efficiency.

Method used

Using the method of search-enhanced generation, the Q&A results are obtained through the Q&A library search, the teaching data is merged to generate classroom prompts, the large language model is input for classification prediction, and the classification confidence is verified through the discriminant model, and the final classification is determined based on the hard voting mechanism. result.

Benefits of technology

It significantly improves the classification efficiency and accuracy of classroom teaching data, overcomes the flexibility and resource consumption problems of data classification in the existing technology, and improves the interpretability and accuracy of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117688424B_ABST
    Figure CN117688424B_ABST
Patent Text Reader

Abstract

The present invention discloses a teaching data classification method, system, device and medium for retrieval-enhanced generation, the method comprising the following steps: firstly, performing a question-answer pair search in a question-answer database according to teaching data to obtain a question-answer pair result; then, merging the teaching data and the question-answer pair result to obtain a classroom prompt; then, inputting the classroom prompt into a large language model, so that the large language model learns the characteristics of the question-answer pair result in the classroom prompt, and classifies and predicts the teaching data according to the learned characteristics to obtain a first label result of the teaching data; finally, inputting the teaching data into a discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verifying the first label result through the classification confidence of multiple classification labels to obtain a data classification result of the teaching data. The present invention significantly improves the classification efficiency and accuracy of teaching data by introducing a large language model and retrieval-enhanced generation technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data classification, and in particular to a teaching data classification method, system, device and medium for retrieval-enhanced generation. Background Art

[0002] When it is necessary to perform AI-assisted analysis on the classroom teaching process, it is often necessary to classify what the teacher says during the teaching process and the students' answers when asking questions, that is, data classification of classroom teaching scenes. At present, data classification can be achieved using manual annotation or natural language understanding technology. Specifically, in the automatic classification of data in classroom teaching scenes, two technical methods, discriminant models and generative models, are often used.

[0003] The discriminant model is a supervised learning method that aims to classify data by learning the mapping relationship between input data and output data. In the automatic classification of classroom teaching scene data, the discriminant model can be obtained based on the classifier of deep neural network, such as convolutional neural network (CNN), recurrent neural network (RNN) or long short-term memory network (LSTM). Since the discriminant model only focuses on learning the mapping relationship between input and output, it can flexibly combine different types of features and has good flexibility. With the rise of deep learning, the discriminant model has been widely used in the automatic classification of classroom teaching scene data. However, since the discriminant model requires a large amount of labeled data to train, it is often necessary to manually select appropriate data. At this time, the discriminant model has limitations when classifying the complex and diverse data of classroom teaching scenes, which affects the accuracy of automatic data classification.

[0004] A generative model is an unsupervised learning method that aims to generate output data similar to the input data by learning the joint probability distribution of the input data and the output data. In the automatic classification of classroom teaching scenario data, the generative model can be a variational autoencoder (VAE) or a generative adversarial network (GAN). Generative models do not require a large amount of labeled data, can improve the performance of the model by generating new data, and have good generalization capabilities. However, the training of generative models usually requires a lot of computing resources and time, and may face problems such as mode collapse.

[0005] Therefore, the above technical problems need to be solved urgently. Summary of the invention

[0006] In order to solve the above problems, the present invention proposes a teaching data classification method, system, device and medium with retrieval enhanced generation, which can improve the classification efficiency and accuracy of classroom teaching data.

[0007] A first aspect of an embodiment of the present invention discloses a teaching data classification method for retrieval enhancement generation, the method comprising the following steps:

[0008] Search the question-answer pair in the question-answer database according to the teaching data to obtain the question-answer pair result;

[0009] The teaching data and the question-answer result are combined to obtain classroom prompts;

[0010] Inputting the classroom prompt into a large language model so that the large language model learns the characteristics of the question-answer pair results in the classroom prompt, and classifies and predicts the teaching data according to the learned characteristics to obtain a first label result of the teaching data;

[0011] The teaching data is input into a discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and the first label result is verified by the classification confidence of the multiple classification labels to obtain a data classification result of the teaching data.

[0012] Furthermore, before the step of searching for question-answer pairs in the question-answer database according to the teaching data to obtain question-answer pair results, the teaching data classification method for search-enhanced generation further includes the following steps:

[0013] Acquire original data of classroom teaching scenes, wherein the original data includes question data and response data;

[0014] Generate a general question text and a general response text according to the original data and the general classroom question template;

[0015] A question-answer pair is obtained according to the general question text and the general response text, and a question-answer library is obtained according to the question-answer pair.

[0016] Furthermore, searching for question-answer pairs in the question-answer database based on the teaching data to obtain question-answer pair results includes the following steps:

[0017] Extracting the teaching data to obtain lesson-specific conditions, and performing scalar search in the question-answer database according to the lesson-specific conditions to obtain a matching teacher discourse set, wherein the lesson-specific conditions include subject, lesson type and school stage;

[0018] Vector retrieval is performed on the teacher's utterance set to obtain question-answer pair results.

[0019] Furthermore, performing vector retrieval on the teacher's speech set to obtain a question-answer pair result includes the following steps:

[0020] The teacher's speech set and the teaching data are converted and merged through a vector model to obtain a semantic vector;

[0021] An approximate nearest neighbor search is performed in the question-answer database according to the semantic vector to obtain top K question-answer pair results, wherein the question-answer pair results include K similar general question texts and general response texts.

[0022] Furthermore, the step of merging the teaching data and the question-answer result to obtain classroom prompts includes the following steps:

[0023] Fill the teaching data into the question template to obtain the first prompt;

[0024] Fill the question-answer pair result into the sample template to obtain the second prompt;

[0025] A classroom prompt is obtained according to the first prompt and the second prompt.

[0026] Further, the step of asking a question to the large language model to generate a first label result according to the prompt result comprises the following steps:

[0027] Ask questions to the large language model based on the teaching data;

[0028] The classroom prompt is input into a large language model to obtain a prompt result, and the large language model is prompted by the prompt result to generate a first label result of the teaching data.

[0029] Furthermore, the first label result is verified by the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data, including the following steps:

[0030] Compare the first label result with the classification confidences of the multiple classification labels to obtain a confidence ranking corresponding to the first label result in the classification confidences of the multiple classification labels;

[0031] It is determined whether the confidence ranking is within a preset confidence ranking range. If so, the first label result is used as the data classification result of the teaching data.

[0032] Furthermore, the first label result is verified by the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data, and the following steps are also included:

[0033] If the confidence ranking is not within the preset confidence ranking range, obtaining the data classification result of the teaching data by hard voting;

[0034] Among them, the data classification results of the teaching data obtained by hard voting are obtained by the following steps:

[0035] The statistical large language model learns all the features of the question-answer results in the classroom prompts, and takes the features that appear most frequently as the data classification results of the teaching data.

[0036] A second aspect of an embodiment of the present invention discloses a teaching data classification system for retrieval enhancement generation, the teaching data classification system for retrieval enhancement generation comprising:

[0037] The first module is used to search for question-answer pairs in the question-answer database based on teaching data to obtain question-answer pair results;

[0038] The second module is used to merge the teaching data and the question-answer result to obtain classroom prompts;

[0039] The third module is used to input the classroom prompt into a large language model so that the large language model learns the characteristics of the question-answer pair results in the classroom prompt, and classifies and predicts the teaching data according to the learned characteristics to obtain a first label result of the teaching data;

[0040] The fourth module is used to input the teaching data into the discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verify the first label result through the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data.

[0041] A third aspect of an embodiment of the present invention discloses a teaching data classification device for retrieval enhancement generation, the device comprising:

[0042] at least one processor;

[0043] at least one memory for storing at least one program;

[0044] When the at least one program is executed by the at least one processor, the at least one processor implements the teaching data classification method for retrieval-enhanced generation as described in any one of the first aspects.

[0045] A fourth aspect of an embodiment of the present invention discloses a computer storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the teaching data classification method for retrieval-enhanced generation as described in any one of the first aspects.

[0046] Compared with the prior art, the present invention has at least one of the following advantages / benefits:

[0047] The present invention first searches for question-answer pairs in a question-answer database based on teaching data to obtain question-answer pair results; then merges the teaching data and the question-answer pair results to obtain classroom prompts; then inputs the classroom prompts into a large language model so that the large language model learns the characteristics of the question-answer pair results in the classroom prompts, and classifies and predicts the teaching data based on the learned characteristics to obtain the first label result of the teaching data; finally, inputs the teaching data into a discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verifies the first label result through the classification confidence of multiple classification labels to obtain the data classification result of the teaching data. The present invention solves the problem of automatic classification of classroom teaching scene data by introducing a large language model and retrieval enhancement generation technology, and significantly improves the classification efficiency and accuracy of classroom teaching data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A flowchart of a teaching data classification method for retrieval-enhanced generation provided by an embodiment of the present invention;

[0050] Figure 2 The embodiment of the present invention provides Figure 1 Flowchart before step S110;

[0051] Figure 3 The embodiment of the present invention provides Figure 1 Flow chart of step S110;

[0052] Figure 4 The embodiment of the present invention provides Figure 3 Flow chart of step S320;

[0053] Figure 5 The embodiment of the present invention provides Figure 1 Flow chart of step S120;

[0054] Figure 6 The embodiment of the present invention provides Figure 1 Flowchart of step S140 in FIG. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present invention and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0057] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0058] Large Language Model (LLM): Also known as a large language model, it is a deep learning model trained with a large amount of text data that can generate natural language text or understand the meaning of language text.

[0059] Retrieval-Augmented Generation: Retrieval-Augmented Generation is a method that combines retrieval and generation techniques to improve the performance and diversity of generative models. This method introduces external knowledge or data into the generative model to help generate more relevant, accurate, and diverse outputs. Retrieval-Augmented Generation is widely used in many fields such as natural language processing, computer vision, and speech processing.

[0060] Among them, the retrieval enhancement generation technology mainly includes the following two steps:

[0061] (1) Retrieval: Retrieve information or context related to the input from a large-scale dataset. The retrieved information can be used as input to the generative model to help generate more relevant outputs;

[0062] (2) Generation: Use the retrieved information as the input of the generative model to generate output. By introducing retrieval information, retrieval-enhanced generation helps the generative model better understand the context and improve the quality of the generated text, making the generated text more relevant to the given task, more accurate, and more coherent.

[0063] Discriminative model: A discriminative model is a model that can learn the relationship between input data and output labels. It predicts the output label by learning the characteristics of the input data.

[0064] Generative model: A generative model is a model that can learn the data generation process. It can learn the probability distribution of input data and generate new data samples.

[0065] Hard Voting Classifier: The final result is determined by the majority rule.

[0066] The embodiments of the present invention provide a teaching data classification method, system, device and medium for retrieval-enhanced generation, which can improve the classification efficiency and accuracy of classroom teaching data.

[0067] The following is a detailed description with reference to the accompanying drawings.

[0068] See also Figure 1 The teaching data classification method for retrieval enhancement generation according to the embodiment of the present invention includes but is not limited to the following steps S110, S120, S130 and S140.

[0069] Step S110, searching for question-answer pairs in the question-answer database according to the teaching data to obtain question-answer pair results;

[0070] See also Figure 2 In some embodiments, before step S110, the teaching data classification method for retrieving enhanced generation further includes but is not limited to the following steps:

[0071] Step S210, obtaining original data of the classroom teaching scene, the original data including question data and response data;

[0072] Step S220, generating a general question text and a general response text according to the original data and the general classroom question template;

[0073] Step S230, obtaining a question-answer pair according to the general question text and the general response text, and obtaining a question-answer library according to the question-answer pair.

[0074] As an optional implementation method, the construction of the question-and-answer library of the embodiment of the present invention is usually based on the manually annotated original data, and generates a general question text and a general response text according to a specific classification mode (such as single-label classification or multi-label classification) in combination with a general classroom template. In addition, the question data and the response data are stored in the form of key values ​​or tuples, including one-to-one and one-to-many storage modes. For one-to-one, it is usually a closed question, and one question data can only correspond to one fixed response data, that is, a question has a clear fixed answer. For one-to-many, it is usually an open question, and one question data can correspond to multiple response data, that is, a question can have multiple answers.

[0075] For example, in a classroom teaching scenario, when a teacher asks students a question in class, "Have you found anything in common between parallel and vertical? Look carefully and see if there are any similarities?", the corresponding answer is "Summarize and conclude". At this time, it is necessary to further determine which secondary label should be marked on this sentence.

[0076] Therefore, the following general classroom question template is applicable: "For the discourse '{{discourse content}}' told by {{discourse initiator}} in class, there are the following optional labels - {{label set enumeration}}, which label should this discourse be labeled with? And attach reasons, explanations or basis". This general classroom question template contains three semantic slots for discourse initiator, discourse content and label set enumeration. According to the manually annotated original data, after filling the corresponding semantic slots with content, the following question text can be obtained, for example: "For the discourse '[Have you found any similarities between parallel and vertical? If you observe carefully, are there any similarities?]' told by [teacher] in class, there are the following optional labels - [basic knowledge, expression of personal opinions, analysis and interpretation, comparison and induction, transfer and innovation, expansion and construction], which label should this discourse be labeled with? And attach reasons, explanations or basis".

[0077] The response text is expanded on the manually annotated original data. For example, it can be obtained: "This discourse should be labeled as 'comparison and induction'; the reason is that the teacher guides students to observe and find the common points between things through asking questions. This is a comparative process and also has inductive elements. Students need to think and summarize based on observation and extract the commonalities of things, which helps to cultivate students' observation, comparison and induction abilities."

[0078] Specifically, the above-mentioned question text and response text can be simplified as a set of data into a question-answer pair and imported into the question-answer library so as to be used as an example of reference answer for the subsequent large language model.

[0079] See also Figure 3In some embodiments, in step S110, a question-answer pair search is performed in the question-answer database according to the teaching data to obtain a question-answer pair result, including but not limited to the following steps:

[0080] Step S310, extracting teaching data to obtain lesson-specific conditions, and performing scalar search in the question-answer database according to the lesson-specific conditions to obtain a matching teacher discourse set, wherein the lesson-specific conditions include subject, lesson type, and school stage;

[0081] Step S320, perform vector search on the teacher's utterance set to obtain question-answer pair results.

[0082] See also Figure 4 In some embodiments, in step S320, vector retrieval is performed on the teacher's utterance set to obtain question-answer pair results, including but not limited to the following steps:

[0083] Step S410, converting and merging the teacher's speech set and the teaching data through a vector model to obtain a semantic vector;

[0084] Step S420, performing an approximate nearest neighbor search in the question and answer database according to the semantic vector to obtain the top K question and answer pair results, wherein the question and answer pair results include K similar general question texts and general response texts.

[0085] As an optional implementation method, before asking questions to the large language model, it is necessary to retrieve question and answer pairs similar to the specific conditions of the lesson in the question and answer library as samples of the external knowledge base and provide them to the large language model for reference. By introducing retrieval enhancement generation technology, it is helpful to improve the efficiency and accuracy of data classification of the large language model.

[0086] As an optional implementation method, the embodiment of the present invention implements the retrieval process of question-answer pairs in the order of "scalar retrieval"-"vector retrieval". Among them, the scalar retrieval will retrieve the teacher's discourse set with a high matching degree in the question and answer library as the data source for subsequent vector retrieval based on the specific conditions of the lesson in the teaching data, such as the subject, class type or stage to which the lesson belongs, as the data source for the subsequent vector retrieval. Then, the teacher's discourse set is vector retrieved. By using a vector model, such as one or more of the character embedding, word embedding or sentence embedding models, the retrieved teacher's discourse set and the teaching data are converted and merged to obtain a semantic vector. Finally, an approximate nearest neighbor search is performed in the vector database (the question and answer library includes the vector database and the teacher's discourse set, and the question and answer pairs are stored in the vector database) according to the semantic vector to obtain the top K question and answer pair results.

[0087] Among them, the embodiment of the present invention can improve the efficiency of search and facilitate obtaining similar question-answer pair results by converting the teacher's speech set and teaching data into semantic vectors.

[0088] For example, in a classroom teaching scenario, the teaching data is "Compare the horizontal and vertical forms, what are their similarities? What are their differences?" The initiator of the discourse is the teacher, and "horizontal" and "vertical" are recognized as knowledge points or keywords in the mathematics teaching process, so it is judged that the subject to which it belongs is mathematics. The initiator of the discourse and the subject to which it belongs constitute the query conditions, and a scalar search is initiated to the question and answer library to obtain a set of teacher discourses in the mathematics subject. Then a vector search is performed on the set, and the teaching data and the teacher discourse set are filled into the general question template, and converted into a vector using a vector model. Finally, through the approximate nearest neighbor search, the top K question and answer pair results are obtained, where the question and answer pair results include K similar question texts and response texts.

[0089] Specifically, the following most similar question-answer pairs can be obtained:

[0090] Question 1:

[0091] "Students, what do decimals and fractions have in common?", "Compare and summarize."

[0092] Question 2:

[0093] "Have you noticed anything similar between parallel and vertical lines? Take a closer look, are there any similarities?", "Compare and summarize".

[0094] Question 3:

[0095] "What are the similarities and commonalities between the two methods of calculating the area of ​​plane geometric figures, the cutting and patching method and the assembly method?", "Compare and summarize".

[0096] Step S120, merging the teaching data and the question-answer result to obtain a classroom prompt;

[0097] See also Figure 5 In some embodiments, in step S120, the teaching data and the question-answer result are combined to obtain classroom prompts, including but not limited to the following steps:

[0098] Step S510, filling the teaching data into the question template to obtain the first prompt;

[0099] Step S520, filling the question-answer pair result into the sample template to obtain a second prompt;

[0100] Step S530, obtaining a classroom prompt according to the first prompt and the second prompt.

[0101] As an optional implementation method, the teaching data and the question-answering results are combined. For example, the following classroom prompts can be obtained:

[0102] "For the speech '[Have you found any similarities between parallel and vertical? Take a closer look, are there any similarities?]' told by [teacher] in class, there are the following optional labels - [basic knowledge, personal opinion expression, analysis and interpretation, comparison and induction, transfer and innovation, expansion and construction], which label should this speech be marked with? And attach the reason, explanation or basis." The following are some reference examples:

[0103] 1. Discourse: "Students, what do decimals and fractions have in common?", Label: "Comparison and induction".

[0104] 2. Discourse: "Have you noticed anything similar between parallel and vertical lines? Take a closer look, are there any similarities?", Label: "Compare and summarize".

[0105] 3. Discourse: "What are the similarities and commonalities between the two methods of calculating the area of ​​plane geometric figures, the cutting and patching method and the assembly method?", Label: "Compare and summarize".

[0106] Step S130, inputting the classroom prompt speech into the large language model, so that the large language model learns the characteristics of the question-answer pair results in the classroom prompt speech, and classifies and predicts the teaching data according to the learned characteristics to obtain the first label result of the teaching data;

[0107] Exemplarily, as an optional implementation method, the aforementioned classroom prompts are input into a large language model, and after learning the classroom prompts, a first label result of the teaching data can be obtained.

[0108] Among them, the first label result can be expanded to obtain the explanation part of the first label result.

[0109] Specifically, the first label results and explanation section are as follows:

[0110] "This discourse should be labeled 'comparative induction'; the reason is that in this discourse the teacher asks students to compare the two different ways of expression, horizontal and vertical, and find out their similarities. This is exactly the thinking process of comparative induction, that is, by finding the similarities and commonalities between different things, we can form a deep understanding and integration of knowledge."

[0111] The first label result is "comparison and induction", and the explanation part is "In this discourse, the teacher asks students to compare the two different expressions, horizontal and vertical, and find their similarities. This is the thinking process of comparison and induction, that is, by finding the similarities and commonalities between different things, we can form a deep understanding and integration of knowledge." The explanation part is used to give the reason for the first label result, which improves the unexplainability of the classification result caused by the judgment process similar to the black box through the conventional discriminant model, which is conducive to improving the quality of the classification result.

[0112] Step S140, input the teaching data into the discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verify the first label result through the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data.

[0113] See also Figure 6 In some embodiments, in step S140, the first label result is verified by the classification confidence of multiple classification labels to obtain the data classification result of the teaching data, including but not limited to the following steps:

[0114] Step S610, comparing the first label result with the classification confidences of the multiple classification labels to obtain the confidence ranking corresponding to the first label result in the classification confidences of the multiple classification labels;

[0115] Step S620, determining whether the confidence ranking is within a preset confidence ranking range, and if so, taking the first label result as the data classification result of the teaching data.

[0116] In some embodiments, in step S140, the first label result is verified by the classification confidence of multiple classification labels to obtain the data classification result of the teaching data, which also includes but is not limited to the following steps:

[0117] If the confidence ranking is not within the preset confidence ranking range, the data classification result of the teaching data is obtained through hard voting;

[0118] Among them, the data classification results of the teaching data obtained by hard voting are obtained by the following steps:

[0119] The statistical large language model learns all the features of the question-answer results in the classroom prompts, and takes the features that appear most frequently as the data classification results of the teaching data.

[0120] As an optional implementation method, the first label result of the teaching data can also be manually given, and the first label result is used as the data classification result. The embodiment of the present invention verifies the first label result through the classification confidence of multiple classification labels, which can significantly improve the classification efficiency and accuracy of classroom teaching data, and has great significance for the education industry.

[0121] The embodiment of the present invention first searches for question-answer pairs in the question-answer database based on the teaching data to obtain question-answer pair results; then merges the teaching data and the question-answer pair results to obtain classroom prompts; then inputs the classroom prompts into a large language model so that the large language model learns the features of the question-answer pair results in the classroom prompts, and classifies and predicts the teaching data based on the learned features to obtain a first label result of the teaching data; finally, inputs the teaching data into a discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verifies the first label result through the classification confidence of multiple classification labels to obtain a data classification result of the teaching data. The embodiment of the present invention solves the problem of automatic classification of classroom teaching scene data by introducing a large language model and retrieval enhancement generation technology, and significantly improves the classification efficiency and accuracy of classroom teaching data.

[0122] In addition, the teaching data classification method for retrieval enhancement generation in the embodiment of the present invention has strong practicality. For example, it can be widely used in but not limited to the following scenarios:

[0123] (1) Automatic classification of classroom teaching scenario data, such as automatic coding of classroom dialogues and automatic rating of classroom interactions;

[0124] (2) It is applied to computer tools or software, Web application systems, mobile application software, applets and other software carriers related to classroom teaching monitoring and analysis, and can be used as a business middle platform or AI middle platform to provide basic services for automatic classification of classroom teaching scene data;

[0125] (3) Integrated into teaching terminal hardware devices as embedded software, including but not limited to classroom whiteboard devices and learning machines;

[0126] (4) Applied to classroom teaching research, by analyzing classroom conversations to obtain research data and provide data support for further research.

[0127] The embodiment of the present invention also provides a teaching data classification system for retrieval enhancement generation, including:

[0128] The first module is used to search for question-answer pairs in the question-answer database based on teaching data to obtain question-answer pair results;

[0129] The second module is used to merge the teaching data and the question-answer results to obtain classroom prompts;

[0130] The third module is used to input the classroom prompts into the large language model so that the large language model can learn the characteristics of the question-answer pair results in the classroom prompts, and classify and predict the teaching data according to the learned characteristics to obtain the first label result of the teaching data;

[0131] The fourth module is used to input the teaching data into the discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verify the first label result through the classification confidence of multiple classification labels to obtain the data classification result of the teaching data.

[0132] The embodiment of the present invention also provides a teaching data classification device for retrieval enhancement generation, comprising:

[0133] at least one processor;

[0134] at least one memory for storing at least one program;

[0135] When at least one program is executed by at least one processor, the at least one processor implements the teaching data classification method for retrieval enhancement generation as described above.

[0136] An embodiment of the present invention further provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the steps described in the above embodiment.

[0137] Those skilled in the art will appreciate that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed in a computer storage medium, and the storage medium includes, but is not limited to, a read-only memory, a random access memory, a programmable read-only memory, an erasable programmable read-only memory, a one-time programmable read-only memory, a read-only optical disk or other optical disk storage, a magnetic disk storage, a magnetic tape storage, or any other medium that can be used to carry or store data and is computer-readable.

[0138] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A teaching data classification method for retrieval enhancement generation, characterized in that: The following steps are involved: Search the question-answer pair in the question-answer database according to the teaching data to obtain the question-answer pair result; The teaching data and the question-answer result are combined to obtain classroom prompts; Inputting the classroom prompt into a large language model so that the large language model learns the characteristics of the question-answer pair results in the classroom prompt, and classifies and predicts the teaching data according to the learned characteristics to obtain a first label result of the teaching data; Inputting the teaching data into a discriminant model to obtain multiple classification labels of the teaching data and classification confidence of each classification label, and verifying the first label result by the classification confidence of the multiple classification labels to obtain a data classification result of the teaching data; The step of searching for question-answer pairs in the question-answer database based on the teaching data to obtain question-answer pair results includes the following steps: Extracting the teaching data to obtain lesson-specific conditions, and performing scalar search in the question-answer database according to the lesson-specific conditions to obtain a matching teacher discourse set, wherein the lesson-specific conditions include subject, lesson type and school stage; The teacher's speech set and the teaching data are converted and merged through a vector model to obtain a semantic vector; Perform an approximate nearest neighbor search in the question-answer database according to the semantic vector to obtain K top-ranked question-answer pair results, wherein the question-answer pair results include K similar general question texts and general response texts; The step of combining the teaching data and the question-answer result to obtain classroom prompts comprises the following steps: Fill the teaching data into the question template to obtain the first prompt; Fill the question-answer pair result into the sample template to obtain the second prompt; A question-and-answer knowledge template is formed according to the first prompt and the second prompt as the classroom prompt.

2. The teaching data classification method for retrieval-enhanced generation according to claim 1 is characterized in that: Before the step of searching for question-answer pairs in the question-answer database according to the teaching data to obtain the question-answer pair results, the teaching data classification method for search-enhanced generation further includes the following steps: Acquire original data of classroom teaching scenes, wherein the original data includes question data and response data; Generate a general question text and a general response text according to the original data and the general classroom question template; A question-answer pair is obtained according to the general question text and the general response text, and a question-answer library is obtained according to the question-answer pair.

3. The teaching data classification method for retrieval-enhanced generation according to claim 1 is characterized in that: The step of verifying the first label result by the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data comprises the following steps: Compare the first label result with the classification confidences of the multiple classification labels to obtain a confidence ranking corresponding to the first label result in the classification confidences of the multiple classification labels; It is determined whether the confidence ranking is within a preset confidence ranking range. If so, the first label result is used as the data classification result of the teaching data.

4. The teaching data classification method for retrieval-enhanced generation according to claim 3 is characterized in that: The step of verifying the first label result by the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data further includes the following steps: If the confidence ranking is not within the preset confidence ranking range, obtaining the data classification result of the teaching data by hard voting; Among them, the data classification results of the teaching data obtained by hard voting are obtained by the following steps: The statistical large language model learns all the features of the question-answer results in the classroom prompts, and takes the features that appear most frequently as the data classification results of the teaching data.

5. A teaching data classification system with enhanced retrieval generation, characterized in that: The teaching data classification system generated by retrieval enhancement includes: The first module is used to search for question-answer pairs in the question-answer database based on teaching data to obtain question-answer pair results; The second module is used to merge the teaching data and the question-answer result to obtain classroom prompts; The third module is used to input the classroom prompt into a large language model so that the large language model learns the characteristics of the question-answer pair results in the classroom prompt, and classifies and predicts the teaching data according to the learned characteristics to obtain a first label result of the teaching data; The fourth module is used to input the teaching data into the discriminant model to obtain multiple classification labels of the teaching data and the classification confidence of each classification label, and verify the first label result through the classification confidence of the multiple classification labels to obtain the data classification result of the teaching data; The step of searching for question-answer pairs in the question-answer database based on the teaching data to obtain question-answer pair results includes the following steps: Extracting the teaching data to obtain lesson-specific conditions, and performing scalar search in the question-answer database according to the lesson-specific conditions to obtain a matching teacher discourse set, wherein the lesson-specific conditions include subject, lesson type and school stage; The teacher's speech set and the teaching data are converted and merged through a vector model to obtain a semantic vector; Perform an approximate nearest neighbor search in the question-answer database according to the semantic vector to obtain K top-ranked question-answer pair results, wherein the question-answer pair results include K similar general question texts and general response texts; The step of combining the teaching data and the question-answer result to obtain classroom prompts comprises the following steps: Fill the teaching data into the question template to obtain the first prompt; Fill the question-answer pair result into the sample template to obtain the second prompt; A question-and-answer knowledge template is formed according to the first prompt and the second prompt as the classroom prompt.

6. A teaching data classification device for retrieval enhancement generation, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the teaching data classification method for retrieval-enhanced generation as described in any one of claims 1-4.

7. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the teaching data classification method for retrieval enhanced generation as described in any one of claims 1 to 4 when executed by the processor.

Citation Information

Patent Citations

  • Large-scale text classification method and system

    CN113535965A

  • Knowledge base construction method and question and answer dialogue method and system based on generative large language model

    CN117056471A