Graph Analytics

Compute and persist PageRank, degree centrality, hubs, bridges, and disconnected islands for each company graph.

Overview

Description

Graph Analytics measures the structure of a company’s knowledge graph and turns raw relationships into usable signals. It computes PageRank, normalized degree centrality, top hubs, bridge edges, and disconnected islands, then persists row-level metrics for API and product consumers. These measures help Dots identify influential knowledge, isolated material, and fragile connections across the company graph.

The engine is deliberately server-only and bounded. It loads a company’s active multigraph into Graphology for centrality and component analysis, retains an iterative Tarjan implementation for bridges, and writes results in chunks. A dedicated metrics subpath keeps the heavy graph runtime out of browser bundles while allowing scheduled jobs and backend adapters to invoke the analysis.

Selling Points

  • Identifies high-influence knowledge and code nodes using established graph measures.
  • Exposes disconnected islands that may need linking, cleanup, or onboarding attention.
  • Finds bridge relationships whose removal would split connected knowledge regions.
  • Persists metrics so ranking consumers avoid recomputing a whole graph per request.
  • Uses bounded, parity-tested algorithms suitable for large company graphs.

User Story

As a knowledge lead, I want to know which records act as hubs and which collections are isolated. Dots can rank and classify the graph in the background, letting dashboards and agents focus attention on structurally important or disconnected knowledge.

Extension Surface

The rating is automatable because backend jobs and adapters invoke runGraphAnalysis from packages/knowledge-graph/src/metrics/index.ts with explicit company scope and analysis options. Individual primitives are exported for composed server workflows. The algorithms themselves are fixed contracts rather than a plug-in registry, and the server-only subpath prevents direct browser extension.

Capabilities & Limits

Capabilities include unweighted PageRank, in/out degree centrality, hub ranking, connected-component islands, bridge detection, bounded node loading, and chunked persistence. Parallel directed edges are represented correctly in the multigraph. The main limit is that stored edge weights are intentionally ignored by PageRank, so ranking reflects link topology rather than confidence or strength. Analysis also stops at its maximum node budget instead of pretending an oversized partial scan is complete.

Implementation Map

  • packages/knowledge-graph/src/metrics/index.ts
  • packages/knowledge-graph/src/metrics/centrality.ts
  • packages/knowledge-graph/src/metrics/bridges.ts
  • packages/knowledge-graph/src/jobs/index.ts

Properties

Property
Value
product
dots-platform
extensibility
automatable
module
Repo Graph, Home
packages
knowledge-graph, api
status
shipped
surface
api
summary
Compute and persist PageRank, degree centrality, hubs, bridges, and disconnected islands for each company graph.

Connections

Graph Analytics · Explore connections

  • complementstoPrecomputed Graph Layout and Clusters
  • complementstoBudgeted Graph Traversal
  • implemented bytopackages/knowledge-graph/src/metrics/centrality.ts
  • implemented bytopackages/knowledge-graph/src/metrics/bridges.ts
  • implemented bytopackages/knowledge-graph/src/metrics/index.ts
  • implemented bytorunGraphAnalysis
  • complementsfromPrecomputed Graph Layout and Clusters

Connected Records7

Complements
Implemented by
packages/knowledge-graph/src/metrics/bridges.ts
packages/knowledge-graph/src/metrics/centrality.ts
packages/knowledge-graph/src/metrics/index.ts
runGraphAnalysis
7 connections.