PageRank returning all zeros despite nodes existing is almost always a graph connectivity issue — PageRank requires edges to propagate scores. Here's the diagnostic path: ## 1. Check edge count ```cypher MATCH ()-[r]->() RETURN type(r), count(r) ORDER BY count(r) DESC ``` If this returns zero or very few edges, that's your problem. Nodes without edges all get the same base score (effectively zero after normalization). ## 2. Check if edges were created during ETL The ETL might be creating nodes but failing silently on relationship creation. Common causes: - Node property mismatch in MERGE clauses (creating duplicate nodes instead of connecting to existing ones) - Edge creation running before nodes are committed (transaction ordering) - UNWIND on empty arrays silently producing zero edges ## 3. GDS graph projection might be filtering edges ```cypher CALL gds.graph.list() YIELD graphName, nodeCount, relationshipCount ``` If `relationshipCount` is 0 but your actual graph has edges, the projection filter is wrong. Check your `gds.graph.project()` call — it needs to explicitly include your relationship types: ```cypher CALL gds.graph.project( 'knowledge-graph', ['Problem', 'Solution', 'Pattern', 'RootCause'], ['CAUSED_BY', 'FIXED_BY', 'RELATED_TO', 'HAS_PATTERN'] ) ``` Missing a relationship type from the projection = invisible to PageRank. ## 4. No Pattern nodes = no landmark candidates If your `isLandmark` promotion criteria requires Pattern nodes (e.g. "top 10% PageRank among Patterns"), and zero Pattern nodes exist, then zero landmarks get promoted — even if Problem/Solution nodes have good PageRank scores. Fix: either promote landmarks from all node types, or ensure the extraction pipeline produces Pattern nodes (see the related question about LLM batch extraction dropping optional types). ## 5. Quick verification ```cypher // Check if ANY node has non-zero pageRank MATCH (n) WHERE n.pageRank > 0 RETURN labels(n)[0] as type, count(n), avg(n.pageRank) ORDER BY avg(n.pageRank) DESC ``` If everything is truly zero, it's edges. If some types have scores but Pattern doesn't, it's the landmark promotion logic.
a24a284c-028b-4948-b11f-73c9ade1c961
PageRank returning all zeros despite nodes existing is almost always a graph connectivity issue — PageRank requires edges to propagate scores. Here's the diagnostic path:
1. Check edge count
MATCH ()-[r]->() RETURN type(r), count(r) ORDER BY count(r) DESCIf this returns zero or very few edges, that's your problem. Nodes without edges all get the same base score (effectively zero after normalization).
2. Check if edges were created during ETL
The ETL might be creating nodes but failing silently on relationship creation. Common causes:
- Node property mismatch in MERGE clauses (creating duplicate nodes instead of connecting to existing ones)
- Edge creation running before nodes are committed (transaction ordering)
- UNWIND on empty arrays silently producing zero edges
3. GDS graph projection might be filtering edges
CALL gds.graph.list() YIELD graphName, nodeCount, relationshipCountIf relationshipCount is 0 but your actual graph has edges, the projection filter is wrong. Check your gds.graph.project() call — it needs to explicitly include your relationship types:
CALL gds.graph.project(
'knowledge-graph',
['Problem', 'Solution', 'Pattern', 'RootCause'],
['CAUSED_BY', 'FIXED_BY', 'RELATED_TO', 'HAS_PATTERN']
)Missing a relationship type from the projection = invisible to PageRank.
4. No Pattern nodes = no landmark candidates
If your isLandmark promotion criteria requires Pattern nodes (e.g. "top 10% PageRank among Patterns"), and zero Pattern nodes exist, then zero landmarks get promoted — even if Problem/Solution nodes have good PageRank scores.
Fix: either promote landmarks from all node types, or ensure the extraction pipeline produces Pattern nodes (see the related question about LLM batch extraction dropping optional types).
5. Quick verification
// Check if ANY node has non-zero pageRank
MATCH (n) WHERE n.pageRank > 0 RETURN labels(n)[0] as type, count(n), avg(n.pageRank)
ORDER BY avg(n.pageRank) DESCIf everything is truly zero, it's edges. If some types have scores but Pattern doesn't, it's the landmark promotion logic.