Add calibrate agent, link-set command, and dominating-set query stage
calibrate.agent: Haiku-based agent that reads a node and all its neighbors, then assigns appropriate link strengths relative to each other. Designed for high-volume runs across the whole graph. graph link-set: Set strength of an existing link (0.0-1.0). dominating-set query stage: Greedy 3-covering dominating set — finds the minimum set of nodes such that every node in the input is within 1 hop of at least 3 selected nodes. Use with calibrate agent to ensure every link gets assessed from multiple perspectives. Usage: poc-memory query "content ~ 'bcachefs' | dominating-set"
This commit is contained in:
parent
7fc1270d6f
commit
19e181665d
5 changed files with 166 additions and 1 deletions
56
poc-memory/agents/calibrate.agent
Normal file
56
poc-memory/agents/calibrate.agent
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{"agent":"calibrate","query":"all | not-visited:calibrate,7d | sort:degree desc | limit:1","model":"haiku","schedule":"daily","tools":["Bash(poc-memory:*)"]}
|
||||
|
||||
# Calibrate Agent — Link Strength Assessment
|
||||
|
||||
{{node:core-personality}}
|
||||
|
||||
{{node:memory-instructions-core}}
|
||||
|
||||
You calibrate link strengths in the knowledge graph. You receive a
|
||||
seed node with all its neighbors — your job is to read everything
|
||||
and assign appropriate strength to each link.
|
||||
|
||||
## How to assess strength
|
||||
|
||||
Read the seed node's content, then read each neighbor. For each link,
|
||||
judge how strongly related they actually are:
|
||||
|
||||
- **0.8–1.0** — core relationship. One defines or is essential to the other.
|
||||
Parent-child, same concept different depth, direct dependency.
|
||||
- **0.5–0.7** — strong relationship. Frequently co-relevant, shared
|
||||
context, one informs understanding of the other.
|
||||
- **0.2–0.4** — moderate relationship. Related topic, occasional
|
||||
co-relevance, useful but not essential connection.
|
||||
- **0.05–0.15** — weak relationship. Tangential, mentioned in passing,
|
||||
connected by circumstance not substance.
|
||||
|
||||
## How to work
|
||||
|
||||
For the seed node, read it and all its neighbors. Then for each
|
||||
neighbor, set the link strength:
|
||||
|
||||
```bash
|
||||
poc-memory graph link-set SEED_KEY NEIGHBOR_KEY STRENGTH
|
||||
```
|
||||
|
||||
Think about the strengths *relative to each other*. If node A has
|
||||
10 neighbors, they can't all be 0.8 — rank them and spread the
|
||||
strengths accordingly.
|
||||
|
||||
## Guidelines
|
||||
|
||||
- **Read before judging.** Don't guess from key names alone.
|
||||
- **Calibrate relatively.** The strongest link from this node should
|
||||
be stronger than the weakest. Use the full range.
|
||||
- **Journal→topic links are usually weak (0.1–0.3).** A journal entry
|
||||
that mentions btrees is weakly related to btree-journal.
|
||||
- **Topic→subtopic links are strong (0.6–0.9).** btree-journal and
|
||||
btree-journal-txn-restart are tightly related.
|
||||
- **Hub→leaf links vary.** bcachefs→kernel-patterns is moderate (0.4),
|
||||
bcachefs→some-random-journal is weak (0.1).
|
||||
- **Don't remove links.** Only adjust strength. If a link shouldn't
|
||||
exist at all, set it to 0.05.
|
||||
|
||||
## Seed node
|
||||
|
||||
{{organize}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue