feat: add optional vector fusion for recall - #26
Open
faj-design5260 wants to merge 5 commits into
Open
faj-design5260 wants to merge 5 commits into
faj-design5260 wants to merge 5 commits into
Conversation
The fingerprint hashed every index knob, so adding vector_enabled and vector_model changed the default fingerprint even though retrieval with the vector index off is byte-for-byte what main does. Every experiment after the merge would then read as a different R than every experiment before it, which is exactly the drift the Invariant 9 guard exists to catch, fired on nothing. A disabled backend shapes nothing, so its knobs leave the hash while it is off and enter it the moment it is on. The default fingerprint is again 4883d0333e25b7c6, the same value main produces. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
faj-design5260
force-pushed
the
feat/optional-index-pr
branch
from
September 18, 2026 13:13
31e66cb to
38ddbd6
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.
Problem
BM25 is fast for lexical matches, but some relevant memories miss the top-k candidate set when query and stored wording diverge.
Design
The branch was rebased onto
34d12a2fand reduced to the optional index, fusion, config/lifecycle, tests, and documentation. Answer replay harness changes were removed from this PR.Retrieval evaluation
Fixed 120-query acceptance set across 200 source sessions:
Optional vector fusion improved Recall@5 by 7.6 percentage points with a substantial latency cost. This establishes a retrieval-coverage/latency trade-off on this fixed set.
Provenance: the local experiment artifact
experiments/runs/optional-index-acceptance-20260909/contains the manifest, selected questions, frozen store/truth hashes, runner, per-query outputs, summary, and identical repeated ON rankings. The manifest pins source SHA-256821a2034d219ab45846873dd14c14f12cfe7776e73527a483f9dac095d38620c, seed20260909, configurations, two embedding threads, and evaluated revisione3480b4b. The final candidate changes only recall fingerprint handling, vector config validation, and BM25 fallback when the vector candidate list is empty; populated-index RRF, filtering, top-k, vector indexing, and benchmark runner remain the evaluated implementation. The 120-query run was therefore not repeated for formality.Answer-level evaluation
These experiments do not establish an answer-quality improvement attributable to the vector index. Larger answer replays are outside this PR's merge claim.
Claim and limitations
This PR establishes an optional retrieval-coverage/latency trade-off. It does not claim an end-to-end answer accuracy improvement or universal superiority. The benefit is measured on the fixed retrieval set only, and enabled retrieval has substantially higher latency.
Compatibility and validation
uv run pytest -q: 410 passed.uv run ruff check .: passed.uv run mypy: passed, 68 source files.