import type { ExtractedEntity, EntityExtractionResult } from '../types/index.js'; import type { DocumentStore } from './store.js'; /** * Extract entities and relationships from a chunk of text. * Uses a structured prompt that works with any LLM provider. * * The caller is responsible for sending this prompt to their LLM * and passing the response back through parseExtractionResponse(). */ export declare function buildEntityExtractionPrompt(chunkText: string, docContext?: string): string; /** * Parse the LLM's JSON response into structured entities and relationships. * Handles common LLM output quirks (markdown fences, trailing commas, etc.). */ export declare function parseExtractionResponse(response: string): EntityExtractionResult; /** * Store extracted entities and relationships into the DocumentStore. * Handles deduplication by upserting entities and resolving names to IDs. */ export declare function storeExtraction(store: DocumentStore, extraction: EntityExtractionResult, docId: string, chunkId: string): { entitiesStored: number; relationshipsStored: number; }; /** * Deduplicate entities by fuzzy name matching. * Simple approach: normalize and compare lowercase names. * More advanced: Levenshtein distance or LLM-assisted resolution. */ export declare function deduplicateEntities(entities: ExtractedEntity[]): ExtractedEntity[]; //# sourceMappingURL=knowledge-graph.d.ts.map