# Streaming Intent Router Configuration # HMM-style belief updating for STT chunk processing intents: - ESCALATION - APPOINTMENT - MEDICATION - SYMPTOM_CHECK - BILLING - GENERAL_INQUIRY - OTHER # Prior distribution (initial belief state) prior: ESCALATION: 0.05 APPOINTMENT: 0.15 MEDICATION: 0.15 SYMPTOM_CHECK: 0.15 BILLING: 0.10 GENERAL_INQUIRY: 0.15 OTHER: 0.25 # Transition matrix T[i,j] = P(intent_t=j | intent_{t-1}=i) # Rows must sum to 1.0 # High diagonal = "stickiness" (intent tends to persist) transition_matrix: ESCALATION: ESCALATION: 0.90 APPOINTMENT: 0.01 MEDICATION: 0.02 SYMPTOM_CHECK: 0.02 BILLING: 0.01 GENERAL_INQUIRY: 0.02 OTHER: 0.02 APPOINTMENT: ESCALATION: 0.02 APPOINTMENT: 0.80 MEDICATION: 0.03 SYMPTOM_CHECK: 0.03 BILLING: 0.07 GENERAL_INQUIRY: 0.03 OTHER: 0.02 MEDICATION: ESCALATION: 0.04 APPOINTMENT: 0.03 MEDICATION: 0.82 SYMPTOM_CHECK: 0.04 BILLING: 0.02 GENERAL_INQUIRY: 0.03 OTHER: 0.02 SYMPTOM_CHECK: ESCALATION: 0.08 APPOINTMENT: 0.04 MEDICATION: 0.05 SYMPTOM_CHECK: 0.75 BILLING: 0.02 GENERAL_INQUIRY: 0.03 OTHER: 0.03 BILLING: ESCALATION: 0.01 APPOINTMENT: 0.05 MEDICATION: 0.02 SYMPTOM_CHECK: 0.02 BILLING: 0.85 GENERAL_INQUIRY: 0.03 OTHER: 0.02 GENERAL_INQUIRY: ESCALATION: 0.03 APPOINTMENT: 0.05 MEDICATION: 0.05 SYMPTOM_CHECK: 0.05 BILLING: 0.04 GENERAL_INQUIRY: 0.75 OTHER: 0.03 OTHER: ESCALATION: 0.02 APPOINTMENT: 0.08 MEDICATION: 0.08 SYMPTOM_CHECK: 0.08 BILLING: 0.06 GENERAL_INQUIRY: 0.08 OTHER: 0.60 # Emission model parameters emission: alpha: 1.5 # Sharpening exponent for DriveHealthBERT probabilities epsilon: 1.0e-8 # Smoothing to avoid zero probabilities # Decision thresholds thresholds: theta_hi: 0.85 # Immediate escalation threshold theta_med: 0.60 # Consecutive-steps escalation threshold theta_lock: 0.70 # Commit threshold for non-escalation intents K: 3 # Required consecutive steps for stability # Rolling window parameters window: max_tokens: 64 # Default max tokens in rolling window max_tokens_limit: 128 # Hard limit for max_tokens # Debounce parameters debounce: debounce_ms: 150 # Minimum ms between updates (unless is_final) min_change_chars: 3 # Minimum character change to trigger update # Model parameters model: max_length: 48 # Max sequence length for BioClinicalBERT inference (reduced for latency) # SPRT (Sequential Probability Ratio Test) parameters # Used for statistically-principled escalation decisions sprt: alpha: 0.05 # Type I error target (false escalation rate) beta: 0.10 # Type II error target (missed escalation rate) p0: 0.20 # H0: baseline escalation probability (non-escalation) p1: 0.60 # H1: expected escalation probability (true escalation) # Note: Run scripts/evaluate_sprt_streaming.py --estimate_p0_p1 to tune these