/** * Embedding Evolution — synaptic plasticity for retrieval space. * * Pure math. Given an original embedding and a small set of recent query * embeddings that produced this memory, returns a blended embedding that * "migrates" the memory toward the semantic space where it is actually * being looked up. * * Quality guard: if the centroid of recent queries diverges too far from * the original embedding (cosine < drift threshold), the blend is skipped * to avoid destabilizing memories that get used in genuinely different * contexts. The caller decides what to do in that case (split, tag, etc.). * * Default `enabled: false` — experimental. */ export interface EmbeddingEvolutionConfig { enabled: boolean; /** Minimum query embeddings required to compute a blend. */ minSamples: number; /** Blend weight on the original embedding. */ originalWeight: number; /** Blend weight on the centroid of recent queries. */ centroidWeight: number; /** Skip the update if cosine(original, centroid) is below this. */ driftThreshold: number; } export interface EvolutionInput { id: string; original: number[] | Float32Array; queryEmbeddings: Array; } export interface EvolutionUpdate { id: string; blended: number[]; driftCosine: number; } /** * Compute blended embeddings for a batch. Caller persists them. */ export declare function evolveEmbeddings(inputs: EvolutionInput[], config: EmbeddingEvolutionConfig): EvolutionUpdate[]; export declare const DEFAULT_EMBEDDING_EVOLUTION_CONFIG: EmbeddingEvolutionConfig; //# sourceMappingURL=embedding-evolution.d.ts.map