A method for retrieving answers to questions from educational knowledge graphs
By constructing EDUCEQ dataset and template-based question answering methods, the problem that the existing EKGQA dataset cannot handle complex and diverse educational problems is solved, and more efficient multi-hop reasoning and language style adaptability are achieved.
Patent Information
- Application Number
- CN202510064196.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing Education Knowledge Graph Q&A (EKGQA) datasets are unable to effectively deal with complex and diverse educational problems in the real world, especially in terms of cognitive expression and language style.
The Chinese cognitive expression education question and answer data set EDUCEQ is constructed, which contains different types of learning questions, displays different cognitive expression and language styles, and adopts the template-based educational cognitive expression problem answering method to generate and answer reason through a large language model.
It improves the processing ability in multi-hop, educational cognitive expression and different types of language styles, and enhances the universality of the model and the understanding and reasoning ability of educational cognitive expression problems.
Smart Images

Figure CN119474279B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of educational technology, and in particular relates to a method for retrieving answers to questions from an educational knowledge graph. Background Art
[0002] Educational Knowledge Graph Question Answering (EKGQA) is the task of answering educational questions by extracting knowledge from an educational knowledge base. Although this topic has been intensively studied in the past few years, most datasets used in the latest research are too rigid and simple to match real-world situations. Therefore, there is a need to analyze real-world educational problems. Due to the differences in learners' personal experiences, cultural backgrounds, and cognitive levels, the expressions and style types of their questions can be very complex, that is, questions may involve different and mixed cognitive expressions and language styles.
[0003] In recent years, online education has become a way for hundreds of millions of people around the world to learn. As data continues to accumulate in online education, the cost of searching for accurate knowledge continues to increase, leading to a phenomenon where learners can easily get lost.
[0004] Educational Knowledge Graphs (EKGs) provide a solution by aggregating a large amount of scattered and unstructured educational data into a structured and interpretable form of knowledge, thereby reducing the access cost for users and promoting rapid cognitive enhancement. Therefore, EKGs have attracted widespread attention.
[0005] In order to effectively and accurately solve the problems faced by learners in online education, recent research works have been devoted to handling natural language educational problems, namely answering questions through educational knowledge graphs (EKGQA for short). Given an educational question and a background EKG, the task involves retrieving the answer to the question from the EKGs. In order to advance the research of EKGQA, several datasets have been introduced, among which MOOCQA is the most representative.
[0006] Specifically, MOOCQA contains 65K educational questions, each of which has at least one knowledge entity as an answer. Figure 1 - (a) shows an example, which includes "What is the concept of the revised assignment", EKG, and the answer "algorithm". However, it is not difficult to observe that these questions are rigid and formal, while in reality, due to the different understanding of knowledge and personal experience of learners, their questioning styles are often diverse, and there may be different language styles and cognitive expressions. For example, Figure 1As shown in -(b), first, for the same problem, the logic and clarity of questions raised by different users often vary. u1 asks questions in a more detailed and polite manner, while u2's expression is more direct. Second, due to the different personal experiences and family backgrounds of learners, there may also be some buzzwords (such as "Emmm…") and Chinese dialects (such as "啥" / "What"), which are common in real-world questions.
[0007] However, the above problems are largely ignored by the existing EKGQA datasets. In addition, the scale of the Chinese EKGQA dataset is much smaller than that of the English dataset. Therefore, the current benchmark tests may not be comprehensive and fair enough to evaluate EKGQA models. Summary of the Invention
[0008] In view of this, the objective of the present invention is to construct a Chinese cognitive expression education question-answering dataset EDUCEQ, which not only contains different types of learning questions, showing different cognitive expressions and language styles, but also has a large-scale question-and-answer pair, and establish a strong baseline for processing cognitive expression EKGQA; and construct a template-based educational cognitive expression question-answering method, which adopts a template-based question generation method that automatically constructs questions based on the established templates to solve the differences in multi-hop reasoning, cognitive expression and language style of different types of learners.
[0009] The method for retrieving question answers from an educational knowledge graph disclosed in the first aspect of the present application includes the following steps:
[0010] Obtain a first set of educational questions, and analyze the cognitive representations and language styles in the first set of educational questions;
[0011] Unify the language styles and cognitive representations in the first set of educational questions through the instructions of a large language model;
[0012] Extract the topic entities and combine the questions to obtain complete and simplified questions;
[0013] Perform multi-hop answer reasoning to infer the answers to the reorganized questions.
[0014] Preferably, unifying the language styles in the educational knowledge graph through the instructions of a large language model includes:
[0015] Input the first set of educational questions and instructions into a large language model for standard style conversion, and the standard style conversion includes unifying the language style and retaining the intention to obtain a second set of questions.
[0016] Preferably, the unifying of the language style includes: using sentence structures with a length less than a preset value; replacing dialects, slang, buzzwords or modifiers; and referring to standard language expression norms.
[0017] Preferably, the retention intention includes:
[0018] Maintain the core concepts of the problem, the focus of the inquiry, and the accuracy of any key information;
[0019] Compare the questions before and after the conversion to check whether the same information or concepts are being asked and ensure that no new meanings or ambiguities are introduced;
[0020] If you discover that the intent has changed, re-adjust the question formulation until the original intent is accurately preserved.
[0021] Preferably, the unification of cognitive representations comprises:
[0022] Unify expressions for the second set of problems;
[0023] Extract relations from the educational knowledge graph and guide the large language model to pre-build single-hop and multi-hop cognitive expression core templates based on the initial question template;
[0024] The large language model is used to select cognitive expression templates from single-hop and multi-hop cognitive expression core templates to unify the expression of questions. At the same time, the information of the number of question hops and the type of initial question template is retained to facilitate answer reasoning.
[0025] Preferably, unifying the expressions of the second question set specifically includes:
[0026] Relationships are extracted from the second question set to create single-hop and multi-hop cognitive expression core templates, and the templates are connected to the second question set to form prompts that are input into the large language model. The large language model selects a template from the single-hop and multi-hop cognitive expression core templates for each question, and converts it into the third question set based on the template, thereby unifying the expression of the questions.
[0027] Preferably, the single-hop and multi-hop cognitive expression core templates are used as an external knowledge base, and the single-hop and multi-hop cognitive expression core templates related to the question are extracted to form prompts input into the large language model together with the question.
[0028] Preferably, the single-hop and multi-hop cognitive expression core templates are used as an external knowledge base, and the single-hop and multi-hop cognitive expression core templates related to the question are extracted to form prompts input into the large language model together with the question, including: converting the template in each single-hop and multi-hop cognitive expression core template and each question in the second question set into an embedded template vector and an embedded question vector through an embedding model and a projection matrix;
[0029] The embedding model and projection matrix are used as learnable parameters to construct a retriever.
[0030] Preferably, an initial question template classifier is trained to identify the initial question template to which each question in the second question set belongs, and a cognitive expression core template corresponding to the initial question template is obtained, and the cognitive expression core template is used for retrieval, thereby reducing the number of templates to be retrieved;
[0031] Calculate the dot product similarity between the core cognitive expression template and each question in the second question set; input the top K cognitive expression templates with the highest dot product similarity to each question in the second question set as candidate templates into the large language model;
[0032] The large language model selects a template from the candidate templates for each question in the second question set, connects it with the question hop number and the type information of the initial question template, and then outputs it to obtain the third question set.
[0033] Preferably, the subject body extraction includes:
[0034] Use the education named entity extraction model to extract subject entities from the first education question set to obtain a subject entity set;
[0035] Align the subject entity set with the entity set in the education knowledge graph; use the embedding model to encode the subject entities in the subject entity set and the subject entities in the entity set in the education knowledge graph respectively, and calculate the dot product similarity;
[0036] Take the subject entity of the entity set in the education knowledge graph that has the highest similarity with the subject entity in the subject entity set to obtain the aligned subject entity set;
[0037] The question combination includes: using a matching function to correspond each subject entity in the aligned subject entity set to each template question in the second question set one by one, so as to obtain a reorganized question set.
[0038] Preferably, performing answer reasoning includes:
[0039] Set the score of the starting topic entity of the reorganized question set to 1, and the scores of other entities to 0, to obtain the starting row vector;
[0040] Calculate the row vectors of other jumps. The row vector of each jump is obtained by multiplying the row vector of the previous jump and the relationship score of the jump.
[0041] Traversal Jump, the answer is the entity with the highest score among all row vectors;
[0042] Divide the data set into several parts according to the initial question template type, and use the data set that belongs to the initial question template The dataset is used to train a specific machine learning model TransferNet, and the question is given to the specific TransferNet to reason about the answer.
[0043] Preferably, the relationship score is obtained by calculating a part of the jump attention problem, specifically including:
[0044] For the questions in the restructured question set, compute their embeddings and the hidden vectors for each word:
[0045] Pass the embedding through a linear mapping layer to get the skip query key:
[0046] The skip query key is used as the attention key and the hidden vector of each word to calculate the attention score, and the weighted sum of the probability distribution and the hidden vector is obtained in turn;
[0047] Represent relations in the educational knowledge graph with a set of predicates, and use a multi-layer perceptron to compute the predicate distribution from the weighted sum of hidden vectors;
[0048] The predicate distributions of the relation sets of all relations between each pair of entities are accumulated to obtain the relation score.
[0049] The method for retrieving answers to questions from an educational knowledge graph disclosed in the second aspect of the present application combines cognitive representation, language style and educational knowledge graph to construct a first set of educational questions, and the steps are as follows:
[0050] S61. Collect real problems in educational scenarios;
[0051] S62. To ensure the correct format of the questions, filter out inappropriate samples;
[0052] S63. Notes on question types;
[0053] S64.Construction problem;
[0054] S65. Cognitive expression questions include at least one of alternative solutions, concept exploration, example explanation, comparative analysis, scenario-based causal discussion, process guidance, assertion evaluation, and requirements / instructions; then, based on the definition of cognitive expression categories, sample questions of each core template and its domain expertise, each core template is expanded into several cognitive extension templates; finally, several cognitive expression templates are constructed;
[0055] S66. Classify language styles into buzzwords and non-buzzwords; based on the constructed corpus, use the language generation module to randomly transform the input template questions into expressions containing different buzzword combinations according to the statistical characteristics and grammatical habits of the relevant corpus;
[0056] S67. Question filtering and splitting: Partition the knowledge forest into training / development / test sets with no entity overlap, and then execute the question generation protocol on each split educational knowledge graph.
[0057] Preferably, the constructing of the question comprises: selecting a number of relations from the knowledge forest, gradually constructing a template, and generating a question based on an original data set in the educational knowledge graph, wherein the relation comprises at least one of "attribution", "learning dependency", "inclusion", "upper and lower", "facet-static knowledge fragment" and "facet-dynamic knowledge fragment";
[0058] Building multiple templates based on the above relationships and their combinations;
[0059] Expand the core template. In the core template, we first modify the original data set to obtain multiple cognitive expression extension templates. Then, these question templates are further extended through a language style generation module.
[0060] The final extended templates are obtained, each of which has a corresponding execution process, which the educational knowledge graph executes to extract all possible answers for the template; then, these templates are instantiated by filling in entities and their aliases from the knowledge forest to generate multiple unique question-answer pairs.
[0061] The beneficial effects of this application are as follows:
[0062] This application has improvements in multi-hop, educational cognitive expression, and different types of language styles. It can be applied to different models of educational cognitive expression problems and has high versatility.
[0063] The educational cognitive expression question answering method supported by a large language model in this application adopts a template-based question generation method, which automatically constructs questions based on established templates and can address the differences in multi-hop reasoning, cognitive expression, and language style of different types of learners.
[0064] The question-answering dataset constructed in this application is large in scale and has rich cognitive expression types and language style types. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 Examples of answers to educational questions;
[0066] Figure 2 The learner cognitive expression model framework based on the large language model of this application;
[0067] Figure 3 The method processing flow of this application;
[0068] Figure 4 The framework of the Chinese dataset for this application;
[0069] Figure 5 Schematic diagram of the expansion from cognitive expression template to the final expansion template. DETAILED DESCRIPTION
[0070] The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention belong to the protection scope of the present invention.
[0071] Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0072] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
[0073] The technical solutions provided in the embodiments of the present application involve technologies such as machine learning and natural language processing of artificial intelligence, which are specifically introduced and explained through the following embodiments.
[0074] refer to Figure 2 and Figure 3 The overall framework and processing flow of the model shown. First, the precise semantics of complex questions are captured through a unified module of cognitive expression and language style, thereby obtaining simplified and templated questions. Since the questions provided in the traditional EKGQA dataset are mostly rigid, such as "What is the concept of post-assignment correction", it is easy for traditional models to obtain semantic information for reasoning. However, due to differences in personal experience and cognitive levels among learners, real-world problems often show a complex mixture of cognitive expression and language style. This leads to greater interference with the true semantics of the question, making it difficult for the model to accurately obtain semantic information. In order to solve this problem and obtain accurate question semantics, this application obtains an initial educational question set , that is, the set of questions, The cognitive representation, language style and educational knowledge graph are combined to obtain a new educational knowledge graph; the language style and cognitive representation in the knowledge graph are unified through the instructions of the large language model; the subject matter is extracted and the questions are combined to obtain complete and simplified questions; multi-hop answer reasoning is performed to infer the answers to the reorganized questions.
[0075] In one embodiment, EKG features are used to perform cognitive expression and language style unification, question reorganization, and multi-hop answer reasoning on EKG. EKG is an educational knowledge graph, specifically EKG = (E, R), and the entity representation in the educational knowledge graph is , the relationship between entities is represented as . use Indicates the number of entities, is a A matrix whose elements Represents the head entity To the end entity . Multi-hop problem Start with the subject entity Traverse the relationship to reach the answer entity , |Y| represents the total number of entities, Representing the multi-hop problem From the subject entity Start the first traversal of the relationship, Indicates the first entity traversed.
[0076] In one embodiment, the present application unifies the style by the following method:
[0077] Since most of the questions provided in the traditional EKGQA dataset are rigid, such as "What is the concept of post-modification of an assignment", it is easy for traditional models to obtain semantic information for reasoning. However, due to differences in personal experience and cognitive levels among learners, real-world problems often exhibit a complex mixture of cognitive expressions and language styles. This leads to greater interference with the true semantics of the question, making it difficult for the model to accurately obtain semantic information. In order to solve this problem and obtain accurate question semantics, this application first proposes a cognitive expression and language style unification module to parse and unify the cognitive expression and language style information in the question. Through two operations: unification of style and unification of cognitive expressions, it aims to simplify problems in complex environments to obtain accurate question semantic information.
[0078] In view of the zero-sample generalization ability of the large language model LLM, instructions are used to guide LLM to identify, analyze, and unify the complex language style of the questions. At the same time, in order to solve the problem of knowledge limitations of the large model, a search engine interface is provided, and LLM decides whether to use the search engine to retrieve unclear language elements in the questions (such as professional terms, unrecorded dialects, buzzwords, etc.). The instructions are input into LLM, and the output result is recorded as , which contains the result of unifying the language style for each question. Here the instructions are recorded as , the search engine is denoted as ,from arrive The process is recorded as:
[0079] ;
[0080] get .
[0081] In one embodiment, the prompt instructions of the style unification module of this application are as follows:
[0082] "Please follow the steps below for each question in your input question set.
[0083] 1. Understanding and analysis:
[0084] 1. Read the question carefully: determine its topic, content, and focus of inquiry. For complex questions, try to break them down into multiple small questions or sub-questions;
[0085] 2. Use external tools: You can use [Search Engine] in the tool list to search for background information related to the problem, unclear word meanings, etc. Construct specific and targeted search queries and browse relevant results to obtain the required information. Use the searched information to assist in understanding the background of the problem, confirm the meaning of key terms, and obtain relevant expertise or data. Pay attention to evaluating the accuracy and reliability of search results;
[0086] 3. Mark key information: Mark the key information points, core concepts, and any special terms or expressions that may affect understanding. For unfamiliar terms or concepts, use [Search Engine] to obtain accurate explanations.
[0087] 2. Unified language style:
[0088] 1. Adjust the language style: Adjust the language style of the question to a clear, concise and professional expression. Avoid using long and complex sentence structures;
[0089] 2. Replace non-standard terms: Replace any non-standard terms, dialects, slang, buzzwords or unnecessary modifiers. For example, "What is..." is replaced with "What is...", "How to deal with" is replaced with "How to deal with", etc. For professional terms, please provide a brief explanation or example;
[0090] 3. Reference standard specifications: Refer to the standard language expression specifications to ensure that the language of the output questions is both standardized and easy to understand. Pay attention to maintaining the integrity of the sentence structure and the correctness of the grammar.
[0091] 3. Retention Intention:
[0092] 1. Do not change the core intention: When changing the language style, pay attention to maintaining the core concept of the question, the focus of the inquiry, and the accuracy of any key information. For statements that may cause ambiguity, use clearer and more specific language to replace or explain;
[0093] 2. Comparison check: Compare the questions before and after the transformation to check whether the same information or concepts are still asked. Make sure no new meaning or ambiguity is introduced. If necessary, readjust the question statement;
[0094] 3. Re-adjust: If you find that the intent has changed, re-adjust the question until the original intent is accurately preserved. For complex questions, make sure the intent of each small question or sub-question is accurately preserved.
[0095] 4. Generate output:
[0096] 1. Generate new questions: Based on the above analysis and transformation, generate new questions with consistent language style and accurate intention. Ensure that the logic between the various parts of the question is clear and coherent, and avoid jumps or breaks. For complex questions, ensure that each small question or sub-question is arranged in a logical order and the relationship between them is clear;
[0097] 2. Ensure quality: Ensure that the output questions not only conform to the standard language expression, but also clearly convey the core intention of the original question. For uncertain questions, you can use [Search Engine] for further verification and confirmation. Ensure the accuracy and reliability of the output questions;
[0098] ### Input question set:
[0099] [{…,…,……,…}]
[0100] ###Tool list and description
[0101] [Search Engine]: You can search for external knowledge on the Internet. When using it, please enter keywords related to the question to search, and browse the relevant results to obtain the required information. ”
[0102] In one embodiment, In particular, we first extracted relations from EKG to guide LLM to pre-construct single-hop and multi-hop cognitive expression core templates based on 16 initial question templates. . Then use LLM again from The most appropriate cognitive expression template is selected to unify the expression of the question, while retaining the information of the number of question jumps and the type of initial question template to facilitate answer reasoning. It is worth noting that The scale is huge. In order to improve the utilization rate of tokens, this application will As an external knowledge base, extract a small amount of problem-related , and the question form the prompts input into the LLM. Specifically, each template is first and Problems By embedding the model and the projection matrix , Convert to embedding vector and :
[0103] ;
[0104] ;
[0105] in and the projection matrix , As a learnable parameter , forming a retriever , which can be pre-trained with the EDUCEQ dataset or trained simultaneously with the entire architecture. This application also uses the EDUCEQ dataset to train an initial question template classifier (Initial question template classifier) to enable accurate identification The initial question template belongs to, thus greatly reducing the number of templates to be retrieved:
[0106] ;
[0107] In the above formula Representation problem The initial question template for Representation and The core templates of cognitive expressions belonging to the same initial question template are then calculated and The dot product similarity :
[0108] ;
[0109] and The top K cognitive expression templates with the highest dot product similarity Will be entered into LLM as an alternative template:
[0110] ;
[0111] in represents the LLM for unifying the cognitive representation of the problem, Represents the initial question template The above formula indicates that LLM is the number of hops for each problem. from Select the most suitable template, connect it with the number of problem hops and the type of initial problem template, and then output it.
[0112] , thereby unifying the expression of the problem.
[0113] In one embodiment, examples of single-hop and multi-hop templates (Tpl) are as follows:
[0114] ###Single-hop template example:
[0115] about What are some practical use cases?
[0116] What are the practical use cases for ?
[0117] ####This example is constructed from the initial question template: facet-dynamic knowledge fragment ,The “actual use case” is the relations extracted from the EKG.
[0118] ###Multi-hop template example:
[0119] Can you explain the What does the classic concept of a domain usually include?
[0120] Can you explain what the classical concepts belonging to the field of usuallycontain?
[0121] ####This example is constructed from the initial question template: belongs to contains , belongs to the 2-hop template, and the “classical concept” is the relationship extracted from EKG.
[0122] In one embodiment, the present application performs subject extraction and question combination to obtain complete and concise questions. The core template of the subject entity is missing, so subject body extraction and question combination are needed to obtain complete and concise questions.
[0123] First, extract the subject entities of the original question set. Specifically, use the education named entity extraction model From the original problem set Extract the subject entity to get the subject entity set:
[0124] ;
[0125] Afterwards, Entity sets in knowledge graphs Specifically, the embedding model is used to align and Encode and calculate the dot product similarity separately:
[0126] ;
[0127] Take and The most similar , get the aligned subject entity set:
[0128] ;
[0129] In one embodiment, the subject entities of the original question set are extracted using a rule-based entity extraction method, which mainly relies on manually written rules to identify entities in the text. These rules may include part-of-speech tags, grammatical patterns, keyword lists, etc. Exemplarily, telephone numbers, email addresses are matched by regular expressions, or noun phrases are identified as potential entities by part-of-speech tag patterns.
[0130] In addition to rules, rule-based entity extraction methods also use dictionaries (or entity lists) for entity matching. These dictionaries contain a large number of names of specific types of entities, such as names of people, places, and institutions. Through dictionary matching, the system can identify known entities that appear in the text. In this embodiment, rules and dictionaries are integrated into a processing flow to identify and extract entities in the text. This process may include steps such as text preprocessing, part-of-speech tagging, and syntactic analysis to assist rule matching and entity recognition.
[0131] In one embodiment, the subject entities of the original question set are extracted using a statistical entity extraction method, which identifies entities in the text by learning the features of the entities from labeled training data. Such methods include hidden Markov models (HMM), maximum entropy models, support vector machines (SVM), and conditional random fields (CRF). These methods can automatically learn rules from data and reduce reliance on artificial rules.
[0132] In one embodiment, the subject entities of the original question set are extracted based on deep learning entity extraction methods, including but not limited to deep neural networks such as convolutional neural networks (CNN), recurrent neural networks (RNN), long short-term memory networks (LSTM) and Transformer, and pre-trained models are applied to the entity extraction task. These models can capture deep semantic relationships and complex contextual information in the text, significantly improving the performance of entity extraction. Pre-trained models include but are not limited to BERT and GPT, which effectively capture rich language features and improve the accuracy and efficiency of entity extraction by pre-training on a large-scale text corpus.
[0133] Next, this application will and Combine them to get the reorganized :
[0134] ;
[0135] Where Mat is the matching function that will Each subject entity and Each template problem One-to-one correspondence, thus obtaining a complete problem. The reorganized problem It has accurate semantics, unified problem expression and language style, which facilitates model understanding and reasoning.
[0136] In one embodiment, the method for combining problems adopts a brute force enumeration method, that is, traversing each entity and enumerating the combinations one by one.
[0137] In one embodiment, the method for combining questions adopts a semantic decomposition and recombination method, and the method includes:
[0138] Semantic unit recognition and segmentation stage:
[0139] First, the system needs to understand and split the input question text. This step uses BERT or RoBERTa as the basic model to understand the meaning of the text, and then uses the BiLSTM-CRF model to perform sequence labeling to identify the various semantic units in the question. For example, for a question like "Who invented the light bulb and in which year did he get the patent?", the system splits it into independent semantic units "Who invented the light bulb" and "In which year did he get the patent?"
[0140] Semantic dependency analysis phase:
[0141] Next, the system analyzes the relationship between these semantic units. Through the Transformer-based dependency analyzer, a semantic dependency tree of the problem can be constructed to clarify the hierarchy and association between the various parts. This process includes determining grammatical structures such as subject-predicate relationships and modification relationships, which helps with subsequent precise reorganization.
[0142] Semantic Reorganization Phase:
[0143] Finally, based on the previous analysis results, the system uses the Seq2Seq model with the attention mechanism to reassemble the questions. This process takes into account semantic integrity to ensure that the reassembled questions not only maintain the original meaning but also conform to the expected form. The system will optimize the reorganization results to ensure that the generated questions are natural and fluent.
[0144] In one embodiment, the method for combining problems adopts a path combination method based on a knowledge graph, and the method includes the following stages:
[0145] Entity recognition and linking phase:
[0146] The system first identifies key entities and concepts from the question. It uses BERT with the BiLSTM-CRF model for named entity recognition, and then associates these entities with nodes in the knowledge graph through ELMo or ERNIE. This process ensures that we can accurately understand the specific objects involved in the question.
[0147] Path search phase:
[0148] After identifying the entities, the system searches for possible connection paths in the knowledge graph. Through bidirectional breadth-first search or A* algorithm, all possible relationship paths between entities are found. The system evaluates the rationality and importance of each path and selects the most relevant path for subsequent processing.
[0149] Problem generation phase:
[0150] Based on the selected knowledge graph path, the system uses the GPT or T5 model to generate corresponding sub-questions for each key node on the path. These generated questions will be optimized to ensure logical coherence and expression accuracy. Finally, these sub-questions are combined into a complete question sequence.
[0151] In one embodiment, the method for combining questions adopts a template combination method based on a question-answering model, and the method includes the following stages:
[0152] Problem type identification stage:
[0153] The system first understands the type and purpose of the question. Through the TextCNN or BERT classifier, it analyzes the basic types of questions, such as reasoning, fact, comparison, etc. This process also includes determining the complexity of the question and the type of answer required.
[0154] Template matching stage:
[0155] Based on the identified question type, the system searches for the most appropriate question template in the preset template library. The most matching template is selected by calculating the semantic similarity between the question and the template. This process needs to take into account the context to ensure that the selected template is consistent with the question intent.
[0156] Slot filling phase:
[0157] After selecting a template, the system uses the conditional random field model and pointer network to extract key information from the original question and fill it into the corresponding position of the template. This process ensures the accuracy of the filling and the coherence of the semantics, generating natural and fluent questions.
[0158] In one embodiment, the method for combining problems adopts a generative combination method based on deep learning, and the method includes the following stages:
[0159] The problem represents the learning phase:
[0160] First, the system uses BERT or RoBERTa to encode the input question and convert the text into a vector representation that the deep learning model can understand. This process fully captures the semantic information and intrinsic characteristics of the question.
[0161] Feature extraction stage:
[0162] Through the multi-head attention mechanism, the system weights the importance of different parts of the question and extracts key features. This process takes into account the relationship between words and contextual information to ensure that important information is not lost.
[0163] Sequence generation phase:
[0164] Based on the extracted features, a new question sequence is generated using the Transformer decoder. Multiple candidate questions are generated through a beam search strategy, and the optimal combination result is selected from them. The whole process focuses on the coherence and completeness of the questions.
[0165] In one embodiment, the method for combining problems adopts a rule-based hierarchical combination method, which includes the following stages:
[0166] Rule base construction phase:
[0167] Build a complete rule knowledge base, including combination rules and transformation rules for various types of questions. These rules are organized through decision trees or rule engines to facilitate fast retrieval and matching. The rule base is regularly updated and maintained to adapt to new types of questions.
[0168] Rule matching phase:
[0169] When a new question is received, the problem features are analyzed through regular expressions and decision trees to find applicable rules. This process takes into account the priority and applicable conditions of the rules to ensure that the most appropriate rule is selected for processing.
[0170] Recursive combination phase:
[0171] The system recursively processes the problem according to the matched rules. Dynamic programming is used to optimize the combination process to ensure that the generated problem meets the rule requirements and maintains semantic integrity. This process may require multiple iterations to obtain the final result.
[0172] In one embodiment, the method for combining questions adopts a dynamic combination method based on intention, and the method includes the following stages:
[0173] Intent recognition stage:
[0174] First, BERT is used in conjunction with the intent classifier to understand the underlying intent of the question. This process not only identifies the surface purpose of the inquiry, but also understands the underlying information needs. Through the attention mechanism, key information is captured to improve the accuracy of intent recognition.
[0175] Strategy selection phase:
[0176] Based on the identified intent, a reinforcement learning model (such as DQN or Policy Gradient) is used to select the most suitable combination of strategies. This process takes into account historical successful experiences and dynamically adjusts the weights of strategy selection.
[0177] Dynamic combination stage:
[0178] Based on the selected strategy, the Seq2Seq model is used to generate new questions. This process is dynamic and the generation strategy will be continuously adjusted based on the intermediate results to ensure the quality of the final questions. The attention mechanism ensures that the generated questions are more accurate and reasonable.
[0179] In one embodiment, the method for combining questions adopts an iterative combination method based on user interaction, and the method includes the following stages:
[0180] Initial combination stage
[0181] Use T5 or GPT model to generate initial question combinations. This stage focuses on generating diverse candidate questions to provide a basis for subsequent optimization. The initially generated questions consider basic grammatical rules and semantic completeness.
[0182] User feedback processing stage:
[0183] Collect and analyze user feedback on generated questions. Use the BERT model to understand the specific content of user feedback and use active learning to continuously improve the question generation strategy. This process requires special attention to changes in user preferences and specific needs.
[0184] Combination optimization stage:
[0185] Based on user feedback, we use genetic algorithms and reinforcement learning to continuously optimize the problem set. This process is iterative, and each optimization takes into account new feedback information until the expected quality standard is reached. The system dynamically adjusts the optimization strategy to ensure continuous improvement in the quality of the problems.
[0186] In one embodiment, the present application performs answer reasoning: from the restructured question Starting from the subject entity, for each question Traversal Jump.
[0187] First, let Represents the number of entities. LLM-CEQA sets the score of the starting topic entity to 1 and the scores of other entities to 0, expressed as a row vector . No. Jump corresponding row vector Given by:
[0188] ;
[0189] in is the relationship score of the jump, which is obtained by calculating a part of the question that the jump focuses on: First, for a question , calculate its embedding and the hidden vector for each word :
[0190] ;
[0191] in is a learnable parameter. Then, Through a linear mapping layer , get the jump query key :
[0192] ;
[0193] in is a learnable parameter. As the attention key and the hidden vector of each word Calculate the attention scores and get and , Contains some information about the issue being addressed. The weighted sum of express · The probability distribution of is:
[0194] ;
[0195] ;
[0196] Contains information about a part of the issue that this jump is concerned about. There is no ambiguity in the expression of relations, and a fixed set of predicates can be used Represents the relationship in the knowledge graph, from Computing predicate distributions :
[0197] ;
[0198] in (multi-layer perceptron) represents a multi-layer perceptron. Let the relationship set between a pair of entities be , is the corresponding maximum number of relationships between the pair of entities.
[0199] Distribute the predicates of the relationship set of all relationships between the pair of entities Add them up to get the relationship score, which is calculated by the following formula:
[0200] ;
[0201] According to formula (10), from the reorganization problem Starting from the subject entity and traversing After the jump, the answer is The entity with the highest score.
[0202] In one embodiment, the present application performs answer reasoning using a method based on a semantic matching method, calculates the semantic match between the distributed representations of the question and the candidate answers, and obtains the final answer by sorting the candidate answers, specifically including: using embeddings to represent the question and knowledge graph triples, using a neural network model to learn the distributed representation of the answer path, background information, and answer type, learning the global information of the knowledge graph through an attention mechanism, using complex vector space embedding for link prediction, and using a Teacher-Student framework to generate intermediate supervision signals.
[0203] In one embodiment, the present application uses a graph neural network method to perform answer reasoning, and performs reasoning by transferring and aggregating information through a graph structure. The steps include: using a graph convolutional network to aggregate entity neighbor information; combining a multi-relational graph neural network with an attention mechanism; combining a pre-trained language model with a graph neural network; and integrating a text corpus and a knowledge graph to construct a question subgraph.
[0204] In one embodiment, the present application uses a memory network method to perform answer reasoning, using an external memory module to store and update information. The steps include: using key-value pairs to store memory information; completing reasoning by iteratively updating memory slots; using a dynamic memory network to focus on the input and results of previous iterations; and combining an attention mechanism to capture the relevance of questions and knowledge graph information.
[0205] In one embodiment, the application uses a reinforcement learning method to perform answer reasoning, transforms path search into a reinforcement learning process, and guides path selection through a reward mechanism. The steps include: using a Markov decision process to model the interactive environment; using a policy network to select relationship links to expand the reasoning path; combining Monte Carlo tree search to overcome the sparse reward problem; and using soft rewards and dropout technology to optimize the training process.
[0206] In one embodiment, the present application uses a query graph method for answer reasoning, uses a graph structure to represent questions, and expands subgraphs around subject entities. The steps include: generating query graphs in stages; using deep neural networks to evaluate relationship paths; combining multiple constraints to handle complex problems; and enhancing entity linking and relationship detection through residual learning.
[0207] In one embodiment, the present application uses a probabilistic logic method to perform answer reasoning, combining first-order logic and probability models to handle uncertainty. The steps include: using a Markov logic network; optimizing joint distribution in combination with a graph attention network; and optimizing through a variational EM algorithm.
[0208] In one embodiment, the present application uses a combination of logic rules and knowledge embedding to perform answer reasoning, converting logical operations into geometric operations in vector space. The steps include: representing the query as a computational graph; using boxes or probability distributions to represent the query; defining geometric operations to implement logical operations; and predicting the answer through vector distance calculation.
[0209] Multiple TransferNet enhancement method. Since there are 16 types of initial question templates, one idea to enhance LLM-CEQA is to divide the dataset into 16 parts according to the type of initial question template, and use them to train 16 TransferNets respectively, so that each model is specialized. Specifically, for the question , the answer reasoning process can be expressed as:
[0210] ;
[0211] in Indicates the answer, Indicates the use of the initial question template The above formula represents the use of the initial problem template type ,Will The answer is inferred by a specific TransferNet to improve performance.
[0212] In one embodiment, reference Figure 4 ,This application constructs the dataset through the following methods:
[0213] 1. Collect real questions from learners in educational scenarios, including collecting and cleaning original questions from iLearning, Bilibili, i-Course, and Baidu Iron Abacus. Two popular research areas were selected on each platform: artificial intelligence and data structure. The original questions were extracted from the comments and Q&A sections of these platforms;
[0214] 2. Preprocessing: To ensure that the question format is correct, this application filters out inappropriate samples. For example, duplicate questions are removed to improve data quality. In the end, this application retains 19,988 questions from i-Learning, 4,224 questions from Bilibili, 8,312 questions from i-Course, and 6,617 questions from Baidu;
[0215] 3. Question type annotation. After finalizing the annotation guidelines, randomly select The questions were collected from the preprocessed data of i-Learning, Bilibili, i-Course, and Baidu and annotated. After removing samples that did not reach a consensus, the final data set included 3,972 questions. The sample size is 3972. Concept exploration questions are the most common, accounting for 18.8% of the total sample size. of samples, and only It is a request / instructive question. Krippendorff's of all samples The value is 0.71, which shows a reasonable level of consistency.
[0216] For samples with inconsistent labels, we checked whether we could reach agreement by considering both annotation types at the same time. For example, if annotator A annotated a question as “alternative choice” and “illustrate”, and annotator B annotated it as “illustrate”, the agreed type would be “illustrate”. Then, we filtered out low-quality questions from the five data sources.
[0217] Table 1: Rules for filtering out low-quality questions from five data sources:
[0218]
[0219] 4. Problem construction:
[0220] According to MULTITQ and MOOCQA, the 6 most common relations are selected from the knowledge forest, and the template is gradually constructed based on the dataset. Generate questions. The six common relationships are "belonging", "learning dependency", "inclusion", "upper and lower", "facet-static knowledge fragment", and "facet-dynamic knowledge fragment".
[0221] Table 2 Rules for filtering out low-quality questions from five data sources: “belonging”, “learning dependency”, “inclusion”, “upper and lower”, “facet-static knowledge fragment” and “facet-dynamic knowledge fragment”;
[0222] ;
[0223] First, 64 unique core templates are constructed based on the above 6 relations and their combinations. Obviously, these core templates contain one-hop and multi-hop issues. Taking the single relation "belonging" as an example, several core templates are constructed based on human expertise, such as "what knowledge field does the topic {head} belong to".
[0224] Next, we will expand the core template step by step. In the core template, we first After modification, 5120 cognitive expression extension templates were obtained. Subsequently, these question templates were further extended through a language style generation module. These operations enriched and diversified the semantics and application scenarios of the templates.
[0225] Finally, 10.2k final expanded templates were obtained. Each template has a corresponding execution process that EKGs can execute to extract all possible answers for that template. These templates are then instantiated by populating entities and their aliases from the knowledge forest, generating 236.3k unique question-answer (QA) pairs.
[0226] 5. Learners’ cognitive expression problems. Learners show cognitive differences, which naturally lead to different language expressions, a feature that has been ignored by previous models. The motivation for introducing learners’ cognitive expression problems is to attract people’s analysis of these problems, which reflects the learners’ cognitive state.
[0227] According to the real-world needs and annotation scenarios, learners’ cognitive expression problems are divided into 8 types, as shown in Table 3. For each core template, from the dataset 80 questions (10 of each type) were randomly selected as examples. Then, each core template was modified into 80 cognitive extension templates based on the definition of cognitive expression categories, sample questions of each core template, and its domain expertise. Finally, 5120 cognitive expression templates were constructed, which effectively increased the diversity and complexity of the questions.
[0228] Table 3 Types of learners’ cognitive expression problems, which are classified according to learners’ cognitive expression level (from low to high):
[0229] ;
[0230] 6. Learner language style. Learners’ language styles are also diverse, which is a feature that the previous EKGQA model has ignored. The motivation for introducing learner language style questions is to arouse people’s understanding of such questions that reflect learners’ language styles. Here, we simply divide language styles into buzzwords and non-buzzwords.
[0231] Buzzwords are language phenomena that appear in a specific period due to changes in the social language environment, and often appear in different language styles of Chinese. In order to generate questions that reflect information about different language styles, we collected a corpus of Chinese buzzwords that are commonly used in recent years, mainly including popular words, phrases, and short expressions. This application matches these words with the questions in the dataset. And remove the unmatched buzzwords from the dictionary. Based on the constructed corpus, this application designs a language generation module, which can randomly convert the input template question into an expression containing different buzzword combinations according to the statistical characteristics and grammatical habits of the relevant corpus. This effectively increases the diversity of the question text and makes it closer to the real language environment.
[0232] refer to Figure 5, learners’ language style generation, and extended cognitive expression (dialect) generation. Figure 5 The upper and lower parts of the figure show the schematic diagrams of EDUCEQ-V1 and EDUCEQ-V2 from the cognitive expression expansion template to the final expansion template.
[0233] The extended learner cognitive expressions generated when constructing the EDUCEQ-V2. The language is divided into the following 10 types according to the frequency of use:
[0234] Standard language: a language that uses Mandarin as the standard pronunciation and modern vernacular Chinese as the grammatical norm;
[0235] Dialects include: Mandarin dialect, Jin dialect, Wu dialect, Min dialect, Hakka dialect, Cantonese dialect, Xiang dialect, Gan dialect, Huizhou dialect;
[0236] 7. Question filtering and splitting. Follow the MULTITQ principle to ensure that there is no entity overlap between training questions and test questions. This strategy ensures that the model performs cognitive understanding and reasoning rather than guessing based on the entities seen during training. Specifically, this application divides the knowledge forest into training / development / test sets with no entity overlap, and then executes the question generation protocol on each split EKG.
[0237] Automatically generating questions through templates may result in some low-quality questions, such as meaningless questions. In order to reduce these drawbacks, this application removes all meaningless questions to make the dataset more challenging.
[0238] Finally, we get a training / validation / test split of about 8:1:1, with V1 having The statistics of the dataset are shown in Table 3. Each example contains a natural language educational question and a set of golden answers (i.e., entities).
[0239] Overall, EDUCEQ-V1 contains 236.3k questions from the knowledge forest. The core statistics for each split are listed in Table 4.
[0240] Table 4: Core statistics for each split in EDUCEQ-V1:
[0241] ;
[0242] This application experimentally evaluates the method of this application through 6 baselines. They are 1) KVMemNN: an algorithm that uses key-value memory to store knowledge and perform multi-hop reasoning; 2) EmbedKBQA: an algorithm that integrates embedding and link prediction tasks; 3) TransferNet: an efficient and transparent QA model; 4) Zero-Shot LLM: a method that uses a sample-free large language model (ChatGPT is used here) to directly answer these questions; 5) Few-ShotLLM: 6) KG-RAG: a retrieval enhancement method, this application extracts EKG-related entities and relations that appear in the question and inputs them into the large model as a hint, as a retrieval enhancement method compared with other methods.
[0243] Table 5 shows the comparison results of our method with other baseline methods. First, by comparing KG-RAG with Zero-Shot LLM and Few-Shot LLM, it can be found that retrieving KG related subgraphs as input to KG-RAG can significantly improve the reasoning ability of the model, even without any unification and reorganization of educational questions. This is because the EKG specific subgraph information helps the model focus on these entities.
[0244] Secondly, by comparing the effects of TransferNet with other non-large language models, we can also see that although TransferNet does not perform additional educational cognitive expression problem understanding, it also significantly improves the model's reasoning ability by gradually focusing on different parts of the problem to calculate relationship and entity probabilities.
[0245] Then, by further comparing the effects of TransferNet with other large language models, it can be found that the gap between the large language model and TransferNet is the largest on the multi-hop problem. This is because the large language model may have seen similar data during the full parameter training of the model, while TransferNet has a relatively small number of parameters.
[0246] Through the overall results of the experiment, it can be found that LLM-CEQA performs significantly better than the optimal baseline in most tasks, indicating that the unification of cognitive expression and language style and question restructuring are effective solutions to improve the overall performance of learners' cognitive expression EKGQA. As shown in Table 5, LLMCEQA performs better than TransferNet and KGRAG in terms of learners' cognitive expression and classification of different language styles.
[0247] Table 5 Comparison results:
[0248] ;
[0249] In order to verify the effectiveness of the model in educational cognitive expression reasoning, experiments were further conducted on educational cognitive expression problems.
[0250] First, by comparing the effects of using LLM-CEQA in different models for cognitive expression and language style unification and question reorganization, it can be seen that there are improvements in multi-jump, educational cognitive expression, and different types of language styles. Specifically, in the multi-jump model, more than It shows that LLM-CEQA can be applied to different models of educational cognitive expression problems and has high versatility.
[0251] In addition, this shows that LLMCEQA has significantly improved on educational cognitive expression questions. While demonstrating the effectiveness of LLM-CEQA, it also highlights the shortcomings of previous models in terms of understanding and reasoning when answering educational cognitive expression questions.
[0252] Although EDUCEQ-V1 is templated and has limited semantics, a large-scale dataset can still effectively improve the model’s efficacy. For LLMCEQA, the size of the training dataset was increased from arrive The performance of the model on learners’ cognitive representations and language styles steadily improves as the training progresses. These results validate the hypothesis that large datasets, even synthetic ones, are useful for training learners’ cognitive representation problem-solving models in educational settings.
[0253] The beneficial effects of this application are as follows:
[0254] This application has improvements in multi-hop, educational cognitive expression, and different types of language styles. It can be applied to different models of educational cognitive expression problems and has high versatility.
[0255] The educational cognitive expression question answering method supported by a large language model in this application adopts a template-based question generation method, which automatically constructs questions based on established templates and can address the differences in multi-hop reasoning, cognitive expression, and language style of different types of learners.
[0256] The question-answering dataset constructed in this application is large in scale and has rich cognitive expression types and language style types.
[0257] As used herein, the word "preferred" is intended to be used as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as being more advantageous than other aspects or designs. On the contrary, the use of the word "preferred" is intended to present concepts in a specific way. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clear from the context, "X uses A or B" means any one of the naturally included permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.
[0258] Moreover, although the present disclosure has been shown and described with respect to one or implementations, those skilled in the art will think of equivalent variations and modifications based on the reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations, and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (such as it is functionally equivalent), even if the structure is not equivalent to the disclosed structure of the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that may be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".
[0259] The functional units in the embodiments of the present invention may be integrated into a processing module, or each unit may exist physically separately, or multiple or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc. The above-mentioned devices or systems may execute the storage method in the corresponding method embodiment.
[0260] To sum up, the above embodiment is an implementation mode of the present invention, but the implementation mode of the present invention is not limited by the embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for retrieving answers to questions from an educational knowledge graph, characterized in that: The following steps are involved: Obtain the first educational problem set, and analyze the cognitive representation and language style in the first educational problem set; The language style and cognitive representation of the first set of educational questions are unified through the instructions of the large language model; the language style unification includes: inputting the first set of educational questions and instructions into the large language model for standard style conversion, the standard style conversion includes unifying the language style and retaining the intention, and obtaining the second set of questions; the unified language style includes: using sentence structures with a length less than a preset value; replacing dialects, slang, buzzwords or modifiers; and referring to standard language expression specifications; the cognitive representation unification includes: unifying the expressions of the second set of questions; extracting relationships from the educational knowledge graph to guide the large language model to pre-construct single-hop and multi-hop cognitive expression core templates based on the initial question template; using the large language model to select cognitive expression templates from the single-hop and multi-hop cognitive expression core templates, unifying the expression of the questions, and retaining the information of the number of question jumps and the type of the initial question template to which they belong, so as to facilitate answer reasoning; Extract the main topic and combine the questions to obtain complete and simplified questions; Perform multi-hop answer reasoning to infer the answer to the restructured question.
2. The method for retrieving answers to questions from an educational knowledge graph according to claim 1, characterized in that: The reservation intentions include: Maintain the core concepts of the problem, the focus of the inquiry, and the accuracy of any key information; Compare the questions before and after the conversion to check whether the same information or concepts are being asked and ensure that no new meanings or ambiguities are introduced; If you discover that the intent has changed, re-adjust the question formulation until the original intent is accurately preserved.
3. The method for retrieving answers to questions from an educational knowledge graph according to claim 1, characterized in that: The expression unification of the second problem set specifically includes: Relationships are extracted from the second question set to create single-hop and multi-hop cognitive expression core templates, and the templates are connected to the second question set to form prompts that are input into the large language model. The large language model selects a template from the single-hop and multi-hop cognitive expression core templates for each question, and converts it into the third question set based on the template, thereby unifying the expression of the questions.
4. The method for retrieving answers to questions from an educational knowledge graph according to claim 3, characterized in that: The single-hop and multi-hop cognitive expression core templates are used as the external knowledge base, and the single-hop and multi-hop cognitive expression core templates related to the question are extracted to form prompts that are input into the large language model together with the question.
5. The method for retrieving answers to questions from an educational knowledge graph according to claim 4, characterized in that: The core templates of single-hop and multi-hop cognitive expressions are used as external knowledge bases to extract the core templates of single-hop and multi-hop cognitive expressions related to the question, and form prompts with the question to be input into the large language model, including: Convert each template in each single-hop and multi-hop cognitive expression core template and each question in the second question set into an embedded template vector and an embedded question vector through an embedding model and a projection matrix; The embedding model and projection matrix are used as learnable parameters to construct a retriever.
6. The method for retrieving answers to questions from an educational knowledge graph according to claim 5, characterized in that: Training the initial question template classifier to identify the initial question template to which each question in the second question set belongs, and obtaining the cognitive expression core template corresponding to the initial question template, and using the cognitive expression core template for retrieval, thereby reducing the number of templates to be retrieved; Calculate the dot product similarity between the cognitive expression core template and each question in the second question set; The top K cognitive expression templates with the highest dot product similarity to each question in the second question set will be input into the large language model as candidate templates; The large language model selects a template from the candidate templates for each question in the second question set, connects it with the question hop number and the type information of the initial question template, and then outputs it to obtain the third question set.
7. The method for retrieving answers to questions from an educational knowledge graph according to claim 1, characterized in that: Subject extraction includes: Use the education named entity extraction model to extract subject entities from the first education question set to obtain a subject entity set; Align the subject entity set with the entity set in the education knowledge graph; use the embedding model to encode the subject entities in the subject entity set and the subject entities in the entity set in the education knowledge graph respectively, and calculate the dot product similarity; Take the subject entity of the entity set in the education knowledge graph that has the highest similarity with the subject entity in the subject entity set to obtain the aligned subject entity set; The question combination includes: using a matching function to correspond each subject entity in the aligned subject entity set to each template question in the second question set one by one, so as to obtain a reorganized question set.
8. The method for retrieving answers to questions from an educational knowledge graph according to claim 1, characterized in that: Reasoning about the answer includes: Set the score of the starting topic entity of the reorganized question set to 1, and the scores of other entities to 0, to obtain the starting row vector; Calculate the row vectors of other jumps. The row vector of each jump is obtained by multiplying the row vector of the previous jump and the relationship score of the jump. Traversal Jump, the answer is the entity with the highest score among all row vectors; Divide the data set into several parts according to the initial question template type, and use the data set that belongs to the initial question template The dataset is used to train a specific machine learning model TransferNet, and the question is given to the specific TransferNet to reason about the answer.
9. The method for retrieving answers to questions from an educational knowledge graph according to claim 8, characterized in that: The relationship score is obtained by calculating a part of the jump attention problem, specifically including: For the questions in the restructured question set, compute their embeddings and the hidden vectors for each word: Pass the embedding through a linear mapping layer to get the skip query key: The skip query key is used as the attention key and the hidden vector of each word to calculate the attention score, and the probability distribution of the hidden vector corresponding to each word and the weighted sum of the hidden vector are obtained in turn; Represent relations in the educational knowledge graph with a set of predicates, and use a multi-layer perceptron to compute the predicate distribution from the weighted sum of hidden vectors; The predicate distributions of the relation sets of all relations between each pair of entities are accumulated to obtain the relation score.
10. A method for retrieving answers to questions from an educational knowledge graph, characterized in that: Combining cognitive representation, language style and educational knowledge graph, we construct the first set of educational questions. The steps are as follows: S61. Collect real problems in educational scenarios; S62. To ensure the correct format of the questions, filter out inappropriate samples; S63. Notes on question types; S64.Construction problem; S65. Cognitive expression questions include at least one of alternative solutions, concept exploration, example illustration, comparative analysis, scenario-based cause-effect discussion, process guidance, assertion evaluation, requirement, and instruction; Then, according to the definition of cognitive expression categories, sample problems of each core template and its domain expertise, each core template is expanded into several cognitive extension templates; finally, several cognitive expression templates are constructed; S66. Classify language styles into buzzwords and non-buzzwords; based on the constructed corpus, use the language generation module to randomly convert the input template questions into expressions containing different buzzword combinations according to the statistical characteristics and grammatical habits of the relevant corpus; S67. Question filtering and splitting: Partition the knowledge forest into training, development, and test sets with no entity overlap, and then execute the question generation protocol on each split educational knowledge graph.
11. The method for retrieving answers to questions from an educational knowledge graph according to claim 10, characterized in that: The constructing of the problem includes: selecting a number of relations from the knowledge forest, gradually constructing a template, and generating a problem based on an original data set in the educational knowledge graph, wherein the relation includes at least one of "belonging", "learning dependency", "inclusion", "upper and lower", "facet-static knowledge fragment" and "facet-dynamic knowledge fragment"; Building multiple templates based on the above relationships and their combinations; Expand the core template. In the core template, we first modify the original data set to obtain multiple cognitive expression extension templates. Then, these question templates are further extended through a language style generation module. The final extended templates are obtained, each of which has a corresponding execution process, which the educational knowledge graph executes to extract all possible answers for the template; then, these templates are instantiated by filling in entities and their aliases from the knowledge forest to generate multiple unique question-answer pairs.
Citation Information
Patent Citations
Semantic understanding method and system for knowledge graph intelligent question and answer
CN114117069A
Power operation and maintenance system and method based on large language model
CN117952777A