KnowledgeGraph.health()

Get health metrics for the graph.

Usage

Source

KnowledgeGraph.health()

Reports orphan nodes (no edges), isolated clusters, and embedding coverage.

Returns

dict[str, Any]
Health metrics including orphan count and embedding coverage.

Examples

report = kg.health()
report["orphan_nodes"]       # 3
report["embedding_coverage"] # 0.85