Abstract
Knowledge graphs (KGs) are fundamental to modern AI, yet automated construction methods often produce noisy or incomplete data. CleanGraph is an interactive, web-based tool designed to bridge the gap between automated generation and the high-quality requirements of real-world applications. By integrating a human-in-the-loop (HITL) workflow with a flexible plugin architecture, CleanGraph enables domain experts to efficiently refine, correct, and expand knowledge graphs through an intuitive interface.
Introduction
While Large Language Models (LLMs) have accelerated the creation of massive knowledge graphs, they are frequently prone to "hallucinations," factual errors, and structural incompleteness. This is particularly problematic in domain-specific fields like medicine or engineering, where resource scarcity makes expert verification essential. Existing graph tools often prioritize visualization or complex querying over interactive refinement. CleanGraph addresses this "interaction gap" by providing a dedicated environment for Knowledge Graph Refinement (KGR) and Completion (KGC), allowing a human "oracle" to validate and improve model-generated data.
System Architecture and Workflow
CleanGraph is built on the FARM stack (FastAPI, React, and MongoDB) and centers on an extensible plugin system. This architecture allows researchers to integrate custom Python-based models for specific tasks.
The workflow is divided into three main stages:
- Automated Construction: Initial graph data is processed through Error Detection Models (EDMs) for refinement and Completion Models (CMs) for link prediction.
- HITL Interactive Refinement: The human oracle reviews the graph, accepting or rejecting model suggestions and performing manual CRUD operations.
- Final Output: The result is a certain and complete JSON graph dataset ready for downstream applications.
Interactive Interface and UX
To handle the complexity of large-scale graphs without overwhelming the user, CleanGraph introduces several UI/UX innovations designed for efficiency.
Key features include:
- Subgraph Pagination: Instead of displaying a "hairball" of the entire graph, the tool partitions data into focused views centered on a single node. Users can navigate through triples in manageable chunks.
- Visual Feedback: Errors and suggestions are rendered as color-coded notifications directly on the graph. A dedicated panel allows for one-click resolution of these issues.
- Advanced CRUD Operations: Beyond standard editing, the tool supports specialized actions like 1-hop item deletion (to prevent orphaned nodes) and subgraph merging to resolve entity duplication.
Key Insights
The development of CleanGraph highlights several critical principles for modern KG management:
- The Necessity of the Oracle: Human expertise remains the gold standard for domain-specific factuality. CleanGraph minimizes the friction of human intervention.
- Model Decoupling: By using Pydantic for data validation, the system decouples the UI from the underlying models. This allows any KGR/KGC model (heuristic or deep learning) to be plugged in without front-end modifications.
- Refinement vs. Completion: The tool provides a unified interface for both fixing existing noise (refinement) and predicting missing information (completion).
Comparative Analysis and Results
Qualitative analysis against industry standards like Neo4j, AllegroGraph, and JanusGraph shows that CleanGraph is unique in providing a unified interface for HITL CRUD, KGR, and KGC. While traditional graph databases often require complex query languages (e.g., Cypher or SPARQL) for data cleaning, CleanGraph enables direct manipulation through intuitive mouse actions and shortcuts, significantly lowering the barrier for non-technical domain experts.
Conclusion and Future Work
CleanGraph provides a robust framework for high-precision knowledge graph curation. While currently optimized for text-based graphs, future work aims to improve scalability for industrial-scale datasets and integrate native support for RDF-based semantic web standards. Additionally, the authors plan to incorporate graph embedding models directly into the plugin ecosystem to enhance automated suggestions.
Summary updated