A ranked document with a relevance score and an index position.

RankedDocument

interface RankedDocument {
    document?: { [key: string]: any };
    index: number;
    score: number;
}

Properties

Properties

document?: { [key: string]: any }

Document for reranking

RankedDocument

index: number

The index position of the document from the original request.

RankedDocument

score: number

The relevance of the document to the query, normalized between 0 and 1, with scores closer to 1 indicating higher relevance.

RankedDocument