pub fn compact_clusters(
facts: &mut Vec<KnowledgeFact>,
cfg: &ClusterCompactionConfig,
) -> (usize, Vec<KnowledgeFact>)Expand description
Collapse clusters of low-value, mutually-similar, same-category facts into one
recoverable digest each. Returns (clusters_collapsed, archived_originals);
the caller archives the originals so the operation is lossless. Deterministic:
candidates are scanned in the store’s existing order and similarity ties
resolve to the earliest-founded cluster.