2026年11月25日
Technology Watch

從實驗室到產業,追蹤新技術的路徑

← 回首頁

arXiv

程式設計回饋讓一次修改變成全班檢查

AI 為程式設計課程提供的回饋,若教師能把一次修正轉成規則,並在規則擴散前檢查它,便會更值得信賴。作者打造了 ValiAssist;在一項實驗室研究中,經過驗證的回饋符合參與者自身標準的比例為 91%。在大學程式設計實驗課中,如果教師能找出過度概括的規則,同一個流程就能從許多份作業中移除透露太多答案的提示。

大型語言模型(LLM)可以為班上每份程式設計作業寫一則評語。但這不代表這些評語可以安全使用。一段流暢的文字可能誤解程式碼、違反教師的政策、透露答案,或把學生引向錯誤的想法。教師仍然必須逐一檢查作業和回饋。

事先寫好所有規則也沒有容易多少。教師往往要看到某個具體錯誤後,才會發現正確的規則。一則評語的修改能顯示教師想改變什麼,卻不會確切說明之後再次出現什麼情況時也應該進行同樣的修改。同一個例子可能支持好幾種不同的規則。如果一條錯誤的規則被套用到大量作業上,它的錯誤可能在任何人注意到之前,就已經影響許多學生。

從教師的修改到可檢查的規則

ValiAssist 的設計目的,是把這種局部判斷轉變成教師可以檢查的東西。教師從一段程式碼的一則 AI 生成評語開始。他們可以直接修改文字、和 AI 助理討論修改內容,或針對程式碼、錯誤訊息或回饋留言。ValiAssist 會利用這些操作,以及原始和修改後的材料,提出一條規則。

規則的形式很簡單:當某件事為真時,就進行某項修改。條件可以詢問程式碼或回饋是否包含某些內容、缺少某些內容、使用特定風格,或具有某種長度。動作則可以新增、刪除、替換或修改文字。有些檢查,例如確切措辭和長度,是由軟體直接完成的。其他檢查,例如兩段文字的意思或風格是否相同,則由 LLM 判斷。

重要的差異在於,規則並不是藏在提示詞裡。ValiAssist 會顯示促成條件匹配的文字片段。當規則可能重複、細化或互相衝突時,它可以提出警告。教師可以新增例子、修改規則,並在套用到其餘程式碼—回饋配對之前檢查結果。

從這個意義上說,一次修改只有在教師檢查過它代表什麼之後,才會變成全班檢查。系統擴散的是檢查,而不是對第一次判斷的盲目信任。

早期測試發現了什麼

作者以網頁系統的形式打造 ValiAssist,並將它與一種由教師用日常語言描述標準的方法比較。在一項有 16 名參與者的實驗室研究中,使用 ValiAssist 檢查的回饋,有 91% 符合參與者自身的標準;日常語言方法的比例則為 57%。參與者使用 ValiAssist 時,也能更準確地修正有問題的標準。他們對標準進行的修改也更多,這表示可見的規則鼓勵主動檢查,而不是被動接受。

這項結果並不能證明系統已準備好用於真正的課程。技術測試使用了 40 組修改意圖和 240 個程式碼—回饋案例。研究使用一門 Python 入門課程的資料,在實驗室中進行,沒有讓系統運行完整學期,也沒有在數百名學生的班級中運行。

Refer to caption
Figure 1. The validation-by-demonstration workflow of ValiAssist. The instructor starts by revising LLM-generated feedback in a sample code-feedback pair, then ValiAssist suggests validation criteria by inferring the instructor’s intention according to their interactions (e.g., comments, AI chat, and direct edit) and context information (e.g., original and revised feedback, code submission, and error message). After verifying and tuning the criteria, the instructor can apply the criteria to all other code-feedback pairs to scale the validation. ValiAssist first performs condition matching on the code-feedback pairs and takes actions based on the matched criteria.###### Abstract. 出處: ValiAssist: Scaling LLM-generated Programming Feedback Validation by Demonstration(arXiv)
Refer to caption
Figure 5. ValiAssist’s validation criterion (B). If the instructor attempts to accept a pending criterion (A) with potential issues, a dialog (C) would pop up. The instructor can switch to the detailed view (D) to relate the criterion to the original demonstration, where the semantic labels are linked to the corresponding matched text spans (E). In the detailed view, the instructor can also directly select a text span to add as an example (F). By clicking the view icon, the instructor can overview the matched text spans of semantic labels by clusters and add examples (G). They can also refine the criterion in edit view (H). ValiAssist represents validation criteria in a lightweight DSL (Fig.[4](https://arxiv.org/html/#S5.F4 "Figure 4 ‣ 5.1.1. Feedback Generation ‣ 5.1. Core Features ‣ 5. ValiAssist ‣ ValiAssist: Scaling LLM-generated Programming Feedback Validation by Demonstration")) of the form 𝐰𝐡𝐞𝐧:Φ​𝐭𝐡𝐞𝐧:Δ\\mathbf{when:}\\,\\Phi\\;\\mathbf{then:}\\,\\Delta, where Φ\\Phi is a condition over the student’s submission and the generated feedback, and Δ\\Delta is an edit intention. Both vocabularies are closed, four predicates and four actions, so an instructor can read the whole language, adjust a criterion directly, and compare two criteria for redundancy or conflict (DC1, DC2, DG2). 出處: ValiAssist: Scaling LLM-generated Programming Feedback Validation by Demonstration(arXiv)

持續接受檢查的教師規則手冊

想像一間大學程式設計實驗課。助教發現,AI 提示透露了太多解法。助教修正了這一則提示。在修改其餘作業之前,ValiAssist 會顯示它認為符合相同問題的文字片段。助教可以接受這條規則、縮小它的適用範圍、新增例子,或拒絕它。如果規則成立,學生就能獲得指引,而不會直接拿到答案。

隨著時間過去,反覆出現的決定可能會成為一套持續維護的教學規則庫,而不是一連串重複的修正。這可以幫助教師把自己的教學策略套用到大量 AI 生成的回饋上,同時讓教育軟體擁有一套可稽核、可修復的工作流程。

前提是嚴格的:教師必須持續檢查規則可以概括到哪些地方。作業和學生的錯誤會改變,而一條適合某個例子的規則,可能會在不熟悉的例子上越界。ValiAssist 讓這個問題變得可見,但它並沒有免除教師決定規則應該在哪裡停止的責任。

來源

arXiv,「ValiAssist: Scaling LLM-generated Programming Feedback Validation by Demonstration」