Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The ratio of WeightedRanker in hybridsearch doesn't seem to be effective #34745

Closed
1 task done
pppyypp opened this issue Jul 17, 2024 · 6 comments
Closed
1 task done
Assignees
Labels
help wanted Extra attention is needed kind/bug Issues or changes related a bug stale indicates no udpates for 30 days

Comments

@pppyypp
Copy link

pppyypp commented Jul 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version:newest
- Deployment mode(standalone or cluster):standalone
- SDK version(e.g. pymilvus v2.0.0rc2): pymilvus 
- OS(Ubuntu or CentOS): Ubuntu

Current Behavior

Collection A with two vectors , one vector is the original data vector, and the other vector is the vector that summarizes the data.
Collection B with single vector, only the original data vector and the same as the vector of CollectionA original data vector

When searching for the same query, when I set the WeightedRanker weight of Collection A to [0.99,0.01], and set it to [0.8,0.2],[0.5,0.5], [0.2,0.8], [0.01,0.99], there is almost no difference in scores between 0.01.

The difference in search scores between Collection A [0.99,0.01] and Collection B is relatively large, exceeding 0.1. But theoretically, shouldn't the score difference between Collection A [0.99,0.01] and Collection B search be very small, because the weights are all in the original vector.

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@pppyypp pppyypp added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 17, 2024
@czs007 czs007 assigned czs007 and unassigned yanliang567 Jul 17, 2024
@yanliang567
Copy link
Contributor

The score in hybridsearch is a reranking similarity, and it is not the same meaning as it in search. I don't think it is meaningful to compare them directly.
/assign @czs007
any details to share for the difference?

/assign @manchiy

@yanliang567 yanliang567 added help wanted Extra attention is needed and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 17, 2024
@xiaofan-luan
Copy link
Collaborator

can you share your scripts for this test.
I'm confused about what you are trying to do. All the milvus hybrid search only happened on one collection

@pppyypp
Copy link
Author

pppyypp commented Jul 30, 2024

@xiaofan-luan @yanliang567 Sorry, I was busy with other things and didn't notice the reply. I am using this hybrid search on a collection. However, when performing vector search, it is essential to set a score to filter out irrelevant results, not just rely on top_K. I tested the above scenarios because I found it challenging to filter by score after using hybrid search. I suspect, as the bro above mentioned, that the scores are re-ranked rather than the original scores, making it difficult for me to set an effective score filter. As a result, the search results are always top_K, even if the content is irrelevant.

@pppyypp pppyypp removed their assignment Jul 30, 2024
@xiaofan-luan
Copy link
Collaborator

Yes, the score of hybrid search is not original score. it is a hybrid score based on what algorithm you are using

@xiaofan-luan
Copy link
Collaborator

@czs007 should be already working on it

Copy link

stale bot commented Sep 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@stale stale bot added the stale indicates no udpates for 30 days label Sep 1, 2024
@stale stale bot closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/bug Issues or changes related a bug stale indicates no udpates for 30 days
Projects
None yet
Development

No branches or pull requests

4 participants