KnowledgeGraph.stats()

Get summary statistics about the graph.

Usage

Source

KnowledgeGraph.stats()

Returns

dict[str, Any]
Counts of nodes (total and per type), edges, and per-layer breakdowns.

Examples

kg.stats()
# {"nodes": 42, "edges": 87, "documents": 10, "entities": 25, "topics": 7,
#  "decisions": 3, "layers": {"base": 30, "enrichment": 10, "extended": 2}}