Skip to main content
POST
Rerank
Last updated: 2026-06-06

Overview

Reorder a set of documents by semantic relevance to a query. Commonly used as the second-stage reranking step in RAG (Retrieval-Augmented Generation) pipelines.
Implemented following the SiliconFlow Rerank API format.

Supported Models

Request Parameters

string
required
Reranking model name, e.g. gte-rerank-v2
string
required
Query text
string[]
required
List of documents to rerank
integer
Return the top N results. Defaults to returning all
boolean
default:"true"
Whether to include the original document text in the response

Response Format

Code Examples

Typical RAG Pipeline

The number of input documents for reranking should not exceed 100. Too many documents will increase latency and cost.