UNPKG

memory-engineering-mcp

Version:

🧠 AI Memory System powered by MongoDB Atlas & Voyage AI - Autonomous memory management with zero manual work

29 lines • 1.21 kB
import type { CodeChunk } from '../types/memory-v5.js'; /** * Generate embeddings for code chunks using voyage-code-3 model. * Each chunk is embedded with its signature, content, and metadata. */ export declare function generateCodeEmbeddings(chunks: Omit<CodeChunk, '_id' | 'contentVector' | 'createdAt' | 'updatedAt'>[]): Promise<number[][]>; /** * Generate embedding for a code search query using voyage-3 model */ export declare function generateCodeQueryEmbedding(query: string): Promise<number[]>; /** * Example of how contextualized embeddings solve the "golden chunk" problem: * * File: userService.ts * Chunks: * 1. "import { User } from './models/User';" * 2. "export class UserService { ... }" * 3. "async authenticate(email: string, password: string) { ... }" * * With standard embeddings: * - Chunk 3 loses context about UserService class * - Search for "UserService authenticate" might not find chunk 3 * * With contextualized embeddings: * - Chunk 3 is embedded knowing it's part of UserService * - Search for "UserService authenticate" correctly finds chunk 3 * - Each chunk "knows" about the imports and class structure */ //# sourceMappingURL=codeEmbeddings.d.ts.map