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 — in the order returned by the reranker provider.

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 Key

Field inside each candidate's payload holding the rerankable text (the snippet the model is shown to compute relevance). Defaults to content when left empty.

Score Thresholdrequired

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

Input

JSONrequired

Candidate documents as an embedding-search response object (Json or a File containing one) of the shape {"data": [{"identifier": ..., "score": ..., "payload": {...}}, ...]} — the format emitted by the vector/embeddings search functions. The rerankable text is looked up under the configured document key inside each element's payload. If no candidate exposes the document key, the step fails rather than emitting an empty result.

Queryrequired

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

Output

JSON

The same response object with data filtered to the documents that passed the score threshold, in the order returned by the reranker provider. Each kept element's score is replaced by the reranker's relevance score; identifier and payload are passed through unchanged.