Repository navigation
Conversation
|
@DZH166 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Hi @DZH166, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Hi @DZH166, this PR is still waiting for the Contributor License Agreement (CLA) to be signed. Please note that if the CLA isn't signed within the next 24 hours, this PR will be automatically closed. Signing only takes a minute via the link in the |
Problem
DocumentJoinermerges the weighted contributions with a plain sum:A non-finite input score therefore propagates instead of being neutralised:
NaNpoisons the merged score (and, because comparisons with NaN are false, the document keeps its position - sorting becomes insertion-order dependent);+infdominates every real document even with a weight of0.1;-infvetoes the document entirely (its merged score is-infregardless of the other backend).Scores like these arrive from remote embedding/reranking backends and from user-supplied
Document(score=...); they are not scores, and the joiner's contract is to merge comparable relevance values.Fix
Weight a non-finite contribution as zero (
0.0 if not math.isfinite(score) else score * weight); finite inputs are unchanged.Tests
test/components/joiners/test_document_joiner.py(NaN, +inf, -inf with weights):