Papers
Topics
Authors
Recent
Search
2000 character limit reached

DKG-LLM Framework: Dynamic Graph Integration for LLMs

Updated 8 July 2026
  • DKG-LLM Framework is a method that integrates evolving knowledge graphs with LLMs to ground and refine reasoning.
  • It employs a closed-loop architecture where extraction and validation reduce hallucinations and improve domain specialization in applications like clinical diagnosis and financial trend analysis.
  • The framework utilizes adaptive control, probabilistic graph updates, and dynamic schema design to enhance precision and scalability across specialized domains.

The DKG-LLM Framework denotes a class of systems that integrate a dynamic knowledge graph (DKG) with a LLM so that unstructured data can be converted into structured, evolving knowledge and then used to ground, constrain, and extend model reasoning. Across the literature, this pattern appears in clinical diagnosis and treatment recommendation, domain-specific KG construction, specialized question answering, and financial trend detection. The common premise is that LLMs contribute semantic extraction, dialogue, and flexible reasoning, while DKGs contribute typed entities, explicit relations, temporal or provenance structure, and validation signals that reduce hallucination and improve domain specialization (Zuo et al., 2024, Sarabadani et al., 8 Aug 2025, Zeng et al., 2 Feb 2026, Zhang et al., 2024, Li et al., 2024).

1. Definition and scope

In the surveyed work, a DKG-LLM framework is not merely retrieval-augmented generation over a static knowledge source. It is a bidirectional or closed-loop architecture in which the graph is continually constructed, refined, or expanded from incoming evidence, and the LLM is in turn conditioned on that graph for downstream reasoning. KG4Diagnosis frames the problem in terms of medical diagnosis, where single-agent LLM approaches struggle with hallucination, validation, and specialization, and where static ontologies do not scale to unstructured text and dynamic medical knowledge (Zuo et al., 2024). WTS makes the distinction explicit by contrasting one-way KG augmentation with an “LLM\circlearrowrightKG” paradigm in which the model both consumes and evolves the domain knowledge graph (Zhang et al., 2024).

A second defining feature is domain specialization without abandoning general-purpose language competence. In LEC-KG, the objective is domain-specific knowledge graph construction from unstructured SDG reports under heterogeneous entity mentions, long-tail relation distributions, and the absence of standardized schemas (Zeng et al., 2 Feb 2026). In FinDKG, the graph is explicitly temporal and is built from financial news so that trends and predictive relations can be tracked over time (Li et al., 2024). In the medical DKG-LLM system based on Grok 3, the graph is treated as a probabilistic, continuously updated representation of diseases, symptoms, treatments, patient profiles, and related clinical factors, supporting both diagnosis and personalized treatment recommendation (Sarabadani et al., 8 Aug 2025).

Framework Domain and task Distinctive dynamic mechanism
KG4Diagnosis Medical diagnosis across 362 common diseases Hierarchical GP agent and specialist agents with KG construction, KG constraint checks, and expert-validated updates
DKG-LLM Medical diagnosis and personalized treatment recommendations ASFA-based graph updates, MRF pruning, Bayesian diagnosis, treatment optimization, physician feedback
LEC-KG Domain-specific KG construction for SDGs LLM extraction, RotatE structural validation, evidence-guided CoT feedback, semantic initialization for unseen entities
WTS Specialized reasoning across 6 datasets spanning 5 domains DKG-Augmented LLM plus LLM-Assisted DKG Evolution in a closed loop
FinDKG Financial trend detection and thematic investing LLM-generated time-stamped facts, dynamic financial KG construction, temporal KGTransformer learning

This pattern suggests that “dynamic” in DKG-LLM has at least three meanings in the current literature: graph evolution from new data, adaptive control or routing during inference, and feedback-driven recalibration of the extraction or reasoning process.

2. Canonical architectural patterns

The architecture most directly aligned with clinical workflow is KG4Diagnosis, which uses a two-tier hierarchy. A GP agent performs initial assessment and triage, produces a preliminary diagnosis and confidence, and routes cases when confidence is low or the diagnosis requires specialized expertise. The current instantiation includes four specialist agents—cardiology, neurology, endocrinology, and rheumatology—which perform deeper domain reasoning and can collaborate on multi-domain cases. Referral is governed by a confidence threshold τ=0.7\tau = 0.7 and the set XsX_s of diagnoses requiring specialized expertise; specialist outputs can be combined either as a weighted aggregation,

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),

or as an average,

Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.

Inter-agent transfer is represented by T(A,B,q)=ϕ(q), ϕ:QQT(A, B, q) = \phi(q), \ \phi: Q \to Q', and GP memory is updated as KGP(t+1)=KGP(t)+ΔKK_{\text{GP}^{(t+1)}} = K_{\text{GP}^{(t)}} + \Delta K (Zuo et al., 2024).

The medical DKG-LLM system centered on Grok 3 organizes the pipeline around the Adaptive Semantic Fusion Algorithm (ASFA). ASFA unifies probabilistic entity and relation extraction via Grok 3, Bayesian inference for diagnosis, MRF-based graph pruning for scalability, constrained optimization for treatment utility maximization, and feedback-based learning from physician input. Its flow is explicit: ingestion and normalization, semantic extraction with confidence scoring and filtering by threshold τ\tau, DKG construction and update, reasoning and recommendation, and feedback integration that adjusts parameters such as θ\theta, W1W_1, τ=0.7\tau = 0.70, τ=0.7\tau = 0.71, and the decay factor τ=0.7\tau = 0.72 (Sarabadani et al., 8 Aug 2025).

WTS expresses the same general idea in a less domain-bound form. Its two core components are the DKG-Augmented LLM and the LLM-Assisted DKG Evolution module. The former retrieves question-relevant domain triples by exact match, question-similarity retrieval, and LLM semantic pruning; the latter generates new triples from processed tasks and updates the DKG after validation. The resulting loop allows specialization to accumulate over a stream of tasks without domain-specific fine-tuning (Zhang et al., 2024).

These systems reveal a recurring control structure: extraction from raw evidence, graph-grounded reasoning, confidence-sensitive routing or triage, and graph evolution conditioned on model outputs plus external validation. A plausible implication is that DKG-LLM is better understood as a systems architecture than as a single model family.

3. Knowledge graph construction, schema design, and update regimes

Graph construction in DKG-LLM frameworks is typically staged and schema-aware. KG4Diagnosis specifies an end-to-end pipeline with five stages: data chunking and segmentation; semantic-driven entity and relationship extraction; KG construction; LLM-augmented KG expansion; and human-guided reasoning. Documents τ=0.7\tau = 0.73 are segmented into chunks τ=0.7\tau = 0.74 by a segmentation function τ=0.7\tau = 0.75, using context-based segmentation rules such as section-based boundaries and paragraph boundaries to preserve clinical semantics. Entity extraction uses BioBERT contextual embeddings aligned with SNOMED-CT and UMLS; the extracted entity and relation sets are

τ=0.7\tau = 0.76

The graph is then defined as

τ=0.7\tau = 0.77

and stored in Neo4j with nodes such as diseases, symptoms, drugs, tests, and categories, and edges such as has_symptom, treated_by, indicates, and contraindicated_with (Zuo et al., 2024).

LEC-KG is more explicit about schema engineering under long-tail relations. Its ontology defines a two-level relation hierarchy with 8 coarse categories and 89 fine-grained types. The LLM performs joint extraction in a single pass, producing tuples τ=0.7\tau = 0.78, where τ=0.7\tau = 0.79 is the evidence span and XsX_s0 is the coarse category. The coarse-to-fine prompt first selects among the 8 coarse categories and then among the fine-grained relations within the chosen category, thereby reducing the search space and allowing low-frequency relations to compete locally rather than against all 89 types. The corpus consists of the “Big Earth Data in Support of the Sustainable Development Goals” report series, with each report about 100k Chinese characters; relation imbalance is severe, with the top-10 relations accounting for 68.2% of instances and 23 relations having fewer than 5 instances (Zeng et al., 2 Feb 2026).

The Grok 3-based DKG-LLM defines its graph formally as

XsX_s1

where XsX_s2 maps nodes into 13 node types and XsX_s3 maps edges into 26 relation types. The reported initialization scale is 15,964 nodes across 13 types and 127,392 edges across 26 types, with dynamic updates adding approximately 150 new nodes and edges per category per batch and pruning to maintain at most 987,654 edges. The node schema includes Disease, Symptom, Treatment, Patient Profile, Medication, Procedure, Risk Factor, Comorbidity, Diagnostic Test, Body System, Gene, Lifestyle Factor, and Biomarker. The edge schema includes Causal, Therapeutic, Associative, Contraindicative, Diagnostic, Preventive, Exacerbative, Ameliorative, Temporal, Dosage-Related, Side Effect, Interaction, Epidemiological, Genetic, Allergic, Monitoring, Supportive, Concomitant, Risk-Associated, Symptom-Symptom, Procedure-Related, Outcome-Related, Age-Related, Lifestyle-Related, Biomarker-Related, and Comorbidity-Related (Sarabadani et al., 8 Aug 2025).

FinDKG shows the same design in a temporal extraction setting. Using ICKG, a fine-tuned open-source LLM, the system builds an open-source DKG from about 400,000 Wall Street Journal articles from 1999 to 2023. Entities are assigned to 12 meta-entity types and constrained to 15 financial relation types, with timestamps set to publication dates and disambiguation performed using Sentence-BERT (Li et al., 2024).

4. Grounding, retrieval, and reasoning

Graph grounding mechanisms vary by task but share the principle that LLM outputs must be constrained by explicit structure. In KG4Diagnosis, graph integration operates as KG-as-context, constraint checking, and path reasoning. Entities and relations stored in Neo4j are retrieved and provided as structured context. Proposed diagnoses and suggested tests or treatments are cross-checked against KG relations, and inconsistencies trigger re-evaluation or escalation. Agents can use edges such as symptomXsX_s4disease and drugXsX_s5indication to justify differentials and recommendations, while specialist collaboration aggregates evidence across domains (Zuo et al., 2024).

In the Grok 3-based DKG-LLM, the main reasoning backbone is probabilistic. Entity confidence is calibrated by combining model probability with graph similarity:

XsX_s6

Graph updates are treated as probabilistic optimization over data batches, pruning is performed through an MRF,

XsX_s7

and edge weights evolve by temporal decay,

XsX_s8

Diagnosis uses a Bayesian posterior,

XsX_s9

and treatment selection uses utility maximization,

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),0

with

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),1

A cost-aware formulation is given by the Lagrangian

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),2

These equations make the graph not only a retrieval substrate but also a probabilistic state representation for clinical inference (Sarabadani et al., 8 Aug 2025).

LEC-KG is organized around structural validation rather than clinical decision support. Its KGE model is RotatE in complex space, with scoring function

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),3

where Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),4 and Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),5. Structural scores route candidate triples into Accept, Feedback, and Reject partitions using dynamic thresholds

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),6

Unseen entities are handled by semantic initialization:

Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),7

with Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),8 mapping into the 512-dimensional complex RotatE space. Mid-confidence triples are sent to an evidence-guided Chain-of-Thought verification channel that checks textual support, alternative relations, and schema constraints before correction or rejection (Zeng et al., 2 Feb 2026).

WTS uses a retrieval-and-evolution loop rather than embedding-based structural validation. For a question Pfinal(zq)=i=1nwiPAgenti(zq),P_{\text{final}(z \mid q)} = \sum_{i=1}^n w_i P_{\text{Agent}_i}(z \mid q),9, it computes question-triple similarity by cosine distance,

Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.0

retains triples satisfying Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.1, prunes them further by LLM semantic scoring, and performs multi-hop retrieval with width Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.2, maximum depth Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.3, and an early-exit hop Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.4. After reasoning, the model may generate new triples for graph evolution, subject to redundancy checks and an insertion threshold Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.5 (Zhang et al., 2024).

5. Empirical performance and representative deployments

The strongest fully specified quantitative evaluation in the medical setting is the DKG-LLM system integrating Grok 3 and ASFA. On real-world datasets including MIMIC-III and PubMed, it reports diagnostic accuracy of 84.19%, treatment recommendation precision of 89.63%, semantic coverage of 93.48%, semantic extraction accuracy of 91.5% Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.6, and Graph Alignment Score of 92.7% Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.7. Reported graph update efficiency is under 1 second per category for approximately 150 nodes and edges per batch, with a scalability cap of 987,654 edges. Clinician feedback scores are reported as 4.3 Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.8 for accuracy, 4.1 Pfinal(zq)=1ni=1nPAgenti(zq),zZ.P_{\text{final}(z \mid q)} = \frac{1}{n} \sum_{i=1}^n P_{\text{Agent}_i}(z \mid q), \quad z \in Z.9 for reliability, and 4.2 T(A,B,q)=ϕ(q), ϕ:QQT(A, B, q) = \phi(q), \ \phi: Q \to Q'0 for applicability, with Cohen’s T(A,B,q)=ϕ(q), ϕ:QQT(A, B, q) = \phi(q), \ \phi: Q \to Q'1 (Sarabadani et al., 8 Aug 2025).

LEC-KG provides detailed extraction benchmarks. On the 2024 expert-annotated SDG test set, it reports Micro-F1 36.79%, Macro-F1 21.63%, Precision 34.84%, and Recall 38.96%. Compared with LLM Few-shot, Micro-F1 improves by 11.25 points and Macro-F1 by 11.44 points. Tail-relation F1 reaches 13.3%, compared with 6.7% for LLM Few-shot and 7.7% for the non-iterative schema-constrained variant. Ablations show Micro-F1 drops to 25.01% without evidence retrieval, 26.35% without active selection, 28.30% without semantic initialization, and 21.50% without iterative refinement. Across iterations, Micro-F1 rises from 21.5% to 27.2%, then 32.1%, and finally 36.79%, while validated triples grow from 341 to 436, 572, and 727 (Zeng et al., 2 Feb 2026).

WTS evaluates specialization across six datasets spanning five domains. The paper reports that WTS surpasses previous state of the art in four specialized domains and achieves a maximum performance improvement of 11.3%. Examples include PubMedQA accuracy 0.397 for WTS(GPT-4o) versus 0.175 for GPT-4o and 0.372 for CoT; MedMCQA (Single) 0.781 versus 0.708 for GPT-4o and 0.576 for ToG; MedMCQA (Multi) 0.728 versus 0.654 for GPT-4o; ScienceQA-LAN 0.906 versus 0.862 for GPT-4o and 0.778 for ToG; and ChatDoctor5k BERTScore 0.791 for WTS(GPT-4o) versus 0.777 for GPT-4o (Zhang et al., 2024).

FinDKG reports two different forms of evaluation. For link prediction, KGTransformer outperforms R-GCN, RE-Net, and EvoKG on YAGO and WIKI and, on FinDKG, outperforms temporal baselines by approximately 10% on MRR and Hits@3,10 when node types are used. For thematic investing, a monthly rebalanced long-only S&P 500 portfolio based on predicted AI impact, FinDKG-AI, achieves annualized return 39.6% and Sharpe 1.81 over 2022-06-30 to 2023-12-29, exceeding SPY, QQQ, ARKK, AI-themed ETFs, and an EvoKG baseline (Li et al., 2024).

By contrast, KG4Diagnosis is primarily architectural at its present stage. It reports coverage of 362 common diseases across multiple specialties and specifies that a comprehensive benchmark is under development to assess diagnostic accuracy, hallucination prevention, and multi-agent coordination efficiency, with planned evaluation on MedQA and comparison to ESM-1b, Med-PaLM, and BioGPT (Zuo et al., 2024).

6. Safety, constraints, misconceptions, and future directions

A recurrent misconception is that a DKG-LLM framework is equivalent to attaching a static graph to an LLM prompt. The surveyed systems instead emphasize continuous graph evolution, explicit validation, and feedback-sensitive control. KG4Diagnosis uses multi-agent verification, KG constraint checks, ontology normalization, expert validation, and referral thresholds to mitigate hallucination. When T(A,B,q)=ϕ(q), ϕ:QQT(A, B, q) = \phi(q), \ \phi: Q \to Q'2 is below a safe threshold or KG constraints flag contradictions, the agents propose further tests or history-taking and escalate to human oversight when needed (Zuo et al., 2024). The medical DKG-LLM system employs confidence thresholds, graph similarity calibration, MRF pruning, Bayesian inference, and reinforcement-style physician feedback as guardrails (Sarabadani et al., 8 Aug 2025). WTS similarly treats graph evolution as conditional on validation, redundancy checks, and confidence thresholds rather than unconditional insertion (Zhang et al., 2024).

Limitations are also consistent across domains. KG4Diagnosis notes dependence on KG quality, underrepresentation of rare diseases and rapidly evolving knowledge, and coordination complexity that grows with the number of specialists (Zuo et al., 2024). LEC-KG identifies cold-start instability, sensitivity to the manually designed 89-relation schema, and computational overhead from iterative refinement—about 700–800 additional LLM API calls per round, about 4 hours per round, and about 16 hours in total for T(A,B,q)=ϕ(q), ϕ:QQT(A, B, q) = \phi(q), \ \phi: Q \to Q'3 (Zeng et al., 2 Feb 2026). The Grok 3-based DKG-LLM notes scalability beyond the graph edge cap, missing explicit prompt-design details, and cross-institution generalization as open concerns (Sarabadani et al., 8 Aug 2025). FinDKG raises issues of source bias, extraction errors, temporal leakage, and the memory intensity of temporal GNN training (Li et al., 2024).

Privacy and governance are unevenly specified. KG4Diagnosis states that privacy considerations are not explicitly detailed, while suggesting that typical deployment would keep PHI local and control KG access with role-based permissions (Zuo et al., 2024). The Grok 3-based DKG-LLM emphasizes de-identification and identifies federated learning as a future direction (Sarabadani et al., 8 Aug 2025). These points suggest that data governance remains a framework-level requirement rather than a solved property of DKG-LLM systems.

Future directions in the literature are convergent. KG4Diagnosis points to comprehensive benchmarking, richer coordination mechanisms, and multimodal integration (Zuo et al., 2024). LEC-KG identifies end-to-end alignment learning for semantic initialization, denser evidence retrieval, automated schema induction, and multilingual cross-domain evaluation (Zeng et al., 2 Feb 2026). WTS proposes probabilistic KGs, reinforcement learning over retrieval depth and update thresholds, human-in-the-loop validation, and uncertainty-aware prompting (Zhang et al., 2024). FinDKG identifies continuous-time temporal modeling, multimodal integration, causal inference, and active validation loops (Li et al., 2024). Taken together, these directions indicate that the DKG-LLM framework is evolving toward more explicit uncertainty management, more disciplined schema and provenance control, and tighter integration between extraction, reasoning, and long-horizon knowledge maintenance.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DKG-LLM Framework.