Repository navigation
feat(core): count recall/search hits in recall_count, apart from explicit gets (#1337) - #1397
Merged
Merged
Conversation
…icit gets (#1337) Schema v21 adds memories.recall_count. recall, recall_context and search now bump recall_count; only get bumps access_count. Salience, aging and orphan scores use access_count + 0.5 * recall_count, so automated recalls reinforce a memory less than real use. Existing rows start at recall_count 0; historical access_count is left untouched. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
marked this pull request as ready for review
October 9, 2026 03:39
This was referenced Oct 13, 2026
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.
What
memories.recall_count INTEGER NOT NULL DEFAULT 0(in-placeALTER TABLEmigration, existing rows start at 0).recall,recall_contextandsearchnow bumprecall_count; onlygetbumpsaccess_count(touch_recall_batchvstouch_access/touch_access_batch).recompute_importance) and orphan scoring useaccess_signal() = access_count + 0.5 * recall_count(RECALL_ACCESS_WEIGHT).Memorygets arecall_countfield (#[serde(default)], so old exports still import);row_to_memoryreads it as column 22 via the shared column macros.Why
Closes #1337 together with the contract issue codecoradev/uteke-cloud#135. Automated recalls (session hooks, agents repeating a query) reinforced the same memories through
access_count, a rich-get-richer effect that can also push a wrong memory up. An explicitgetis stronger evidence of use than a hit in a result list. Historicalaccess_countcannot be split retroactively and is left as it is.Testing
-D warnings,cargo test --workspace, vecq-only core lib tests green (661)access_signalweights correctly; a v20 store upgrades in place keeping its data;recall_countsurvives every row readerdevelopc4fceaa vs this branch 62ffe13 (same image recipe,defaultstrategy, 10 shards). Aggregates identical: overall mean R@5 0.9800 vs 0.9800 (+0.0000), 0 questions improved, 0 regressed (compare_fast50.py); on the 43 scored questions recall_all@5 0.9767 and recall_all@10 1.0000 in both runs. The script's own "GATE (+3pp)" line is a leftover from the rerank experiment and does not apply here. fast50 does not exercise long-lived access counters, so this shows no retrieval regression, not an improvement.Behaviour notes:
access_countvalues returned byget/listchange over time (they now only grow onget); no response field forrecall_countis added.🤖 Generated with Claude Code