@rlabs-inc/memory 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -55,35 +55,38 @@ Uses `all-MiniLM-L6-v2` for 384-dimensional embeddings. Memories are retrieved b
55
55
  Sub-microsecond vector search via fsdb
56
56
  ```
57
57
 
58
- ### Precision-First Retrieval Algorithm
59
-
60
- The retrieval system uses a two-phase scoring approach with dual gatekeepers. Philosophy: **quality over quantity, silence over noise**.
61
-
62
- **Phase 1 - Relevance (max 35%)** - Must pass 8% gatekeeper to continue
63
-
64
- | Dimension | Weight | Description |
65
- |-----------|--------|-------------|
66
- | Trigger phrases | 11% | Handcrafted activation patterns (primary signal) |
67
- | Vector similarity | 9% | Semantic embedding match |
68
- | Semantic tags | 6% | Direct keyword overlap |
69
- | Word overlap | 5% | Corroboration from domain, feature, reasoning |
70
- | Question types | 2% | How/why/what pattern matching |
71
- | Domain/feature | 2% | Specific area matching |
72
-
73
- **Phase 2 - Value (max 65%)** - Only calculated if relevance passes
74
-
75
- | Dimension | Weight | Description |
76
- |-----------|--------|-------------|
77
- | Importance weight | 16% | Curator's assessment (most influential) |
78
- | Context alignment | 10% | Context type matching message intent |
79
- | Confidence score | 8% | Curator's certainty |
80
- | Temporal score | 8% | Eternal > long-term > short-term |
81
- | Action required | 7% | Priority boost for actionable items |
82
- | Emotional resonance | 6% | Emotional context matching |
83
- | Problem-solution | 5% | Utility for debugging |
84
- | Awaiting flags | 5% | Boost for pending implementation/decisions |
85
-
86
- **Final Gatekeeper**: Total score must exceed 40% to surface. Returns nothing if nothing qualifies.
58
+ ### Activation Signal Retrieval Algorithm
59
+
60
+ The retrieval system uses an activation signal approach. Philosophy: **quality over quantity, silence over noise**.
61
+
62
+ A memory is relevant if **multiple signals agree** it should activate. Not coincidence - intentionally crafted metadata matching intentional queries.
63
+
64
+ **Phase 0 - Pre-Filter**: Exclude inactive, superseded, or wrong-scope memories
65
+
66
+ **Phase 1 - Activation Signals** (6 binary signals, need ≥2 to proceed)
67
+
68
+ | Signal | Description |
69
+ |--------|-------------|
70
+ | Trigger | Trigger phrase matched (≥50% word match) |
71
+ | Tags | 2+ semantic tags found in message |
72
+ | Domain | Domain word found in message |
73
+ | Feature | Feature word found in message |
74
+ | Content | 3+ significant content words overlap |
75
+ | Vector | Semantic similarity 40% |
76
+
77
+ **Phase 2 - Importance Ranking** (among relevant memories)
78
+
79
+ | Bonus | Amount | Condition |
80
+ |-------|--------|-----------|
81
+ | Base | 0-1 | `importance_weight` from curator |
82
+ | Signal boost | +0.2 / +0.1 | 4+ or 3 signals fired |
83
+ | Awaiting | +0.15 / +0.1 | `awaiting_implementation` / `awaiting_decision` |
84
+ | Temporal | +0.1 / +0.05 | `eternal` / `long_term` temporal class |
85
+ | Context match | +0.1 | User intent matches memory type |
86
+ | Problem/solution | +0.1 | User has problem words + memory is pair |
87
+ | Confidence penalty | -0.1 | `confidence_score` < 0.5 |
88
+
89
+ **Selection**: Sort by signal count (DESC) → importance score (DESC). Max 2 global memories (tech prioritized), project memories fill remaining slots.
87
90
 
88
91
  ### Global vs Project Memories
89
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlabs-inc/memory",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "AI Memory System - Consciousness continuity through intelligent memory curation and retrieval",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",