Return entries reordered by descending relevance to query. Implementations should rescore
only the first topK (retrieval is assumed to have surfaced the strongest first) and append any
remainder in place, so the result is a same-length permutation of the input.
OptionaltopK: number
Reorders retrieved memories by cross-encoder relevance to a query.