← All questions
RAGHard· Reranking· Sorting· Algorithms

Your pairwise reranker returned A > B, B > C, and C > A...

Given a cycle, quicksort and heapsort return a permutation determined by the comparison sequence rather than relevance. Cycles usually occur with near-duplicates or equally-relevant passages where the ordering does not matter. The three responses are: all-pairs with win-count (cycle-tolerant but expensive), a tournament for top-1 (needs only local correctness), or keeping the sort and escalating to listwise only when the cycle rate crosses a threshold.

Code playground (Python)