Skip to main content

Reranker

Take a list of candidate documents (typically fetched by a prior vector search) and a search query, ask the configured reranker model to score each document's relevance to the query, and emit only the documents above the configured score threshold — ordered by descending score.

This is the standard "rerank" step in a retrieval pipeline: vector search returns a broad recall set, and the reranker tightens precision before passing to the LLM.

Pre-requisite: Install an AI provider application that exposes a reranker model from Profile > {Organization} > Applications (e.g. Cohere, Mistral, Voyage).

Parameters

ProviderREQUIRED

Configured AI application supporting reranking.

Model

Reranker model identifier from the selected provider. Defaults to the provider's recommended reranker model when left empty.

Document KeyREQUIRED

Field on each candidate document holding the rerankable text (the snippet the model is shown to compute relevance).

Score ThresholdREQUIRED

Minimum relevance score (0–1) a document must reach to be emitted. Documents below the threshold are dropped.

Input

JSONREQUIRED

Candidate documents — either a JSON array or a JSONL file (each line a candidate). Each candidate must expose the configured document key.

QueryREQUIRED

The search query (plain text) used to score relevance.

Output

JSON

Documents that passed the score threshold, sorted by descending relevance score.