A method and system for enhancing the accuracy of large-scale model answers based on knowledge graph
By building a knowledge graph and using a propt template to improve the accuracy of the answers of the big model, the shortcomings of the big model in understanding user intentions and providing answers are solved, and more accurate and professional answers are achieved.
Patent Information
- Application Number
- CN202411378497.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Existing large models have shortcomings in understanding user intentions and providing accurate answers, especially in the semantic context and contextual understanding of complex questions, resulting in low relevance of answers and prone to hallucinations.
By building a knowledge graph, obtaining text data sets for preprocessing, extracting entities and relationships, establishing entity connection graphs and fusing them, identifying user's problem intentions, and using the propt template to improve the answer accuracy of the big model.
By combining knowledge graphs and large models, we can understand user questions more accurately, provide professional and authoritative answers, and improve the accuracy of large models' answers.
Smart Images

Figure CN119271784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and more specifically, to a method and system for enhancing the accuracy of large-model answers based on knowledge graphs. Background Art
[0002] Knowledge Graph (KG) is a knowledge domain visualization or knowledge domain mapping map. It is a series of various graphics that show the knowledge development process and structural relationship. It uses visualization technology to describe knowledge resources and their carriers, mine, analyze, construct, draw and display knowledge and their mutual connections, and display complex knowledge fields through data mining, information processing, knowledge measurement and graph drawing. With the development of artificial intelligence technology, it currently has broad application prospects in the field of high-dimensional knowledge management.
[0003] While existing technologies can generate high-quality language models, due to the complexity and diversity of language, existing large models often fail to accurately understand user intent, resulting in low relevance of search results. Furthermore, due to their autoregressive generation, large language models are often constrained by limited contextual information and long-range dependencies. Their understanding of the semantic context and context of complex questions deviates from human intent, leading to poor reasoning, hallucinations, and practical problems of exceeding knowledge boundaries in specialized fields. Therefore, combining knowledge graphs with large models to enable them to better understand user intent and improve answer accuracy has become a pressing technical challenge in this field. Summary of the Invention
[0004] The present invention provides a method and system for enhancing the accuracy of large-scale model answers based on knowledge graphs, which is used to solve the problem of low accuracy of large-scale models in answering user questions in the prior art, including:
[0005] Obtain a text dataset, preprocess the text dataset, and extract entities and relationships in the text dataset;
[0006] Establish an entity connection graph based on the entities and relationships in the text dataset, fuse the entity nodes in the entity connection graph, and create a knowledge graph based on the fused entity nodes and relationships;
[0007] Obtain the user's query question, and determine the matching node for the user's query question based on the user's query question;
[0008] Identify the user's question intent based on the user's query question, determine the prompt template based on the user's question intent and the matching node corresponding to the user's query question, input the prompt template into the big model, and obtain a credible answer to the user's query question.
[0009] Furthermore, the preprocessing of the text dataset to extract entities and relationships in the text dataset includes:
[0010] Segment the text dataset using a preset segmentation algorithm, and perform vectorization on the segmented text dataset;
[0011] Create an entity relationship extraction model and extract entities and relationships from the vectorized text data based on the entity relationship extraction model.
[0012] Furthermore, establishing an entity connection graph based on entities and relationships in the text dataset includes:
[0013] The entities of text data are clustered based on the k-means clustering algorithm. The partitions corresponding to the entities are determined according to the clustering results. The entities in each partition are used as nodes and connected to obtain an entity connection graph.
[0014] Furthermore, clustering entities of text data based on the k-means clustering algorithm includes:
[0015] Preprocess the entity information of the text data, establish an entity information dataset based on the preprocessed entity information, and randomly select k initial cluster centers of the entity information dataset;
[0016] Calculate the Euclidean distance between the entity information in the entity information dataset and the initial cluster center, and divide the entity information into corresponding partitions according to the Euclidean distance between the entity information in the entity information dataset and the initial cluster center;
[0017] Calculate the average value of entity information in each partition, and recalculate the cluster center based on the average value of entity information in each partition;
[0018] Repeat the above steps until the cluster center no longer changes or the number of iterations reaches the maximum number of iterations, and obtain k final cluster centers.
[0019] Furthermore, the fusing of the entity nodes of the entity connection graph includes:
[0020] Calculating the degree of each entity node in the entity connection graph, and filtering out entity nodes whose degrees exceed a first preset threshold according to the degrees of each entity node in the entity connection graph;
[0021] Setting the entity node whose degree exceeds a first preset threshold as the central node, obtaining the connected components of the central node, calculating the connectability of each entity node in the connected components, and fusing the entity nodes whose connectability is greater than a second preset threshold with the central node;
[0022] Nodes whose connectability is less than or equal to the second preset threshold are connected to the central node, and the entity nodes are merged.
[0023] Furthermore, the calculation of the connectivity of each entity node in the connected component includes:
[0024] Calculate the cosine similarity between the entity node to be connected and the central entity node in the connected component, and calculate the connectivity of the entity node according to the connectivity calculation formula. The connectivity calculation formula is specifically:
[0025]
[0026] Where P is the connectability of the entity node, D is the degree of the entity node, α is the first weight value corresponding to the degree of the entity node, S is the cosine similarity between the entity node to be connected and the central entity node, and β is the second weight value corresponding to the cosine similarity between the entity node to be connected and the central entity node.
[0027] Furthermore, the step of determining a matching node for the user's query question according to the user's query question includes:
[0028] Obtain the user's query question, perform word segmentation on the query question, and obtain the user's question word segmentation;
[0029] Establish a user question knowledge base and determine the domain to which the user question belongs based on the frequency of the user question segmentation words in the user question knowledge base;
[0030] Establish a domain knowledge base, which stores domain keywords and corresponding synonym lists. Match the user question segmentation with the domain knowledge base to obtain the synonym list corresponding to the user question segmentation.
[0031] The synonym list corresponding to the user question segmentation is used as the user question supplement, the user question keywords are obtained according to the user question segmentation and the user question supplement, and the corresponding matching nodes are determined according to the user question keywords.
[0032] Furthermore, the step of determining the corresponding matching node based on the user question keywords includes:
[0033] Calculate the cosine similarity between the user question keywords and the entity nodes in the knowledge graph, and use the entity nodes in the knowledge graph whose cosine similarity is greater than a third preset threshold as matching nodes for the user question keywords.
[0034] Furthermore, the step of identifying the user's question intention based on the user's query question and determining the prompt template based on the user's question intention and the matching node corresponding to the user's query question includes:
[0035] Determine the user's question intent based on the user's question keywords, set the prompt template based on the user's question intent, and set placeholders in the prompt template;
[0036] Obtain the matching nodes of the user's question keywords in the knowledge graph, input the matching nodes and the relationship between the matching nodes into the corresponding placeholders, and obtain the prompt template.
[0037] In order to achieve the above objectives, the present invention also provides a large model answer accuracy enhancement system based on knowledge graph, comprising:
[0038] The first module is used to obtain a text dataset, preprocess the text dataset, and extract entities and relationships in the text dataset;
[0039] The second module is used to establish an entity connection graph based on the entities and relationships in the text dataset, fuse the entity nodes of the entity connection graph, and create a knowledge graph based on the fused entity nodes and relationships;
[0040] The third module is used to obtain the user's query question and determine the matching node of the user's query question according to the user's query question;
[0041] The fourth module is used to identify the user's question intent based on the user's query question, determine the prompt template based on the user's question intent and the matching node corresponding to the user's query question, input the prompt template into the large model, and obtain a credible answer to the user's query question.
[0042] The beneficial effects of the present invention are:
[0043] By applying the above technical solution, the present invention constructs a knowledge graph for the text dataset and combines the knowledge graph with the big model, which can more deeply understand the questions or needs raised by users, thereby providing more accurate and targeted answers or suggestions. At the same time, a prompt template is established based on the user's question intention, making the generated prompt more professional and authoritative, meeting the user's demand for high-quality information, and effectively improving the accuracy of the big model's answers to user questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1A schematic diagram of a process for enhancing the accuracy of large-model answers based on a knowledge graph, according to an embodiment of the present invention, is shown;
[0046] Figure 2 The figure shows the overall structure of a large model answer accuracy enhancement system based on knowledge graph proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0048] The embodiment of the present application provides a method for enhancing the accuracy of large-scale model answers based on knowledge graphs, such as Figure 1 Shown, including:
[0049] S101, obtaining a text dataset, preprocessing the text dataset, and extracting entities and relationships in the text dataset;
[0050] In some embodiments of the present application, the preprocessing of the text dataset and the extraction of entities and relationships in the text dataset include: segmenting the text dataset according to a preset segmentation algorithm, and vectorizing the segmented text dataset; creating an entity relationship extraction model, and extracting entities and relationships from the vectorized text data based on the entity relationship extraction model.
[0051] In this embodiment, the text dataset is segmented based on a preset segmentation algorithm, and useless words in the text dataset are removed. The segmented text dataset is vectorized based on the word2vec algorithm, and the entities and relationships of the vectorized text data are extracted according to the BERT model.
[0052] S102, establishing an entity connection graph based on the entities and relationships in the text dataset, fusing the entity nodes of the entity connection graph, and creating a knowledge graph based on the fused entity nodes and relationships;
[0053] In some embodiments of the present application, the entity connection graph is established based on the entities and relationships in the text data set, including: clustering the entities of the text data based on the k-means clustering algorithm, determining the partitions corresponding to the entities according to the clustering results, and treating the entities in each partition as nodes and connecting them to obtain an entity connection graph.
[0054] In some embodiments of the present application, the entities of text data are clustered based on the k-means clustering algorithm, including: preprocessing the entity information of the text data, establishing an entity information data set based on the preprocessed entity information, and randomly selecting k initial cluster centers of the entity information data set; calculating the Euclidean distance between the entity information in the entity information data set and the initial cluster center, and dividing the entity information into corresponding partitions based on the Euclidean distance between the entity information in the entity information data set and the initial cluster center; calculating the average value of the entity information in each partition, and recalculating the cluster center based on the average value of the entity information in each partition; repeatedly iterating the above steps until the cluster center no longer changes or the number of iterations reaches the maximum number of iterations, and obtaining k final cluster centers.
[0055] In this embodiment, the k value is set according to the size of the text data. In this embodiment, the k value is set to 5. The entities of the text data are clustered based on the k-means clustering algorithm. According to the clustering results, the entities in each partition whose Euclidean distance is less than a preset threshold are edge-connected to obtain an entity connection graph.
[0056] In some embodiments of the present application, the fusing of entity nodes of the entity connection graph includes:
[0057] Calculating the degree of each entity node in the entity connection graph, and filtering out entity nodes whose degrees exceed a first preset threshold according to the degrees of each entity node in the entity connection graph;
[0058] Setting the entity node whose degree exceeds a first preset threshold as the central node, obtaining the connected components of the central node, calculating the connectability of each entity node in the connected components, and fusing the entity nodes whose connectability is greater than a second preset threshold with the central node;
[0059] Nodes whose connectability is less than or equal to the second preset threshold are connected to the central node, and the entity nodes are merged.
[0060] In some embodiments of the present application, the calculation of the connectivity of each entity node in the connected component includes: calculating the cosine similarity between the entity node to be connected and the central entity node in the connected component, and calculating the connectivity of the entity node according to the connectivity calculation formula, wherein the connectivity calculation formula is specifically:
[0061]
[0062] Where P is the connectability of the entity node, D is the degree of the entity node, α is the first weight value corresponding to the degree of the entity node, S is the cosine similarity between the entity node to be connected and the central entity node, and β is the second weight value corresponding to the cosine similarity between the entity node to be connected and the central entity node.
[0063] In this embodiment, node fusion is performed by calculating the connectivity between each entity node and the central node. The entities with the same semantics as the central node are found through the connectivity and fused, thereby reducing redundant information and improving the accuracy of the knowledge graph. It can also enhance the connectivity of the knowledge graph to a certain extent and improve the efficiency of information retrieval.
[0064] S103, obtaining a user's query question, and determining a matching node for the user's query question according to the user's query question;
[0065] In some embodiments of the present application, determining the matching node of the user's query question based on the user's query question includes: obtaining the user's query question, performing word segmentation processing on the query question, and obtaining user question word segmentations; establishing a user question knowledge base, and determining the domain to which the user question belongs based on the frequency of occurrence of the user question word segmentations in the user question knowledge base; establishing a domain knowledge base, the domain knowledge base stores domain keywords and corresponding synonym lists, matching the user question word segmentations with the domain knowledge base, and obtaining a synonym list corresponding to the user question word segmentations; using the synonym list corresponding to the user question word segmentations as a user question supplement, obtaining user question keywords based on the user question word segmentations and the user question supplement, and determining the corresponding matching node based on the user question keywords.
[0066] In this embodiment, a user question knowledge base and a domain knowledge base are created in advance, a user question supplement is obtained through the user question knowledge base and the domain knowledge base, and user question keywords are obtained through user question word segmentation and the user question supplement.
[0067] In some embodiments of the present application, determining the corresponding matching node based on the user question keyword includes: calculating the cosine similarity between the user question keyword and the entity node in the knowledge graph, and taking the entity node in the knowledge graph whose cosine similarity is greater than a third preset threshold as the matching node for the user question keyword.
[0068] In this embodiment, based on vectorization processing of user question keywords, matching nodes are obtained by calculating the cosine similarity between the user question keywords and the entity nodes in the knowledge graph.
[0069] S104, identifying the user's question intention based on the user's query question, determining a prompt template based on the user's question intention and the matching node corresponding to the user's query question, inputting the prompt template into the big model, and obtaining a credible answer to the user's query question.
[0070] In some embodiments of the present application, identifying the user's question intention based on the user's query question, and determining the prompt template based on the user's question intention and the matching node corresponding to the user's query question include: determining the user's question intention based on the user's question keywords, setting the prompt template based on the user's question intention, and setting a placeholder in the prompt template; obtaining the matching nodes of the user's question keywords in the knowledge graph, inputting the matching nodes and the relationship between the matching nodes into the corresponding placeholder to obtain the prompt template.
[0071] In this embodiment, a user intention analysis model is established to determine the user's question intention, and a corresponding prompt template is customized according to the user's question intention. Placeholders corresponding to matching nodes and the relationship between matching nodes are set in the prompt template. The matching nodes corresponding to the current user's question keywords and the relationship between matching nodes are input into the corresponding placeholders to obtain a prompt template. The prompt template is a structured input form used to guide the language model to perform specific tasks and generate a specific type of text output. In natural language processing, prompt templates for specific tasks are usually used to provide input to the model to prompt it to generate text that meets specific requirements. The prompt template in the dialogue system may be more complex and may include information such as contextual dialogue history, user intention, and previous responses of the system to guide the model to generate natural and coherent responses. By inputting the prompt template into the large model, a credible answer to the user's query question can be obtained.
[0072] Based on the same technical concept, such as Figure 2 As shown, the present invention also provides a large model answer accuracy enhancement system based on knowledge graph, including:
[0073] The first module is used to obtain a text dataset, preprocess the text dataset, and extract entities and relationships in the text dataset; the second module is used to establish an entity connection graph based on the entities and relationships in the text dataset, fuse the entity nodes of the entity connection graph, and create a knowledge graph based on the fused entity nodes and relationships; the third module is used to obtain the user's query question and determine the matching node of the user's query question based on the user's query question; the fourth module is used to identify the user's question intent based on the user's query question, determine the prompt template based on the user's question intent and the matching node corresponding to the user's query question, input the prompt template into the large model, and obtain a credible answer to the user's query question.
[0074] By applying the above technical solution, the present invention obtains a text dataset, preprocesses the text dataset, extracts entities and relationships in the text dataset; establishes an entity connection graph based on the entities and relationships in the text dataset, fuses the entity nodes of the entity connection graph, and creates a knowledge graph based on the fused entity nodes and relationships; obtains a user's query question, determines a matching node for the user's query question based on the user's query question; identifies the user's question intent based on the user's query question, determines a prompt template based on the user's question intent and the matching nodes corresponding to the user's query question, inputs the prompt template into a large model, and obtains a credible answer to the user's query question. The present invention matches the text dataset based on the knowledge graph, effectively improving the accuracy of the large model's answers to user questions.
[0075] Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented through hardware or by using software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) and includes a number of instructions for enabling a computer device (such as a personal computer, a server, or a network device) to execute the methods described in various implementation scenarios of the present invention.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for enhancing the accuracy of large-scale model answers based on knowledge graph, characterized in that: The method comprises: Obtain a text dataset, preprocess the text dataset, and extract entities and relationships in the text dataset; Establish an entity connection graph based on the entities and relationships in the text dataset, fuse the entity nodes in the entity connection graph, and create a knowledge graph based on the fused entity nodes and relationships; Obtain the user's query question, and determine the matching node for the user's query question based on the user's query question; Identify the user's question intent based on the user's query question, determine the prompt template based on the user's question intent and the matching node corresponding to the user's query question, input the prompt template into the big model, and obtain a credible answer to the user's query question; The preprocessing of the text dataset to extract entities and relationships in the text dataset includes: Segment the text dataset using a preset segmentation algorithm, and perform vectorization on the segmented text dataset; Create an entity relationship extraction model and extract entities and relationships from the vectorized text data based on the entity relationship extraction model; The step of establishing an entity connection graph based on entities and relationships in a text dataset includes: Cluster the entities of text data based on the k-means clustering algorithm, determine the partitions corresponding to the entities based on the clustering results, and connect the entities in each partition as nodes to obtain an entity connection graph; The method of clustering entities of text data based on the k-means clustering algorithm includes: Preprocess the entity information of the text data, establish an entity information dataset based on the preprocessed entity information, and randomly select k initial cluster centers of the entity information dataset; Calculate the Euclidean distance between the entity information in the entity information dataset and the initial cluster center, and divide the entity information into corresponding partitions according to the Euclidean distance between the entity information in the entity information dataset and the initial cluster center; Calculate the average value of entity information in each partition, and recalculate the cluster center based on the average value of entity information in each partition; Repeat the above steps until the cluster center no longer changes or the number of iterations reaches the maximum number of iterations, and obtain k final cluster centers; The fusing of the entity nodes of the entity connection graph includes: Calculating the degree of each entity node in the entity connection graph, and filtering out entity nodes whose degrees exceed a first preset threshold according to the degrees of each entity node in the entity connection graph; Setting the entity node whose degree exceeds a first preset threshold as the central node, obtaining the connected components of the central node, calculating the connectability of each entity node in the connected components, and fusing the entity nodes whose connectability is greater than a second preset threshold with the central node; Connecting nodes whose connectability is less than or equal to a second preset threshold to the central node to fuse the entity nodes; The calculating the connectivity of each entity node in the connected component includes: Calculate the cosine similarity between the entity node to be connected and the central entity node in the connected component, and calculate the connectivity of the entity node according to the connectivity calculation formula. The connectivity calculation formula is specifically as follows: Where P is the connectability of the entity node, D is the degree of the entity node, α is the first weight value corresponding to the degree of the entity node, S is the cosine similarity between the entity node to be connected and the central entity node, and β is the second weight value corresponding to the cosine similarity between the entity node to be connected and the central entity node.
2. The method for enhancing the accuracy of large-scale model answers based on knowledge graph according to claim 1 is characterized in that: The step of determining a matching node for the user's query question according to the user's query question includes: Obtain the user's query question, perform word segmentation on the query question, and obtain the user's question word segmentation; Establish a user question knowledge base and determine the domain to which the user question belongs based on the frequency of the user question segmentation words in the user question knowledge base; Establish a domain knowledge base, which stores domain keywords and corresponding synonym lists. Match the user question segmentation with the domain knowledge base to obtain the synonym list corresponding to the user question segmentation. The synonym list corresponding to the user question segmentation is used as the user question supplement, the user question keywords are obtained according to the user question segmentation and the user question supplement, and the corresponding matching nodes are determined according to the user question keywords.
3. The method for enhancing the accuracy of large-scale model answers based on knowledge graph according to claim 2 is characterized in that: Determining the corresponding matching node according to the user question keyword includes: Calculate the cosine similarity between the user question keywords and the entity nodes in the knowledge graph, and use the entity nodes in the knowledge graph whose cosine similarity is greater than a third preset threshold as matching nodes for the user question keywords.
4. The method for enhancing the accuracy of large-scale model answers based on knowledge graph according to claim 3 is characterized in that: The step of identifying the user's question intention based on the user's query question and determining the prompt template based on the user's question intention and the matching node corresponding to the user's query question includes: Determine the user's question intent based on the user's question keywords, set the prompt template based on the user's question intent, and set placeholders in the prompt template; Obtain the matching nodes of the user's question keywords in the knowledge graph, input the matching nodes and the relationship between the matching nodes into the corresponding placeholders, and obtain the prompt template.
5. A large model answer accuracy enhancement system based on knowledge graph, characterized by: include: The first module is used to obtain a text dataset, preprocess the text dataset, and extract entities and relationships in the text dataset; The preprocessing of the text dataset to extract entities and relationships in the text dataset includes: Segment the text dataset using a preset segmentation algorithm, and perform vectorization on the segmented text dataset; Create an entity relationship extraction model and extract entities and relationships from the vectorized text data based on the entity relationship extraction model; The second module is used to establish an entity connection graph based on the entities and relationships in the text dataset, fuse the entity nodes of the entity connection graph, and create a knowledge graph based on the fused entity nodes and relationships; The step of establishing an entity connection graph based on entities and relationships in a text dataset includes: Cluster the entities of text data based on the k-means clustering algorithm, determine the partitions corresponding to the entities based on the clustering results, and connect the entities in each partition as nodes to obtain an entity connection graph; The method of clustering entities of text data based on the k-means clustering algorithm includes: Preprocess the entity information of the text data, establish an entity information dataset based on the preprocessed entity information, and randomly select k initial cluster centers of the entity information dataset; Calculate the Euclidean distance between the entity information in the entity information dataset and the initial cluster center, and divide the entity information into corresponding partitions according to the Euclidean distance between the entity information in the entity information dataset and the initial cluster center; Calculate the average value of entity information in each partition, and recalculate the cluster center based on the average value of entity information in each partition; Repeat the above steps until the cluster center no longer changes or the number of iterations reaches the maximum number of iterations, and obtain k final cluster centers; The fusing of the entity nodes of the entity connection graph includes: Calculating the degree of each entity node in the entity connection graph, and filtering out entity nodes whose degrees exceed a first preset threshold according to the degrees of each entity node in the entity connection graph; Setting the entity node whose degree exceeds a first preset threshold as the central node, obtaining the connected components of the central node, calculating the connectability of each entity node in the connected components, and fusing the entity nodes whose connectability is greater than a second preset threshold with the central node; Connecting nodes whose connectability is less than or equal to a second preset threshold to the central node to fuse the entity nodes; The calculating the connectivity of each entity node in the connected component includes: Calculate the cosine similarity between the entity node to be connected and the central entity node in the connected component, and calculate the connectivity of the entity node according to the connectivity calculation formula. The connectivity calculation formula is specifically as follows: Where P is the connectability of the entity node, D is the degree of the entity node, α is the first weight value corresponding to the degree of the entity node, S is the cosine similarity between the entity node to be connected and the central entity node, and β is the second weight value corresponding to the cosine similarity between the entity node to be connected and the central entity node; The third module is used to obtain the user's query question and determine the matching node of the user's query question according to the user's query question; The fourth module is used to identify the user's question intent based on the user's query question, determine the prompt template based on the user's question intent and the matching node corresponding to the user's query question, input the prompt template into the large model, and obtain a credible answer to the user's query question.
Citation Information
Patent Citations
Intelligent question answering method and device
CN106874441A
Large language model medical question-answering system based on medical record knowledge graph
CN117056493A
Data processing method based on knowledge graph
CN117973519A
Ancient book knowledge base intelligent question and answer method, device and equipment based on large model technology
CN118332091A