arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.14798cs.SEcs.AIcs.CY
收藏

评估生成式AI在CS1代码评分中的应用:直接法与反向法

Evaluating Generative AI for CS1 Code Grading: Direct vs Reverse Methods

University of British Columbia Okanagan(不列颠哥伦比亚大学奥克兰分校)

Ahmad Memon, Abdallah Mohamed

AI总结:

针对计算机科学入门课程编程作业人工评分耗时且不一致的问题,本文比较直接法与新提出的反向法两种AI评分技术,发现反向法更细粒度,两种方法均需提示工程,为混合人机AI评分系统提供参考。

摘要:

计算机科学入门课程中编程作业的人工评分耗时且易出现不一致性。尽管单元测试常用于自动评估,但它通常遵循二元通过/失败模型,不提供部分分数。大型语言模型(LLMs)的最新进展为自动化、可扩展且更客观的评分提供了潜力。本文比较了两种基于AI的评分技术:直接法(AI模型直接将评分标准应用于学生代码)和反向法(新提出的方法,AI先修复错误,再根据错误的性质和数量推导分数)。每种方法都在教师原始评分量表和十倍扩展量表上进行了评估,以评估范围对AI评分准确性的影响。为评估其有效性,AI分配的分数与人类导师对一系列编码问题和错误类型的评估进行了对比。初步结果表明,虽然直接法更快更直接,但反向法通过关注修正工作量往往能提供更细粒度的评估。两种方法都需要仔细的提示工程,特别是在分配部分学分和处理逻辑错误方面。为进一步测试一致性,我们还使用了Gemini Flash 2.0生成的合成学生代码,这使我们能够在更广泛的受控错误类型和难度级别上评估AI评分器。我们讨论了每种方法的优缺点、提示设计的实际考虑,以及旨在提高计算机科学课程一致性、效率和公平性的混合人机AI评分系统的未来方向。

英文摘要:

Manual grading of programming assignments in introductory computer science courses can be time-consuming and prone to inconsistencies. While unit testing is commonly used for automatic evaluation, it typically follows a binary pass/fail model and does not give partial marks. Recent advances in large language models (LLMs) offer the potential for automated, scalable, and more objective grading. This paper compares two AI-based grading techniques: \textit{Direct}, where the AI model applies a rubric directly to student code, and \textit{Reverse} (a newly proposed approach), where the AI first fixes errors, then deduces a grade based on the nature and number of fixes. Each method was evaluated on both the instructor's original grading scale and a tenfold expanded scale to assess the impact of range on AI grading accuracy. To assess their effectiveness, AI-assigned scores were evaluated against human tutor evaluations on a range of coding problems and error types. Initial findings suggest that while the Direct approach is faster and straightforward, the Reverse technique often provides a more fine-grained assessment by focusing on correction effort. Both methods require careful prompt engineering, particularly for allocating partial credit and handling logic errors. To further test consistency, we also used synthetic student code generated using Gemini Flash 2.0, which allowed us to evaluate AI graders on a wider range of controlled error types and difficulty levels. We discuss the strengths and limitations of each approach, practical considerations for prompt design, and future directions for hybrid human-AI grading systems that aim to improve consistency, efficiency, and fairness in CS courses.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑