Member Junction
    Preparing search index...

    Parameters for AIRerankerRunner.RunRerank: the driver's own RerankParams (query, documents, topK, options), plus what the runner needs to choose a model and record the run.

    interface AIRerankParams {
        AgentRunID?: string;
        CancellationToken?: AbortSignal;
        ChatPromptID?: string;
        ContextUser: UserInfo;
        documents: RerankDocument[];
        ModelID?: string;
        options?: Record<string, unknown>;
        ParentRunID?: string;
        PromptID?: string;
        query: string;
        TimeoutMS?: number;
        topK?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    AgentRunID?: string

    The agent run this rerank belongs to. MJ: AI Prompt Runs has no agent-run column, so it is recorded in the row's Messages.

    CancellationToken?: AbortSignal

    Cancels 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.

    ChatPromptID?: string

    The 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.

    ContextUser: UserInfo

    The user the run is made and recorded for. Required.

    documents: RerankDocument[]

    Documents to rerank (typically from vector search results)

    ModelID?: string

    Pins the reranker model by ID, as AIDecisionRunner does with override.modelId. Failover then stays within that model's vendors.

    options?: Record<string, unknown>

    Provider-specific options (passed through to the reranker implementation)

    ParentRunID?: string

    A parent MJ: AI Prompt Runs row, recorded as this run's ParentID.

    PromptID?: string

    The MJ: AI Prompts row whose bindings choose the model and whose failover settings apply. Defaults to the Default Rerank prompt.

    query: string

    The query text to rank documents against

    TimeoutMS?: number

    A 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.

    topK?: number

    Maximum number of results to return after reranking. If not specified, returns all reranked documents.