Skip to content

D50c — "Related to X" is computed from current relations, and never stored

  • Status: Accepted
  • Date: 2026-09-23
  • Origin: slice 27 build
  • Area: reading

Decision

  • kg related <entity> [--limit N] [--edges e1,e2] [--type T] (MCP read op=related) ranks what sits closest to an entity.
  • It uses a personalised PageRank from the entity: a walker returning to its start with probability 0.15, for 50 steps, over current relations taken both ways and weighted by each relation's score.
  • A hub is discounted: its rank is divided by the square root of its degree, as a crowded node is in a path search (D40d).
  • Adjacency comes from the current_values table (D50). There is no new dependency.
  • Each result comes with the shortest route that makes it related, from find_paths, so the ranking can be checked hop by hop against its claims.
  • It is labelled "computed from current relations, not evidence" and is never stored. Cluster reports, and storing inference of this kind, wait for a real need.

Why

"Who are a developer's partners?" is a question about the shape of the graph, not any one claim. A path search answers "how are these two connected"; ranking answers "what is near this one", and on the real graph it names [redacted — D65] partners through the sites they share. A number with no route would ask to be trusted. A number with its route can be checked.

Alternatives

  • Store the rankings, or clusters, as labelled inference. They go stale with every merge, and nothing yet needs them kept.
  • Count shared neighbours. Simpler, but blind to anything two hops away, and a hub makes everything look related.
  • Embeddings. They need a model and a dependency, and relate names, not evidence.