メインコンテンツへスキップ
POST
Rerank
更新日: 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

model
string
必須
Reranking model name, e.g. gte-rerank-v2
query
string
必須
Query text
documents
string[]
必須
List of documents to rerank
top_n
integer
Return the top N results. Defaults to returning all
return_documents
boolean
デフォルト:"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.