/** * ENSEMBLE AGGREGATION ENGINE - Combine responses from multiple models * Implements all aggregation strategies: voting, confidence weighting, synthesis, etc. */ import { AggregationStrategy, AggregationStrategyConfig } from '../../types/policies'; import { VendorResponse } from '../../types/vendors'; import { AdapterResponse } from '../execution/execution-engine'; export interface AggregationContext { responses: AdapterResponse[]; config?: AggregationStrategyConfig; strategy: AggregationStrategy; request_context?: Record; } export interface AggregatedResponse { combined_response: VendorResponse; strategy_used: AggregationStrategy; confidence_score: number; metadata: { source_count: number; successful_sources: number; aggregation_details: Record; }; } export declare class AggregationEngine { /** * Main aggregation method */ aggregate(context: AggregationContext): Promise; /** * FIRST: Return the first successful response */ private aggregateFirst; /** * VOTING: Aggregate based on voting method */ private aggregateVoting; /** * CONFIDENCE_WEIGHTED: Weight responses by confidence scores */ private aggregateConfidenceWeighted; /** * RANKER: Rank responses and select top-k */ private aggregateRanker; /** * SYNTHESIZER: Use LLM to synthesize responses */ private aggregateSynthesizer; /** * EARLIEST: Return the response that completed first */ private aggregateEarliest; /** * DIVERSITY: Select diverse responses */ private aggregateDiversity; /** * CONSENSUS: Require consensus threshold */ private aggregateConsensus; private extractText; private normalizeText; private tieBreaker; private createTextResponse; private extractConfidence; private calculateRankingScore; private calculateDiversity; private cosineSimilarity; private jaccardSimilarity; private levenshteinDistance; } //# sourceMappingURL=aggregation-engine.d.ts.map