Detect Knowledge Communities
graph_communitiesFind clusters of densely interconnected entities in a knowledge graph. Each entity belongs to one community, helping you explore related groups without specifying a starting point.
Instructions
Find clusters of densely-interconnected entities in the graph. Uses greedy seed-based BFS through edges above the weight threshold — works without GDS or APOC. Each entity is assigned to at most one community (the first that reaches it from a high-degree seed). Useful for understanding knowledge neighbourhoods (e.g. "everything related to infrastructure"). Returns at most max_communities clusters, each shaped {community_id, seed: {id, name, type}, size, members: [{id, name, type}]}, sorted by size desc; communities below min_size are filtered out. Use graph_query or graph_search instead when you have a specific entity to start from.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_hops | No | BFS depth from each seed (default 3, capped at 4). | |
| min_size | No | Minimum members for a community to be returned (default 2). | |
| max_communities | No | Maximum number of communities to return (default 10). | |
| weight_threshold | No | Only traverse edges with weight strictly greater than this (default 0.4). |