/** * LLM Deduplication Enhancer. * * Provides a 4th-pass semantic deduplication via LLM analysis. * Receives unclaimed facts (not already grouped by the 3-pass algorithm) * and asks the LLM to identify semantically equivalent facts. * * Results are returned as IDuplicateGroup with reason 'llm-semantic'. * Graceful fallback: returns empty groups on any LLM failure. * * Part of Phase 6D: Intelligent LLM-Assisted Deduplication. */ import type { ILlmGuard } from '../../domain/interfaces/ILlmGuard'; import type { ILogger } from '../../domain/interfaces/ILogger'; import type { IMemoryItem } from '../../domain/interfaces/types'; import type { IDuplicateGroup } from '../../domain/interfaces/IDeduplicationService'; /** * Options for the LLM deduplication enhancer. */ export interface ILlmDeduplicationOptions { /** Maximum facts to send to the LLM (default: 100) */ readonly maxFacts?: number; /** Batch size for LLM calls (default: 20) */ readonly batchSize?: number; } /** * LLM-assisted semantic deduplication enhancer interface. */ export interface ILlmDeduplicationEnhancer { /** * Find semantic duplicates among unclaimed facts using LLM analysis. * * @param facts - All facts from the group * @param existingGroups - Groups already found by the 3-pass algorithm * @param options - Batch size and limit options * @returns New duplicate groups with reason 'llm-semantic' */ findSemanticDuplicates(facts: readonly IMemoryItem[], existingGroups: readonly IDuplicateGroup[], options?: ILlmDeduplicationOptions): Promise; } /** * Create an LLM deduplication enhancer. * * @param llmGuard - LLM guard for policy-enforced completions * @param logger - Optional logger */ export declare function createLlmDeduplicationEnhancer(llmGuard: ILlmGuard, logger?: ILogger): ILlmDeduplicationEnhancer; //# sourceMappingURL=LlmDeduplicationEnhancer.d.ts.map