Class RerankResponse


public class RerankResponse extends ObjectWithJsonToString
Configuration for a mocked rerank response (Cohere /v1/rerank, Voyage /v1/rerank, ...). A rerank endpoint scores a list of candidate documents against a query and returns them ordered by relevance.

MockServer derives one result per candidate document from the request, scoring each with a relevance score (descending) — reproducible when deterministicFromInput is set, otherwise random. Each result is a {"index":N,"relevance_score":F} entry; the surrounding envelope is provider-specific (Cohere: top-level results; Voyage: OpenAI-style data list with an object/usage wrapper).