A generative knowledge graph completion method and system combining dynamic narrative.

CN121390244BActive Publication Date: 2026-08-14SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

大模型依赖高质量的上下文输入,但知识图谱补全的上下文来源高度异构,包括图谱内部的结构化路径和外部非结构化文本,有效融合这些不同模态的信息存在困难

Benefits of technology

1、显著提升补全性能与鲁棒性、优化信息利用效率:通过上下文感知动态叙事的构建,能够智能地融合知识图谱内部的结构化路径与外部非结构化文本信息,生成高质量、高信噪比的连贯叙事。该方法有效克服了信息源的异构性问题,并为处理信息稀疏的长尾实体提供了充足且相关的上下文,从而显著提升了大语言模型在复杂关系和稀疏数据场景下的推理能力与补全准确率;动态叙事构建方法具备主动的信息筛选与重构能力,能够针对特定查询提炼出最关键的信息,有效解决了传统方法中上下文信息信噪比低的问题,使得大语言模型能够基于精炼的“叙事”进行高效、精准的推理,提升了整体信息利用效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390244B_ABST
    Figure CN121390244B_ABST
Patent Text Reader

Abstract

This invention provides a generative knowledge graph completion method and system that combines dynamic narrative, relating to the field of knowledge graph completion technology. The method includes: acquiring the knowledge graph triples to be completed; intelligently selecting key information from the internal structure of the knowledge graph and external text corpus, combined with multi-dimensional entity embedding, to dynamically generate an information-rich and context-relevant natural language narrative for the triples to be completed; constructing completion instructions based on the natural language narrative, controlling the execution of the completion task in a large language model after fine-tuning with multi-task instructions, and generating preliminary completion results; determining whether the preliminary completion results need correction through internal consistency checks and external selectivity verification; if correction is needed, reconstructing the instructions using an evidence-based enhancement method, and generating a completion result with accompanying explanations using the large language model. This invention improves the performance, robustness, and interpretability of the large language model in knowledge graph completion tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graph completion technology, specifically to a generative knowledge graph completion method and system that combines dynamic narrative. Background Technology

[0002] Knowledge graphs, as structured semantic knowledge bases, represent and organize information in the real world through entities and their relationships. They play a significant role in downstream tasks such as intelligent question answering, recommendation systems, and medical decision-making, and are gradually becoming an important infrastructure in the field of artificial intelligence. However, due to the difficulty and dynamism of knowledge acquisition, real-world knowledge graphs are often incomplete, containing a large number of missing entities and relationships, which greatly limits their application potential and reasoning capabilities. Therefore, the knowledge completion task of using existing data to reason and fill in the missing information in knowledge graphs has gradually become a core issue of concern for both academia and industry.

[0003] In recent years, large language models such as ChatGPT and Qwen have demonstrated powerful text understanding, generation, and commonsense reasoning capabilities, achieving revolutionary progress in the field of natural language processing. The massive pre-training data of these large models potentially stores rich world knowledge and textual patterns, providing new approaches to knowledge graph completion tasks in handling sparse information in graph structures and scenarios requiring deep semantic understanding of text within context. Researchers are actively exploring the application of large models' capabilities to knowledge graph completion tasks, hoping to overcome the limitations of traditional completion methods in handling sparse data, complex relationships, and utilizing external textual knowledge. Despite the promising prospects, directly applying large models to completion still faces many challenges: (1) Context construction faces challenges in heterogeneous fusion and information quality. Large models rely on high-quality context input, but the context sources for knowledge graph completion are highly heterogeneous, including structured paths within the graph and unstructured text outside, making it difficult to effectively fuse information from these different modalities. At the same time, information-sparse long-tail entities are difficult to provide sufficient context, while information-rich entities are prone to introducing a lot of noise. Existing methods lack intelligent mechanisms to dynamically extract high signal-to-noise ratio context summaries for different entities.

[0004] (2) Domain knowledge injection is costly and inefficient. General-purpose large models lack depth in specialized domain knowledge, and injecting domain knowledge into them to adapt to knowledge graph completion tasks faces significant challenges. The computational and storage costs of traditional full-parameter fine-tuning methods are prohibitive. Although efficient parameter fine-tuning techniques reduce costs, how to design targeted fine-tuning paradigms to enable large models to quickly and accurately grasp the semantic patterns and relational constraints of specific domains at minimal cost remains an unsolved problem.

[0005] (3) Insufficient reliability and interpretability of the generation process. When using a generative paradigm for completion, large models are prone to factual illusions, fabricating seemingly reasonable but actually erroneous knowledge, directly damaging the reliability of the knowledge base, while the coverage of existing verification methods is limited. In addition, the decision-making process of large models is like a black box, and users cannot trace the evidence on which a certain fact is generated. This lack of interpretability seriously hinders its application in scenarios with high credibility requirements.

[0006] In summary, existing knowledge graph completion technologies based on large language models suffer from problems such as insufficient understanding of complex text-image contexts, poor adaptability to specific domains, and the generation of factual illusions, resulting in poor completion effects. Summary of the Invention

[0007] To address the aforementioned issues, this invention proposes a generative knowledge graph completion method and system that incorporates dynamic narrative, thereby improving the performance, robustness, and interpretability of large language models in knowledge graph completion tasks.

[0008] According to some embodiments, the present invention adopts the following technical solution: A generative knowledge graph completion method incorporating dynamic narrative includes: Retrieve the knowledge graph triples to be completed; By combining the internal structure of the knowledge graph and external text corpus with the multi-dimensional embedding of entities, key information is intelligently selected to dynamically generate a rich and context-related natural language narrative for the triples to be completed. Based on natural language narrative, a completion instruction is constructed to control the execution of the completion task in the large language model after fine-tuning with multi-task instructions, and to generate preliminary completion results. By conducting internal consistency checks and external selective verification, it is determined whether the preliminary completion result needs to be corrected. If correction is required, the instruction is reconstructed using an evidence-based enhancement method, and a completion result with accompanying explanations is generated using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities given a set of candidate positive and negative entities and to identify the most reasonable entity. The verification reasoning task trains the model to judge whether a given triple is true.

[0009] According to some embodiments, the present invention adopts the following technical solution: A generative knowledge graph completion system incorporating dynamic narrative, comprising: The triplet acquisition module is configured to: acquire triplets from the knowledge graph to be completed; The narrative generation module is configured to: intelligently select key information from the internal structure of the knowledge graph and external text corpus, combined with the multi-dimensional embedding of entities, and dynamically generate an information-rich and context-related natural language narrative for the triple to be completed; The preliminary completion module is configured to: construct completion instructions based on natural language narratives, control the execution of completion tasks in the large language model after fine-tuning by multi-task instructions, and generate preliminary completion results; The enhanced completion module is configured to: determine whether the preliminary completion result needs to be corrected through internal consistency checks and external selective verification; if correction is needed, reconstruct the instruction through evidence-based enhancement methods and generate a completion result with explanations using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities given a set of candidate positive and negative entities and to identify the most reasonable entity. The verification reasoning task trains the model to judge whether a given triple is true.

[0010] According to some embodiments, the present invention adopts the following technical solution: A computer program product includes a computer program that, when executed by a processor, implements the aforementioned generative knowledge graph completion method incorporating dynamic narrative.

[0011] According to some embodiments, the present invention adopts the following technical solution: A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned generative knowledge graph completion method incorporating dynamic narrative.

[0012] According to some embodiments, the present invention adopts the following technical solution: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the aforementioned generative knowledge graph completion method combining dynamic narrative.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Significantly improves completion performance and robustness, and optimizes information utilization efficiency: By constructing context-aware dynamic narratives, it can intelligently integrate structured paths within the knowledge graph with external unstructured text information to generate high-quality, high signal-to-noise ratio coherent narratives. This method effectively overcomes the heterogeneity problem of information sources and provides sufficient and relevant context for processing long-tail entities with sparse information, thereby significantly improving the reasoning ability and completion accuracy of large language models in complex relationship and sparse data scenarios. The dynamic narrative construction method has the ability to actively filter and reconstruct information, and can extract the most critical information for specific queries, effectively solving the problem of low signal-to-noise ratio of contextual information in traditional methods. This enables large language models to perform efficient and accurate reasoning based on refined "narratives," improving overall information utilization efficiency.

[0014] 2. Efficient Domain Knowledge Adaptation and Cost Control: Employing a domain-adaptive prompting fine-tuning strategy based on multi-task instructions (such as combining QLoRA to fine-tune models like Qwen3), this approach can quickly and efficiently internalize domain-specific semantic patterns and relational constraints into large language models with extremely low parameter tuning costs. This solves the problem of insufficient depth of knowledge in specialized domains in general-purpose large models, while avoiding the high computational and storage overhead of full-scale fine-tuning, greatly promoting the application of this method in specialized fields such as biomedicine and finance.

[0015] 3. Effectively Enhances the Credibility and Interpretability of Results: Through an interpretable hallucination identification and mitigation mechanism, multi-source verification and identification of factual hallucinations prone to occur in generative models can be performed. External knowledge is dynamically retrieved, evaluated, and integrated based on model uncertainty and hallucination signals. This mechanism not only effectively reduces the pollution of the knowledge base by erroneous information, improving the reliability and robustness of the completion results, but also enhances the transparency and traceability of the entire completion process by providing sources and verification processes for decision-making evidence, helping to build user trust in high-risk decision-making scenarios. Attached Figure Description

[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0017] Figure 1 This is a flowchart of a generative knowledge graph completion method that combines dynamic narrative, as shown in Example 1. Detailed Implementation The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0018] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in these embodiments have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0019] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0020] Example 1 One embodiment of the present invention provides a generative knowledge graph completion method combining dynamic narrative, comprising: Step S1: Obtain the knowledge graph triples to be completed; Step S2: From the internal structure of the knowledge graph and the external text corpus, combined with the multi-dimensional embedding of entities, key information is intelligently selected to dynamically generate a natural language narrative that is rich in information and relevant to the context for the triple to be completed. Step S3: Construct completion instructions based on natural language narrative, control the execution of completion tasks in the large language model after fine-tuning with multi-task instructions, and generate preliminary completion results; Step S4: Through internal consistency check and external selective verification, determine whether the preliminary completion result needs to be corrected. If it needs to be corrected, reconstruct the instruction through evidence-based enhancement method and generate a completion result with an accompanying explanation using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities given a set of candidate positive and negative entities and to identify the most reasonable entity. The verification reasoning task trains the model to judge whether a given triple is true.

[0021] As one embodiment, the generative knowledge graph completion method of the present invention, which combines dynamic narrative, improves the performance, robustness, and interpretability of large language models in knowledge graph completion tasks. The specific implementation process is as follows: I. Task Definition Given a knowledge graph G = (E, R, F), where E is a set of entities, R is a set of relations, and F is a set of known valid triples. The core task of knowledge graph completion is link prediction: for a given query (h, r, ?), predict the most likely tail entity t' ∈ E, making the triple (h, r, t') a valid fact; or for a query (?, r, t), predict the most likely head entity h' ∈ E. This embodiment uses tail entity prediction as an example, but the proposed method can also be applied to head entity prediction.

[0022] II. Dataset This embodiment is based on the classic knowledge graph link prediction benchmark dataset FB15k-237. As a subset of Freebase, this dataset, by removing simple triples from the training set that are easily inferred through inverse relationships, places higher demands on the model's complex reasoning capabilities. Therefore, it is often used to evaluate the model's robustness and factual consistency. To provide the model with the necessary textual context, this embodiment utilizes the entity description file (FB15k_mid2description.txt) and entity name file (FB15k_mid2name.txt) that accompany this dataset. Before the experiment, the data underwent systematic preprocessing to construct the data structure required for subsequent modules: ① Create a global mapping: By traversing all triples in the dataset file, a global bidirectional mapping from string to integer IDs is created for all unique entities and relations in the knowledge graph, ensuring ID consistency throughout the experimental process.

[0023] ② Construct an acceptable set of answers: To achieve fair post-filter evaluation and handle one-to-many relationships, an acceptable answer set dictionary is constructed, which uses the query (head_mid, relation_str) as the key and the set of all known correct tail entity names of the query in the entire knowledge graph (training set, validation set, and test set) as the value.

[0024] ③ Construct a text corpus index: Entity description files are used as the core text corpus in this embodiment. After segmenting and converting all entity descriptions to lowercase using NLTK, a BM25 index is built for this corpus to support subsequent efficient lexical retrieval.

[0025] Finally, the dataset is shown in Table 1: Table 1. Dataset Settings

[0026] III. Methods This embodiment proposes a method such as Figure 1The multi-module collaborative framework shown aims to utilize large language models for knowledge graph completion. This framework mainly includes three core components: (1) Context-aware dynamic narrative construction module: This module is responsible for dynamically generating a rich and context-relevant natural language narrative for a given KGC query by combining multi-dimensional entity embeddings from the internal structure of the knowledge graph (such as relation paths and neighboring nodes) and external text corpora, and intelligently selecting key graph information. N This narrative will serve as the primary input for subsequent large-scale modeling for understanding and prediction.

[0027] (2) Qwen3 semantic understanding enhancement and fine-tuning module based on prompt word engineering: This module targets KGC tasks in a specific domain. It designs a domain-aware prompt word template library and uses LoRA to perform lightweight fine-tuning of the Qwen3 model. The goal is to enhance Qwen3's ability to understand core domain concepts, relational patterns, and fine-grained semantics, ultimately resulting in a large language model after fine-tuning with multi-task instructions. In this embodiment, the large language model uses the Qwen3 model, but it can also use Mita AI, Wenxin Yiyan, etc.

[0028] (3) Explainable hallucination resolution module: This module (i.e.) Figure 1 The interpretable hallucination resolution module in the model first uses a multi-source verification mechanism to identify and locate hallucinations in the preliminary completion results of the fine-tuned Qwen3 model. Then, based on the model's prediction uncertainty and the detected hallucination signals, it dynamically retrieves relevant evidence from credible external knowledge sources for evaluation. Finally, it integrates high-quality external knowledge into the final decision-making process of LLM in a traceable manner to generate completion results with explanations.

[0029] The three modules work together to comprehensively improve the performance of large model completion tasks from three aspects: constructing high-quality inputs, internalizing model capabilities, and ensuring reliable decision-making. The specific contents of the three modules are explained below: 1. Context-Aware Dynamic Narrative Construction Module: Dynamic Knowledge Reconstruction and Injection Based on COT Projects To overcome the inherent limitations of large language models in processing discrete knowledge graph data, this embodiment proposes an innovative two-stage paradigm. The first stage is the knowledge injection stage, which involves dynamic knowledge reconstruction and injection based on COT engineering. The second stage is the model adaptation stage. Before presenting the information to the downstream completion model, the first stage utilizes a proactive and intelligent mechanism to reconstruct the knowledge. Then, through injection, it transforms the knowledge into an LLM-friendly, reasoning-oriented format—a rich and context-sensitive natural language narrative. NThis process not only preprocesses the data but also leverages the capabilities of LLM to optimize the input information flow, aiming to provide the highest quality contextual foundation for the subsequent second-stage model adaptation phase. The context-aware dynamic narrative building module includes: ① Intelligent Information Selector: Traditional methods typically passively receive all available contextual information, which not only leads to information overload but also introduces significant noise that interferes with the model's decision-making. To address this issue, this embodiment designs an innovative intelligent information selector that proactively identifies and reconstructs knowledge. Specifically, it selects, evaluates, and ranks the knowledge fragments most relevant to the current completion task from a vast body of knowledge sources. This selector collaboratively processes structured evidence from within the knowledge graph and unstructured evidence from external text. The extraction of information from within the knowledge graph, such as the topological structure of neighbor nodes and relationship paths, provides direct logical clues for reasoning.

[0030] This selector extracts this structured knowledge in the following way: For a given head entity h, a breadth-first search (BFS) algorithm is used to extract its neighbor subgraph within a k-hop range from the graph. This includes not only 1-hop neighbors directly connected to h, but also 2-hop neighbors that reveal more complex relationships, thus constructing a local knowledge environment closely related to the query entity.

[0031] Meanwhile, the pathfinding algorithm is also based on BFS, which is used to find relational paths starting from the head entity h with a length not exceeding L = 2. This path can reveal multi-step reasoning chains between entities and provide potential logical deduction basis for the model.

[0032] To compensate for the sparsity of knowledge graph structural information, external textual evidence was introduced. A text corpus closely associated with knowledge graph entities was constructed using entity description files. The retrieval process from the corpus employed a two-stage "retrieve-and-rerank" strategy: Recall Phase: First, the efficient word frequency weighting algorithm BM25 is used to recall a large set of candidate text descriptions. The query in this phase consists of the name of the head entity (obtained through mapping) and the natural language form of the query relationship to ensure that the recalled text has high relevance at the lexical level.

[0033] Reordering Stage: To improve the semantic accuracy of search results, an embedding-based reordering mechanism was introduced. A query vector was constructed. ,in, It is the fusion and embedding of the head entity. It is a semantic embedding of query relationships. For each recalled candidate text (i.e., a description of a certain entity), the fused embedding of its corresponding entity is obtained. Final ranking score Normalized BM25 score Cosine similarity between query vector and candidate entity vector Composed of weighted combinations:

[0034] in, α It is a hyperparameter that balances lexical and semantic relevance, thereby selecting textual evidence that best matches the query in terms of deep semantics.

[0035] After extracting information from multiple sources, prioritizing it is crucial. The textual evidence has already been ranked using the aforementioned recall and reordering strategy. For relational paths, a heuristic scoring function is designed to evaluate the relevance of each path. This score comprehensively considers path length (shorter paths are generally more direct and receive higher scores), direct matching to the query relation (i.e., paths containing the query relation receive the highest weight), and semantic similarity by calculating the cosine similarity between the embeddings of the relation in the path and the query relation. This ensures that the selected paths are not only structurally connected but also highly semantically relevant to the query. The scoring function is expressed by the formula:

[0036] in, For path p Relative to query relationship r The final score, p Candidate paths consist of a sequence of relations. L ( p () represents the path length. w These are the weight hyperparameters corresponding to the three components: path length, direct matching, and semantic similarity. This is an indicator function; the function value is 1 if the relation belongs to the path, and 0 otherwise. Path relationship and query relationship r The cosine similarity of the embedded vectors.

[0037] Finally, for neighbor information, 1-hop neighbors are given priority because they provide the most direct context and are sorted by hop count.

[0038] Through the above steps, the intelligent information selector completes an active knowledge reconstruction, transforming the original, scattered knowledge into an ordered, prioritized knowledge set that is highly relevant to the current query task. This set mainly includes one-hop pairs directly connected to the query head entity and two-hop pairs indirectly connected, sorted by the number of hops to prioritize the most direct associations. Secondly, it includes the relational paths of the reasoning chain. These multi-step relational chains starting from the head entity are scored and sorted using heuristic functions to ensure logical relevance. To supplement the sparse structural information of the graph, the set also includes key textual evidence selected from external text corpora, which is sorted using a recall and rearrangement strategy.

[0039] ② Dynamic narrative generator: After obtaining the reconstructed knowledge set, the next key step is to inject it into a format that is friendly to large language models, namely, generating natural language narratives. N Simply piecing together information fragments will result in disjointed and redundant input, increasing the cognitive load of LLM.

[0040] To address this issue, a dynamic narrative generator was designed. Its core leverages the contextual learning capabilities of LLM as a zero-parameter-overhead knowledge transformation tool, converting the reconstructed knowledge into a high-quality, reasoning-friendly narrative format. A few-shot prompt training method is used to guide the powerful generative model Qwen3-7B to perform this transformation task. The prompts have been carefully designed and debugged, and mainly include the following components: First, Qwen3 is assigned the role of a "knowledge graph analysis expert" and given clear instructions to generate a concise, insightful, key-clue-highlighting, and reasoning-oriented narrative based on the provided information. Next, two high-quality examples of the transition from input information to the target narrative are provided in the prompts. These examples guide and teach Qwen3 how to abstract information, organize logically, and highlight key points, rather than simply restating. Finally, the sorted knowledge fragments (including head entity descriptions, paths, neighbors, and textual evidence) output by the intelligent information selector are presented to the large model in a clear machine language format, enabling it to easily parse and distinguish evidence from different sources.

[0041] Through this process, discrete data points are transformed by Qwen3 into a logically coherent summary. This dynamically generated narrative not only summarizes the most important facts but also often reveals potential connections or conflicts between information, thus providing downstream completion models with a deeply processed and optimized high-quality contextual input—a natural language narrative. N .

[0042] 2. Qwen3 Semantic Understanding Enhancement and Fine-Tuning Module Based on Prompt Word Engineering: Domain Knowledge Adaptation Based on Multi-Task Instruction Fine-Tuning High-quality natural language narratives were dynamically generated in the first stage. N Next, the data enters the second stage of the entire framework: model adaptation.

[0043] The goal at this stage is not simply to enable the model to memorize contextual facts, but rather to internalize the complex semantic patterns, logical constraints, and domain-specific knowledge representations inherent in the knowledge graph through a carefully designed, domain-specific fine-tuning paradigm. To achieve this goal, this embodiment proposes a parameter-efficient adaptation strategy based on multi-task instruction fine-tuning. This strategy decomposes a single knowledge graph completion task into a set of interconnected and complementary sub-tasks, and trains the model to simultaneously master these sub-tasks through a diverse instruction template library, thereby guiding it to develop deeper and more robust reasoning capabilities.

[0044] ① Design principles and construction of the instruction template library Traditional instruction fine-tuning often uses a single-format template, which can easily lead to the model superficially learning the template itself rather than truly understanding the essence of the task. To overcome this limitation, this embodiment constructs a domain-aware, multi-task instruction template library. The design of this library follows the principles of complementary task decomposition and robust, diverse prompt words.

[0045] Specifically, the core challenge of the completion task is first broken down into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning, aiming to train the model's capabilities from different perspectives. The generative completion task trains the model to directly generate text representations of missing entities, a fundamental capability of KGC. The discriminative selection task trains the model to identify the most reasonable candidate given a set of positive and negative entities, forcing the model to learn finer-grained differences between entities. Finally, the verification reasoning task trains the model to determine whether a given triple is true, enhancing the model's fact-checking ability and effectively suppressing illusions.

[0046] For each subtask, this embodiment designs multiple instruction templates that differ in language style and structure. For example, the generative completion task can be presented in various forms such as direct question-based commands (i.e., "What is the...?") and imperative commands (i.e., "Provide the value for..."). This diversity is achieved through manual interpretation and the use of LLM-assisted generation of variants, aiming to make the fine-tuned model robust to various variants of natural language questions, rather than simply memorizing specific trigger words. The specific structure of the instruction template library is as follows: To cultivate the model's basic prediction and generation capabilities, a generative completion task is performed: Direct question: {"instruction": "Read the narrative and answer the question.", "input": "Narrative: {narrative}\nQuestion: What is the{relation_name} of {head_name}?"} Imperative: {"instruction": "Based on the context, provide the entity for the given relation.", "input": "Entity: {head_name}\nRelation: {relation_name}\nNarrative: {narrative}\nMissing Entity:"} To improve the model's discriminative ability in the discriminative selection task, and especially when dealing with semantically similar or easily confused entities, constructing high-quality training samples is crucial. A type-constrained, popularity-based negative sampling strategy is designed. For a query (h, r, t), the selected negative samples not only need to belong to the same semantic type as the query (e.g., both are movies or people), but also prioritize entities that are more popular (highly connected) in the knowledge graph, as these entities are more challenging hard negative samples. The template example for the discriminative selection task is as follows: Multiple choice question format: {"instruction": "From the options below, select the one that correctly completes the fact '{head_name} - {relation_name} -?'.", "input": "Context Narrative:\n{narrative}\n\nOptions:\n- {option_A}\n-{option_B}\n- {option_C}\n- {option_D}\n\n Answer:"} The verification-based reasoning task aims to train the model into an efficient fact checker, enabling it to self-examine and verify content while generating it. To achieve this goal, a specialized training data generation process and instruction template were designed, for each positive fact in the knowledge graph ( h, r, t), by combining a negative sampling strategy to construct corresponding high-quality negative examples ( h, r, t' ),in t′ It is a with t Belonging to the same semantic type but with h and r Entities that do not constitute valid facts.

[0047] Subsequently, this method uses a true / false judgment instruction template to transform these positive and negative examples into training samples for binary classification: {"instruction": "Carefully analyze the narrative and determine if the following statement is true or false. Respond with only 'True' or 'False'.","input": "Narrative:\n{narrative}\n\nStatement: The {relation_name} of {head_name} is {candidate_name}.", "output": "True"} In this template, the {narrative} field is populated with the generated natural language narrative. N The {candidate_name} field is then filled with the actual tail entity. t Name (constituting a positive sample) or negative sampling tail entity t′ The names (constituting negative samples) are used. By fine-tuning under this explicit binary supervision signal, the model is explicitly incentivized to learn the logical consistency between factual statements and contextual evidence. This fact-checking capability, internalized during the fine-tuning phase, forms the foundation of the mitigation system, enabling the model to a priori prefer predictions that better align with its internal factual model when performing generative tasks, thereby reducing the probability of illusions at their source.

[0048] By mixing diverse instructions from these three types of tasks during fine-tuning, the model is motivated to learn a more comprehensive knowledge representation. It not only knows what to generate, but also which to make judgments, and whether to verify, thus building a more three-dimensional and reliable knowledge reasoning ability.

[0049] ② High-efficiency adapter fine-tuning To maintain the powerful generality of the pre-trained model while efficiently adapting it to specific domain KGC tasks, a parameter efficient fine-tuning (PEFT) technique, specifically LoRA (Low-Rank Adaptation), was adopted. This technique effectively adjusts the model's behavior without updating billions of original parameters by introducing a trainable low-rank decomposition matrix (i.e., an adapter) next to the weight matrix of the pre-trained model.

[0050] Within the framework of this embodiment, the application of LoRA has the following advantages: By precisely applying the LoRA adapter based on singular value decomposition to all linear projection layers in the Transformer architecture of the Qwen3-4B model, including the query Q, key K, value V, output O, and feedforward network in the self-attention mechanism, this choice ensures that the core feature extraction and information interaction parts of the model can be fine-tuned with minimal parameter cost. The number of trainable parameters of LoRA is only a tiny fraction of that of the original model (usually <1%), which greatly reduces the GPU memory required for training and speeds up the convergence.

[0051] The combination of 4-bit quantization (QLoRA technology) and a paging optimizer makes it possible to fine-tune 4B-level models on a single consumer-grade GPU, significantly improving accessibility and experimental efficiency.

[0052] Because over 99% of the model parameters are frozen, LoRA can retain, to the greatest extent possible, the general language understanding and common sense reasoning abilities learned by the model during pre-training on massive corpora while adapting to new tasks. This is crucial for handling open-domain knowledge graphs.

[0053] ③ Training process and setup of multi-task instruction data Using SFTTrainer for training, as an advanced trainer for fine-tuning and optimizing instructions, it can seamlessly integrate PEFT configuration and automatically handle complex details such as data packing, sequence padding, and loss calculation. During training, a cosine learning rate scheduler and a warm-up strategy are used to ensure stable convergence of the training process. At the same time, the loss on the validation set is continuously monitored, and an early stopping mechanism is used to prevent the model from overfitting on the training set. The checkpoint weights of the model with the best validation performance are saved.

[0054] ④ Reasoning process After being fine-tuned by multi-task instructions, the model utilizes a structured reasoning process to ensure that when faced with new knowledge graph completion queries, it can maximize the use of the model's generation, discrimination, and verification capabilities. This process not only aims to generate the most likely answer, but also improves the robustness of the prediction through a multi-template integration strategy.

[0055] The prompt-driven domain KGC inference process in this embodiment is as follows: For a given query (h,r,?), the context-aware dynamic narrative building module first generates a corresponding natural language narrative for it. N This method does not rely on a single prompt template, but instead utilizes a built instruction template library. P Multiple templates are used to obtain prediction results in parallel or heuristically.

[0056] This embodiment prioritizes using a direct completion template to generate a preliminary list of candidate answers. To verify the reliability of these candidate answers, a true / false judgment instruction template is used to process the generated candidate answers. Fill in the judgment template to form a statement to be verified, and then input it into the model to obtain its confidence level for the statement.

[0057] This self-consistency check effectively utilizes the validation capabilities learned by the model during the fine-tuning phase to filter out predictions that seem reasonable but are not self-consistent with the model. For scenarios requiring higher robustness against disturbances, an ensemble strategy is adopted: the prediction results obtained from different templates (direct completion, multiple choice type) are aggregated, and a more robust final answer is obtained through the inverse ranking fusion method. The entire reasoning process organically combines the different capabilities of the model, forming a closed loop from generation to validation, which significantly improves the accuracy and reliability of the completion results.

[0058] 3. Explainable Hallucination Resolution Module: An End-to-End Hallucination Relief Method Based on Reactive Introspection While constructing dynamic narratives and fine-tuning multi-task instructions significantly enhances the model's completion capabilities, the inherent illusion risk of large language models when handling factual knowledge remains a severe challenge in practical applications. To address this issue, this embodiment introduces an end-to-end hierarchical illusion mitigation paradigm. This method integrates the shaping of the model's intrinsic capabilities with dynamic monitoring of inference behavior, aiming to improve the reliability and factual consistency of prediction results throughout the entire chain from generation source to final decision.

[0059] ①Uncertainty signal capture based on generation consistency Traditional hallucination detection paradigms rely on external knowledge bases, limiting their versatility. In contrast, this embodiment proposes an introspective detection approach to identify potential, unsuccessfully suppressed hallucinations. The generative behavior of its hypothetical model can reflect its internal deterministic state. The reasoning process based on solid evidence should exhibit high internal consistency under different decoding paths, while the generation of hallucinations is accompanied by uncertainty in the generation process.

[0060] Therefore, this embodiment employs a multi-path decoding strategy to quantify this uncertainty, for a given input prompt. P ,By enabling a random decoding strategy with sampling, it is executed independently. N Secondary generation to obtain a candidate answer set The consistency of the answer set is quantified by two core metrics: Answer Entropy. ) and majority vote confidence, The answer distribution entropy is based on the answer set. Each has its own unique answer empirical probability distribution Information entropy is defined as:

[0061] in, k The number of unique answers; a high entropy value indicates a dispersed distribution of answers, corresponding to high model uncertainty; the majority vote confidence score calculates the proportion of the most frequently occurring answers, defined as... ,in The frequency of the most frequent answer is indicated by the frequency of the most frequent answer, while the low confidence score also represents the hesitation state of the model's decision-making.

[0062] In this embodiment, an entropy value higher than a preset threshold or a confidence score lower than a preset threshold will be identified as a strong high-risk signal, representing the model's low confidence in the prediction. This signal constitutes the monitoring layer of the hallucination relief system.

[0063] ② Evidence-enhanced reasoning based on uncertain signals When a completion prediction is identified as a high-risk signal by a preceding module, the framework initiates a hierarchical correction process. The first layer of this process is selective external verification, which involves using a verification-based inference task to test the triples to be verified. Queries are performed on the global knowledge graph fact set to obtain direct evidence from authoritative knowledge sources, and the results of external verification (such as hits, missing values, or conflicts) serve as precise correction signals.

[0064] The second layer of dynamic knowledge fusion in this process is an evidence enhancement-re-reasoning loop triggered by correction signals. The system dynamically constructs a new cue for secondary reasoning. This cue integrates the original dynamic narrative, the model's initial predictions, and explicit correction signals generated by internal monitoring or external verification. This evidence-enhanced cue is then input into the large language model for re-reasoning, aiming to guide it to a more reliable decision-making path.

[0065] Through this hierarchical, closed-loop process—from active suppression during fine-tuning to internal monitoring during inference, and finally to selective external correction—the methodology of this embodiment constructs a system that comprehensively improves the reliability and accuracy of generative knowledge graph completion.

[0066] IV. Evaluation Indicators The following metrics are used to evaluate the model performance in this embodiment: Knowledge Graph Completion (KGC) performance was evaluated using standard post-filtering settings, calculating the Mean Reciprocal Rank (MRR) and the top k hit rate (Hits@k, k=1, 3). It's worth noting that traditional KGC evaluation metrics originated from a discriminative, ranking-based paradigm. This paradigm calculates a score for all entities in the knowledge graph and performs a global ranking. However, the method in this embodiment belongs to an open generative paradigm, where the model directly generates the text string of the most probable answer without ranking the entire entity set. Applying traditional metrics to this new paradigm presents challenges; for example, the model might generate a fact that is perfectly correct in the real world but does not match the standard answer in the test set (e.g., for a movie starring actor A, generating "a movie that matches a specific genre X" instead of "movie a" in the test set).

[0067] To maintain the rigor of the evaluation while fairly measuring the true capabilities of generative models, this embodiment designs an approximate evaluation process based on string matching: For a single answer text generated by the model, it is first checked whether it exists in a pre-built "acceptable answer set". To handle differences in expression (e.g., "USA" vs. "UnitedStates"), fuzzy matching is performed using the string matching toolkit fuzzywuzzy. Based on the matching results, all metrics are estimated and calculated: if the similarity score between the predicted text and any correct answer is equal to 100 or greater than or equal to 95, its ranking is recorded as 1; if the similarity score is in the range [90, 95), its ranking is recorded as 3. Although this method is approximate, it effectively rewards models that can generate correct or highly similar answers and constitutes a reliable proxy evaluation of the model's ability to generate accurate text.

[0068] Narrative quality was evaluated using ROUGE (ROUGE-1, ROUGE-L) and BERTScore (F1) on a sample set containing 100 manually annotated reference narratives.

[0069] Multitasking capability is measured by discriminative selection accuracy and verification inference accuracy.

[0070] To address the key challenges faced by large language models in knowledge graph completion tasks, namely insufficient contextual understanding, poor domain adaptability, and factual illusion, this embodiment proposes and validates an innovative multi-stage generative framework that systematically combines external knowledge reconstruction with the adaptation of the model's intrinsic capabilities.

[0071] The framework first constructs an intelligent information selector, using heuristic rules and semantic embedding techniques to dynamically reconstruct knowledge and extract relevant information from heterogeneous data sources. Then, leveraging the contextual learning capabilities of a large language model, this reconstructed knowledge is injected into a dynamic narrative geared towards reasoning. Building upon this, a multi-task instruction fine-tuning paradigm, combined with QLoRA fine-tuning, adapts the general-purpose Qwen3 model into a domain-specific knowledge graph completion expert, internalizing its ability to generate, discriminate, and verify facts. Finally, an introspective end-to-end illusion mitigation system is constructed, using self-consistency checks to capture uncertainty signals and ensure the reliability of the output. When needed, this system triggers a closed-loop correction process involving external verification and internal evidence enhancement for re-reasoning.

[0072] Extensive comparative experiments on the classic FB15k-237 benchmark dataset systematically validated that our method outperforms robust multi-class baseline models on key metrics such as Hits@1 and MRR. Detailed ablation studies confirmed the independent yet synergistic contributions of the selector and narrator modules. Furthermore, the hallucination mitigation module improved the final Hits@1 performance by 2.9 percentage points while providing interpretable answers. In conclusion, this study demonstrates the effectiveness and superiority of the proposed multi-stage framework in improving the performance, reliability, and interpretability of generative knowledge graph completion.

[0073] Example 2 One embodiment of the present invention provides a generative knowledge graph completion method combining dynamic narrative for the knowledge question answering domain. The question to be answered is transformed into a triple, and the triple is completed by the generative knowledge graph completion method combining dynamic narrative of this embodiment to obtain the answer to the question.

[0074] To visually demonstrate the workflow and effects of this framework, a typical case study is provided: querying (movie protagonist △, / fictional_character / portrayed_by, ?), i.e., who plays the movie protagonist △, involves the following steps: (1) Context building and preliminary prediction: First, a dynamic narrative is constructed for querying the entity, the movie protagonist △. This narrative fully integrates structured clues from the knowledge graph with external text descriptions, mentioning the movie protagonist △'s identity as a core character in a certain comic, his secret identity as an important movie character ☆, and multiple entities associated with him in the graph, such as comic series 1 and movie b.

[0075] Based on this rich context, the model made an initial prediction, outputting the actor who is well-known but not the standard answer for the test set: "Actor B".

[0076] (2) Hallucination / Uncertainty Detection: The initial prediction triggered an internal consistency check. In 10 sampled decoding iterations, the model's output exhibited significant dispersion, generating multiple different versions of the film's main character △, including {"Actor B": 4, "Actor C": 3, "Actor D": 2, "Actor E": 1}. Based on this, a high answer entropy (1.81) and a low confidence level (0.4) were calculated. This uncertainty signal indicates that while the model knows multiple correct answers, it cannot determine which one is the only expected answer in the current context without further constraints. Therefore, this prediction is marked as high-risk.

[0077] (3) Selective external validation and attribution: A high-risk signal triggers a selective external verification process. The system queries the global knowledge graph for (movie protagonist △, / fictional_character / portrayed_by, actor B), verifying the correctness of this fact. Simultaneously, the external verification module discovers several other valid facts in the knowledge graph, such as (movie protagonist △, ..., actor F) and (movie protagonist △, ..., actor C). Based on this, the system generates the attribution text: "Internal consistency check indicates high uncertainty (Entropy: 1.81, Confidence: 0.40), as the model generated multiple valid actors. External verification confirms that while 'actor B' is a correct answer, the knowledge graph contains several other actors who have also portrayed the movie protagonist △. The initial prediction is valid but may not be the specific answer required by the test set instance." (4) Enhanced Evidence and Re-inference: The system then constructs a new, evidence-enhancing cue that supplements the original dynamic narrative with the aforementioned attribution text. This new cue is equivalent to issuing a higher-order instruction to the model: "Warning: While your initial answer 'Actor B' is correct, there are multiple actors who can play this role. Please re-examine any subtle clues in the original context that could point to a more specific instance." (5) Final output (correction successful): Upon receiving clear signals that multiple valid answers exist and that the initial prediction may not be unique, the model, during re-reasoning, will more carefully examine details in the original narrative that were initially overlooked (such as a faint mention of a particular comic book era or film series). Suppose the standard answer in the test set is an actor related to the film trilogy B; in the secondary reasoning, the model, prompted to make a more precise choice, will successfully output "Actor B" again, this time based on stronger internal confidence. Alternatively, if the standard answer is a less well-known actor F, and the narrative happens to contain clues about a 1960s television series, the model might pick up on this in the secondary reasoning and output the correct answer.

[0078] This case clearly demonstrates how our method addresses the typical one-to-many knowledge completion problem. Instead of hastily labeling factually correct answers as incorrect, it accurately identifies the uncertainty of an answer being one of multiple possible answers. Through an interpretable, closed-loop verification and re-reasoning process, the system not only confirms the general correctness of initial predictions but also seeks more precise and context-specific answers by introducing deeper contextual analysis when needed. This not only improves the final evaluation accuracy but also provides valuable transparency and traceability to the model's decision-making process.

[0079] Example 3 One embodiment of the present invention provides a generative knowledge graph completion system that combines dynamic narrative, comprising: The triplet acquisition module is configured to: acquire triplets from the knowledge graph to be completed; The narrative generation module is configured to: intelligently select key information from the internal structure of the knowledge graph and external text corpus, combined with the multi-dimensional embedding of entities, and dynamically generate an information-rich and context-related natural language narrative for the triple to be completed; The preliminary completion module is configured to: construct completion instructions based on natural language narratives, control the execution of completion tasks in the large language model after fine-tuning by multi-task instructions, and generate preliminary completion results; The enhanced completion module is configured to: determine whether the preliminary completion result needs to be corrected through internal consistency checks and external selective verification; if correction is needed, reconstruct the instruction through evidence-based enhancement methods and generate a completion result with explanations using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities given a set of candidate positive and negative entities and to identify the most reasonable entity. The verification reasoning task trains the model to judge whether a given triple is true.

[0080] Example 4 One embodiment of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned generative knowledge graph completion method incorporating dynamic narrative.

[0081] Example 5 In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned generative knowledge graph completion method combined with dynamic narrative.

[0082] Example 6 One embodiment of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the aforementioned generative knowledge graph completion method combining dynamic narrative.

[0083] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0085] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A generative knowledge graph completion method combining dynamic narrative, characterized in that, include: Retrieve the knowledge graph triples to be completed; By combining the internal structure of the knowledge graph and external text corpus with the multi-dimensional embedding of entities, key information is intelligently selected to dynamically generate a rich and context-related natural language narrative for the triples to be completed. Based on natural language narrative, a completion instruction is constructed to control the execution of the completion task in the large language model after fine-tuning with multi-task instructions, and to generate preliminary completion results. By conducting internal consistency checks and external selective verification, it is determined whether the preliminary completion result needs to be corrected. If correction is required, the instruction is reconstructed using an evidence-based enhancement method, and a completion result with accompanying explanations is generated using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities and identify the most reasonable entity given a set of candidate positive and negative entities. The verification reasoning task trains the model to judge whether a given triple is true. By employing an intelligent information selector, knowledge is proactively identified and reconstructed. From a vast amount of knowledge sources, the most relevant knowledge fragments to the current completion task are selected, evaluated, and sorted. This transforms the original, scattered knowledge into an ordered set of knowledge with clear priorities that is highly relevant to the current completion task, thereby enabling intelligent selection of key information. A dynamic narrative generator is employed to generate narrative generation instructions based on examples and transformed knowledge sets from input information to the target narrative. By utilizing a large language model, high-quality, reasoning-friendly, and narrative-formatted natural language narratives are generated. The completion result with accompanying explanation is generated in the following specific process: First, preliminary completion results are generated using a finely tuned large language model; Then, a multi-source verification mechanism is used to identify and locate hallucinations based on the preliminary completion results; Secondly, based on the model's predictive uncertainty and the detected hallucination signals, relevant evidence is dynamically retrieved from trusted external knowledge sources for evaluation; Finally, high-quality external knowledge is incorporated into the final decision-making process of the large language model in a traceable manner to generate complete results with accompanying explanations.

2. The generative knowledge graph completion method combining dynamic narrative as described in claim 1, characterized in that, The large language model employs a parameter-efficient adapter fine-tuning method, which effectively adjusts the model's behavior by introducing a trainable low-rank decomposition matrix next to the weight matrix of the pre-trained model.

3. The generative knowledge graph completion method combining dynamic narrative as described in claim 1, characterized in that, The generative completion task, discriminative selection task, and verification reasoning task are based on three preset instruction templates, generating their respective task instructions. By mixing and using diverse instructions from these three types of tasks during the fine-tuning process, the model is encouraged to learn a more comprehensive knowledge representation.

4. A generative knowledge graph completion system combining dynamic narrative, characterized in that, include: The triplet acquisition module is configured to: acquire triplets from the knowledge graph to be completed; The narrative generation module is configured to: intelligently select key information from the internal structure of the knowledge graph and external text corpus, combined with the multi-dimensional embedding of entities, and dynamically generate an information-rich and context-related natural language narrative for the triple to be completed; The preliminary completion module is configured to: construct completion instructions based on natural language narratives, control the execution of completion tasks in the large language model after fine-tuning by multi-task instructions, and generate preliminary completion results; The enhanced completion module is configured to: determine whether the preliminary completion result needs to be corrected through internal consistency checks and external selective verification; if correction is needed, reconstruct the instruction through evidence-based enhancement methods and generate a completion result with explanations using a large language model. The large language model decomposes the fine-tuning task into three complementary sub-tasks: generative completion, discriminative selection, and verification reasoning. These sub-tasks are trained separately. The generative completion task trains the model to directly generate missing entities. The discriminative selection task trains the model to learn finer-grained differences between entities and identify the most reasonable entity given a set of candidate positive and negative entities. The verification reasoning task trains the model to judge whether a given triple is true. By employing an intelligent information selector, knowledge is proactively identified and reconstructed. From a vast amount of knowledge sources, the most relevant knowledge fragments to the current completion task are selected, evaluated, and sorted. This transforms the original, scattered knowledge into an ordered set of knowledge with clear priorities that is highly relevant to the current completion task, thereby enabling intelligent selection of key information. A dynamic narrative generator is employed to generate narrative generation instructions based on examples and transformed knowledge sets from input information to the target narrative. By utilizing a large language model, high-quality, reasoning-friendly, and narrative-formatted natural language narratives are generated. The completion result with accompanying explanation is generated in the following specific process: First, preliminary completion results are generated using a finely tuned large language model; Then, a multi-source verification mechanism is used to identify and locate hallucinations based on the preliminary completion results; Secondly, based on the model's predictive uncertainty and the detected hallucination signals, relevant evidence is dynamically retrieved from trusted external knowledge sources for evaluation; Finally, high-quality external knowledge is incorporated into the final decision-making process of the large language model in a traceable manner to generate complete results with accompanying explanations.

5. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the generative knowledge graph completion method combining dynamic narrative as described in any one of claims 1-3.

6. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement a generative knowledge graph completion method combining dynamic narrative as described in any one of claims 1-3.

7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to perform a generative knowledge graph completion method combining dynamic narrative as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Generative AI large language model-based knowledge base construction method, system and equipment

    CN118885465A

  • Knowledge query reasoning method and device and knowledge base system

    CN118940845A