Add graph_topology, graph_health, interference_pairs tools
Convert {{topology}}, {{health}}, {{pairs}} placeholders to
{{tool:}} calls. Made format_topology_header, format_health_section,
format_pairs_section pub so tools can call them.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
1a03264233
commit
fd722662da
9 changed files with 49 additions and 13 deletions
|
|
@ -46,7 +46,7 @@ For each target node, one of:
|
|||
- **Don't be contrarian for its own sake.** If a node is correct,
|
||||
say so and move on.
|
||||
|
||||
{{TOPOLOGY}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
{{SIBLINGS}}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ Set with: `poc-memory graph link-set <source> <target> <strength>`
|
|||
If you see default-strength links (0.10 or 0.30) in the neighborhoods
|
||||
you're exploring and you have context to judge them, reweight those too.
|
||||
|
||||
{{TOPOLOGY}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
## Nodes to examine for cross-community connections
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ pattern you've found.
|
|||
- **Preserve diversity.** Multiple perspectives on the same concept are
|
||||
valuable. Only delete actual duplicates.
|
||||
|
||||
{{TOPOLOGY}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
## Neighborhood nodes
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ overall structure.
|
|||
- Most output should be observations about system health. Act on structural
|
||||
problems you find — link orphans, refine outdated nodes.
|
||||
|
||||
{{topology}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
## Current health data
|
||||
|
||||
{{health}}
|
||||
{{tool: graph_health}}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ clusters and determine how it fits.
|
|||
- **Trust the decay.** Unimportant nodes don't need pruning — just
|
||||
don't link them.
|
||||
|
||||
{{TOPOLOGY}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
## Nodes to review
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ overlapping inputs and orthogonalize them.
|
|||
- **Session summaries are the biggest source of interference.**
|
||||
- **Look for the supersession pattern.**
|
||||
|
||||
{{topology}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
## Interfering pairs to review
|
||||
|
||||
{{pairs}}
|
||||
{{tool: interference_pairs}}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ entries, and extract those patterns into semantic nodes.
|
|||
- **The best extractions change how you think, not just what you know.**
|
||||
Extract the conceptual version, not just the factual one.
|
||||
|
||||
{{TOPOLOGY}}
|
||||
{{tool: graph_topology}}
|
||||
|
||||
{{SIBLINGS}}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ pub struct AgentBatch {
|
|||
pub node_keys: Vec<String>,
|
||||
}
|
||||
|
||||
pub(super) fn format_topology_header(graph: &Graph) -> String {
|
||||
pub fn format_topology_header(graph: &Graph) -> String {
|
||||
let sigma = graph.small_world_sigma();
|
||||
let alpha = graph.degree_power_law_exponent();
|
||||
let gini = graph.degree_gini();
|
||||
|
|
@ -139,7 +139,7 @@ pub(super) fn format_nodes_section(store: &Store, items: &[ReplayItem], graph: &
|
|||
out
|
||||
}
|
||||
|
||||
pub(super) fn format_health_section(store: &Store, graph: &Graph) -> String {
|
||||
pub fn format_health_section(store: &Store, graph: &Graph) -> String {
|
||||
use crate::graph;
|
||||
|
||||
let health = graph::health_report(graph, store);
|
||||
|
|
@ -195,7 +195,7 @@ pub(super) fn format_health_section(store: &Store, graph: &Graph) -> String {
|
|||
out
|
||||
}
|
||||
|
||||
pub(super) fn format_pairs_section(
|
||||
pub fn format_pairs_section(
|
||||
pairs: &[(String, String, f32)],
|
||||
store: &Store,
|
||||
graph: &Graph,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue