/** * Bias detection algorithms for the Sentinel Agent system */ import { EvaluationResult, EvaluationContext } from "../types/evaluation"; /** * Types of bias that can be detected */ export declare enum BiasType { SYSTEMATIC = "systematic", TEMPORAL = "temporal", POSITIONAL = "positional", CONFIRMATION = "confirmation", ANCHORING = "anchoring", GROUPTHINK = "groupthink" } /** * Configuration for bias detection */ export interface BiasDetectionConfig { /** Minimum number of evaluations required for bias detection */ minEvaluations: number; /** Threshold for detecting systematic bias (0-1) */ systematicBiasThreshold: number; /** Threshold for detecting temporal bias (0-1) */ temporalBiasThreshold: number; /** Threshold for detecting positional bias (0-1) */ positionalBiasThreshold: number; /** Enable detection of confirmation bias */ detectConfirmationBias: boolean; /** Enable detection of anchoring bias */ detectAnchoringBias: boolean; /** Window size for temporal analysis */ temporalWindow: number; } /** * Report of detected bias */ export interface BiasReport { /** Type of bias detected */ biasType: BiasType; /** Severity score (0-1, higher is more severe) */ severity: number; /** Human-readable description */ description: string; /** IDs of agents affected by this bias */ affectedAgents: string[]; /** Recommendations for mitigation */ recommendations: string[]; /** Statistical evidence supporting the bias detection */ evidence: Record; /** Confidence in the bias detection (0-1) */ confidence: number; } /** * Pattern of bias detected in evaluations */ export interface BiasPattern { pattern: string; strength: number; frequency: number; agents: string[]; } /** * Bias detector implementing various bias detection algorithms */ export declare class BiasDetector { private config; private evaluationHistory; constructor(config: BiasDetectionConfig); /** * Detect systematic bias in a set of evaluations */ detectSystematicBias(evaluations: EvaluationResult[]): BiasReport | null; /** * Detect temporal bias (bias that changes over time) */ detectTemporalBias(history: EvaluationResult[]): BiasReport | null; /** * Detect positional bias (bias based on game state characteristics) */ detectPositionalBias(evaluations: EvaluationResult[], contexts: EvaluationContext[]): BiasReport | null; /** * Detect confirmation bias (tendency to evaluate in line with initial impressions) */ detectConfirmationBias(evaluations: EvaluationResult[]): BiasReport | null; /** * Add evaluation to history for temporal analysis */ addToHistory(evaluation: EvaluationResult): void; /** * Get the evaluation history */ getHistory(): EvaluationResult[]; /** * Clear the evaluation history */ clearHistory(): void; private groupEvaluationsByAgent; private calculateSystematicBiasScore; private createTimeWindows; private identifyTemporallyBiasedAgents; private identifyPositionallyBiasedAgents; private getAllAgentIds; private calculateAutoCorrelation; private calculateCorrelation; } //# sourceMappingURL=bias-detector.d.ts.map