import type { RAGHybridFusionMode, RAGHybridRetrievalMode, RAGHybridSearchOptions, RAGQueryResult } from "@absolutejs/ai";
type LexicalScoringCandidate = {
    chunkId: string;
    text: string;
    title?: string;
    source?: string;
    metadata?: Record<string, unknown>;
};
export declare const buildRAGLexicalHaystack: (result: {
    title?: string;
    source?: string;
    chunkText: string;
    metadata?: Record<string, unknown>;
}) => string;
export declare const scoreRAGLexicalMatch: (query: string, result: {
    title?: string;
    source?: string;
    chunkText: string;
    metadata?: Record<string, unknown>;
}) => number;
export declare const rankRAGLexicalMatches: <T extends LexicalScoringCandidate>(query: string, results: T[]) => {
    result: T;
    score: number;
}[];
export declare const fuseRAGQueryResults: ({ fusion, fusionConstant, lexical, lexicalWeight, vector, vectorWeight, }: {
    vector?: RAGQueryResult[];
    lexical?: RAGQueryResult[];
    fusion?: RAGHybridFusionMode;
    fusionConstant?: number;
    lexicalWeight?: number;
    vectorWeight?: number;
}) => {
    score: number;
    chunkId: string;
    chunkText: string;
    embedding?: number[];
    title?: string;
    source?: string;
    metadata?: Record<string, unknown>;
}[];
export declare const resolveRAGHybridSearchOptions: (retrieval: RAGHybridSearchOptions | RAGHybridRetrievalMode | undefined) => Required<Pick<RAGHybridSearchOptions, "fusion" | "fusionConstant" | "lexicalWeight" | "mode" | "diversityStrategy" | "mmrLambda" | "sourceBalanceStrategy" | "vectorWeight">> & Pick<RAGHybridSearchOptions, "lexicalTopK" | "maxResultsPerSource">;
export {};
