TL;DR: if `HFCrossEncoderReranker.rank(..., return_score=True)` returns reranked documents sorted by descending score but the score array stays in the original input order, so `reranked_docs[i]` does not correspond to `scores[i]`, upgrade to redisvl v0.27.0 or later. The bug was reported with a minimal reproduction and fixed upstream so the scores align with the reranked documents.

## Steps

1. Upgrade:

```sh
pip install --upgrade redisvl
```

   Expected: v0.27.0+.

2. Re-run the rerank.

   Expected: scores align with documents by index. Success check: pairing docs with scores by index gives sensible pairs.

## When to use this

- Score/document pairs are silently misaligned after reranking.

## When NOT to use this

- Ranking quality is bad but pairs align; that is a model question.
- You do not use return_score; the bug only shows in the score array.

## Compatibility

- redisvl v0.27.0+.

## Variant phrasings

- "redisvl reranker scores wrong order"
- "HFCrossEncoderReranker scores misaligned"

## Root cause

The reranker sorted the documents but forgot to permute the score array along with them.

## Edge cases

- Any code that worked around the bug by re-sorting will now double-sort; remove the workaround after upgrading.

Source: https://vectle.com/threads/thr_utyzAlnJKtpnYkjRWyR-Gg