OptionalAgentThe agent run this rerank belongs to. MJ: AI Prompt Runs has no agent-run column, so it is
recorded in the row's Messages.
OptionalCancellationCancels the rerank, as AIPromptParams.cancellationToken cancels a chat call. A token already
aborted refuses the call before a run row exists. Aborted during the call, it ends the call at
once, tears the driver's request down, tries no further failover candidate, and the run row is
recorded as Cancelled.
OptionalChatThe prompt a prompt-backed candidate runs, in place of the one its model-vendor APIName names:
the chat prompt of an LLMReranker, or the decision prompt of a DecisionReranker.
RerankerService.RerankNotes passes RerankerConfiguration.rerankPromptID here.
The user the run is made and recorded for. Required.
Documents to rerank (typically from vector search results)
OptionalModelPins the reranker model by ID, as AIDecisionRunner does with override.modelId. Failover then
stays within that model's vendors.
OptionaloptionsProvider-specific options (passed through to the reranker implementation)
OptionalParentA parent MJ: AI Prompt Runs row, recorded as this run's ParentID.
OptionalPromptThe MJ: AI Prompts row whose bindings choose the model and whose failover settings apply.
Defaults to the Default Rerank prompt.
The query text to rank documents against
OptionalTimeoutA bound, in milliseconds, on each driver call, as AIPromptParams.timeoutMS bounds each chat
call: every failover candidate gets its own. A call that runs longer is aborted through the
signal the driver is handed and fails with an AIPromptTimeoutError, which reads as a network
error and so fails over. Unset or not positive means no bound.
OptionaltopMaximum number of results to return after reranking. If not specified, returns all reranked documents.
Parameters for
AIRerankerRunner.RunRerank: the driver's ownRerankParams(query, documents, topK, options), plus what the runner needs to choose a model and record the run.