K12 subject approximate question retrieval method and system based on large language model
By constructing a knowledge tree and modifying the large language model, and combining it with neural networks for classification and segmentation, the problems of insufficient recall and unreasonable ranking in traditional methods are solved, and more accurate approximate question retrieval is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JD100 COM
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-08
AI Technical Summary
In K-12 online education, existing technologies rely on keyword matching or word frequency statistics for traditional similar question retrieval methods, resulting in insufficient recall and unreasonable ranking of search results, and failing to accurately identify diverse expressions and knowledge point weights.
A knowledge tree is constructed, modified through a large language model, and approximate question retrieval is performed using the hierarchical relationship of the knowledge tree. Combining a one-dimensional convolutional neural network and a fully connected neural network, classification and segmentation are performed to obtain a sequence of knowledge points and achieve weighted retrieval.
It improves the accuracy and recall of similar question retrieval, and can identify diverse expressions and knowledge point weights to achieve more accurate knowledge structure matching.
Smart Images

Figure CN121996779A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of similar question retrieval, and more specifically, to a method and system for similar question retrieval in K-12 subjects based on a large language model. Background Technology
[0002] In K-12 online education, intelligent homework systems, and personalized learning platforms, quickly and accurately finding "similar questions" that test the same knowledge points, have similar solution methods, or match in difficulty is a core and challenging task. In K-12 education scenarios, teachers and intelligent question-generating systems often need to quickly find "similar questions" for target test questions in order to achieve the ability to apply knowledge to different situations, provide personalized practice, and reuse teaching materials for research.
[0003] Traditional methods for finding similar questions primarily rely on keyword matching or text retrieval methods based on term frequency / inverted indexes (such as TF-IDF / BM25). Measuring similarity solely from a term frequency perspective means the same knowledge point may be covered by multiple linguistic expressions, question styles, or interdisciplinary descriptions. When keywords do not overlap, existing methods are prone to missing key points, resulting in significantly insufficient recall due to the diversity of expressions. Furthermore, a single question typically relates to multiple knowledge points, and these knowledge points often have a primary and secondary relationship. Keyword methods cannot weight core and secondary knowledge points, leading to unreasonable ranking of search results and failing to reflect the knowledge structure and weighting. Therefore, these methods can result in inaccurate search results. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for retrieving approximate questions in K12 subjects based on a large language model, so as to solve the above-mentioned problems existing in the prior art.
[0005] In a first aspect, embodiments of the present invention provide a method for retrieving approximate questions in K12 subjects based on a large language model, including: Obtain the question sequence; the question sequence represents the sequence of statements used as questions after encoding. Construct a knowledge tree; Based on the knowledge tree, the large language model is modified; Based on the question sequence, classification and segmentation are performed to obtain multiple sub-questions and corresponding question category values; the question category value represents the level of the sub-question in the knowledge tree; Using the modified large language model, a knowledge point sequence is obtained based on the multiple sub-topics and their corresponding topic category values; the knowledge point sequence contains multiple arranged knowledge points. Based on the sequence of knowledge points, a similar question retrieval is performed to obtain the search question.
[0006] Optionally, modifying the large language model based on the knowledge tree includes: The large language model includes a normalized structure, a feedforward neural network, and a multi-head attention mechanism. Construct n i-th feedforward neural networks and n-1 i-th knowledge tree control structures based on the number of layers in the knowledge tree; The input to the (i+1)th feedforward neural network is the output of the i-th feedforward neural network and the output of the (i+1)th knowledge tree control structure; The modified large language model is obtained by replacing the feedforward neural networks in the large language model with the connected multiple i-th feedforward neural networks and the n-1 i-th knowledge tree control structure.
[0007] Optionally, the i-th knowledge tree control structure is used to store the sub-topics corresponding to the nodes at the i-th level in the knowledge tree; i is a positive integer greater than or equal to 1 and less than or equal to n; The output of the first knowledge tree control structure serves as the input to the first feedforward neural network.
[0008] Optionally, the classification and segmentation based on the question sequence to obtain multiple sub-questions and corresponding question category values includes: Traverse the question vector, search for keywords, and obtain the keyword positions; Features are extracted from the characters in the question vector to obtain multiple question feature vectors; the question feature vectors represent the features of the characters in the question vector. Based on multiple question feature vectors, the features of words associated with keywords are detected to obtain a question keyword feature matrix; the question keyword feature matrix represents the overall features of words associated with keywords in the question vectors; The keyword feature matrix of the question is input into a one-dimensional convolutional neural network to detect the level of the corresponding knowledge point on the knowledge tree and obtain the question category value. Arrange the multiple characters corresponding to the keyword feature matrix of the title in order to obtain the sub-titles.
[0009] Optionally, the training method for the modified large language model includes: Obtain multiple training sub-topics, their corresponding training topic category values, and annotated knowledge point sequences; the annotated knowledge point sequence represents the knowledge points corresponding to the annotated training sub-topics; one output value corresponds to the number of sub-topics segmented. According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the training knowledge point sequence; The labeled knowledge point sequence and the training knowledge point sequence are of fixed length; The loss is calculated on the training knowledge point sequence and the labeled knowledge point sequence to obtain the first loss value; The second loss value is obtained by calculating the index values corresponding to multiple training sub-topics in the training knowledge point sequence and the labeled knowledge point sequence. Add the first loss value and the second loss value to obtain the loss value; The modified large language model is trained based on the loss value.
[0010] Optionally, the step of obtaining a knowledge point sequence based on the multiple sub-topics and their corresponding topic category values using the modified large language model includes: According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the knowledge point sequence.
[0011] Optionally, the step of performing a similar question retrieval based on the knowledge point sequence to obtain the retrieval question includes: By using the knowledge tree, similar knowledge points are detected to obtain a set of similar knowledge points; the set of similar knowledge points includes multiple similar knowledge points; each similar knowledge point represents a knowledge point that is similar to one knowledge point in the knowledge point sequence. One knowledge point in a knowledge point sequence corresponds to one set of similar knowledge points; Retrieve the stored questions and their corresponding stored knowledge point sequences; the stored questions refer to questions stored in the database; the stored knowledge point sequences refer to the knowledge point sequences corresponding to the stored questions; Construct a similar knowledge point matrix by combining a knowledge point sequence with the corresponding set of similar knowledge points; the columns of the similar knowledge point matrix correspond to the indices of the knowledge point sequence, and the rows represent the knowledge points and similar knowledge points corresponding to the knowledge point sequence. Determine whether the knowledge points at corresponding indices of the similar knowledge point matrix and the stored knowledge point sequence are similar or identical; If they are the same, the question corresponding to the stored knowledge point sequence will be used as the search question.
[0012] Optionally, the step of detecting the features of words associated with keywords based on multiple question feature vectors to obtain a question keyword feature matrix includes: Obtain the adjacent first keyword, second keyword, and third keyword; the second keyword is the keyword between the first keyword and the third keyword; The feature vectors of multiple questions corresponding to the words between the first keyword and the third keyword are superimposed to form the question keyword feature matrix.
[0013] Optionally, the method for obtaining the knowledge tree includes: Acquire multiple stored knowledge points; the stored knowledge points represent the stored knowledge points of K12 subjects; Based on the relationships between stored knowledge points, a knowledge tree is constructed from the multiple stored knowledge points; the intermediate nodes of the knowledge tree represent composite knowledge points, and the leaf nodes represent atomic knowledge points.
[0014] Secondly, embodiments of the present invention provide an approximate question retrieval system for K12 subjects based on a large language model, comprising: The acquisition module is used to acquire a question sequence; the question sequence represents the sequence of statements used as questions after encoding. The knowledge tree module is used to build knowledge trees; The large language model module is used to modify the large language model based on the knowledge tree; The segmentation module is used to classify and cut the question sequence to obtain multiple sub-questions and corresponding question category values; the question category value represents the level of the sub-question in the knowledge tree. The knowledge point sequence module is used to obtain a knowledge point sequence based on the multiple sub-topics and their corresponding question category values using the modified large language model; the knowledge point sequence contains multiple arranged knowledge points. The similar question detection module is used to retrieve similar questions based on the knowledge point sequence and obtain the retrieved questions.
[0015] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects: This invention also provides a method and system for retrieving approximate questions in K12 subjects based on a large language model.
[0016] In this invention, a knowledge tree is constructed. First, keywords are detected to determine the corresponding levels within the knowledge tree. Instead of directly acquiring knowledge points, the knowledge tree identifies only the levels, preserving hierarchical relationships between knowledge points and similarity relationships between those at the same level. This allows the knowledge tree to find multiple knowledge points corresponding to a single keyword, leading to more accurate identification of the deeper meaning of language. After segmenting into sub-topics, the large language model is modified using the knowledge tree to focus more on the relationships between sub-topics, enabling the identification of knowledge point information contained within sentences, rather than simply matching keywords. Based on the detected knowledge point sequences, the invention achieves the technical effect of enabling structured modeling of knowledge points, weighted and vectorized retrieval capabilities, and controllable approximate question retrieval. Attached Figure Description
[0017] Figure 1 This is a flowchart of an approximate question retrieval method for K12 subjects based on a large language model, provided by an embodiment of the present invention.
[0018] Figure 2Schematic diagram of the feedforward neural network and the recognition tree control structure in the modified large language model in an approximate question retrieval method for K12 disciplines based on a large language model provided by an embodiment of the present invention.
[0019] Figure 3 Schematic diagram of the calculation methods of the first loss value and the second loss value in an approximate question retrieval method for K12 disciplines based on a large language model provided by an embodiment of the present invention.
[0020] Figure 4 Schematic diagram of the similarity knowledge point matrix in an approximate question retrieval method for K12 disciplines based on a large language model provided by an embodiment of the present invention.
[0021] Figure 5 Schematic diagram of the original transformer model of the large language model in an approximate question retrieval method for K12 disciplines based on a large language model provided by an embodiment of the present invention. Specific implementation manners
[0022] The present invention will be described in detail below with reference to the accompanying drawings.
[0023] Embodiment 1: As Figure 1 shown, an embodiment of the present invention provides an approximate question retrieval method for K12 disciplines based on a large language model, and the method includes: S101: Obtain a question sequence; the question sequence represents a sequence after encoding the sentences serving as questions.
[0024] Among them, in this embodiment, each character is replaced with a numerical value. For example, in this embodiment, "I" is replaced with "0000001".
[0025] S102: Construct a knowledge tree structure.
[0026] Among them, the relationships between knowledge points are obtained through a tree structure and named a knowledge tree structure.
[0027] S103: Modify the large language model based on the knowledge tree.
[0028] S104: Based on the question sequence, perform classification and segmentation to obtain multiple sub-questions and corresponding question category values; the question category values represent the levels of the sub-questions on the knowledge tree.
[0029] S105: Through the modified large language model, based on the multiple sub-questions and the corresponding question category values, obtain a knowledge point sequence; the knowledge point sequence contains multiple arranged knowledge points.
[0030] Among them, different structures are input according to different knowledge points.
[0031] S106: Based on the knowledge point sequence, perform a similar question retrieval to obtain the retrieval question.
[0032] Among them, the detected questions are those that are similar to the question sequence.
[0033] Optionally, modifying the large language model based on the knowledge tree includes: The large language model includes a normalized structure, a feed-forward neural network, and a multi-head attention mechanism.
[0034] In this embodiment, the Large Language Models (LLMs) used employ a transformer model architecture. The output of a multi-head self-attention module serves as the input to one normalization structure (LN1), the output of another normalization structure (Add&orm) serves as the input to a feedforward neural network, and the output of the feedforward neural network serves as the input to yet another normalization structure, Add&orm. In this embodiment, the normalization structure is a layer normalization structure (Add&orm), as shown below. Figure 5 As shown.
[0035] Construct n i-th feedforward neural networks and n-1 i-th knowledge tree control structures based on the number of layers in the knowledge tree.
[0036] Where n represents the number of levels in the knowledge tree, starting from 1.
[0037] The inputs to the (i+1)th feedforward neural network are the outputs of the i-th feedforward neural network and the outputs of the (i+1)-th knowledge tree control structure.
[0038] The role of 'i' is to differentiate between feedforward neural networks. For example, the input layer of the second feedforward neural network includes the output of the first feedforward neural network and the data corresponding to the nodes of the first level in the knowledge tree.
[0039] Among them, such as Figure 2 As shown.
[0040] The modified large language model is obtained by replacing the feedforward neural networks in the large language model with the connected multiple i-th feedforward neural networks and the n-1 i-th knowledge tree control structure.
[0041] Optionally, the i-th knowledge tree control structure is used to store the sub-topics corresponding to the nodes at the i-th level in the knowledge tree; i is a positive integer greater than or equal to 1 and less than or equal to n; The output of the first knowledge tree control structure serves as the input to the first feedforward neural network.
[0042] Optionally, the classification and segmentation based on the question sequence to obtain multiple sub-questions and corresponding question category values includes: Traverse the question vector, search for keywords, and obtain the keyword positions; The keyword features are obtained by extracting features from the characters at the keyword positions; the keyword features represent the characteristics of the keywords present in the question vector.
[0043] Feature extraction is performed using a fully connected neural network (FCN). Since each character corresponds to a unique encoding, this encoding is input into the FCN.
[0044] Based on multiple question feature vectors, the features of words associated with keywords are detected to obtain a question keyword feature matrix; the question keyword feature matrix represents the overall features of words in the question vectors that are associated with keywords.
[0045] The keyword feature matrix of the question is input into a one-dimensional convolutional neural network (1DCNN) to detect the level of the corresponding knowledge point on the knowledge tree and obtain the question category value.
[0046] Specifically, when training the 1D Convolutional Neural Network (1DCNN) and the Fully Connected Neural Network (FCN), the labeled question category values are used as labeled data for training.
[0047] The above method first employs a one-dimensional convolutional neural network (1DCNN) for hierarchical detection. While it cannot directly detect knowledge points, it can utilize the range of levels corresponding to the knowledge tree to more accurately detect knowledge points in subsequent detections. Furthermore, it can find similar knowledge points at the same level through the knowledge tree, thereby retrieving questions and making the retrieval more accurate.
[0048] Arrange the multiple characters corresponding to the keyword feature matrix of the title in order to obtain the sub-titles.
[0049] Wherein, the order refers to the sequence of questions.
[0050] Optionally, the training method for the modified large language model includes: Obtain multiple training sub-topics, their corresponding training topic category values, and annotated knowledge point sequences; the annotated knowledge point sequence represents the knowledge points corresponding to the annotated training sub-topics; one output value corresponds to the number of sub-topics segmented. According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the training knowledge point sequence.
[0051] For example, if the number of training sub-topics is 3, the corresponding training topic category values are 2, 3, and 2. The two sub-topics corresponding to the training topic category value 2 are stored in the third knowledge tree control structure. The output of the second feedforward neural network (set to 0 if there is no output) and the output of the third knowledge tree control structure are input into the third feedforward neural network. The sub-topics corresponding to the training topic category value 3 are stored in the fourth knowledge tree control structure. The output of the third feedforward neural network and the output of the fourth knowledge tree control structure are input into the fourth feedforward neural network.
[0052] If the corresponding training question category value is 1, the sub-question corresponding to the training question category value 1 is stored in the first knowledge tree control structure, and the output of the first knowledge tree control structure is used as the input of the first feedforward neural network.
[0053] The labeled knowledge point sequence and the training knowledge point sequence are of fixed length.
[0054] In this embodiment, because the output length of the large language model is the same, but the number of training sub-topics is different, the number of output knowledge points is also different. Therefore, in the output training knowledge point sequence of the large language model, part represents knowledge points and part represents meaningless information, which is marked as 0 when calculating the loss.
[0055] The loss is calculated for the training knowledge point sequence and the labeled knowledge point sequence to obtain the first loss value.
[0056] In this embodiment, a regression function is used to calculate the loss.
[0057] The overall loss calculation includes the meaningless parts of the training knowledge point sequence that should be zero.
[0058] Based on the number of multiple training sub-topics, the loss is calculated by taking the indices corresponding to the training knowledge point sequence and the labeled knowledge point sequence, thus obtaining the second loss value.
[0059] Only the knowledge points corresponding to the training sub-questions are tested.
[0060] In this example, if the number of training sub-topics is 3, the loss is calculated using a regression function with the values of the training knowledge point sequence and the labeled knowledge point sequence at indices 0, 1, and 2. In this embodiment, the indices start from 0.
[0061] The calculation methods for the first loss value and the second loss value are as follows: Figure 3 As shown in the figure. In this embodiment, a difference of 10 is used to represent one corresponding knowledge point sequence.
[0062] The above method allows for a certain degree of bias in the loss calculation, thus overcoming the characteristics of neural networks.
[0063] The first loss value and the second loss value are added together to obtain the loss value.
[0064] The modified large language model is trained based on the loss value.
[0065] Optionally, the step of obtaining a knowledge point sequence based on the multiple sub-topics and their corresponding topic category values using the modified large language model includes: According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the knowledge point sequence.
[0066] Optionally, the step of performing a similar question retrieval based on the knowledge point sequence to obtain the retrieval question includes: By using the knowledge tree, similar knowledge points are detected to obtain a set of similar knowledge points; the set of similar knowledge points includes multiple similar knowledge points; the similar knowledge point represents a knowledge point that is similar to one knowledge point in the knowledge point sequence.
[0067] The similarity of the knowledge points is marked in the knowledge tree.
[0068] One knowledge point in a knowledge point sequence corresponds to one set of similar knowledge points.
[0069] Retrieve the stored questions and their corresponding stored knowledge point sequences; the stored questions refer to questions stored in the database; the stored knowledge point sequences refer to the knowledge point sequences corresponding to the stored questions.
[0070] A similar knowledge point matrix is constructed by combining the knowledge point sequence with the corresponding set of similar knowledge points; the columns of the similar knowledge point matrix correspond to the indices of the knowledge point sequence, and the rows represent the knowledge points and similar knowledge points corresponding to the knowledge point sequence.
[0071] The similar knowledge point matrix is as follows: Figure 4 As shown.
[0072] Determine whether the knowledge points at corresponding indices of the similar knowledge point matrix and the stored knowledge point sequence are similar or identical.
[0073] If they are the same, the question corresponding to the stored knowledge point sequence will be used as the search question. Optionally, the step of detecting the features of words associated with keywords based on multiple question feature vectors to obtain a question keyword feature matrix includes: Obtain the adjacent first keyword, second keyword, and third keyword; the second keyword is the keyword between the first keyword and the third keyword; The feature vectors of multiple questions corresponding to the words between the first keyword and the third keyword are superimposed to form the question keyword feature matrix.
[0074] Optionally, the method for obtaining the knowledge tree includes: Acquire multiple stored knowledge points; the stored knowledge points represent the stored knowledge points of K12 subjects; Based on the relationships between stored knowledge points, a knowledge tree is constructed from the multiple stored knowledge points; the intermediate nodes of the knowledge tree represent composite knowledge points, and the leaf nodes represent atomic knowledge points.
[0075] In this embodiment, a textbook's table of contents is used to represent the stored knowledge points. The relationships between the stored knowledge points represent the hierarchical relationships between the directories.
[0076] Wherein, the atomic knowledge point represents a directory without subdirectories, and the composite knowledge point represents a directory with subdirectories.
[0077] In this embodiment, the root node is taken as the first level, and the child nodes of the root node are taken as the second level.
[0078] In this embodiment, when entering knowledge points corresponding to the directory, similar stored knowledge points set by experts are marked.
[0079] Example 2: Based on the above-described approximation question retrieval method for K-12 subjects based on a large language model, this embodiment of the invention also provides an approximation question retrieval system for K-12 subjects based on a large language model, the system comprising: The acquisition module is used to acquire a sequence of questions; the sequence of questions represents the sequence of statements that are used as questions after being encoded.
[0080] The Knowledge Tree module is used to build knowledge trees.
[0081] The large language model module is used to modify the large language model based on the knowledge tree.
[0082] The segmentation module is used to classify and cut the question sequence to obtain multiple sub-questions and corresponding question category values; the question category value represents the level of the sub-question in the knowledge tree.
[0083] The knowledge point sequence module is used to obtain a knowledge point sequence based on the multiple sub-topics and their corresponding question category values using the modified large language model; the knowledge point sequence contains multiple arranged knowledge points.
[0084] The similar question detection module is used to retrieve similar questions based on the knowledge point sequence and obtain the retrieved questions.
[0085] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0086] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0087] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
Claims
1. A method for retrieving approximate questions in K-12 subjects based on a large language model, characterized in that, include: Obtain the question sequence; the question sequence represents the sequence of statements used as questions after encoding. Construct a knowledge tree; Based on the knowledge tree, the large language model is modified; Based on the question sequence, classification and segmentation are performed to obtain multiple sub-questions and their corresponding question category values; The question category value represents the level of the sub-question in the knowledge tree; Using the modified large language model, a knowledge point sequence is obtained based on the multiple sub-topics and their corresponding topic category values; the knowledge point sequence contains multiple arranged knowledge points. Based on the sequence of knowledge points, a similar question retrieval is performed to obtain the search question.
2. The method for retrieving approximate questions in K12 subjects based on a large language model according to claim 1, characterized in that, The modification of the large language model based on the knowledge tree includes: The large language model includes a normalized structure, a feedforward neural network, and a multi-head attention mechanism. Construct n i-th feedforward neural networks and n-1 i-th knowledge tree control structures based on the number of layers in the knowledge tree; The input to the (i+1)th feedforward neural network is the output of the i-th feedforward neural network and the output of the (i+1)th knowledge tree control structure; The modified large language model is obtained by replacing the feedforward neural networks in the large language model with the connected multiple i-th feedforward neural networks and the n-1 i-th knowledge tree control structure.
3. The approximate question retrieval method for K12 subjects based on a large language model according to claim 2, characterized in that, The i-th knowledge tree control structure is used to store the sub-questions corresponding to the nodes at the i-th level in the knowledge tree; i is a positive integer greater than or equal to 1 and less than or equal to n; The output of the first knowledge tree control structure serves as the input to the first feedforward neural network.
4. The approximate question retrieval method for K12 subjects based on a large language model according to claim 1, characterized in that, The process of classifying and segmenting the question sequence to obtain multiple sub-questions and corresponding question category values includes: Traverse the question vector, search for keywords, and obtain the keyword positions; The features of the characters in the question vector are extracted to obtain multiple question feature vectors; the question feature vectors represent the features of the characters in the question vector. Based on multiple question feature vectors, the features of words associated with keywords are detected to obtain a question keyword feature matrix; the question keyword feature matrix represents the overall features of words associated with keywords in the question vectors; Input the keyword feature matrix of the question into a one-dimensional convolutional neural network to detect the level of the corresponding knowledge point on the knowledge tree and obtain the question category value. Arrange the multiple characters corresponding to the keyword feature matrix of the title in order to obtain the sub-titles.
5. The approximate question retrieval method for K12 subjects based on a large language model according to claim 1, characterized in that, The training method for the modified large language model includes: Obtain multiple training sub-topics, their corresponding training topic category values, and a sequence of labeled knowledge points; the sequence of labeled knowledge points represents the knowledge points corresponding to the labeled training sub-topics; one output value corresponds to the number of sub-topics segmented. According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the training knowledge point sequence; The labeled knowledge point sequence and the training knowledge point sequence are of fixed length; The loss is calculated on the training knowledge point sequence and the labeled knowledge point sequence to obtain the first loss value; The second loss value is obtained by calculating the index values corresponding to multiple training sub-topics in the training knowledge point sequence and the labeled knowledge point sequence. Add the first loss value and the second loss value to obtain the loss value; The modified large language model is trained based on the loss value.
6. The approximate question retrieval method for K12 subjects based on a large language model according to claim 5, characterized in that, The modified large language model, based on the multiple sub-topics and their corresponding topic category values, yields a sequence of knowledge points, including: According to the question category value, the multiple sub-questions are input into the corresponding i-th feedforward neural network in the large language model to obtain the knowledge point sequence.
7. The approximate question retrieval method for K12 subjects based on a large language model according to claim 1, characterized in that, The process of performing approximate question retrieval based on the knowledge point sequence to obtain the retrieved questions includes: By using the knowledge tree, similar knowledge points are detected to obtain a set of similar knowledge points; the set of similar knowledge points includes multiple similar knowledge points; each similar knowledge point represents a knowledge point that is similar to one knowledge point in the knowledge point sequence. One knowledge point in a knowledge point sequence corresponds to one set of similar knowledge points; Retrieve the stored questions and their corresponding stored knowledge point sequences; the stored questions refer to questions stored in the database; the stored knowledge point sequences refer to the knowledge point sequences corresponding to the stored questions; Construct a similar knowledge point matrix by combining a knowledge point sequence with the corresponding set of similar knowledge points; the columns of the similar knowledge point matrix correspond to the indices of the knowledge point sequence, and the rows represent the knowledge points and similar knowledge points corresponding to the knowledge point sequence. Determine whether the knowledge points at corresponding indices of the similar knowledge point matrix and the stored knowledge point sequence are similar or identical; If they are the same, the question corresponding to the stored knowledge point sequence will be used as the search question.
8. The approximate question retrieval method for K12 subjects based on a large language model according to claim 4, characterized in that, The method involves detecting features of words associated with keywords based on multiple question feature vectors to obtain a question keyword feature matrix, including: Obtain the adjacent first keyword, second keyword, and third keyword; the second keyword is the keyword between the first keyword and the third keyword; The feature vectors of multiple questions corresponding to the words between the first keyword and the third keyword are superimposed to form the question keyword feature matrix.
9. The approximate question retrieval method for K12 subjects based on a large language model according to claim 1, characterized in that, The method for obtaining the knowledge tree includes: Acquire multiple stored knowledge points; the stored knowledge points represent the stored knowledge points of K12 subjects; Based on the relationships between stored knowledge points, a knowledge tree is constructed from the multiple stored knowledge points; the intermediate nodes of the knowledge tree represent composite knowledge points, and the leaf nodes represent atomic knowledge points.
10. A K-12 subject approximation question retrieval system based on a large language model, characterized in that, include: The acquisition module is used to acquire a question sequence; the question sequence represents the sequence of statements that are used as questions after being encoded. The knowledge tree module is used to build knowledge trees; The large language model module is used to modify the large language model based on the knowledge tree; The segmentation module is used to classify and cut the question sequence to obtain multiple sub-questions and corresponding question category values; the question category value represents the level of the sub-question in the knowledge tree. The knowledge point sequence module is used to obtain a knowledge point sequence based on the multiple sub-topics and their corresponding question category values using the modified large language model; the knowledge point sequence contains multiple arranged knowledge points. The similar question detection module is used to perform similar question retrieval based on the knowledge point sequence to obtain the retrieved question.
Citation Information
Patent Citations
Multi-modal safety knowledge retrieval method for online education
CN116955655A
Subject test question generation method and device based on large language model and retrieval enhancement
CN118861240A
Method and system for automatically labeling knowledge points of large language model
CN119357310A
Generation and exploitation of an approximate language model
US8615389B1
KR20250046492A