CreateRerankResponseBody - Python SDK

CreateRerankResponseBody method reference

The Python SDK and docs are currently in beta. Report issues on GitHub.

Rerank response containing ranked results

Fields

FieldTypeRequiredDescriptionExample
idOptional[str]Unique identifier for the rerank response (ORID format)gen-rerank-1234567890-abc
modelstr✔️The model used for rerankingcohere/rerank-v3.5
providerOptional[str]The provider that served the rerank requestCohere
resultsList[operations.Result]✔️List of rerank results sorted by relevance[
{"document": {"text": "Paris is the capital of France."},
“index”: 0,
“relevance_score”: 0.98
}
]
usageOptional[operations.CreateRerankUsage]Usage statistics{"search_units": 1,"total_tokens": 150}