UNPKG

@astermind/astermind-pro

Version:

Astermind Pro - Premium ML Toolkit with Advanced RAG, Reranking, Summarization, and Information Flow Analysis

45 lines 1.59 kB
export type Chunk = { heading: string; content: string; rich?: string; level?: number; secId?: number; score_base?: number; }; export type ScoredChunk = Chunk & { score_rr: number; p_relevant: number; /** Engineered feature vector used by the ridge reranker (if exposeFeatures=true) */ _features?: number[]; /** Names for _features; same array for all rows (if attachFeatureNames=true) */ _feature_names?: string[]; }; export type RerankOptions = { lambdaRidge?: number; useMMR?: boolean; mmrLambda?: number; probThresh?: number; epsilonTop?: number; budgetChars?: number; randomProjDim?: number; /** NEW: attach _features to outputs (default true) */ exposeFeatures?: boolean; /** NEW: also attach _feature_names (default false) */ attachFeatureNames?: boolean; }; /** Train per-query ridge model and score chunks. */ export declare function rerank(query: string, chunks: Chunk[], opts?: RerankOptions): ScoredChunk[]; /** Filter scored chunks using probability/near-top thresholds and MMR coverage. */ export declare function filterMMR(scored: ScoredChunk[], opts?: RerankOptions): ScoredChunk[]; /** Convenience: run rerank then filter. */ export declare function rerankAndFilter(query: string, chunks: Chunk[], opts?: RerankOptions): ScoredChunk[]; export declare function explainFeatures(query: string, chunks: Chunk[], opts?: { randomProjDim?: number; }): { names: string[]; rows: { heading: string; features: number[]; }[]; }; //# sourceMappingURL=OmegaRR.d.ts.map