Docs2KG: Unified Knowledge Graph Construction from Heterogeneous Documents Assisted by Large Language Models
Qiang Sun, Yuanyi Luo, Wenxiao Zhang, Sirui Li, Jichunyang Li, Kai Niu, Xiangrui Kong, Wei Liu
TL;DR
The paper addresses the challenge of extracting and integrating knowledge from heterogeneous unstructured enterprise documents. It introduces Docs2KG, a dual-path framework that combines Image-based layout analysis and Markdown/HTML-based parsing to construct a multimodal knowledge graph with intra- and inter-modal relations, stored in Neo4j. Key contributions include open-source tooling, support for emails, web pages, PDFs, and Excel files, and demonstrations of graph querying and RAG-augmented retrieval using proximity-based node selection. This approach enhances information discovery, reduces language model hallucination in retrieval tasks, and enables flexible, domain-agnostic knowledge integration across diverse document formats.
Abstract
Even for a conservative estimate, 80% of enterprise data reside in unstructured files, stored in data lakes that accommodate heterogeneous formats. Classical search engines can no longer meet information seeking needs, especially when the task is to browse and explore for insight formulation. In other words, there are no obvious search keywords to use. Knowledge graphs, due to their natural visual appeals that reduce the human cognitive load, become the winning candidate for heterogeneous data integration and knowledge representation. In this paper, we introduce Docs2KG, a novel framework designed to extract multimodal information from diverse and heterogeneous unstructured documents, including emails, web pages, PDF files, and Excel files. Dynamically generates a unified knowledge graph that represents the extracted key information, Docs2KG enables efficient querying and exploration of document data lakes. Unlike existing approaches that focus on domain-specific data sources or pre-designed schemas, Docs2KG offers a flexible and extensible solution that can adapt to various document structures and content types. The proposed framework unifies data processing supporting a multitude of downstream tasks with improved domain interpretability. Docs2KG is publicly accessible at https://docs2kg.ai4wa.com, and a demonstration video is available at https://docs2kg.ai4wa.com/Video.
