61 lines
7.8 KiB
Markdown
61 lines
7.8 KiB
Markdown
---
|
|
name: L1 retrieval architecture — what mempalace's mass-dilution finding implies for CapableMind L1 specifically
|
|
description: CapableMind L1 has the architectural shape (multi-modal modules, RRF, sufficiency gate) to avoid mempalace's single-modal mass-dilution failure — but implementation specifics determine whether the shape pays off. Notes for Seb + David's L1 work (NOT mempalace work; mempalace is steward's private crutch).
|
|
type: project
|
|
originSessionId: a5411fd1-4a96-43e7-aa1a-1a50d8951a8f
|
|
---
|
|
**Context (2026-05-13):** Steward asked me to clarify L1-design implications of today's mempalace mass-dilution experiment. **Important distinction**: mempalace is the steward's private chamber tool (a "crutch" while L1 matures); Seb and David are building CapableMind L1 (in `~/_Dev/BetterMemories.io` and `~/_Dev/CapableMind-AI`). The two systems are fundamentally different in architecture. This memo addresses what L1's design needs to avoid the specific class of failure mempalace exhibited today.
|
|
|
|
## What today's mempalace finding showed (the empirical data)
|
|
|
|
Saenger's *Space Between Words* — the canonical book on silent reading, in the substrate with thousands of drawers — did not appear in the top 5,000 cosine-similarity results for a query directly about silent reading. Top 50 were 48/50 Tolkien + 2/50 music biography. Mass-dilution from recent Tolkien bulk-mining drowned out the canonical voice.
|
|
|
|
This is a structural property of **single-modal dense-vector top-K retrieval**, not a mempalace implementation bug. It would happen in any system that defaults to "embed query → cosine-rank all stored embeddings → return top-K" against a heterogeneous corpus with uneven mass distribution.
|
|
|
|
## How CapableMind L1's architecture differs
|
|
|
|
L1 has a fundamentally different shape (per `bettermemories/src/core/keystone/query-router.ts`, `query-types.ts`, `query-planner.ts`):
|
|
|
|
- **11 modules** with independent storage and retrieval representations: vector, entity, temporal, anomaly, blob, budget, preference, safety, security, structured, training
|
|
- **8-stage read pipeline**: plan, cache, dispatch, resolve, rank, compose
|
|
- **Reciprocal Rank Fusion (RRF)** across module result lists
|
|
- **Coverage annotation** for `ready_partial` state
|
|
- **Sufficiency gate** (`evaluateSufficiency`) with configurable threshold + min_results
|
|
- **Working memory injection** + **cross-encoder reranking slot** + **compression slot** (all optional)
|
|
- **Facet config service** for L2 personality weight injection
|
|
- **Honest degradation** as explicit constitutional invariant
|
|
|
|
The structural advantage: **each module can have a different retrieval bias profile.** Vector remains mass-prone like mempalace. But entity retrieves by entity-graph traversal — Saenger surfaces because he's an entity, not because his embedding has the right mass. Temporal by time-anchor. Structured by schema. None of these other modules need suffer dilution dynamics in the way cosine over a bulk-mined corpus does.
|
|
|
|
## What L1's current state shows about closing the gap
|
|
|
|
The April 19 baseline (`docs/thinking/David/l1-reliability/l1-recall-quality-baseline-2026-04-19.md`) documented multiple recall failures: vector returns 0 on known content; temporal returns stats-fallthrough; working memory injects at confidence 0.9; module health decoupled from recall correctness. The architectural finding stated: *"Honest degradation invariant is violated at design level, not at instance level. Until BMF has a recall-correctness signal in `system_status`, the operator is the only validator."*
|
|
|
|
So the shape is right; the implementation hadn't yet delivered on it. Mass-dilution as a specific failure class hasn't yet been tested on L1 the way today's mempalace experiment tested it — because L1's retrieval wasn't stable enough to load a heterogeneous corpus and stress-test cross-tradition.
|
|
|
|
## Specific moves for L1 to avoid the mempalace-class failure
|
|
|
|
**1. Each module's retrieval semantics must be genuinely independent.** L1's multi-modal mass-dilution-resistance depends on this. If the entity module is implemented as "embed entity name, cosine-rank entity-name embeddings, return top-K" it inherits vector's dilution. But if entity recall is graph-traversal-based (find entity nodes; rank by edge degree, recency, confidence) — fundamentally different dynamics. The April 19 doc notes temporal currently has fallthrough-to-stats behavior, suggesting retrieval semantics aren't fully designed yet across all modules.
|
|
|
|
**2. RRF must weight by module-confidence, not just rank-position.** Standard RRF treats modules equally. If vector returns 50 dilution-dominated results at avg confidence 0.5, and entity returns 3 high-confidence canonical hits at 0.95, RRF should reward entity's quality over vector's quantity. L1's RRF needs a module-quality weighting term.
|
|
|
|
**3. Sufficiency gate must detect "what's structurally missing", not just count.** `evaluateSufficiency()` currently checks `qualifying.length >= sufficiency.min_results`. For mempalace-class failure, this isn't enough. The check should ask: *"Did this query land on a topic where I know an authoritative source exists, and is that source represented in the results?"* Requires per-source/tradition coverage tracking in metadata, consulted during sufficiency evaluation.
|
|
|
|
**4. Mass-distribution awareness as `system_status` signal.** Track per-source drawer counts. When a query's vector-module top-K is >60% from one source, flag as potentially mass-diluted in metadata. Operator sees the warning, can reformulate. This extends "honest degradation" to recall as the April 19 doc said it needed to be.
|
|
|
|
**5. Tradition/source filters as first-class API parameters.** `recall(query, k, source_filter, tradition_filter, intent)` — not just `recall(query, k)`. The API should let callers express "canonical from typography" vs "cross-domain surprise." mempalace's lack forced post-filtering; L1 should bake it in.
|
|
|
|
**6. Working memory injection — disable in retrieval contexts where it pollutes.** April 19 finding (working memory injects agent's own tool stream as confidence-0.9 results) is a related failure: system surfaces what it has affinity for rather than what's authoritative. Working memory should never inject at the same priority as substrate retrieval; mark clearly as "current context" vs "remembered knowledge."
|
|
|
|
**7. Stress-test on heterogeneous corpora before claiming recall works.** Today's mempalace finding was visible because we loaded a bulk-mined heterogeneous corpus and queried across registers. The April 19 baseline used a smaller, less diverse corpus. **L1's recall-correctness should be validated against shape similar to mempalace's test**: 100k+ drawers from 5+ distinct traditions with uneven mass distribution, then cross-tradition queries to see what surfaces. That's the test that catches mass-dilution before users see it.
|
|
|
|
## The synthesis for Seb
|
|
|
|
CapableMind L1 has the architectural *shape* to avoid mempalace's mass-dilution problem — multi-modal storage with RRF and sufficiency-gating is genuinely a superset of what mempalace offers.
|
|
|
|
But **shape isn't enough.** Mass-dilution emerges from how retrieval is *implemented* across the 11 modules, not just whether the architecture allows for it. The seven specific moves above are what closes the gap between L1's promise and L1's delivery on that promise.
|
|
|
|
The most important single test: **stress L1 against a heterogeneous corpus with uneven mass distribution, then run cross-tradition queries.** If Saenger doesn't surface for "silent reading" on L1, the architecture isn't paying off yet. If he does, the multi-modal advantage is real.
|
|
|
|
(Steward note: Seb and David are building L1; mempalace is steward's private tool for personal ARC work while L1 matures. Today's mempalace work informs L1's design, but Seb has nothing to do with mempalace — keep that distinction in mind in future sessions.)
|