Abstract
Knowledge Graphs (KGs) structure real-world entities and their relationships into triples, enhancing machine reasoning for various tasks. While domain-specific KGs offer substantial benefits, their manual construction is often inefficient and requires specialized knowledge. Recent approaches for knowledge graph construction (KGC) based on large language models (LLMs), such as schema-guided KGC and reference knowledge integration, have proven efficient. However, these methods are constrained by their reliance on manually defined schema, single-document processing, and public-domain references, making them less effective for domain-specific corpora that exhibit complex knowledge dependencies and specificity, as well as limited reference knowledge. To address these challenges, we propose LKD-KGC, a novel framework for unsupervised domain-specific KG construction. LKD-KGC autonomously analyzes document repositories to infer knowledge dependencies, determines optimal processing sequences via LLM driven prioritization, and autoregressively generates entity schema by integrating hierarchical inter-document contexts. This schema guides the unsupervised extraction of entities and relationships, eliminating reliance on predefined structures or external knowledge. Extensive experiments show that compared with state-of-the-art baselines, LKD-KGC generally achieves improvements of 10% to 20% in both precision and recall rate, demonstrating its potential in constructing high-quality domain-specific KGs.
Introduction
Building a Knowledge Graph (KG)—a structured network of entities and their relationships—is essential for advanced AI tasks like Retrieval-Augmented Generation (RAG). However, manual construction is prohibitively slow, and existing automated methods struggle with domain-specific corpora, such as internal technical manuals or specialized industry documentation.
Current LLM-based approaches face three main hurdles: schema dependency (requiring a human-defined blueprint), reference gaps (relying on public knowledge like Wikipedia), and ignoring contextual flow. Knowledge is inherently hierarchical; for instance, one cannot fully grasp "Metric Alerting" without first understanding "Metric Types." Existing tools often process documents in isolation, missing these critical inter-document dependencies.
The LKD-KGC Framework
LKD-KGC (LLM-driven Knowledge Dependency Parsing for KG Construction) automates the construction of domain-specific KGs by mimicking the human learning process: mastering foundational concepts before tackling advanced ones. The framework operates in three distinct stages:
- Dependency Evaluation Module: This module performs a bottom-up traversal of a document directory to create initial summaries. It then uses a top-down recursive process to determine the "optimal access order" for the documents. Finally, it generates context-aware summaries for each document by integrating the summaries of "foundational" documents already processed.
- Schema Definition Module: Instead of requiring a manual schema, the system extracts potential entity types from the context-aware summaries. To avoid a "vocabulary explosion," it employs K-means clustering (optimized by silhouette coefficients) to group similar terms, prompting the LLM to unify these clusters into a clean, defined entity schema.
- Triple Extraction Module: Using the generated schema as a guide, the LLM extracts valid entities and identifies meaningful relationships from the original text to form the final graph. To handle large volumes of data, the framework utilizes a vector database to retrieve relevant "prior knowledge" summaries during extraction.
Experimental Evaluation and Results
The researchers evaluated LKD-KGC across three environments: the public Prometheus documentation, a Windows-focused subset of Re-DocRED, and a private IMS dataset consisting of 46 internal technical documents.
LKD-KGC, tested using Llama-3.1-70B and DeepSeek-R1-Distill-Qwen-14B, consistently outperformed baselines like AutoKG and EDC. Key results include:
- Precision & Recall: LKD-KGC achieved 10%–20% improvements in both precision and recall across datasets.
- Private Data Performance: On the internal IMS dataset, the framework reached nearly 90% precision. In contrast, methods like AutoKG suffered from hallucinations due to their reliance on public-domain reference knowledge.
- Complex Benchmarks: On the challenging Re-DocRED dataset, LKD-KGC reached an F1 score approaching 30, a significant leap over previous zero-shot methods.
Discussion and Conclusion
The most significant insight from this work is that the "learning path" matters: the order in which an AI processes a library affects the quality of the resulting KG. By identifying prerequisite documents, the LLM gains the necessary context to identify specialized entities correctly. Furthermore, extracting entity types from summaries rather than raw text acts as a denoising filter, leading to cleaner schemas.
While LKD-KGC offers unsupervised autonomy, future work could address current limitations such as the computational overhead of recursive processing and the lack of standardized relation naming. Nonetheless, LKD-KGC demonstrates a robust path forward for constructing high-quality, domain-specific knowledge graphs without the need for predefined structures or external references.
Summary updated