feat: preserve LLM grading details (criteria, confidence, reasons)
- aggregate_final_grade.py now keeps criteria and confidence from LLM output - create_minimal_metadata.py includes these in the uploaded metadata
This commit is contained in:
parent
fa984b79f2
commit
bf78d9074c
@ -51,7 +51,7 @@ def main():
|
||||
total_score = prog_score + report_score + frontend_score
|
||||
total_max = prog_max + report_max + frontend_max
|
||||
|
||||
# 构建最终成绩数据
|
||||
# 构建最终成绩数据(保留 LLM 评分的详细内容)
|
||||
final_grade = {
|
||||
"total_score": round(total_score, 2),
|
||||
"max_score": total_max,
|
||||
@ -64,12 +64,16 @@ def main():
|
||||
"report": {
|
||||
"score": round(report_score, 2),
|
||||
"max_score": report_max,
|
||||
"flags": report_grade.get("flags", [])
|
||||
"flags": report_grade.get("flags", []),
|
||||
"confidence": report_grade.get("confidence"),
|
||||
"criteria": report_grade.get("criteria", []) # LLM 评分详情
|
||||
},
|
||||
"frontend": {
|
||||
"score": round(frontend_score, 2),
|
||||
"max_score": frontend_max,
|
||||
"flags": frontend_grade.get("flags", [])
|
||||
"flags": frontend_grade.get("flags", []),
|
||||
"confidence": frontend_grade.get("confidence"),
|
||||
"criteria": frontend_grade.get("criteria", []) # LLM 评分详情
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,9 @@ def create_final_metadata(final_grade_file='final_grade.json'):
|
||||
"score": report.get("score", 0),
|
||||
"max_score": report.get("max_score", 10),
|
||||
"details": {
|
||||
"flags": report.get("flags", [])
|
||||
"flags": report.get("flags", []),
|
||||
"confidence": report.get("confidence"),
|
||||
"criteria": report.get("criteria", []) # LLM 各评分项及理由
|
||||
}
|
||||
}
|
||||
components.append(report_component)
|
||||
@ -110,7 +112,9 @@ def create_final_metadata(final_grade_file='final_grade.json'):
|
||||
"score": frontend.get("score", 0),
|
||||
"max_score": frontend.get("max_score", 10),
|
||||
"details": {
|
||||
"flags": frontend.get("flags", [])
|
||||
"flags": frontend.get("flags", []),
|
||||
"confidence": frontend.get("confidence"),
|
||||
"criteria": frontend.get("criteria", []) # LLM 各评分项及理由
|
||||
}
|
||||
}
|
||||
components.append(frontend_component)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user