/** * Enhanced Delphi Consensus Engine v2 * * Implements an advanced Delphi method with: * 1. Semantic highlighting - consensus keywords and terms * 2. Severity-coded flags - high/medium/low hallucination risk * 3. Consensus strength - quantified agreement per claim * 4. Dynamic rounds - convergence detection with early stopping * 5. Follow-up questions - targeted probes for disputes * 6. Rich output - visual formatting with progress bars */ import { DelphiResponse, DelphiOptions, EnhancedDelphiResult } from './types.js'; export declare class DelphiEngine { private models; private maxRounds; private convergenceThreshold; private temperature; private enableFollowUp; private enableGrounding; private enableControl; private revisionMode; private reopenOnContradiction; private maxTotalTokens?; private maxCost?; private controlModel; private adminModel; private costTracker; private expertise?; private diversePersonas; private autoExpertise; private modelPersonas; private autoExpertiseAnalysis?; private reopenedClaims; private totalReopens; private readonly MAX_REOPENS_PER_CLAIM; private readonly MAX_TOTAL_REOPENS; constructor(options?: DelphiOptions); /** * Set up expert personas for each model in the panel. * If diversePersonas is enabled, each model gets a different complementary role. * Otherwise, all models get the same general domain expertise prompt. */ private setupExpertPersonas; /** * Analyze the question and generate optimal expert panel composition. * Called before Round 1 when autoExpertise is enabled. */ private analyzeQuestionForExpertise; /** * Parse the auto-expertise analysis response from the admin model. */ private parseAutoExpertiseResponse; /** * Build a system prompt from an auto-generated expert role. */ private buildAutoExpertSystemPrompt; /** * Get the effective system prompt for a specific model. * Combines the expert persona (if set) with any user-provided system prompt. */ private getSystemPromptForModel; private trackCost; private checkBudget; private buildCostBreakdown; query(question: string, systemPrompt?: string): Promise; private runInitialRound; private synthesizeEnhanced; private parseAdminResponse; private runRevisionRound; private runFollowUpRound; private createConvergenceSnapshot; private compareControlToConsensus; private parseControlComparisonResponse; } export { DelphiResponse, DelphiOptions, EnhancedDelphiResult }; export interface CostEstimate { estimatedCost: { min: number; max: number; likely: number; }; breakdown: { initialRound: number; perRevisionRound: number; adminSynthesis: number; claimAnalysis: number; grounding?: number; controlComparison?: number; }; assumptions: string[]; } /** * Estimate the cost of a Delphi query before running it. * Returns min/max/likely cost estimates based on heuristics. */ export declare function estimateCost(options?: DelphiOptions): CostEstimate; //# sourceMappingURL=delphi.d.ts.map