訂明本例驗收任務
假設驗收資料有固定哨兵個案及字面答案基線。新答案鍵須逐項對基線;欠鍵或字串改動都是評候選前的資料完整性錯誤。可加非哨兵題,但不能因此改哨兵要求。
- 保留固定哨兵基線
- 核基線編號及字面答案
- 評分前保留已改或欠定義項
獲批准改準則須另列新基線,舊依據仍保留。
使用已填個案
| 個案 | 已提供輸入 | 預期結構化結果 | 判斷及原因 |
|---|---|---|---|
| 哨兵答案被改 | {"baseline":{"S1":"R"},"proposed":{"S1":"S"}} | {"missing":[],"changed":["S1"],"intact":false} | R 變了 S,未有已接受基線改版。 |
| 只加新題 | {"baseline":{"S1":"R"},"proposed":{"S1":"R","C2":"A"}} | {"missing":[],"changed":[],"intact":true} | 非哨兵新題沒有改固定哨兵。 |
| 漏哨兵個案 | {"baseline":{"S1":"R","S2":"A"},"proposed":{"S1":"R"}} | {"missing":["S2"],"changed":[],"intact":false} | 欠 S2 是資料完整性缺口,不是模型答錯。 |
逐步處理 sentinel-missing 個案,須得到甚麼結果?原因是甚麼?
查看參考答案
{"missing":["S2"],"changed":[],"intact":false}。欠 S2 是資料完整性缺口,不是模型答錯。
執行完整本機驗算
import assert from 'node:assert/strict';
function evaluate(x){
const missing=[],changed=[];for(const id of Object.keys(x.baseline).sort()){if(!Object.hasOwn(x.proposed,id))missing.push(id);else if(x.proposed[id]!==x.baseline[id])changed.push(id);}
return {missing,changed,intact:missing.length+changed.length===0};
}
const cases = [
{
"id": "sentinel-mutated",
"input": {
"baseline": {
"S1": "R"
},
"proposed": {
"S1": "S"
}
},
"expected": {
"missing": [],
"changed": [
"S1"
],
"intact": false
}
},
{
"id": "new-case-only",
"input": {
"baseline": {
"S1": "R"
},
"proposed": {
"S1": "R",
"C2": "A"
}
},
"expected": {
"missing": [],
"changed": [],
"intact": true
}
},
{
"id": "sentinel-missing",
"input": {
"baseline": {
"S1": "R",
"S2": "A"
},
"proposed": {
"S1": "R"
}
},
"expected": {
"missing": [
"S2"
],
"changed": [],
"intact": false
}
}
];
for (const c of cases) assert.deepEqual(evaluate(c.input), c.expected, c.id);
console.log(JSON.stringify({checked:cases.length,caseIds:cases.map(c=>c.id)}));
已知哨兵可找出意外改答案。此檢查不把哨兵當未見題,也未防止其他所有資料錯誤。