Academic question-answering system and method fusing knowledge graph and large language model
By constructing and enhancing the knowledge graph, combining the thinking chain of large language models and problem instructions, key index information is generated, and the problem of term ambiguity in the academic question-and-answer system is solved, and the accuracy of answers and contextual understanding ability are improved.
Patent Information
- Application Number
- CN202411625936.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-18
AI Technical Summary
Existing academic question-and-answer systems that incorporate knowledge graphs and large language models have difficulty explaining the meaning of academic terms accurately, especially in polysemes, synonyms, domain terms, and context-dependent vocabulary, resulting in ambiguity in answering questions.
By constructing a knowledge graph of each literature information, semantic enhancement of the knowledge graph based on the large language model, determining the correlation structure and semantic correlation of the knowledge graph, combining the thinking chain of problem instructions, and generating key index information as semantic reasoning of the large language model parameters, and then generate answers.
Effectively eliminate the ambiguity of academic terms, improve the accuracy of interpreting the meaning of academic terms, and ensure that the question and answer system can accurately understand and answer questions based on the specific context.
Smart Images

Figure CN119474316A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of knowledge graph technology, and more specifically, to an academic question-answering system and method that integrates knowledge graph and large language model. Background Art
[0002] A knowledge graph is a graphical data model that represents entities in the real world and their relationships in a structured way. It stores knowledge in the form of nodes (entities) and edges (relationships). Nodes represent entities or concepts, and edges represent the associations between them. For example, in the academic field, nodes can be papers, authors, research topics, etc., and edges describe the citation relationships, collaborative relationships, or subject affiliations between them. The construction of a knowledge graph usually relies on natural language processing, information extraction and other technologies. By extracting structured information from massive texts, it has strong semantic association capabilities and can help machines understand the attributes, semantics, and background of entities, thereby supporting more efficient information retrieval, recommendation systems, question-and-answer systems, and other applications. Knowledge graphs are widely used, covering search engine optimization, intelligent question-and-answer, recommendation systems, and other fields.
[0003] Existing academic question-answering that integrates knowledge graphs and large language models mainly improves the quality of academic question-answering by combining structured knowledge graphs and the reasoning ability of language models. Knowledge graphs can provide the model with clear academic literature data, while large language models can handle more complex academic problems and generate fluent answers with certain reasoning capabilities. However, many academic terms have different meanings in different fields or different contexts. Academic terms usually contain a lot of ambiguity, especially in polysemous words, synonyms, domain terms, and context-dependent vocabulary, which leads to the inability to accurately interpret the meaning of academic terms when answering questions. Therefore, how to eliminate the ambiguity of academic terms and thus improve the accuracy of interpreting the meaning of academic terms has become a difficult problem faced by the industry. Summary of the invention
[0004] The present application provides an academic question-answering system and method that integrates a knowledge graph and a large language model, which can eliminate the ambiguity of academic terms and thus improve the accuracy of interpreting the meaning of academic terms.
[0005] In the first aspect, the present application provides an academic question answering method integrating a knowledge graph and a large language model, comprising the following steps: Accepting the user's question instructions, and then obtaining different literature information in the academic field corresponding to the question instructions; Construct a knowledge graph for each document information, and perform semantic enhancement on each knowledge graph based on a preset large language model to obtain semantic enhancement features of each knowledge graph in the academic question-answering process; Determine the association structure of each knowledge graph through semantic annotations between each document information and the structural information of each knowledge graph, and determine the semantic relevance of each knowledge graph in the academic question-answering process based on all semantic enhancement features and the association structure of each knowledge graph; Determine the thought chain of the question instruction in the academic question-answering process according to the dependency relationship between the question expression of the question instruction and each keyword in each document information; The key index information of the question instruction in the academic question-answering process is determined by the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction.
[0006] In some embodiments, semantic enhancement is performed on each knowledge graph based on a preset large language model, and the semantic enhancement features of each knowledge graph in the academic question-answering process specifically include: Select a knowledge graph as the selected knowledge graph; Determine semantic enhancement information of each entity based on a preset large language model and context information of each entity in the selected knowledge graph; Determine semantic enhancement information of each relationship through a preset large language model and context information of each relationship in the selected knowledge graph; Determine the semantic enhancement features of the selected knowledge graph in the academic question answering process based on the semantic enhancement information of all entities and the semantic enhancement information of all relations; Continue to determine the semantic enhancement features of the remaining knowledge graphs in the academic question answering process.
[0007] In some embodiments, determining the association structure of each knowledge graph through semantic annotations between each document information and structural information of each knowledge graph specifically includes: Construct multiple semantic association clusters of each document information; Determine the semantic annotations between each document information according to all semantic association clusters; Determine the global topology through the structural information of all knowledge graphs; The association structure of each knowledge graph is determined based on the semantic annotations between the various document information and the global topology graph.
[0008] In some embodiments, determining the semantic relevance of each knowledge graph in the academic question-answering process based on all semantic enhancement features and the associated structure of each knowledge graph specifically includes: Perform linear fitting on all semantic enhancement features to obtain semantic enhancement feature curves; The semantic relevance of each knowledge graph in the academic question-answering process is determined based on the semantic enhancement feature curve and the association structure of each knowledge graph.
[0009] In some embodiments, determining the thinking chain of the question instruction in the academic question-answering process according to the dependency relationship between the question representation of the question instruction and each keyword in each document information specifically includes: determining a problem representation of the problem instruction; Determine the dependency path of each document information according to the dependency relationship between each keyword in each document information and the question expression of the question instruction; The thinking chain of the question instruction in the academic question-answering process is determined through all dependent paths.
[0010] In some embodiments, determining the key index information of the question instruction in the academic question answering process through the semantic relevance of each knowledge graph in the academic question answering process and the thought chain specifically includes: Determine the key hint coefficient based on the semantic relevance of each knowledge graph in the academic question-answering process; The key index information of the question instruction in the academic question-answering process is determined through the key prompt coefficient and the thought chain.
[0011] In some embodiments, the large language model is GPT-4.
[0012] In the second aspect, the present application provides an academic question answering system integrating knowledge graph and large language model, including: An acquisition module is used to receive a user's question instruction and then acquire different literature information in the academic field corresponding to the question instruction; A processing module is used to construct a knowledge graph for each document information, and to perform semantic enhancement on each knowledge graph based on a preset large language model to obtain semantic enhancement features of each knowledge graph in the academic question-answering process; The processing module is further used to determine the association structure of each knowledge graph through the semantic annotations between the various document information and the structural information of each knowledge graph, and determine the semantic relevance of each knowledge graph in the academic question-answering process according to all the semantic enhancement features and the association structure of each knowledge graph; The processing module is further used to determine the thinking chain of the question instruction in the academic question-answering process according to the dependency relationship between the question expression of the question instruction and each keyword in each document information; An execution module is used to determine the key index information of the question instruction in the academic question-answering process through the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and use the key index information as the semantic reasoning parameter of the large language model to generate an answer to the question instruction.
[0013] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores code, and the processor is configured to obtain the code and execute the above-mentioned academic question-answering method that integrates the knowledge graph and the large language model.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned academic question-answering method that integrates the knowledge graph and the large language model.
[0015] The technical solution provided by the embodiments disclosed in this application has the following beneficial effects: In the academic question-answering system and method that integrates the knowledge graph and the large language model provided in the present application, the user's question instruction is first accepted, and then different document information in the academic field corresponding to the question instruction is obtained; a knowledge graph for each document information is constructed, and each knowledge graph is semantically enhanced based on a preset large language model to obtain the semantic enhancement features of each knowledge graph in the academic question-answering process; the association structure of each knowledge graph is determined through the semantic annotations between the various document information and the structural information of each knowledge graph, and the semantic relevance of each knowledge graph in the academic question-answering process is determined based on all the semantic enhancement features and the association structure of each knowledge graph; the thinking chain of the question instruction in the academic question-answering process is determined based on the dependency relationship between the question representation of the question instruction and each keyword in each document information; the key index information of the question instruction in the academic question-answering process is determined through the semantic relevance of each knowledge graph in the academic question-answering process and the thinking chain, and the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction.
[0016] It can be seen that in this application, the key index information of the question instruction in the academic question-answering process can be determined through the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain; wherein, first, a knowledge graph is constructed for each document information, and then the entities and relationships in each knowledge graph are semantically enhanced using a large language model to obtain the semantic enhancement features of each knowledge graph. The semantic enhancement features can accurately capture the specific meanings of terms in different contexts, avoid misunderstandings or incorrect reasoning caused by ambiguity, and ensure that the question-answering system can accurately understand and answer questions according to the specific context. Further, a global topological graph that associates the overall structural relationship between each knowledge graph is constructed based on the structural information of each knowledge graph. The global topological graph can capture the global topological relationship between different knowledge graphs so as to understand and operate these knowledge graphs at a higher level. The association structure of each knowledge graph is obtained by combining the global topological graph with the semantic annotations between each document information. The association structure can reveal the semantic logical relationship between different entities in the knowledge graph, thereby providing a basis for cross-domain knowledge integration. Furthermore, the association structure of each knowledge graph is quantified through all semantic enhancement features to obtain the relationship between each knowledge graph in the academic question-answering process. The semantic relevance in the process, wherein the semantic relevance represents the parameter value that measures the degree of semantic association between academic terms in different documents. The semantic relevance can identify the differences in academic terms in different fields, and accurately understand the meaning of academic terms through their contextual information, thereby eliminating ambiguity; secondly, through the problem representation of the question instruction and the dependency relationship between each keyword in each document information, a thinking chain for answering the question is constructed starting from the expression of the question and gradually passing through the dependency relationship of relevant academic keywords. The thinking chain connects the relevant academic knowledge through the dependency relationship to form a reasonable reasoning route, which is helpful to identify the semantics of polysemous words and synonyms, eliminate different understandings of academic terms in different contexts, and thus reduce ambiguity; then, the key index information of the question instruction in the academic question answering process is obtained through the semantic relevance of each knowledge graph in the academic question answering process and the thinking chain, wherein the key index information represents the information composed of the most relevant academic keywords of the question instruction; finally, the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction; in summary, the scheme of the present application can eliminate the ambiguity of academic terms, thereby improving the accuracy of interpreting the meaning of academic terms. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is an exemplary flow chart of an academic question answering method integrating a knowledge graph and a large language model according to some embodiments of the present application; Figure 2 It is a schematic diagram of the knowledge graph structure shown in some embodiments of the present application.
[0018] Figure 3 is a schematic diagram of a process for determining an association structure in some embodiments of the present application; Figure 4 It is a schematic diagram of the structure of an academic question-answering system that integrates a knowledge graph and a large language model in some embodiments of the present application; Figure 5 It is a structural diagram of a computer device for implementing an academic question-answering method that integrates a knowledge graph and a large language model as shown in some embodiments of the present application. DETAILED DESCRIPTION
[0019] In order to better understand the technical solution of the present application, the technical solution of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0020] refer to Figure 1 , which is an exemplary flow chart of an academic question answering method integrating knowledge graph and large language model according to some embodiments of the present application. The academic question answering method 100 integrating knowledge graph and large language model mainly includes the following steps: In step 101, a user's question instruction is accepted, and then different literature information in the academic field corresponding to the question instruction is obtained.
[0021] In the specific implementation, first, the user's question instructions are accepted, and then the user's question instructions are parsed through natural language processing technology. Then, the parsing results are input into the subject classification interface of the academic database (for example: HowNet, Wanfang, etc.) to obtain the academic field theme corresponding to the question instruction, and then the literature is searched according to the academic field theme, and further sorted according to relevance to obtain 100 documents, and the obtained documents are all used as document information. In other embodiments, other numbers of documents can be obtained, which is not limited here.
[0022] In step 102, a knowledge graph of each document information is constructed, and semantic enhancement is performed on each knowledge graph based on a preset large language model to obtain the semantic enhancement features of each knowledge graph in the academic question-answering process.
[0023] In the specific implementation, the construction of the knowledge graph of each document information can be achieved in the following way, namely: first, pre-process each document information, remove irrelevant content (such as references, cover page, etc.), retain the key information such as the title, abstract, keywords, author, institution, citation information, etc. of the article, and then use natural language processing technology to extract entities from each pre-processed document information, such as author, journal name, research topic, experimental method, research results, keywords, etc. These entities will be used as nodes in the knowledge graph. Then, use the relationship extraction algorithm (for example: dependency syntactic analysis algorithm, which is not limited here) to identify the relationship between entities, such as citation relationship (a document cites another document), cooperation relationship (two authors jointly published a paper), belonging relationship (a document belongs to a certain research field or topic), reference relationship, etc. Figure 2 As shown, this figure is a schematic diagram of the knowledge graph structure shown in some embodiments of the present application. The ellipses in the figure represent nodes, and the connecting arrows represent the relationships between nodes. Finally, the extracted entities and relationships are stored in a graph database, such as Neo4j, to obtain a knowledge graph for each document information. Other methods can also be used in other embodiments, which are not limited here.
[0024] In some embodiments, semantic enhancement is performed on each knowledge graph based on a preset large language model, and the semantic enhancement features of each knowledge graph in the academic question-answering process can be obtained by the following steps: Select a knowledge graph as the selected knowledge graph; Determine semantic enhancement information of each entity based on a preset large language model and context information of each entity in the selected knowledge graph; Determine semantic enhancement information of each relationship through a preset large language model and context information of each relationship in the selected knowledge graph; Determine the semantic enhancement features of the selected knowledge graph in the academic question answering process based on the semantic enhancement information of all entities and the semantic enhancement information of all relations; Continue to determine the semantic enhancement features of the remaining knowledge graphs in the academic question answering process.
[0025] It should be noted that the large language model described in this application is GPT-4. GPT-4 has been pre-trained on a large number of academic literature and can capture complex semantic information. GPT-4 can not only understand and capture the subtle differences between different disciplines, thereby providing more targeted and in-depth answers, but also combine knowledge in related fields in academic questions and answers to provide users with detailed background information, thereby helping users to more comprehensively understand complex academic issues.
[0026] In specific implementation, the semantic enhancement information of each entity is determined based on the preset large language model and the context information of each entity in the selected knowledge graph. The following method is used, namely: first, each entity in the selected knowledge graph is subjected to syntactic analysis by a dependency syntactic analysis tool, and the result of the syntactic analysis is used as the context information of each entity, wherein the context information of the entity refers to the role of the entity in the document and its dependency relationship with other vocabulary (such as verbs, other entities, etc.), which helps to determine the semantic meaning of the entity, the direction of the action, and the relationship between the entities. Then, each entity and its context information are input into the preset large language model, and the extracted result is used as the semantic enhancement information of each entity. Other methods may also be used in other embodiments, which are not limited here.
[0027] It should be noted that the semantic enhancement information of entities in this application means that the entities in the knowledge graph show more accurate semantic expression information characteristics in the academic field after expansion and enhancement.
[0028] In specific implementation, determining the semantic enhancement information of each relationship based on the preset large language model and the context information of each relationship in the selected knowledge graph can be implemented in the following manner, namely: first, extracting the context information of each relationship in the selected knowledge graph through a natural language processing tool, wherein the context information of a relationship refers to the grammatical and semantic connection between the relationship and other entities, verbs, nouns and other elements in the document; then, each relationship and its context information are input into the preset large language model, and the extracted result is used as the semantic enhancement information of each relationship; other methods may also be used in other embodiments, which will not be repeated here.
[0029] It should be noted that the semantic enhancement information of the relationship in this application represents that after the relationship in the knowledge graph is expanded and strengthened, it shows the characteristics of richer semantic expression information in the academic field.
[0030] In specific implementation, the semantic enhancement features of the selected knowledge graph in the academic question-answering process are determined based on the semantic enhancement information of all entities and the semantic enhancement information of all relationships. The following method is used, namely: first, the semantic enhancement information of all entities and all relationships in the selected knowledge graph is embedded into a low-dimensional space using graph embedding (for example, graph convolutional network, which is not limited here). This helps to capture the mutual connections between entities and relationships and their semantic information, thereby obtaining multiple vectors, and the obtained vectors are all used as semantic representation vectors. Then, the academic field theme corresponding to the question instruction is obtained, and the academic field theme is converted into a vector, and the converted vector is used as the academic theme vector. The cosine similarity between the academic theme vector and each semantic representation vector is calculated, and then all cosine similarities are summed, and the summed value is used as the semantic enhancement feature of the selected knowledge graph in the academic question-answering process. Other methods can also be used in other embodiments, which are not limited here.
[0031] It should be noted that the semantic enhancement features described in this application represent the feature values of the knowledge graph that enhances the capture of complex semantic relationships between academic terms in academic answers. The semantic enhancement features can accurately capture the specific meanings of terms in different contexts, avoid misunderstandings or incorrect reasoning caused by ambiguity, and ensure that the question-answering system can accurately understand and answer questions based on the specific context.
[0032] In step 103, the association structure of each knowledge graph is determined through the semantic annotations between the various document information and the structural information of each knowledge graph, and the semantic relevance of each knowledge graph in the academic question-answering process is determined based on all the semantic enhancement features and the association structure of each knowledge graph.
[0033] In some embodiments, reference Figure 3 As shown, this figure is a schematic diagram of the process of determining the association structure in some embodiments of the present application. In this embodiment, the association structure of each knowledge graph is determined by the semantic annotations between each document information and the structural information of each knowledge graph, which can be implemented by the following steps: First, in step 1031, multiple semantic association clusters of each document information are constructed; Next, in step 1032, the semantic annotations between the individual document information are determined based on all the semantic association clusters; Then, in step 1033, a global topology graph is determined through the structural information of all knowledge graphs; Finally, in step 1034, the association structure of each knowledge graph is determined based on the semantic annotations between the various document information and the global topology graph.
[0034] In specific implementation, constructing multiple semantic association clusters of each document information can be achieved in the following manner, namely: select one document information as the selected document information, use a natural language processing toolkit to remove irrelevant information (for example: punctuation marks, numbers, special characters, etc.) and stop words (for example: "is", "of", "in", etc.) in the selected document information, and then perform word segmentation to obtain multiple words, and use the obtained words as academic words, and then convert all academic words into vectors, further calculate the cosine similarity between all vectors, and then use the k-means clustering algorithm to cluster all cosine similarities to obtain multiple clusters, and use all the obtained clusters as semantic association clusters of the selected document information, wherein each academic word corresponds to multiple semantic association clusters. Other methods can also be used in other embodiments, which will not be repeated here.
[0035] It should be noted that the semantic association clusters described in the present application represent clusters formed by the cosine similarities between the academic vocabulary in the document information. In addition, when using the k-means clustering algorithm, the number of clusters can be set to the value obtained by taking the square root of the total number of all academic vocabulary in the document information and rounding it down. In other embodiments, it can be set to other values, which are not limited here.
[0036] In specific implementation, the semantic annotations between each document information can be determined based on all semantic association clusters in the following manner, namely: the cluster centers of all semantic association clusters are selected, and the cluster centers are used as association centers, and the set composed of each association center is used as the semantic annotation between each document information. Other methods can also be used in other embodiments, which are not limited here.
[0037] It should be noted that the semantic annotations described in this application represent feature marks of the semantic association relationship between document information.
[0038] In addition, it should be noted that the structural information of the knowledge graph in this application represents the logical structure formed between each entity and each relationship in the knowledge graph.
[0039] In specific implementation, the global topology map can be determined through the structural information of all knowledge graphs in the following manner, namely: first, a string matching method is used to identify the shared entities in each knowledge graph, so that the obtained entities are all used as shared entities, and then a semantic matching method is used to identify the shared relationships in each knowledge graph, so that the obtained relationships are all used as shared relationships, and then all the obtained shared entities and all the shared relationships are mapped into a new knowledge graph, and the obtained knowledge graph is used as the global topology map. Other methods can also be used in other embodiments, which will not be repeated here.
[0040] It should be noted that the global topology graph described in this application represents a graphical model of the overall structural relationship between knowledge graphs. The global topology graph is intended to capture the global topological relationship between different knowledge graphs so as to understand and operate these knowledge graphs at a higher level.
[0041] In specific implementation, the association structure of each knowledge graph is determined according to the semantic annotations between the various document information and the global topology map, which can be implemented in the following manner, namely: select a knowledge graph as the selected knowledge graph, and then select overlapping entities and relationships from the selected knowledge graph and the global topology map, and further select academic vocabulary that is the same as the overlapping entities from each academic vocabulary in the selected knowledge graph, and use the cluster center of the semantic association cluster corresponding to each academic vocabulary as the calibrated association center, and then select the association center closest to each calibrated association center from the semantic annotation, and then form a set of academic vocabulary corresponding to the semantic association cluster where each association center is located, and use the obtained set as the academic vocabulary set, and then construct a knowledge graph for all academic vocabulary in the academic vocabulary set, and use the obtained knowledge graph as the association structure of the selected knowledge graph, and continue to determine the association structure of the remaining knowledge graphs. Other methods can also be used in other embodiments, which are not limited here.
[0042] It should be noted that the association structure described in this application represents a derived structure of mutual associations between entities in the knowledge graph. The association structure can reveal the semantic logical relationship between different entities in the knowledge graph, thereby providing a basis for cross-domain knowledge integration.
[0043] In some embodiments, determining the semantic relevance of each knowledge graph in the academic question-answering process based on all semantic enhancement features and the associated structure of each knowledge graph can be achieved by the following steps: Perform linear fitting on all semantic enhancement features to obtain semantic enhancement feature curves; The semantic relevance of each knowledge graph in the academic question-answering process is determined based on the semantic enhancement feature curve and the association structure of each knowledge graph.
[0044] In the specific implementation, all the semantic enhancement features are sorted in ascending order, and the sorted sequence is used as the semantic enhancement feature sequence. The semantic enhancement feature sequence is fit by the least squares support vector machine algorithm in the prior art, and the fitted sequence is used as the semantic enhancement feature curve. At the same time, the fitted values are all used as semantic enhancement feature fitting values, and each semantic enhancement feature corresponds to a semantic enhancement feature fitting value. Other fitting algorithms can also be used in other embodiments, which are not limited here.
[0045] In specific implementation, the semantic relevance of each knowledge graph in the academic question-answering process is determined according to the association structure of the semantic enhancement feature curve and each knowledge graph, which can be achieved in the following manner, namely: select a knowledge graph as the selected knowledge graph, and then select the semantic enhancement feature fitting value corresponding to the semantic enhancement feature of the selected knowledge graph from the semantic enhancement feature curve, subtract the semantic enhancement feature from the semantic enhancement feature fitting value, and use the subtraction value as the enhancement deviation, then calculate the path length between all entities in the association structure of the selected knowledge graph, and then multiply the obtained path length by the enhancement deviation, and use the multiplication value as the semantic relevance of the selected knowledge graph in the academic question-answering process, and continue to determine the semantic relevance of the remaining knowledge graphs in the academic question-answering process. Other methods can also be used in other embodiments, which are not limited here.
[0046] It should be noted that the semantic relevance described in this application represents a parameter value that measures the degree of semantic association between academic terms in different documents. The semantic relevance can identify the differences between academic terms in different fields and accurately understand the meaning of academic terms through their contextual information, thereby eliminating ambiguity.
[0047] In step 104, the thought chain of the question instruction in the academic question-answering process is determined according to the dependency relationship between the question expression of the question instruction and each keyword in each document information.
[0048] In some embodiments, determining the thought chain of the question instruction in the academic question-answering process according to the dependency relationship between the question representation of the question instruction and each keyword in each document information can be implemented by the following steps: determining a problem representation of the problem instruction; Determine the dependency path of each document information according to the dependency relationship between each keyword in each document information and the question expression of the question instruction; The thinking chain of the question instruction in the academic question-answering process is determined through all dependent paths.
[0049] In the specific implementation, extracting the key information of the problem instruction and then determining the problem representation of the problem instruction can be achieved in the following way, namely: using the GPT-4 model to extract the keywords of the problem instruction, and using the obtained keywords as the key information of the problem instruction, further converting the key information into a vector, and using the obtained vector as the problem representation of the problem instruction. Other methods can also be used in other embodiments, which are not limited here.
[0050] In specific implementation, the following method can be used to determine the dependency path of each document information according to the dependency relationship between each keyword in each document information and the problem representation of the question instruction, namely: first, select a document information as the selected document information, use the GPT-4 model to extract all the keywords in the selected document information, and then use the dependency syntax analysis tool (for example: Stanford NLP) to convert all the keywords in the selected document information into a dependency tree, the nodes of the dependency tree represent keywords, and the edges of the dependency tree represent the dependency relationship between the nodes, and then calculate the cosine similarity between the problem representation of the question instruction and each node in the dependency tree, and then calculate the average of all cosine similarities, and use the average as the cosine similarity equilibrium value, select all nodes corresponding to the cosine similarities greater than the cosine similarity equilibrium value, and then use the Kruskal algorithm to connect the selected nodes to obtain a minimum spanning tree, and use the obtained minimum spanning tree as the dependency path of the selected document information, and continue to determine the dependency path of the remaining document information, wherein the minimum spanning tree is composed of multiple edges and multiple nodes, wherein each node corresponds to a keyword, and other methods can also be used in other embodiments, which will not be repeated here.
[0051] It should be noted that the dependency path described in this application represents a connection path formed by nodes having a dependency relationship between the keywords of the question instruction and the keywords in the literature. The dependency path can help the system infer the intrinsic relationship between words, entities or concepts. Especially in complex academic problems, the dependency path can reveal the deep semantic structure.
[0052] In specific implementation, determining the thinking chain of the question instruction in the academic question-answering process through all dependent paths can be implemented in the following way, namely: calculating the path length between all nodes in each dependent path, and taking the dependent path with the smallest path length as the thinking chain of the question instruction in the academic question-answering process. Other methods can also be used in other embodiments, which are not limited here.
[0053] It should be noted that the thought chain described in this application represents a logical chain of solving problems that is formed step by step through the dependency relationship of relevant academic keywords starting from the expression of the problem. The thought chain connects the relevant academic knowledge through dependency relationships to form a reasonable reasoning route, which helps to identify the semantics of polysemous words and synonyms, eliminate different understandings of academic terms in different contexts, and thus reduce ambiguity.
[0054] In step 105, the key index information of the question instruction in the academic question-answering process is determined through the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction.
[0055] In some embodiments, determining the key index information of the question instruction in the academic question answering process through the semantic relevance of each knowledge graph in the academic question answering process and the thought chain can be implemented by the following steps: Determine the key hint coefficient based on the semantic relevance of each knowledge graph in the academic question-answering process; The key index information of the question instruction in the academic question-answering process is determined through the key prompt coefficient and the thought chain.
[0056] It should be noted that the key prompt coefficient described in the present application represents the parameter that guides the association between keywords in the document and question instructions in the academic question-answering process. As a preferred embodiment, the key prompt coefficient can be determined according to the semantic relevance of each knowledge graph in the academic question-answering process. The following method is used, namely: taking the average of all semantic relevances and using the obtained average as the key prompt coefficient.
[0057] In specific implementation, the key index information of the question instruction in the academic question-answering process can be determined by the key prompt coefficient and the thinking chain in the following manner, namely: multiplying all the edges in the thinking chain by the key prompt coefficient, and using the obtained values as the key quantities of each edge, then taking the average of all the key quantities, further selecting all the edges greater than the mean, and using the nodes connected to each edge as the key nodes, and then using the set of keywords corresponding to all the key nodes as the key index information of the question instruction in the academic question-answering process. Other methods can also be used in other embodiments, which are not limited here.
[0058] It should be noted that the key index information described in this application represents information composed of academic keywords that are most relevant to the question instruction.
[0059] In specific implementation, the key index information is used as the semantic reasoning parameters of the large language model to generate an answer to the question instruction. This can be achieved in the following manner, namely: each keyword in the key index information and the question instruction are input into the large language model as the semantic reasoning parameters of the large language model, the interface of the large language model is called, information is returned after reasoning by the large language model, and the obtained information is used as the answer to the question instruction. Other methods can also be used in other embodiments, which will not be repeated here.
[0060] In addition, in another aspect of the present application, in some embodiments, the present application provides an academic question answering system that integrates knowledge graph and large language model, referring to Figure 4, which is a schematic diagram of the structure of an academic question-answering system integrating a knowledge graph and a large language model according to some embodiments of the present application. The academic question-answering system 400 integrating a knowledge graph and a large language model includes: an acquisition module 401, a processing module 402 and an execution module 403, which are respectively described as follows: Acquisition module 401, in this application, acquisition module 401 is mainly used to accept the user's question instruction, and then obtain different literature information in the academic field corresponding to the question instruction; Processing module 402, in this application, is used to construct a knowledge graph for each document information, and to perform semantic enhancement on each knowledge graph based on a preset large language model to obtain semantic enhancement features of each knowledge graph in the academic question-answering process; It should be noted that the processing module 402 in the present application is also used to determine the association structure of each knowledge graph through the semantic annotations between the various document information and the structural information of each knowledge graph, and determine the semantic relevance of each knowledge graph in the academic question-answering process according to all the semantic enhancement features and the association structure of each knowledge graph; It should be noted that the processing module 402 in the present application is also used to determine the thinking chain of the question instruction in the academic question-answering process according to the question representation of the question instruction and the dependency relationship between each keyword in each document information; Execution module 403. In the present application, execution module 403 is mainly used to determine the key index information of the question instruction in the academic question-answering process through the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and use the key index information as the semantic reasoning parameter of the large language model to generate an answer to the question instruction.
[0061] In addition, the present application also provides a computer device, which includes a memory and a processor, the memory stores code, and the processor is configured to obtain the code and execute the above-mentioned academic question-answering method that integrates the knowledge graph and the large language model.
[0062] In some embodiments, reference Figure 5 , which is a schematic diagram of the structure of a computer device for implementing an academic question-answering method integrating knowledge graph and large language model according to some embodiments of the present application. The academic question-answering method integrating knowledge graph and large language model in the above embodiment can be implemented by Figure 5 The computer device 500 shown in the figure is implemented, and the computer device 500 includes at least one processor 501, a communication bus 502, a memory 503 and at least one communication interface 504.
[0063] Processor 501 can be a general-purpose central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more for controlling the execution of the academic question-answering method that integrates the knowledge graph and the large language model in this application.
[0064] The communication bus 502 may be used to transmit information between the above-mentioned components.
[0065] The memory 503 may be a read only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read only memory (EEPROM), a compact disc read only memory (CD ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 503 may exist independently and be connected to the processor 501 via the communication bus 502. The memory 503 may also be integrated with the processor 501.
[0066] The memory 503 is used to store the program code for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the program code stored in the memory 503. The program code may include one or more software modules. The method described in the above method embodiment can be implemented by the processor 501 and one or more software modules in the program code in the memory 503.
[0067] The communication interface 504 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0068] In a specific implementation, as an embodiment, a computer device may include multiple processors, each of which may be a single-core (single CPU) processor or a multi-core (multi CPU) processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0069] The above-mentioned computer device may be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of computer device.
[0070] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned academic question-answering method that integrates the knowledge graph and the large language model.
[0071] In summary, in the academic question-answering system and method that integrates knowledge graph and large language model disclosed in the embodiment of the present application, the user's question instruction is first accepted, and then different document information corresponding to the academic field of the question instruction is obtained; the knowledge graph of each document information is constructed, and each knowledge graph is semantically enhanced based on the preset large language model to obtain the semantic enhancement features of each knowledge graph in the academic question-answering process; the association structure of each knowledge graph is determined by the semantic annotations between each document information and the structural information of each knowledge graph, and the semantic relevance of each knowledge graph in the academic question-answering process is determined according to all the semantic enhancement features and the association structure of each knowledge graph; the thinking chain of the question instruction in the academic question-answering process is determined according to the dependency relationship between the question representation of the question instruction and each keyword in each document information; the key index information of the question instruction in the academic question-answering process is determined by the semantic relevance of each knowledge graph in the academic question-answering process and the thinking chain, and the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction. The scheme of the present application can eliminate the ambiguity of academic terms, thereby improving the accuracy of interpreting the meaning of academic terms.
[0072] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0073] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An academic question answering method integrating knowledge graph and large language model, characterized in that: The steps include: Accepting the user's question instructions, and then obtaining different literature information in the academic field corresponding to the question instructions; Construct a knowledge graph for each document information, and perform semantic enhancement on each knowledge graph based on a preset large language model to obtain semantic enhancement features of each knowledge graph in the academic question-answering process; Determine the association structure of each knowledge graph through semantic annotations between each document information and the structural information of each knowledge graph, and determine the semantic relevance of each knowledge graph in the academic question-answering process based on all semantic enhancement features and the association structure of each knowledge graph; Determine the thought chain of the question instruction in the academic question-answering process according to the dependency relationship between the question expression of the question instruction and each keyword in each document information; The key index information of the question instruction in the academic question-answering process is determined by the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and the key index information is used as the semantic reasoning parameter of the large language model to generate the answer to the question instruction.
2. The method according to claim 1, characterized in that Semantically enhance each knowledge graph based on a preset large language model, and obtain the semantic enhancement features of each knowledge graph in the academic question-answering process, including: Select a knowledge graph as the selected knowledge graph; Determine semantic enhancement information of each entity based on a preset large language model and context information of each entity in the selected knowledge graph; Determine semantic enhancement information of each relationship through a preset large language model and context information of each relationship in the selected knowledge graph; Determine the semantic enhancement features of the selected knowledge graph in the academic question answering process based on the semantic enhancement information of all entities and the semantic enhancement information of all relationships; Continue to determine the semantic enhancement features of the remaining knowledge graphs in the academic question answering process.
3. The method according to claim 1, characterized in that Determining the association structure of each knowledge graph through the semantic annotations between each document information and the structural information of each knowledge graph specifically includes: Construct multiple semantic association clusters of each document information; Determine the semantic annotations between each document information according to all semantic association clusters; Determine the global topology through the structural information of all knowledge graphs; The association structure of each knowledge graph is determined based on the semantic annotations between the various document information and the global topology graph.
4. The method according to claim 1, characterized in that Determining the semantic relevance of each knowledge graph in the academic question-answering process based on all semantic enhancement features and the associated structure of each knowledge graph specifically includes: Perform linear fitting on all semantic enhancement features to obtain semantic enhancement feature curves; The semantic relevance of each knowledge graph in the academic question-answering process is determined based on the semantic enhancement feature curve and the association structure of each knowledge graph.
5. The method according to claim 1, characterized in that Determining the thinking chain of the question instruction in the academic question-answering process according to the dependency relationship between the question expression of the question instruction and each keyword in each document information specifically includes: determining a problem representation of the problem instruction; Determine the dependency path of each document information according to the dependency relationship between each keyword in each document information and the question expression of the question instruction; The thinking chain of the question instruction in the academic question-answering process is determined through all dependent paths.
6. The method according to claim 1, characterized in that The key index information of the question instruction in the academic question answering process is determined by the semantic relevance of each knowledge graph in the academic question answering process and the thought chain, specifically including: Determine the key hint coefficient based on the semantic relevance of each knowledge graph in the academic question-answering process; The key index information of the question instruction in the academic question-answering process is determined through the key prompt coefficient and the thought chain.
7. The method according to claim 1, characterized in that The large language model is GPT-4.
8. An academic question-answering system integrating knowledge graph and large language model, characterized in that: include: An acquisition module is used to receive a user's question instruction and then acquire different literature information in the academic field corresponding to the question instruction; A processing module is used to construct a knowledge graph for each document information, and to perform semantic enhancement on each knowledge graph based on a preset large language model to obtain semantic enhancement features of each knowledge graph in the academic question-answering process; The processing module is further used to determine the association structure of each knowledge graph through the semantic annotations between the various document information and the structural information of each knowledge graph, and determine the semantic relevance of each knowledge graph in the academic question-answering process according to all the semantic enhancement features and the association structure of each knowledge graph; The processing module is further used to determine the thinking chain of the question instruction in the academic question-answering process according to the dependency relationship between the question expression of the question instruction and each keyword in each document information; An execution module is used to determine the key index information of the question instruction in the academic question-answering process through the semantic relevance of each knowledge graph in the academic question-answering process and the thought chain, and use the key index information as the semantic reasoning parameter of the large language model to generate an answer to the question instruction.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the academic question answering method that integrates the knowledge graph and the large language model as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the academic question answering method that integrates a knowledge graph and a large language model as described in any one of claims 1 to 7.
Citation Information
Cited By
Knowledge base management and intelligent retrieval system and method based on large language model
CN120562563A
Academic research analysis method and device based on large language model and medium
CN121327108A
An academic research analysis method, device, and medium based on a large language model.
CN121327108B