Table of Contents

Method Rank

Namespace
Qavren.Edge.Rag
Assembly
Qavren.Edge.Rag.dll

Rank(IReadOnlyList<RagSource>)

Normalises to best-first without inventing a number: a Distance list is ordered ascending, a Relevance list descending. Nothing is rescaled, because there is no defensible scale to rescale onto.

public static IReadOnlyList<RagSource> Rank(IReadOnlyList<RagSource> sources)

Parameters

sources IReadOnlyList<RagSource>

Returns

IReadOnlyList<RagSource>

Remarks

No Score and no Ordinal is touched; the same instances come back reordered. The sort is stable, so equal scores keep the retriever's order, and the key (Distance ? Score : -Score) means a list that mixes the two kinds still orders deterministically rather than picking one polarity for both.