File size: 550 Bytes
401184c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
Hallucination Detector Configuration
Configure which detection method to use
"""

# Detection method: 'vectara', 'nli', or 'hybrid' (recommended)
HALLUCINATION_DETECTION_METHOD = "hybrid"

# Thresholds
VECTARA_HALLUCINATION_THRESHOLD = 0.5  # Score above this = hallucination
NLI_CONTRADICTION_THRESHOLD = 0.3  # Percentage of contradictions to flag

# Performance settings
USE_GPU = True  # Use GPU if available
BATCH_SIZE = 8  # For batch processing

# Fallback behavior
FALLBACK_TO_LLM = True  # If professional detectors fail, use LLM method