Skip to main content

Module rerank

Module rerank 

Source
Expand description

Reranking: rerank orders documents by relevance to a query.

Design: docs/01-architecture/11-other-modalities.md §5.

Lifecycle behavior is derived from the Vercel AI SDK (Apache-2.0, Copyright 2023 Vercel, Inc.), translated to Rust and modified; see NOTICE.

Structs§

Ranked
One ranked document.
Rerank
Builder returned by rerank; .await runs the call.
RerankCallEndEvent
Event after a successful reranking operation, including an empty input.
RerankCallStartEvent
Event before any provider attempt of a reranking operation.
RerankResult
Result of rerank.

Enums§

RerankDocument
A document to rerank: text or a JSON object.

Functions§

rerank
Reranks documents by relevance to query. Documents must be all text or all objects.