Menu
Rerank results
Rerank results
POST
/rerankUse it in a workflow
- Add a step and choose the Pinecone connector.
- Pick the Rerank results action (under Inference).
- Fill in the fields below, then reference the result from later steps as
{{rerankResults.response.data}}.
Request
Request body
Enter the body as JSON in the step's Body field.
{
"model": "bge-reranker-v2-m3",
"query": "What is the capital of France?",
"documents": [
{
"id": "1",
"text": "Paris is the capital of France.",
"title": "France",
"url": "https://example.com"
}
],
"top_n": 5,
"return_documents": true,
"rank_fields": [
"text"
],
"parameters": {
"truncate": "END"
}
}
Response
Returns 200 with an object. Read it in later steps with {{rerankResults.response.data.<field>}}.
{
"model": "bge-reranker-v2-m3",
"data": [
{
"index": 0,
"score": 0.5,
"document": {
"id": "1",
"text": "Paris is the capital of France.",
"title": "France",
"url": "https://example.com"
}
}
],
"usage": {
"rerank_units": 1
}
}
Need more? See the Pinecone guide for connection setup and behaviour shared by every action.
Was this page helpful?