Repository navigation
Add search_mode, direction scores and a settings echo to semsim search - #1482
Draft
kevinschaper wants to merge 1 commit into
Draft
kevinschaper wants to merge 1 commit into
kevinschaper wants to merge 1 commit into
Conversation
Search gains `search_mode` (hybrid, the default, or full). Every result now carries both direction averages and the settings the search ran with. A request that sets a ducksim-only setting to a non-default value is served by ducksim, since semsimian can't honour it. Requests that set none behave exactly as before on either backend. Part of #1476. Claude-Session: https://claude.ai/code/session_01RmR3yV2ogn7Rx7bJnXXouU
✅ Deploy Preview for monarch-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1482 +/- ##
==========================================
+ Coverage 85.08% 85.22% +0.14%
==========================================
Files 131 132 +1
Lines 7548 7628 +80
==========================================
+ Hits 6422 6501 +79
- Misses 1126 1127 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7 tasks
This branch has not been deployed
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.
Closes #1476. Part of #1474. First in a stack of draft PRs; each later one is based on the one before it.
Summary
This is the groundwork the other ranking settings build on. Requests that don't set the new parameter behave exactly as before, on either backend.
search_mode(hybriddefault, orfull) onGET /semsim/search/{termset}/{group}andPOST /semsim/search. The engine already supported it; the API hard-coded hybrid. Hybrid prefilters candidates with a set Jaccard that drops richly annotated entities before they're scored. Full scores every entity in the group.subject_to_object_scoreandobject_to_subject_score, next toscore. They're derived from each result'ssimilaritypayload, so they mean the same thing on either backend.search_settingson every result: the engine that served the request, plus metric, directionality and search mode. This uses per-result fields rather than a wrapper object, which would have broken the current list response. It's redundant across a page, but compatible.engine: ducksim. The table of ducksim-only settings insemsim.pyis the one place the later PRs extend.similarity.yaml, withmodel.pyandmodel.tsregenerated bymake model.Testing
search_mode=full&directionality=object_to_subjectputs SLC35A2-CDG (MONDO:0010478) third, in the group of 22 diseases that tie for first. The default leaves it out of the top 50.https://claude.ai/code/session_01RmR3yV2ogn7Rx7bJnXXouU