Skip to main content

graph_strength_for_memory

Function graph_strength_for_memory 

Source
pub fn graph_strength_for_memory(graph: &GraphEngine, memory_id: &str) -> f64
Expand description

Compute graph strength for a memory node by combining raw graph metrics.

Blends two signal sources:

  • Code neighbors (sym:, file:, etc.): PageRank, betweenness, connectivity, edge weight
  • Memory neighbors (other memories linked via SHARES_THEME, PRECEDED_BY, etc.): connectivity count and average edge weight

A function with many linked memories ranks higher. A conversational memory connected to many session peers ranks higher than an isolated one.