Conversation
363a7a3 to
83db8f9
Compare
3c46d27 to
e7f784e
Compare
… HeLa-Mem edge weights and Hebbian updates MM-F3: lightweight first-person query intent detection (regex/prefix, no LLM) biases embeddings toward profile centroid via weighted linear combination. Profile centroid cached in RwLock<Option<CachedCentroid>> with 5-min TTL; dimension mismatch logs WARN and passes through unchanged. MM-F4: episode preservation as data-integrity invariant — messages within any summary's [first_message_id, last_message_id] range are excluded from soft-delete in eviction phase 1 via NOT EXISTS with partial index. HL-F1: adds weight REAL NOT NULL DEFAULT 1.0 to graph_edges via SQLite migration 077; updates Edge struct, EdgeRow projection (14 sites), and --migrate-config pipeline. HL-F2: apply_hebbian_increment increments traversed edge weights by hebbian_lr after each recall (WHERE id IN traversed_edge_ids, valid_to IS NULL); instrumented with tracing span; opt-in via memory.hebbian.enabled (default false). Config: new [memory.retrieval].query_bias_correction, [memory.hebbian] section. Tests: 16 new unit/integration tests; 1187 total pass. Closes #3341 Closes #3344
…easoning_strategies
e7f784e to
da4b414
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RwLock<Option<CachedCentroid>>with 5-min TTL; dimension mismatch logs WARN and passes through.[first_message_id, last_message_id]range are excluded from soft-delete in eviction phase 1 viaNOT EXISTSwith partial indexidx_summaries_message_range.weight REAL NOT NULL DEFAULT 1.0tograph_edgesvia SQLite migration 077; updatesEdge,EdgeRow, and 14 SELECT projections.apply_hebbian_incrementincrements traversed edge weights byhebbian_lrafter each recall; instrumented with tracing span; opt-in via[memory.hebbian].enabled = falsedefault.New config sections:
[memory.retrieval].query_bias_correction,[memory.hebbian]. Both wired into--migrate-config.Test plan
cargo nextest run -p zeph-memory— 1187 tests pass (16 new tests for all four features)cargo clippy -p zeph-memory -p zeph-config -- -D warnings— cleancargo +nightly fmt --check— clean--migrate-configenabled = false/query_bias_correction = false— zero overhead (verified by impl-critic)memory.hebbian.enabled = true, run multi-turn, verify edge weights increment in DBCloses #3341
Closes #3344