Member Junction
    Preparing search index...

    Interface RerankParams

    Parameters for a rerank operation.

    interface RerankParams {
        CancellationToken?: AbortSignal;
        documents: RerankDocument[];
        options?: Record<string, unknown>;
        query: string;
        topK?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    CancellationToken?: AbortSignal

    Optional signal for cancelling the request. BaseReranker.Rerank() refuses a call whose signal is already aborted, without calling the driver; once the driver is running, the driver is responsible for honoring it by handing it to the provider's HTTP client or prompt run. A call the signal ends resolves with success: false, and its errorInfo classifies a caller cancellation as Cancelled, which is never failed over.

    documents: RerankDocument[]

    Documents to rerank (typically from vector search results)

    options?: Record<string, unknown>

    Provider-specific options (passed through to the reranker implementation)

    query: string

    The query text to rank documents against

    topK?: number

    Maximum number of results to return after reranking. If not specified, returns all reranked documents.