MCPcopy Create free account
hub / github.com/MiniMax-AI/MiniMax-01 / score_response

Function score_response

evaluation/MR-NIAH/score.py:54–61  ·  view source on GitHub ↗
(response, gt_label, language)

Source from the content-addressed store, hash-verified

52
53
54def score_response(response, gt_label, language):
55 if language=='chinese' and ('抱歉' in response or '没有之前的对话' in response):
56 return 0
57 if language=='english' and ('sorry' in response.lower() or 'no previous conversation' in response.lower()):
58 return 0
59 gt_list = modify_gt(gt_label)
60 score = np.mean([1 if gt in response else 0 for gt in gt_list])
61 return score
62
63def process_log(response_log):
64 gt_label = response_log['label']

Callers 1

score.pyFile · 0.85

Calls 1

modify_gtFunction · 0.85

Tested by

no test coverage detected