Overview of iText2KG architecture
mainiText2KG is a Python package for incrementally constructing consistent knowledge graphs (KGs) from unstructured text using LLMs. It uses a zero-shot approach to extract entities and relations, resolves ambiguities, and integrates the results into Neo4j for visualization.
The architecture consists of four core modules:
- Document Distiller: Reformulates raw documents into semantic blocks based on a user-defined schema to improve the signal-to-noise ratio.
- Incremental Entity Extractor: Extracts unique entities from semantic blocks and resolves ambiguities using cosine similarity to match local entities with global entities.
- Incremental Relation Extractor: Identifies relationships between entities. It supports two modes: using global entities to enrich the graph or using local entities for higher precision.
- Graph Integrator and Visualization: Integrates extracted data into a Neo4j database for interactive exploration.