Member Junction
    Preparing search index...

    Configuration for agent reranking behavior. Stored as JSON in AIAgent.RerankerConfiguration column. When null or disabled, vector search results are used directly without reranking.

    interface RerankerConfiguration {
        contextFields?: string[];
        decisionMaxDocumentsPerCall?: number;
        decisionTimeoutMS?: number;
        enabled: boolean;
        fallbackOnError: boolean;
        minRelevanceThreshold: number;
        rerankerModelId: string;
        rerankExamples?: boolean;
        rerankPromptID?: string;
        retrievalMultiplier: number;
    }
    Index

    Properties

    contextFields?: string[]

    Optional: Additional entity fields to include when building rerank document context. Example: ['Keywords', 'Type'] to include note type and keywords in ranking context.

    decisionMaxDocumentsPerCall?: number

    Optional: the most documents one DecisionReranker decision call carries, when no model its decision prompt can run on declares Decision.MaxQuestionsPerCall (a declared limit always wins). Larger reranks are split across parallel calls. Other rerankers ignore it. Default: 20 (DEFAULT_DECISION_RERANK_DOCUMENTS_PER_CALL)

    decisionTimeoutMS?: number

    Optional: the time budget, in milliseconds, for a DecisionReranker's decision calls, all together. When it runs out the calls are aborted and the rerank fails, so the caller falls back as fallbackOnError says. Other rerankers ignore it. Default: 15000 (DEFAULT_DECISION_RERANK_TIMEOUT_MS)

    enabled: boolean

    Master switch for reranking. When false, reranking is disabled.

    fallbackOnError: boolean

    Whether to fallback to original vector search results when reranker fails. When true: on error, returns unranked vector search results. When false: on error, throws an exception. Default: true

    minRelevanceThreshold: number

    Minimum relevance score (0.0-1.0) for reranked results to be included. Results below this threshold are filtered out. When none reaches it, the agent keeps the vector search results instead, as if reranking were off, so the threshold never empties the list.

    Recommended for a DecisionReranker: 0.1. Its scores are Likelihood probabilities that are not calibrated, so the order and the top-N cut do the ranking, and the threshold should only drop the candidates the model rules out. 0.1 is a starting point until a calibration is fitted for memory reranking. Default: 0.5

    rerankerModelId: string

    ID of the AIModel with type='Reranker' to use for reranking.

    rerankExamples?: boolean

    Optional: whether examples get a reranking stage too. When true, example retrieval fetches maxExamples * retrievalMultiplier candidates and reranks them with the same reranker, threshold and fallbackOnError as notes. When absent or false, examples use vector search results directly. Default: false

    rerankPromptID?: string

    Optional: AIPrompt ID for prompt-backed reranking. Only used when the reranker's DriverClass is 'LLMReranker' (the chat prompt it runs) or 'DecisionReranker' (the decision prompt it asks, 'Default Decision' otherwise).

    retrievalMultiplier: number

    Multiplier for initial retrieval count. If agent wants N notes, fetch N * retrievalMultiplier candidates, then rerank to top N. Default: 3