Large model knowledge graph question answering method and device based on potential unit fine-tuning
By combining a large language model fine-tuned by latent units with a knowledge graph, relational reasoning paths are generated and evaluated, solving the problems of low efficiency and high noise in knowledge graph question answering, and achieving more efficient, accurate question answering capabilities and better flexibility.
Patent Information
- Application Number
- CN202411487073.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-10-23
AI Technical Summary
Existing knowledge graph question answering methods are insufficient in terms of efficiency and accuracy, especially in the process of graph retrieval and reasoning, where they are prone to introducing noise and misleading context, and lack flexibility and generalization ability.
By learning latent relationships through a large language model and knowledge graph based on latent unit fine-tuning, relation reasoning paths are generated, and the most relevant path is selected to obtain the answer through cosine similarity evaluation. The model performance is optimized by combining latent unit fine-tuning and implicit learning processes.
It improves the accuracy and efficiency of knowledge graph question answering, reduces noise interference, enhances the flexibility and generalization ability of the model, reduces dependence on external models, and ensures the stability and consistency of the model.
Smart Images

Figure CN119443271B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of large model knowledge graph question answering, and particularly relates to a large model knowledge graph question answering method and device based on latent unit fine-tuning. BACKGROUND
[0002] Knowledge graphs (KGs) are structured repositories of factual information and have received extensive attention from researchers. The goal of KG reasoning is to derive new insights based on existing graph structures and facts. One major reasoning task in this area is knowledge graph question answering (KGQA), which aims to provide answers based on the knowledge contained in KGs. KGQA methods are generally categorized into three types: embedding-based methods, semantic parsing methods, and retrieval-augmented methods.
[0003] Embedding-based methods represent entities and relations in embedding space and use specialized model architectures for reasoning. For example, KVM uses a key-value memory network to store triples for reasoning, while EmbedKGQA and NSM use sequence models to simulate a multi-hop reasoning process. However, these methods often require customized model architectures, limiting their flexibility and generalization capabilities. Semantic parsing methods translate questions into structured queries that can be executed by a query engine to obtain answers. ArcaneQA dynamically generates queries based on intermediate results, while RnG-KBQA enumerates all possible queries and then ranks them to generate the final output. These methods heavily rely on the quality of generated queries, and if the queries are not executable, answers cannot be obtained. Retrieval-augmented methods focus on retrieving relevant facts from KGs to enhance reasoning performance. Early methods use algorithms such as page rank or random walk to retrieve subgraphs for reasoning, but they often ignore semantic information in the question, resulting in a lot of noise in the retrieval results. To address this issue, some studies have proposed subgraph retrieval methods based on relation paths to improve performance. Other methods retrieve triples using BM25 or DPR to enhance the performance of LLMs, but they often discard the structural information of KGs, resulting in poor performance.
[0004] Recently, UniKGQA integrated graph retrieval and reasoning into a single model, achieving state-of-the-art results in the KGQA task using LLMs. DECAF combined semantic parsing with LLM reasoning to jointly generate answers and performed well in the KGQA task. RoG proposed a graph-based reasoning method that combined the strengths of both: it first generated a planning path and then retrieved an effective relation reasoning path from the KG as a knowledge context to assist the LLM in generating responses. However, they still face the problems of low efficiency and misleading context. SUMMARY
[0005] To solve the above technical problems, the present application provides a large model graph question answering method based on latent unit fine-tuning and a device.
[0006] The purpose of the present application is achieved by the following technical solutions:
[0007] In a first aspect, a large model graph question answering method based on latent unit fine-tuning is provided, which comprises the following steps:
[0008] Based on the symbolized knowledge graph and the relationship path, and using the high-dimensional prompt word to represent the variable of the latent unit, the large language model is learned with the latent relationship of the knowledge graph to generate a relationship reasoning path, wherein the input layer of the large language model is additionally attached with a trainable latent unit; and the latent unit is randomly initialized by a normal distribution and is fine-tuned together with the large language model in the hidden learning process.
[0009] The relationship reasoning path is evaluated for relevance, and the most relevant relationship reasoning path is selected.
[0010] The natural language question is input, and the answer in the knowledge graph is obtained through the most relevant relationship reasoning path.
[0011] In some embodiments, the knowledge graph is a repository containing factual information, the factual information is composed of triples, each triple includes two entities and the relationship between the two entities, all the entities in the knowledge graph constitute an entity set, and all the relationships between the entities in the knowledge graph constitute a relationship set.
[0012] The relationship path is a path connected by multiple relationships in order, each relationship in the path belongs to the relationship set, and the length of the path represents the number of connected relationships.
[0013] In some embodiments, learning the latent relationship of the large language model with the knowledge graph comprises:
[0014] Using a set of latent units to approximate the posterior information statistics of the effective relationship path by minimizing the KL divergence.
[0015] In some embodiments, using a set of latent units to approximate the posterior information statistics of the effective relationship path by minimizing the KL divergence comprises:
[0016] Given a question, an answer and a set of latent units, the relationship reasoning path connecting the question entity and the answer entity in the knowledge graph is identified, the corresponding relationship reasoning path is regarded as an effective relationship path, and is used as a solution to answer the question.
[0017] The posterior distribution in posterior information statistics is formalized as the conditional probability of path existence, and is assumed to be uniformly distributed over all valid relationship paths, and the KL divergence is based on the shortest path between question-entity and answer-entity in the knowledge graph as a supervision signal to maximize the probability of the large language model generating valid relationship paths.
[0018] In some embodiments, the relevance evaluation is performed on the relationship reasoning paths, and the most relevant relationship reasoning path is selected.
[0019] Based on the large language model after fine-tuning and the latent unit set in implicit learning, a conditional probability function of the relationship reasoning path is constructed, and the relationship reasoning path that maximizes the conditional probability is filtered out through the conditional probability function, i.e., the probability of the latent unit is maximum under the condition of the given question and reasoning path, wherein the relationship reasoning path that maximizes the conditional probability is the most relevant relationship reasoning path.
[0020] To this end, the cosine similarity between each pair of generated token vectors and corresponding latent units is calculated, the cosine similarity measures the degree of similarity between vectors, and the value ranges from -1 to 1, the aggregation score is obtained by accumulation, and the relationship reasoning path that is most relevant to the question and most matched with the latent unit is filtered out by maximizing the aggregation score, thereby obtaining the most relevant relationship reasoning path.
[0021] In a first aspect, a large model knowledge graph question answering device based on latent unit fine-tuning is provided, which comprises a memory and one or more processors, and the memory stores executable code, characterized in that when the processor executes the executable code, it is used to implement the large model knowledge graph question answering method based on latent unit fine-tuning as described in any one of the first aspects.
[0022] The beneficial effects of the present application are:
[0023] 1. Effective filtering of irrelevant context: By filtering irrelevant or misleading context information, the method can reduce noise interference and improve the accuracy of reasoning and model performance.
[0024] 2. Improve operational efficiency: Compared with traditional methods, the present application significantly improves the operational efficiency while maintaining the model performance, reducing the consumption of computing resources.
[0025] 3. Integration of graph retrieval and reasoning: The present application integrates graph retrieval and reasoning into one model, optimizing the overall process in the knowledge graph question answering task and achieving more efficient reasoning.
[0026] 4. Better flexibility and generalization ability: Compared with existing methods that require customizing model architectures, the present method has better flexibility and generalization ability, which can adapt to different knowledge graph scenarios.
[0027] 5. Consideration of the advantages of multiple reasoning methods: The present method combines the advantages of graph-based reasoning and path planning, which can generate effective reasoning paths in the knowledge graph and improve the model's question and answer ability.
[0028] 6. Reduce dependence on external models: The present method does not depend on the performance of external models and can complete the reasoning task independently, ensuring the stability and consistency of the model. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0030] Figure 1 is the overall flowchart of the large model graph question and answer method based on latent unit fine-tuning provided by the present application in an embodiment;
[0031] Figure 2 is the model graph of the large model graph question and answer method based on latent unit fine-tuning provided by the present application in an embodiment;
[0032] Figure 3 is the structural schematic diagram of the large model graph question and answer device based on latent unit fine-tuning provided by the present application in an embodiment. DETAILED DESCRIPTION
[0033] In order to better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the drawings.
[0034] As Figures 1-2 shown in an embodiment, a large model graph question and answer method based on latent unit fine-tuning is provided, which includes the following steps:
[0035] Based on the symbolized knowledge graph and the relationship path and the variable using the high-dimensional prompt word representation latent unit, the large language model is used for latent relationship learning with the knowledge graph, and a relationship reasoning path is generated, wherein an input layer of the large language model is additionally provided with a trainable latent unit; the latent unit is randomly initialized through a normal distribution and is fine-tuned together with the large language model in a hidden learning process; through the fine-tuning process, the LLMs can generate a relationship path, thereby strengthening the connection between the large language model and the underlying knowledge graph relationship. The latent unit serves as a bridge to optimize the understanding and generation of the model for these relationship reasoning paths.
[0036] In some embodiments, the knowledge graph (KG) is a repository containing factual information, which is composed of triples, each triple including two entities and the relationship between the two entities, all entities in the knowledge graph constitute an entity set, and all relationships between entities in the knowledge graph constitute a relationship set, specifically, the knowledge graph is: G = (e, r, e') | e, e' ∈ E, r ∈ R, wherein E represents the entity set, R represents the relationship set, and the relationship path is defined as a sequence of relationships: z = r1, r2,..., r l , wherein r i i represents the i-th relationship in the path, and l represents the length of the path.
[0037] The relationship path is a path connected by multiple relationships in sequence, each relationship in the path belongs to the relationship set, and the length of the path represents the number of connected relationships, specifically:
[0038] The relationship reasoning path is a specific instance of the relationship path z in the knowledge graph: w z = e0→(r1)e1→(r2)...→(r l )e l , wherein e i i represents the i-th entity in the path, and r i represents the i-th relationship in the relationship path z.
[0039] The large model graph question answering method based on latent unit fine-tuning is an inference method for answering questions using a knowledge graph. Given a natural language question q and a knowledge graph G, the goal is to design a function f to predict an answer a ∈ A q based on the knowledge in G, i.e., a = f(q, G). It is assumed that the entities e q ∈ T q mentioned in the question q and the answer a ∈ A q have been labeled and linked to the corresponding entities in G, i.e.
[0040] Prompt Tuning is achieved by appending additional trainable tokens (also called soft prompts) to the input layer, which can also be regarded as latent units. However, they are only used to simulate the update direction of parameters. These latent units are used in contextual learning to model implicit topics or concepts, which is formulated as: P(x 1:T ) = ∫ Θ P(x 1:T | θ)P(θ) dθ,
[0041] where θ ∈ represents a high-dimensional latent variable, Θ is the variable space, and x 1:T denotes the input token. Based on PromptTuning, some new latent unit tokens are added to the original vocabulary of large language models (LLMs), denoted as ([unitstoken0][unitstoken1]...). These latent units are randomly initialized by a normal distribution and are fine-tuned with LLMs during latent learning.
[0042] In latent learning, the goal is to fine-tune a large language model (LLM) with a set of latent units to generate a relationship reasoning path, thereby modeling the latent connection between the LLM and the knowledge graph (KG).
[0043] In some embodiments, latent relationship learning of a large language model with a knowledge graph includes:
[0044] Using a set of latent units to approximate the posterior information statistics of the effective relationship path by minimizing the KL divergence.
[0045] In some embodiments, using a set of latent units to approximate the posterior information statistics of the effective relationship path by minimizing the KL divergence includes:
[0046] Given a question, an answer, and a set of latent units, identify the relationship reasoning path that connects the question entity and the answer entity in the knowledge graph, and the corresponding relationship reasoning path is regarded as an effective relationship path and is used as a solution to answer the question.
[0047] The posterior distribution in the posterior information statistics is formalized as the conditional probability of the existence of the path, and it is assumed that it is uniformly distributed on all effective relationship paths, and the KL divergence is based on the shortest path between the question-entity and the answer-entity in the knowledge graph as a supervision signal, maximizing the probability of the large language model generating an effective relationship path.
[0048] Specifically, using a set of latent units ([unitstoken0][unitstoken1]...), the posterior information statistics Q(z) of effective relational paths are approximated by minimizing the KL divergence. Given a question q, an answer a, and a set of latent units U, identify entity e in the connection KGs. q and e a Path example: w z =e0→(r1)e1→(r2)...→(r l )e l The corresponding relational paths are z = r1, r2, ..., r l It is considered efficient and a reliable solution to the question q. The posterior distribution Q(z) can be formally approximated as:
[0049]
[0050] Here, it is assumed that in all valid relation paths The above is a uniform distribution, and Indicates in There exists a connecting entity e q and e a The path instances. Therefore, the KL divergence can be calculated as:
[0051]
[0052] Among them, using KGs e q and e a The shortest path between As a supervisory signal, the probability of LLMs generating effective relational paths is maximized by optimizing the above formula. This also involves learning the latent associations between relational reasoning paths and query statements in the latent space.
[0053] By evaluating the relevance of relational reasoning paths and selecting the most relevant ones, we can ensure that the chosen relational reasoning paths accurately represent the potential relationships in the graph.
[0054] In some embodiments, relevance assessment of relational reasoning paths and selection of the most relevant relational reasoning path include:
[0055] Based on the fine-tuned large language model and the latent unit set in implicit learning, a conditional probability function for relational reasoning paths is constructed. The relational reasoning path that maximizes the conditional probability is selected through the conditional probability function. That is, given the question and the reasoning path, the probability of the latent unit is maximized. Among them, the relational reasoning path that maximizes the conditional probability is the most relevant relational reasoning path.
[0056] To this end, the pairwise cosine similarity between the generated multiple token vectors and the corresponding latent units is calculated, which measures the degree of similarity between vectors, with a value ranging from -1 to 1. The aggregated score is obtained by accumulation, and by maximizing the aggregated score, the most relevant relationship reasoning path that is most relevant to the question and most matched to the latent unit is selected, thereby obtaining the most relevant relationship reasoning path.
[0057] Specifically, the relationship reasoning path is filtered using the fine-tuned large language model and the latent unit set U in the implicit learning, which requires selecting a path (q, w θ ) that can maximize P i (U|q, w k ):
[0058]
[0059] where q represents the question, w i represents the corresponding reasoning path, P θ (U|q, w i ) is the conditional probability, which represents the probability of the latent unit U given the question q and the reasoning path w i . In order to improve the accuracy of the model in generating effective reasoning paths, it is necessary to find the path that maximizes P θ (U|q, w i ).
[0060] To this end, given the generated N token vectors v i , and considering that there are multiple latent units u j , the pairwise cosine similarity between each token vector v i and each latent unit u j is calculated. The aggregated cosine similarity score, i.e., the aggregated score S, is calculated as follows:
[0061]
[0062] where cos_sim(v i , u j ) represents the cosine similarity between the token vector v i and the latent unit u j . The cosine similarity measures the angle between two vectors, i.e., their degree of similarity, with a value between -1 and 1, where 1 represents complete similarity and -1 represents complete dissimilarity. This aggregated score S serves as the final comparison standard for evaluating and filtering the generated reasoning paths. By maximizing this score, the reasoning path that is most relevant to the question q and most matched to the latent unit U can be selected, thereby improving the accuracy and effectiveness of the model reasoning.
[0063] Input natural language questions are processed through the most relevant reasoning paths to obtain answers from the knowledge graph.
[0064] The fine-tuned latent units are used to filter out irrelevant and misleading context snippets during LLM generation. By eliminating these redundant elements, the model's performance is significantly improved, resulting in more accurate and efficient responses. This filtering process ensures that the output is not only relevant but also precise, enhancing the overall effectiveness of the method chain. The core task of the reasoning module is to generate an accurate answer a from the input question q and a set of reasoning paths w t The top-k scoring reasoning paths are selected from the path selection phase as the final reasoning path set w t These paths represent the most likely relationship paths in the knowledge graph that explain the question. Through this process, irrelevant or misleading context information can be effectively filtered out. Traditional methods often introduce noise when dealing with a large number of possible paths, leading the model's reasoning results to deviate from the correct answer. However, the proposed method focuses on the most relevant paths, significantly reducing this risk. In addition, by selecting the optimal path set w t , not only does it improve the model's reasoning accuracy, but it also reduces unnecessary computational overhead. This means that without compromising model performance, more efficient operation can be achieved, saving computing resources and speeding up reasoning. This improvement is particularly important in practical applications, especially in scenarios that require real-time responses or deal with large-scale knowledge graphs. Overall, the reasoning module ensures that the model not only generates high-quality answers but also completes tasks in a more efficient manner by carefully selecting and processing reasoning paths. The effectiveness of this method has been verified in multiple experiments, demonstrating its great potential in complex reasoning tasks.
[0065] In some embodiments, the proposed method is applied to two standard KGQA datasets: WebQuestionSP and Complex WebQuestions. The questions in these datasets contain up to four-hop reasoning. Both datasets are based on Freebase, a knowledge graph containing approximately 88 million entities, 20,000 relationships, and 126 million triples.
[0066] 1) Evaluation metrics: Hits@1 and F1 scores are used for evaluation. Hits@1 evaluates the proportion of the best answer predicted by the model. Since a question may have multiple correct answers, F1 score considers the comprehensiveness of all answers, balancing the accuracy and recall of the model's predictions.
[0067] 2) Latent unit representation: 5-20 prompters are used for high-dimensional representation of latent units.
[0068] 3) Training and hyperparameters: The optimizer is AdamW with a linear warmup decay learning rate schedule. The peak learning rate for the pre-trained model is set to 2e-5, and the training batch size is 4. The model is trained for 10 epochs with dropout set to 0.1.
[0069] 4) Large language model inference and answer generation: The top 4 most relevant KG relation paths are selected as the inference basis, and the context learning method is used to prompt the large model to output the required answer.
[0070] 5) Performance comparison: The evaluation results on WebQSP are shown in Table 1, where QGG, UniKGQA, and RoG are all proposed spectral graph question answering methods, and the proposed method is superior to these methods in two performance indicators.
[0071] Table 1 Prediction result evaluation
[0072] Hits@1 F1 The method of the invention 0.878 0.804 QGG 0.730 0.738 UniKGQA 0.772 0.722 RoG 0.857 0.708
[0073] Corresponding to the foregoing embodiments of the method for predicting the reaction of molecules and olfactory bodies based on a multi-modal deep learning network, the present application also provides embodiments of a large model spectral question answering method based on latent unit fine-tuning.
[0074] Referring to Figure 3 , the large model spectral question answering method based on latent unit fine-tuning provided by the embodiments of the present application includes a memory and one or more processors, the memory stores executable code, and the processor executes the executable code to implement the method for predicting the reaction of molecules and olfactory bodies based on a multi-modal deep learning network in the foregoing embodiments.
[0075] The embodiments of the large model spectral question answering method based on latent unit fine-tuning of the present application can be applied to any device with data processing capability, which can be a device or apparatus such as a computer. The apparatus embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful device, it is formed by the processor of the device with data processing capability reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, as shown in Figure 3 , it is a hardware structure diagram of the device with data processing capability where the large model spectral question answering method based on latent unit fine-tuning of the present application is located. In addition to the processor, memory, network interface, and non-volatile memory shown in Figure 3 , the device with data processing capability where the apparatus in the embodiments is located usually includes other hardware according to the actual functions of the device with data processing capability, and this will not be described again.
[0076] The implementation process of the functions and roles of each unit in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.
[0077] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be referred to the part of the method embodiment. The device embodiment described above is only illustrative, and the units illustrated as separate components can or can not be physically separated, and the components illustrated as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Some or all modules can be selected to achieve the purpose of the present application according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0078] The embodiment of the application also provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the method for predicting the reaction of a molecule and an olfactory entity based on a multi-modal deep learning network in the above embodiment.
[0079] The computer readable storage medium can be an internal storage unit of any data processing capable device of any of the preceding embodiments, such as a hard disk or a memory. The computer readable storage medium can also be an external storage device of any data processing capable device, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of any data processing capable device. The computer readable storage medium is used to store computer programs and other programs and data required by any data processing capable device, and can also be used to temporarily store data that has been output or will be output.
[0080] It should be further noted that the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0081] The above describes particular embodiments of the present specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order in which they are recited and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous or possible.
[0082] The above describes particular embodiments of the present specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order in which they are recited and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous or possible.
[0083] The above describes particular embodiments of the present specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order in which they are recited and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous or possible.
Claims
1. A large model knowledge graph question answering method based on potential unit fine-tuning, characterized in that, The method comprises the following steps: The large language model and the knowledge graph are subjected to latent relationship learning based on a symbolized knowledge graph and a relationship path and a variable using a high-dimensional prompt word representation latent unit, wherein an input layer of the large language model is additionally provided with the trainable latent unit; and the latent unit is randomly initialized through a normal distribution and is fine-tuned together with the large language model in a hidden learning process; The latent relationship learning of the large language model and the knowledge graph comprises: using a group of the latent units to approximate posterior information statistics of an effective relationship path by minimizing KL divergence, specifically: given a question, an answer and a group of latent units, a relationship reasoning path connecting an entity of the question and an entity of the answer in the knowledge graph is identified, and the corresponding relationship reasoning path is regarded as an effective relationship path and is taken as a solution to answer the question; a posterior distribution in the posterior information statistics is formalized as a conditional probability of path existence, and it is assumed that the effective relationship paths are uniformly distributed, and the KL divergence is based on a shortest path between a question-entity and an answer-entity in the knowledge graph as a supervision signal, and the probability of the large language model generating the effective relationship path is maximized; The relationship reasoning path is subjected to relevance evaluation and the most relevant relationship reasoning path is selected, comprising: based on the fine-tuned large language model and the latent unit set in the hidden learning, a conditional probability function about the relationship reasoning path is constructed, and the relationship reasoning path maximizing the conditional probability is screened out through the conditional probability function, that is, the probability of the latent unit is maximum under the condition that the question and the reasoning path are given, wherein the relationship reasoning path maximizing the conditional probability is the most relevant relationship reasoning path; for this purpose, cosine similarity between each two of the generated token vectors and the corresponding latent units is calculated, the cosine similarity measures the similarity between the vectors, and the value range is from -1 to 1, an aggregation score is obtained by accumulation, and the relationship reasoning path most relevant to the question and most matched with the latent unit is screened out by maximizing the aggregation score, so that the most relevant relationship reasoning path is obtained; A natural language question is input, and an answer in the knowledge graph is obtained through the most relevant relationship reasoning path.
2. The large model knowledge graph question answering method based on potential cell fine-tuning according to claim 1, characterized in that, The knowledge graph is a repository containing factual information, and the factual information is composed of triples, each triple comprising two entities and a relationship between the two entities, all the entities in the knowledge graph constitute an entity set, and all the relationships between the entities in the knowledge graph constitute a relationship set; The relationship path is a path connected by a plurality of relationships in sequence, each relationship in the path belongs to the relationship set, and the length of the path represents the number of connection relationships.
3. The large model-based knowledge graph question answering device based on potential unit fine-tuning, comprising a memory and one or more processors, wherein the memory stores executable code, and the executable code comprises the following steps of, The processor, when executing the executable code, is configured to implement the large model knowledge graph question answering method based on latent unit fine-tuning according to any one of claims 1 or 2.
Citation Information
Patent Citations
Weak supervision knowledge graph question answering method based on multi-view reasoning
CN113590799A
Intelligent question and answer method based on cooperation of large language model and knowledge graph
CN118797017A