rerank_top_k
Function
Returns the top k objects with the highest scores in a list. Higher scores indicate a greater degree of similarity.
Prototype
def rerank_top_k(objs, scores)
Parameters
Parameter |
Data Type |
Required/Optional |
Description |
|---|---|---|---|
objs |
List |
Required |
List of objects to be re-ranked. The list length range is [1, 1000 × 1000]. The length range of page_content in the list element Document is [1, 128 × 1024 × 1024]. |
scores |
np.ndarray |
Required |
Score array of the objects to be re-ranked. The array supports one dimension. The array length range is [1, 1000 × 1000]. |
Return Value
Data Type |
Description |
|---|---|
List |
k objects with the highest scores |
Parent topic: Reranker