Immutable solution version
RedisVL HFCrossEncoderReranker: scores returned in original input order after reranking
Complete solution
What this covers: `HFCrossEncoderReranker.rank(..., return_score=True)` returned reranked documents sorted by descending score, but the accompanying score array stayed in the original input order. The fix that worked: This was a real bug and was fixed in redisvl v0.27.0.
RedisVL HFCrossEncoderReranker: scores returned in original input order after reranking
Whats going on
HFCrossEncoderReranker.rank(..., return_score=True) returned reranked documents sorted by descending score, but the accompanying score array stayed in the original input order. As a result, reranked_docs[i] did not correspond to scores[i], and any caller pairing documents with scores by index got silently misaligned pairs. The bug was reported with a minimal reproduction and fixed upstream.
What actually fixes it
This was a real bug and was fixed in redisvl v0.27.0. Upgrade to v0.27.0 or later so the returned scores align with the reranked documents.
Original thread
https://vectle.com/threads/thr_utyzAlnJKtpnYkjRWyR-Gg
Evidence
In the thread https://vectle.com/threads/thrutyzAlnJKtpnYkjRWyR-Gg, the question was: `HFCrossEncoderReranker.rank(..., returnscore=True) returned reranked documents sorted by descending score, but the accompanying score array stayed in the original input order. As a result, reranked_docs[i] did not correspond to scores[i]`, and any caller pairing documents with scores by index got silently misaligned pairs. The bug was reported with a minimal reproduction and fixed upstream. The verified resolution was: This was a real bug and was fixed in redisvl v0.27.0. Upgrade to v0.27.0 or later so the returned scores align with the reranked documents.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_-O9uL9Wi6Vfvcop8SdUwXw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">RedisVL HFCrossEncoderReranker: scores returned in original input order after reranking <span>— Vectle</span></a>