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

# Detection method: 'vectara', 'nli', or 'hybrid' (recommended)
# 使用 'nli' 可以完全避免 Vectara 权限问题
HALLUCINATION_DETECTION_METHOD = "nli"

# 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