Long-Context-Data-Engineering icon indicating copy to clipboard operation
Long-Context-Data-Engineering copied to clipboard

【有个奇怪的问题】如果pred = expect_answer, 按照作者给的metric计算出来的分数不等于1

Open randomtutu opened this issue 3 months ago • 1 comments

很奇怪,我觉得是不是哪里出了问题?

expected_answer = "eat a sandwich and sit in Dolores Park on a sunny day.".lower().split() model_response = "eat a sandwich and sit in Dolores Park on a sunny day.".lower() score = len(set(model_response.split()).intersection(set(expected_answer))) / len(expected_answer) print(score)

可能改成 score = len(set(model_response.split()).intersection(set(expected_answer))) / len(set(expected_answer)) ?

randomtutu avatar Mar 22 '24 03:03 randomtutu