Knowledge graph-based large language model intelligent teaching-assistant question-answering system and implementation method thereof

By integrating knowledge graph technology on large language models and building an intelligent teaching and question-and-answer system, the problem of "illusion" effect, lack of professionalism and insufficient generalization ability in the field of education is solved, and more accurate and professional educational question-and-answer effects are achieved.

CN119782452AInactive Publication Date: 2025-04-08NANJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202410975781.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the application of large language models in the field of education, there is a problem of "illusion" effect, lack of professionalism and insufficient generalization ability, and it is difficult to effectively interpret complex problems and provide professional advice.

Method used

Combining knowledge graph technology and large language model, an intelligent teaching and question-and-answer system is built through the knowledge base module, question-and-answer module and graph visualization module. The system utilizes the structured knowledge of the knowledge graph and the text generation ability of the large language model to enhance the Q&A effect and provide more accurate and professional answers.

Benefits of technology

It significantly improves the Q&A effect of the large language model in the field of education, enhances the user's learning experience and learning effect, reduces the 'illusion' effect, and improves professionalism and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782452A_ABST
    Figure CN119782452A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph-based large language model intelligent teaching aid question-answering system and an implementation method thereof. The knowledge graph-based large language model intelligent teaching aid question-answering system comprises a knowledge base module, a question-answering module and a graph visualization module. And the knowledge base module divides the subject resources into documents to be stored as a local knowledge base of a large language model, and performs related vector base construction for the local knowledge base, so that subsequent retrieval enhancement generation tasks are facilitated. The question and answer module converts user questions into embedded vectors, retrieves most relevant documents in a local knowledge base through semantic similarity to serve as context filling of a large language model, and through prompt word engineering construction, the large language model generation effect is enhanced, the professional degree is enhanced, and the illusion problem is reduced. And the graph visualization module returns the context generated by interaction between the user and the large language model to the large language model again, knowledge nodes in the context are extracted through prompt word engineering, so that a context knowledge graph is constructed and visually presented to the user, an inquiry node and an inquiry relationship are set for interaction, and the interaction experience of the user is improved. According to the method, the knowledge graph and the big language model application are combined and landing in the education field, the text generation and semantic understanding ability of the big language model and knowledge graph visualization are utilized, the question and answer enthusiasm of the user is enhanced, and the learning effect of the user is improved. Meanwhile, a novel man-machine collaborative normal form is provided for an education mode, and a new insight is provided for the technical field of education.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a large language model intelligent teaching question-answering system based on knowledge graph and an implementation method thereof, and belongs to the intersection field of artificial intelligence and education and teaching. Background Art

[0002] With the advent of the information age, technological innovation is vigorously promoting the education industry to move towards a new stage of high-quality development. The deep integration of cutting-edge technologies such as artificial intelligence, big data, and cloud computing, as well as the rise of distance education and online learning platforms, have opened a new era of personalized and adaptive teaching. The large language model is a large-scale generative neural network model with amazing semantic understanding and text generation capabilities. By learning a large amount of text data, the large language model can not only accurately capture the semantic information and complex context in the text, but also generate natural language in a way that conforms to human thinking. Although the large language model has shown significant advantages in multiple dimensions, it also faces a series of complex challenges in practical applications. The first challenge is the "hallucination" effect, that is, in some cases there is a chance to generate information that is inconsistent with reality or misleading. Secondly, the large language model has limitations in the application of specialized fields, that is, it often lacks the necessary depth and expertise in specific sub-fields. In addition, the ability of the large language model to interpret complex problems and provide specialized advice is also quite limited. If the domain knowledge fails to cover the latest and most in-depth information in all disciplines, the model often performs poorly in providing highly professional or up-to-date advice. To meet the above challenges, the application of large language models in the field of education is trying to integrate more innovative technologies, such as introducing knowledge graph technology.

[0003] As an important component in the field of artificial intelligence, knowledge graph has great advantages in knowledge organization. Knowledge graph is a semantic network launched by Google in 2012 that describes the semantic relationship between nodes. It is mainly used to represent entities of various complex data types, relationships between entities, and entity attributes, and then integrate the three through a graph structure data model or topology to clearly visualize abstract and scattered knowledge. The introduction of knowledge graph can provide a structured, domain-specific knowledge system for large language models, which is expected to enhance the accuracy and depth of the model in specific disciplines and professional topics. Integrating the advanced language processing capabilities of large language models with the precise knowledge structure of knowledge graphs can significantly improve the quality of educational applications and effectively solve the inherent "illusion" effect and lack of professionalism of large language models.

[0004] The large language model intelligent teaching system based on knowledge graph can give full play to the natural language processing capabilities of the large language model and the advantages of knowledge graph structured knowledge integration, greatly improving the quality of education and learning efficiency. The deep integration of the two makes the knowledge graph-enhanced large language model question-answering system no longer a static information collection, but an adaptive, interactive, knowledge-intensive and humanized learning platform.

[0005] A question-answering system is a system that uses computers to extract key information from questions raised by users, searches and matches in existing corpora or knowledge bases, and automatically feeds back the answers to users. The paper "AFSGraph: Multidimensional Axiomatic Fuzzy Set Knowledge Graph for Open-Domain Question Answering" (IEEE Transactions on Neural Networks and Learning Systems, vol. 34, no. 12, pp. 10904-10918, 2023) by Q. Lang, X. Liu et al. briefly describes the classification of question-answering systems. Question-answering systems are divided into two categories: closed domain question-answering systems and open domain question-answering systems. In order to ensure the efficiency of answering questions and the professionalism of the answer content to a certain extent, the educational question-answering system is mainly built based on a closed domain database. J. Bai et al. briefly described the existing technologies required to build an educational question-answering system in the paper "Adversarial Knowledge Distillation Based Biomedical Factoid Question Answering" (IEEE / ACM Transactions on Computational Biology and Bioinformatics, vol. 20, no. 1, pp. 106-118, 2023). Specifically, natural language processing technology helps the educational question-answering system model understand the meaning of human language, so as to process and answer various questions raised by students, but it lacks the ability to grasp the overall context content and cannot handle the ambiguity of language well, that is, it is not flexible and diverse enough. Machine learning enables question-answering systems to be trained on large data sets. The paper "Knowledge-Based Reasoning Network for Relation Detection" (IEEE Transactions on Neural Networks and Learning Systems, vol. 34, no. 8, pp. 5051-5063, 2023) by Y. Shen, M. Yang et al. proposed a question-answering system based on a deep learning model, in which a large number of hidden layers and neurons in the neural network enable the deep learning model to process a large number of data sets and select outputs with relatively good fitting effects as answers to return to users. However, the generalization ability of the learning model is still limited by the amount and diversity of training data, that is, it performs poorly in unseen data. In order to overcome the problem of the lack of context understanding ability and limited generalization ability of the question-answering system, the introduction of a large language model has become a better choice at present.The large language model is trained using the transfer learning method and pre-trained on a large-scale dataset, so that the model can learn general language representation and knowledge, and then fine-tune it on specific tasks to adapt to specific application scenarios. The paper "A Chinese Question Answering System based on GPT" (2019IEEE10th International Conference on Software Engineering and ServiceScience.IEEE, 2019, pp.533-537) by S.Liu and X.Huang et al. proposed a Chinese question answering system based on GPT. The large language model uses the Transformer architecture to handle long-distance dependencies. By encoding and decoding the input text, the model can capture more semantic context information, so as to understand the question more accurately and generate answers. However, question answering systems based on large language models usually lack interpretability, making it difficult to explain their reasoning process and how to get a specific answer to students, and the answers often lack professionalism and contain a lot of cumbersome irrelevant content. The question-answering system built on the knowledge graph was studied in the paper "Knowledge-Based Embodied Question Answering" (IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 45, no. 10, pp. 11948-11960, 2023) by S. Tan, M. Ge et al. The knowledge graph represents entities, attributes and relationships as a graph structure, where entities are represented as nodes and attributes and relationships are represented as edges. Using graph structures to store and index knowledge can better capture semantic relationships and contextual information between entities, so that the educational question-answering system can quickly retrieve and reason. The educational question-answering system can match entities in the question with related entities in the knowledge graph, and use the relationship and attribute information in the knowledge graph for semantic reasoning and relationship extraction, so as to more accurately understand the question and generate answers. In addition, the educational question-answering system can maintain the latest knowledge status through incremental updates and maintenance of the knowledge graph to maintain the timeliness and accuracy of the knowledge, solving the problem of its own lack of adaptive and generalization capabilities. Although some results have been achieved in the research of question-answering systems based on knowledge graphs, the research on building question-answering systems driven by large language models is still in a blank stage. Moreover, in the future of human-computer interactive intelligent education, students' personalized and efficient learning, knowledge open source and accuracy are urgently needed, and large language models and knowledge graphs have important research value. Summary of the invention

[0006] The purpose of the present invention is to address the defects or shortcomings of the above-mentioned prior art and propose a large language model intelligent teaching question and answer system based on knowledge graph and its implementation method. The system combines the advantages of knowledge graph visualization, large language model and retrieval enhanced generation technologies to improve the question and answer effect of the large language model, assist learners in building a knowledge system, and enhance the question and answer effect.

[0007] The technical solution adopted by the present invention to solve its technical problem is: a large language model intelligent teaching question and answer system based on knowledge graph, which includes a knowledge base module, a question and answer module and a graph visualization module.

[0008] The knowledge base module divides subject resources into documents and stores them as the local knowledge base of the large language model. It also constructs a relevant vector library for the local knowledge base to facilitate subsequent retrieval enhancement generation tasks, which is the basis for the subsequent question-answering module.

[0009] The question-answering module converts user questions into embedding vectors, retrieves the most relevant documents in the local knowledge base based on semantic similarity as context filling for the large language model, and enhances the generation effect of the large language model by building a prompt word project, thereby enhancing professionalism and reducing hallucination problems.

[0010] The graph visualization module returns the context generated by the user's interaction with the large language model to the large language model, extracts the knowledge nodes in the context through prompt word engineering, and thus constructs a contextual knowledge graph for visualization and presentation to the user. It also sets up "query node" and "query relationship" interactions to improve the user's interactive experience.

[0011] The present invention also provides a large language model intelligent teaching question-answering system based on knowledge graph and an implementation method thereof, the method comprising the following steps:

[0012] Step 1: Knowledge base acquisition and generation of retrieval vector library establishment. Educational resources are acquired and segmented into documents, and semantic embedding is used as an index to establish a vector library.

[0013] Step 2: Ask questions and retrieve enhanced generation. When a user enters the system to ask a question, the most relevant documents are retrieved and enhanced generation is performed based on the semantic embedding of the user's question.

[0014] Step 3: Build a prompt word project and answer the user. Fill the large language model context based on the retrieved documents and generate content to reply to the user.

[0015] Step 4: Obtain knowledge graph nodes and establish relationships. Based on the context of the user's interaction with the large language model obtained in step 3 above, extract the nodes and relationships in the context and build a knowledge graph.

[0016] Step 5: Graph visualization and knowledge graph interaction. The knowledge graph obtained in step 4 is visualized and presented to the user, and "query node" and "query relationship" operations are set to enhance user interaction.

[0017] Step 6: Test the system performance.

[0018] Beneficial effects:

[0019] 1. This invention combines knowledge graphs with large language models and implements them in the field of education. It uses the text generation and semantic understanding capabilities of large language models and knowledge graph visualization to enhance user Q&A enthusiasm and improve user learning outcomes. At the same time, it provides a new paradigm of human-computer collaboration for the education model and provides new insights into the field of educational technology.

[0020] 2. The present invention can automatically generate knowledge graphs, avoid large-scale knowledge graph construction projects, and obtain hundreds of nodes and relationships in a short time.

[0021] 3. The present invention introduces retrieval enhancement generation technology to provide a feasible solution for the large language model with the assistance of a localized knowledge base, thereby improving the professionalism and accuracy of the large language model in a single field and reducing the probability of hallucination problems. At the same time, the questionnaire shows that the platform has an average score of 4.31 / 5 among users who use the large language model, and an average score of 3.33 / 5 for users who do not use the large language model, indicating that the platform can significantly improve user learning effects and usage experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The figure is a flow chart of the method of the present invention.

[0023] Figure 2 Generate a graph node schematic diagram for the present invention.

[0024] Logo Description: Figure 2 (a) Figure 2 (b) is a schematic diagram before and after generating nodes according to the present invention.

[0025] Figure 3 It is a schematic diagram of the query relationship of the present invention.

[0026] Logo Description: Figure 3 (a) Figure 3 (b) is a schematic diagram before and after the query relationship of the present invention.

[0027] Figure 4 This is a graph showing the results of the experimental questionnaire of the present invention. DETAILED DESCRIPTION

[0028] The invention will be described in further detail below in conjunction with the accompanying drawings.

[0029] It should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.

[0030] like Figure 1 As shown, the present invention provides a large language model intelligent teaching question-answering system based on knowledge graph and its implementation method, the method comprising the following steps:

[0031] Step 1: Acquire the knowledge base and generate the search vector library.

[0032] The present invention first collects educational resources taking artificial intelligence courses as an example and constructs a local knowledge base. To construct a local knowledge base, the present invention collects relevant textbook resources, teaching plan documents, and online resources as the initial local knowledge base. Then, the LlamaIndex tool is used to establish a vector library. A retrieval enhancement generation pipeline is created, and documents of different forms are loaded using a data connector and stored as document objects. After that, data conversion is performed, and the document object is divided into Node objects with a fixed size, and the summary, title, entity, etc. of the Node object are extracted using a large language model and saved together as metadata.

[0033]

[0034] Among them, P is the search enhancement generation pipeline, DataConnector is the data connector function, and D j is the jth document object, and m is the total number of document objects. Then, the text-embedding layer of the large language model is used to generate embeddings for each Node object as the index of each Node object, and finally a retrieval vector library is constructed.

[0035]

[0036] Among them, N is the set of all Node objects, Segment (D j ,s) is the document object D j A function that splits into Node objects according to a fixed size s.

[0037] Step 2, ask questions and retrieve enhancement generation.

[0038] When a user enters the platform, he asks a question to the large language model. Let the user's question sentence be ε, then the embedding of the user's question can be obtained as:

[0039] V ε =embedding(ε)

[0040] Where embedding is the text embedding layer of the large language model. According to the Node object obtained in step 1 above, assuming that there are M Node objects, the nth Node object is represented by N n , the embedding vector of the Node object is The semantic similarity between the user's question and the Node object can be expressed as:

[0041]

[0042] Among them, sim n The semantic similarity of the nth Node object to the question is repeated, and the semantic similarities of all Node objects to the question are calculated. The first K Node objects are obtained according to the semantic similarity scores, namely, the Top-K related texts.

[0043]

[0044] Among them, T output To finally generate the text content, Text(N k ) is the text information contained in the kth Top-K Node object.

[0045] After that, set the Node postprocessor. Filter the Node objects by keyword filtering and keyword inclusion, and set the semantic similarity threshold to filter the Node objects with too low scores to further reduce the cost of calling the large language model and improve the quality of question and answer. Finally, synthesize the text information contained in all Node objects to generate retrieval-enhanced generated text content.

[0046] Step 3: Build a prompt word project and answer the user.

[0047] The present invention records the search enhancement generated text content obtained in step 2 as context, and the text content of the user's question as query. The specific form of the constructed prompt words is as follows:

[0048] The context information is as follows.

[0049] ————————————

[0050] {context}

[0051] ————————————

[0052] Please answer the following questions based on the context and your own knowledge: {query}

[0053] If this information is not useful, please ignore it and answer based on your own knowledge.

[0054] The system-level prompt words of the large language model are:

[0055] You are an intelligent learning assistant. You have relevant learning resources stored in the local knowledge base, and you can obtain the most needed relevant resources for users through information retrieval enhancement. Please answer questions for users based on the content generated by the retrieval.

[0056] The constructed prompt words are input into the large language model to obtain the generated content and feed it back to the user.

[0057] Step 4: Acquire knowledge graph nodes and establish relationships.

[0058] Set the "Generate Graph Node" button above the large language model generation text box to return this round of conversation to the large language model through the prompt word template to generate a knowledge graph node. Due to the uncertainty of the content generated by the large language model, the JSON mode is used to ensure that the output format of the large language model is consistent so that the program can parse the generated content. The specific prompt word template is as follows:

[0059] You are a text processing tool designed to extract key words from user input. These keywords are mainly phrases or words that can serve as knowledge points for a specific educational subject. Follow these steps to process:

[0060] 1. Identify and extract key words from user text. These terms should be independent knowledge points.

[0061] 2. Focus on the key knowledge points of a certain education or teaching subject. The extracted points can be detailed or brief, but try to keep them concise. Avoid extracting general nouns such as names of people or places. Knowledge points should be inseparable words and should not be returned in a subject-verb structure.

[0062] 3. The results should be returned in Chinese.

[0063] 4. Return the result in JSON format, where the value is the extracted knowledge point and the key can be anything, but it is best to keep the key and value consistent.

[0064] 5. The goal is to extract about three key points. If no important content is found, return {"null":"null"}. Make sure the extracted knowledge points are concise and have practical educational significance. For example:

[0065] {Bayesian Decision Theory":"Bayesian Decision Theory","Generalization":"Generalization","Principal Component Analysis":"Principal Component Analysis}

[0066] This prompt word template is used as the system-level prompt word, and the large language model is used as a node generator. The JSON format of "{knowledge point 1":"knowledge point 1","knowledge point 2":"knowledge point 2"}" is returned. The program reads it and uses the key value as the knowledge point extracted in this round of dialogue.

[0067] Step 5: Graph visualization interacts with the knowledge graph.

[0068] Based on the knowledge points obtained in step 4 above, the nodes for generating the knowledge graph can be obtained, and users can interact with the nodes. When you left-click a node, a menu pops up, including the "Ask" and "Delete" interactive buttons. Click "Ask" to automatically ask the large language model about the meaning of the knowledge point. Click "Delete" to delete the node and all the relationships it contains from the graph.

[0069] Right-click the first node, and the "FROM" label will appear in the upper right corner of the node. Right-click the second node, and the "TO" label will appear in the upper right corner of the node, and a "Query Relationship" button will appear. When the user clicks this button, the large language model will be asked about the relationship between the two nodes. The specific prompt word template is as follows:

[0070] You are a text processing tool. The user will enter a pair of keywords in the format of {"from":"keyword1","to":"keyword2"}. These keywords are field-specific terms that can serve as educational points. Process according to the following guidelines:

[0071] 1. The result is returned in Chinese.

[0072] 2. Provide the relationship between the "from" and "to" keywords. This description can be a phrase or a single word, but it must be kept concise. Possible descriptions include "belongs to," "contains," "associated with," "similar to," "subordinate to," "precedes," "follows," "derived from," "sourced from," and so on. The description should be concise and accurately convey the relationship.

[0073] 3. If there is no relationship between terms, avoid forcing a relationship and directly return "text":"null".

[0074] 4. The response should be in JSON format. Examples of input and output are provided for reference.

[0075] 5. Pay attention to the order between "from" and "to"; it affects the interpretation of the relationship. Make sure the sentence connecting "from" and "to" flows smoothly.

[0076] Example:

[0077] Input:{"from":"Support Vector Machine","to":"Correlation Vector Machine"}

[0078] Output:{"from":"Support Vector Machine","to":"Correlation Vector Machine","text":"Association"}

[0079] Input:{"from":"neural network","to":"deep neural network"}

[0080] Output:{"from":"neural network","to":"deep neural network","text":"contains"}

[0081] Input:{"from":"Sparse Learning","to":"Sparse Representation"}”

[0082] Output:{"from":"Sparse Learning","to":"Sparse Representation","text":"Similar"}

[0083] Input:{"from":"Overfitting","to":"Regularization"}

[0084] Output:{"from":"Overfitting","to":"Regularization","text":"Prefix"}

[0085] Input:{"from":"Naive Bayes Classifier","to":"Semi-Naive Bayes Classifier"}

[0086] Output:{"from":"Naive Bayes Classifier","to":"Semi-Naive Bayes Classifier","text":"Derivation"}

[0087] Input:{"from":"Machine Learning","to":"JAVA"}

[0088] Output:{"from":"Machine Learning","to":"JAVA","text":"null"}

[0089] Get the value of the key text as the relationship from the FROM node to the TO node. If the value is not null, draw a relationship line to connect the FROM node and the TO node, and display the relationship on the connection line. If the value is null, it will prompt that there is no relationship between the two nodes.

[0090] Left-click on the relationship line to pop up the "Ask" and "Delete" menus. Click "Ask" to automatically ask the large language model for a detailed explanation of the relationship between the two nodes. Click "Delete" to delete the relationship line.

[0091] Step 6: Test the system effect.

[0092] To test the system effect, the present invention conducted experiments on students of the machine learning and big data processing course. In the classroom, the online platform was released to students as a temporary test to experience the use and fill in the questionnaire.

[0093] The effects of the present invention are further described in detail below in conjunction with experiments.

[0094] 1. Experimental process and experimental design:

[0095] The present invention conducts experiments on students of the machine learning and big data processing course. The teacher assigns tasks and asks students to use the platform to assist in learning in this class, and use the system to build a knowledge map related to the content of this class as a topic in class. During this period, students can use the platform functions arbitrarily, and the ultimate goal is to build a complete knowledge map as the knowledge system of this class. After the class, a questionnaire survey is conducted and the questionnaire results are analyzed.

[0096] 2. Experimental content:

[0097] The present invention collected a total of 70 valid questionnaires. Figure 4 As shown in the figure, the graph shows the option "When using a large language model, the graphical visualization interface is helpful to me", and "yes" and "no" are the options "Do you usually use the large language model platform for learning assistance?" The following conclusions can be drawn from the comparative analysis. When using a large language model, the degree to which the graphical visualization interface is helpful to users shows obvious differences. Among the users who use the large language model, 49.09% of them said they "very agree" that the graphical visualization interface is helpful to them, and only 1.82% said they "disagree". From the overall average score, the average score of users who use the large language model on the degree to which the graphical visualization interface is helpful to them is 4.31 points, while the average score of users who do not use the large language model is 3.33 points. This shows that users who use the large language model generally believe that the graphical visualization interface is more helpful to them. In addition, it can be observed that among the users who use the large language model, 34.55% of them said they "agree" that the graphical visualization interface is helpful to them, which also shows that the graphical visualization interface has an auxiliary effect on users of the large language model to a certain extent. In summary, large language model users generally believe that the graphical visualization interface is helpful to them, and the option of “strongly agree” accounts for a high proportion, indicating that the graphical visualization interface has a positive effect.

[0098] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

Claims

1. A large language model intelligent teaching question-answering system based on knowledge graph and its implementation method, characterized in that: The system includes a knowledge base module, a question-answering module, and an exercise recommendation and graph visualization module; The knowledge base module divides subject resources into documents and stores them as the local knowledge base of the large language model. It also constructs a related vector library for the local knowledge base to facilitate subsequent retrieval enhancement generation tasks. It is the basis for the subsequent question-answering module. The question-answering module converts user questions into embedding vectors, retrieves the most relevant documents in the local knowledge base based on semantic similarity as context filling for the large language model, and enhances the generation effect of the large language model through prompt word engineering, enhances professionalism, and reduces hallucination problems; The graph visualization module returns the context generated by the interaction between the user and the large language model to the large language model, extracts the knowledge nodes in the context through prompt word engineering, and thus constructs a contextual knowledge graph for visualization and presentation to the user. It also sets up "query nodes" and "query relationships" to interact, improving the user's interactive experience.

2. A large language model intelligent teaching question-answering system based on knowledge graph and its implementation method, characterized in that: The method comprises the following steps: Step 1: Acquire the knowledge base and generate the retrieval vector library. Obtain educational resources and split them into documents, and use semantic embedding as an index to build a vector library; Step 2: Ask questions and retrieve enhanced generation. When a user enters the system to ask a question, the most relevant documents are retrieved and enhanced generation is performed based on the semantic embedding of the user's question; Step 3: Build a prompt word project and answer the user. Fill the large language model context based on the retrieved documents and generate content to reply to the user; Step 4: Obtain knowledge graph nodes and establish relationships. Based on the context of the user's interaction with the large language model obtained in step 3 above, extract the nodes and relationships in the context and build a knowledge graph; Step 5: Graph visualization and knowledge graph interaction. The knowledge graph obtained in step 4 is visualized and presented to the user, and "query node" and "query relationship" operations are set to enhance user interaction; Step 6: Test the system performance.

3. According to claim 2, a large language model intelligent teaching question-answering system based on knowledge graph and its implementation method, characterized in that: Step 1 of the method includes: collecting educational resources such as artificial intelligence courses and building a local knowledge base. To build a local knowledge base, the present invention collects relevant textbook resources, teaching plan documents, and online resources as the initial local knowledge base. Then, the LlamaIndex tool is used to establish a vector library. A retrieval enhancement generation pipeline is created, and documents of different forms are loaded using a data connector and stored as document objects. After that, data conversion is performed, the document object is divided into Node objects with a fixed size, and the summary, title, entity, etc. of the Node object are extracted using a large language model and saved as metadata. Among them, P is the search enhancement generation pipeline, DataConnector is the data connector function, and D j is the jth document object, and m is the total number of document objects. Then, the text-embedding layer of the large language model is used to generate embeddings for each Node object as the index of each Node object, and finally a retrieval vector library is constructed. Among them, N is the set of all Node objects, Segment (D j ,s) is the document object D j A function that splits objects into Node objects according to a fixed size s, representing the union of all the split Node objects.

4. According to claim 2, a knowledge point dynamic recommendation and teaching feedback method based on knowledge graph and its system implementation are characterized in that: Step 2 of the method includes: when a user enters the platform, asking a question to the large language model. Let the user's question sentence be ε, then the embedding of the user's question can be obtained as: V ε =embedding(ε) Where embedding is the text embedding layer of the large language model. According to the Node object obtained in step 1 above, assuming that there are M Node objects, the nth Node object is represented by N n , the embedded value of the Node object is The semantic similarity between the user's question and the Node object can be expressed as: Among them, sim n is the semantic similarity of the nth Node object to the question, ||·|| represents the norm calculation, V ε ∈□ 1×d represents the embedding of the user's question, Represents the embedding value of the nth object, and d represents the output layer dimension of the large language model. Repeat the above steps and calculate the semantic similarity of all Node objects relative to the question, sort them according to the semantic similarity score, and obtain the first K Node objects, namely the Top-K related texts. Among them, T output To finally generate the text content, Text(N k ) is the text information contained in the kth Top-K Node object, and ∑ represents the concatenation of all text information. After that, set the Node postprocessor. Filter the Node objects by keyword filtering and keyword inclusion, and set the semantic similarity threshold to filter the Node objects with too low scores to further reduce the cost of calling the large language model and improve the quality of question and answer. Finally, synthesize the text information contained in all Node objects to generate retrieval-enhanced generated text content.

5. According to claim 2, a knowledge point dynamic recommendation and teaching feedback method based on knowledge graph and its system implementation, characterized in that: Step 3 of the method includes: the present invention records the search enhancement generated text content obtained in the above step 2 as context, and the text content of the user's question as query. The specific form of the constructed prompt words is as follows: The context information is as follows. Please answer the following questions based on the context and your own knowledge: {query} If this information is not useful, please ignore it and answer based on your own knowledge. The system-level prompt words of the large language model are: You are an intelligent learning assistant. You have relevant learning resources stored in the local knowledge base, and you can obtain the most needed relevant resources for users through information retrieval enhancement. Please answer questions for users based on the content generated by the retrieval. The constructed prompt words are input into the large language model to obtain the generated content and feed it back to the user.

6. According to claim 2, a knowledge point dynamic recommendation and teaching feedback method based on knowledge graph and its system implementation are characterized in that: Step 4 of the method includes: setting a "Generate Graph Node" button above the large language model generation text box, and returning the current round of dialogue to the large language model through the prompt word template to generate a knowledge graph node. Due to the uncertainty of the content generated by the large language model, the JSON mode is used to ensure that the output format of the large language model is consistent so that the program can parse the generated content. The specific prompt word template is as follows: You are a text processing tool designed to extract key words from user input. These keywords are mainly phrases or words that can serve as knowledge points for a specific educational subject. Follow these steps to process:

1. Identify and extract key words from user text. These terms should be independent knowledge points.

2. Focus on the key knowledge points of a certain education or teaching subject. The extracted points can be detailed or brief, but try to keep them concise. Avoid extracting general nouns such as names of people or places. Knowledge points should be inseparable words and should not be returned in a subject-verb structure.

3. The results should be returned in Chinese.

4. Return the result in JSON format, where the value is the extracted knowledge point and the key can be anything, but it is best to keep the key and value consistent.

5. The goal is to extract about three key points. If no important content is found, return {"null":"null"}. Make sure the extracted knowledge points are concise and have practical educational significance. For example: {Bayesian Decision Theory":"Bayesian Decision Theory","Generalization":"Generalization","Principal Component Analysis":"Principal Component Analysis} This prompt word template is used as the system-level prompt word, and the large language model is used as a node generator. The JSON format of "{knowledge point 1":"knowledge point 1","knowledge point 2":"knowledge point 2"}" is returned. The program reads and uses the key value as the knowledge point extracted from the conversation.

7. According to claim 2, a knowledge point dynamic recommendation and teaching feedback method based on knowledge graph and its system implementation are characterized in that: Step 5 of the method includes: based on the knowledge points obtained in step 4 above, nodes for generating a knowledge graph can be obtained, and the user can interact with the nodes. When the node is clicked with the left mouse button, a menu pops up, including "Ask" and "Delete" interactive buttons. Clicking "Ask" will automatically ask the large language model to explain the meaning of the knowledge point. Clicking "Delete" will delete the node and all the relationships contained in it from the graph. Right-click the first node, and the "FROM" label will appear in the upper right corner of the node. Right-click the second node, and the "TO" label will appear in the upper right corner of the node, and the "Query Relationship" button will appear. When the user clicks this button, the large language model will be asked about the relationship between the two nodes. The specific prompt word template is as follows: You are a text processing tool. The user will enter a pair of keywords in the format of {"from":"keyword1","to":"keyword2"}. These keywords are field-specific terms that can serve as educational points. Process according to the following guidelines:

1. The result is returned in Chinese.

2. Provide the relationship between the "from" and "to" keywords. This description can be a phrase or a single word, but it must be kept concise. Possible descriptions include "belongs to," "contains," "associated with," "similar to," "subordinate to," "precedes," "follows," "derived from," "sourced from," and so on. The description should be concise and accurately convey the relationship.

3. If there is no relationship between the terms, avoid forcing the relationship and return "text":"null".

4. The response should be in JSON format. Examples of input and output are provided for reference.

5. Pay attention to the order between "from" and "to"; it affects the interpretation of the relationship. Make sure the sentence connecting "from" and "to" flows smoothly. Example: Input:{"from":"Support Vector Machine","to":"Correlation Vector Machine"} Output:{"from":"Support Vector Machine","to":"Correlation Vector Machine","text":"Association"} Input:{"from":"neural network","to":"deep neural network"} Output:{"from":"neural network","to":"deep neural network","text":"contains"} Input:{"from":"Sparse Learning","to":"Sparse Representation"} Output:{"from":"Sparse Learning","to":"Sparse Representation","text":"Similar"} Input:{"from":"Overfitting","to":"Regularization"} Output:{"from":"Overfitting","to":"Regularization","text":"Prefix"} Input:{"from":"Naive Bayes Classifier","to":"Semi-Naive Bayes Classifier"} Output:{"from":"Naive Bayes Classifier","to":"Semi-Naive Bayes Classifier","text":"Derivation"} Input:{"from":"Machine Learning","to":"JAVA"} Output:{"from":"Machine Learning","to":"JAVA","text":"null"} Get the value of the key text as the relationship from the FROM node to the TO node. If the value is not null, draw a relationship line and display the relationship on the connection line. If the value is null, it prompts that there is no relationship between the two nodes. Left-click on the relationship line to pop up the "Ask" and "Delete" menus. Click "Ask" to automatically ask the large language model for a detailed explanation of the relationship between the two nodes. Click "Delete" to delete the relationship line.

8. According to claim 2, a knowledge point dynamic recommendation and teaching feedback method based on knowledge graph and its system implementation are characterized in that: Step 6 of the method includes: conducting an experiment on students of the machine learning and big data processing course. The teacher assigns tasks and asks students to use the platform to assist in learning in this class, and use the system to build a knowledge graph related to the content of this class as a class topic. During this period, students can use the platform functions at will, and the ultimate goal is to build a complete knowledge graph as the knowledge system of this class. After the class, a questionnaire survey is conducted and the questionnaire results are analyzed.

Citation Information

Patent Citations

  • Intelligent question and answer implementation method and system based on large model and semantic map

    CN117271724A

  • Agricultural intelligent question and answer method and system supporting multi-mode and multi-round dialogues

    CN117370506A

  • Medical auxiliary question and answer method and system based on knowledge calibration and retrieval enhancement

    CN117573843A

  • Law question answering system based on intention recognition and knowledge graph

    CN117891923A

Cited By

  • Online programming community learning support method and system based on generative artificial intelligence

    CN120450652A

  • Online programming community learning support method and system based on generative artificial intelligence

    CN120450652B

  • Intelligent question learning method and system based on large language model

    CN120541193A

  • Rainwater condition intelligent interaction service platform based on large language model

    CN120596642A

  • Process design standard intelligent question-answering system and method based on multi-mode large model and GraphRAG

    CN120725156A