Repository navigation
Scoring Model
MemoryVault computes dynamic confidence and importance scores for every memory using the memoryvault-dynamic-v1 scoring model. These scores combine the user-set base values with signals derived from content analysis, graph structure, source trust, and age.
Use memory_explain_score to see the full breakdown for any memory.
- Start with user-provided
base_confidence(default 0.7) andbase_importance(default 0.5) - Compute deltas from multiple signal components
- Sum base + all deltas
- Clamp result to [0, 1]
| Component | Max Effect | What It Measures |
|---|---|---|
source_bonus |
+0.09 | High-signal source keywords (api, system, official, doc, test, etc.) |
source_trust_delta |
+/-0.40 | Trust weight set via memory_source_trust_set (0.5 = neutral) |
certainty_signal |
+0.20 | Certainty keywords in content (verified, confirmed, exact, measured, etc.) |
hedge_penalty |
-0.20 | Hedge keywords in content (maybe, might, perhaps, guess, probably, etc.) |
type_confidence_bias |
+/-0.08 | Memory type: fact +0.08, journal -0.06, note 0 |
support_signal |
+0.22 | Count of supports relationship links |
link_signal |
+0.063 | Total link count (log-scaled) |
example_signal |
+0.02 | Count of example_of relationship links |
contradiction_penalty |
-0.28 | Count of contradicts relationship links |
source_penalty |
-0.07 | Low-signal source keywords (rumor, guess, hearsay, vibe) |
stale_penalty |
-0.20 | Age > 365 days since last update |
| Component | Max Effect | What It Measures |
|---|---|---|
importance_keyword_signal |
+0.24 | Action keywords (goal, strategy, deadline, todo, critical, priority, etc.) |
source_trust_delta |
+/-0.14 | Source trust weight |
content_depth_signal |
+0.08 | Content length > 80 characters (longer = more important) |
type_importance_bias |
+/-0.04 | Memory type: note +0.04, fact +0.02, journal +0.01 |
link_signal |
+0.18 | Total link count (log-scaled) |
cause_signal |
+0.14 | Count of causes relationship links |
example_signal |
+0.08 | Count of example_of links |
supersede_signal |
+0.08 | Count of supersedes links |
recency_signal |
+/-0.12 | Age: <3 days +0.12, <14 days +0.07, <60 days +0.03, >60 days decays |
contradiction_penalty |
-0.07 | Contradictions (scaled down from confidence impact) |
Keyword matching scans the concatenation of title + key + content + tags (case-insensitive).
Source trust is set per-brain via memory_source_trust_set. The baseline is 0.5 (neutral). Higher trust boosts both confidence and importance. Lower trust reduces them.
Link stats are computed from the memory_links table, counting each relationship type separately.
Age is measured from updated_at (not created_at), so updating a memory resets the age signal.
A memory with:
- Type:
fact, base confidence 0.7, base importance 0.5 - Content containing "verified" and "confirmed"
- 3
supportslinks, 1contradictslink - Source trust: 0.8
- Age: 5 days
Would produce roughly:
- Confidence: 0.7 + 0.08 (type) + 0.12 (source trust) + 0.08 (certainty x2) + 0.15 (supports x3) - 0.09 (contradicts) = ~1.0 (clamped)
- Importance: 0.5 + 0.02 (type) + 0.042 (source trust) + 0.18 (links) + 0.07 (recency) = ~0.81
- Sorting: Higher scores = more trustworthy/important memories
-
Filtering: Use
min_scoreinmemory_searchto filter low-confidence results -
Decay:
memory_decayreduces scores for stale, poorly-connected memories -
Reinforcement:
memory_reinforceboosts scores and spreads to neighbors -
Conflicts:
memory_conflictsuses confidence to identify contradictions worth resolving
Reference
Concepts
Features