Expand description
Shared reranking vocabulary for the VoyageAI reranking design.
Used identically by the server’s inline rerank stage and by clients reranking locally (BYOK), so the same search reranks the same way regardless of placement.
Enums§
- Rerank
Param - The
rerankrequest parameter: which Voyage model to rerank with, or none.
Constants§
- MAX_
INSTRUCTION_ CHARS - Hard cap on agent-supplied rerank instructions, in characters.
- RERANK_
REASONS - The closed set of
search_metadata.rerank.reasonvalues the server emits.
Functions§
- compose_
rerank_ query - Compose the query text sent to Voyage
/v1/rerank. - default_
instruction - Derive the default rerank instruction from request shape (spec §3).
- known_
reason - Map a raw
search_metadata.rerank.reasonstring from a server response to a known reason wire value, returningNonefor anything outside the closedRERANK_REASONSset. - validate_
instruction - Validate an agent-supplied instruction against
MAX_INSTRUCTION_CHARS.