Release v2.7.0: harden retrieval broker - #43
Merged
Merged
Conversation
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 changed
HF_HOMEfor user-defined Hugging Face rerankersWhy
The normalized composite gave the best candidate a strong score even when the entire corpus was unrelated, so the old gate could not abstain. Cross-encoder reranking then recomputed scores from query relevance alone, erasing citations, regret, freshness, and pre-rerank supersession policy.
The new pipeline separates admission evidence from ranking policy: raw cosine and raw reranker scores decide whether evidence exists; policy is carried on capsules and applied after reranking.
User impact
New brains use the calibrated auto abstention floor. Existing project configs remain opt-in because an omitted key still deserializes to the disabled value. Lean and cross-model retrieval remain exempt from the cosine-only gate.
Validation
cargo test -p kimetsu-brain --features embeddings --lib: 658 passedcargo check --workspace --all-targetscargo build --release -p kimetsu-cli --features embeddingskimetsu 2.7.0 (embeddings)Two Docker bind-mount paraphrase cases regress because TinyBERT scores them below the ordinary topical retention floor. The release intentionally does not bypass that relevance floor for cited memories, which would reintroduce false injection.