Skip to content

@lancedb/lancedb β€’ Docs


@lancedb/lancedb / rerankers / RRFReranker

Class: RRFReranker

Reranks the results using the Reciprocal Rank Fusion (RRF) algorithm.

Internally this uses the Rust implementation

Constructors

new RRFReranker()

new RRFReranker(inner): RRFReranker

Parameters

  • inner: RrfReranker

Returns

RRFReranker

Methods

rerankHybrid()

rerankHybrid(
   query,
   vecResults,
   ftsResults): Promise<RecordBatch<any>>

Parameters

  • query: string

  • vecResults: RecordBatch<any>

  • ftsResults: RecordBatch<any>

Returns

Promise<RecordBatch<any>>


create()

static create(k): Promise<RRFReranker>

Parameters

  • k: number = 60

Returns

Promise<RRFReranker>