diff --git a/.autograde/llm_grade.py b/.autograde/llm_grade.py index f9aea73..af0b3a6 100644 --- a/.autograde/llm_grade.py +++ b/.autograde/llm_grade.py @@ -169,6 +169,12 @@ def main(): "confidence": 0.0 } + # 重新计算 total(不信任 LLM 返回的 total,使用各项得分之和) + criteria = resp.get("criteria", []) + if criteria: + calculated_total = sum(float(c.get("score", 0)) for c in criteria) + resp["total"] = round(calculated_total, 2) + # 边界带自动送审 try: rubric_data = json.loads(rubric_text)