Rerank Documents
AI-generatedSummary
Rerank documents based on relevance to a specified query using a Berget AI model.
Inputs
- model — Rerank model to use, defaulting to 'BAAI/bge-reranker-v2-m3'.
- query (required) — Query to rank documents against.
- documents (required) — Documents to rank, input as a collection of text.
- options — Additional options including 'Top K' ranked documents to return and whether to include document text.
Output shape
a list of ranked documents with their relevance scores and optionally the document text
Includes ranked documents based on the provided query; can include document text if specified.
Examples
Example 1: Rank a list of documents based on a given search query.
Set the query to 'Example search', provide a fixed collection of document texts, and specify options for the top K results.