cx-agent / utils /scoring.py
yekkala's picture
Create utils/scoring.py
1117b7b verified
raw
history blame
206 Bytes
def confidence_score(intent, sentiment):
score = 70
if sentiment == "NEGATIVE":
score -= 20
if intent in ["Support", "Complaint"]:
score += 10
return max(0, min(100, score))