Expose raw semantic cosine scores in search results#230
Closed
yasyf wants to merge 1 commit into
Closed
Conversation
Confidence Score: 5/5This looks safe to merge.
Reviews (1): Last reviewed commit: "Expose semantic cosine scores in search ..." | Re-trigger Greptile |
Contributor
|
Hey, please read the CONTRIBUTING.md and open an issue first. Also, we use PR templates for a reason, please don't ignore them. Closing for now. |
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.
Hybrid search currently returns only the fused RRF score, which reflects rank position rather than absolute semantic relevance — a top-ranked result over weak matches is indistinguishable from a genuinely strong hit (RRF caps near 1/61 per leg before boosts).
This adds a
semantic_scorefield toSearchResultcarrying the dense leg's raw cosine similarity, threaded through fusion and both reranking paths without changing ranking behavior. BM25-only results exposesemantic_score: None. The field is included in CLI and MCP output.Motivation: agent consumers (we drive semble from the ccx/cc-context MCP facade) need an absolute relevance signal to detect all-weak result sets instead of mistaking top-ranked junk for evidence.
Nonecoveragepytestgreen, 100% coverage maintained, pre-commit hooks pass