divya / engine /utils /uncertainty.py
jash-ai's picture
Upload 46 files
b413e74 verified
Raw
History Blame Contribute Delete
204 Bytes
def assess_uncertainty(attacks, category, medical_intent):
score=0
if any(attacks.values()): score+=0.4
if category=="MEDICAL" and medical_intent=="INFO": score+=0.3
return min(score,1.0)