mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-22 23:41:59 +00:00
评测逐题结果给出这一题实际问的问题,模板原文另放 question_template
验收:评测结果列表里 question 是原始模板(带 {{ schedule.last_week_start }}),作答运行实际收到的问题已经渲染好了。
results 接口直接取的是 EvalCase.question。
改法:api/evals 的 _asked_questions 按执行时同一个算法、同一组输入渲染:题目模板 + 这次评测的截至时间(as_of,
建评测时就定下、重试不变)+ 题集时区 + 定时的 cron(runner._unit 交给 Driver 的就是这个)。题目在这次评测之后
改过(结果记的 case_hash 对不上现在的)时,现在的模板不一定是当时问的:改取作答运行输入里的 question,也没有
(反问、建图失败没有运行)就给 null,不拿现在的模板编一个。模板原文放 question_template。没有加库表的列:
渲染是确定的,不用另存。
前端:评测页逐题表的问法一格写实际问的问题;模板原文和它不同时(带变量,或题目改过)另起一行「题目原文:…」,
文案进 termsEval。类型补上 question_template。
测试:test_eval_runner 新增一条:带变量的题,结果的 question 和作答时 Driver 收到的一字不差、不含 {{,模板原文在
question_template;没有变量的题两者一样;题目改过、没有作答运行可取时 question 为 null、模板照给。去掉修复回跑挂。
check-evals 的夹具给带变量的那一题配上渲染好的 question 和模板原文,核对逐题表写的是实际问的、原文另起一行,
没有变量的题不多这一行。tsc、check-copy 通过,check-evals 102 项全过(漏到服务端的那个偶发问题另一次提交里修)。
This commit is contained in:
@@ -473,6 +473,8 @@ export const EVAL_TEXT = {
|
||||
cleaned: '明细已清理',
|
||||
seq: '题',
|
||||
question: '问法',
|
||||
/** 逐题表里实际问的问题下面一行:题目原文和实际问的不同(带变量的模板,或者题目之后改过)时写原文 */
|
||||
questionTemplate: (text: string) => `题目原文:${text}`,
|
||||
verdict: '结论',
|
||||
expected: '期望',
|
||||
got: '答案里的数',
|
||||
|
||||
@@ -370,7 +370,10 @@ function Results({ id, live, focusCase }: { id: string; live: boolean; focusCase
|
||||
{r.arm && <div className="text-2xs text-faint">{T.run.arm(r.arm)}</div>}
|
||||
</td>
|
||||
<td className="max-w-xs px-2 py-1.5">
|
||||
<div className="line-clamp-2 break-words">{r.question ?? '—'}</div>
|
||||
<div className="line-clamp-2 break-words" data-eval-result-question="">{r.question ?? '—'}</div>
|
||||
{r.question_template && r.question_template !== r.question && (
|
||||
<div className="line-clamp-2 break-words text-2xs text-faint" data-eval-result-template="">{R.questionTemplate(r.question_template)}</div>
|
||||
)}
|
||||
{r.path && <div className="text-2xs text-faint">{R.path}:{T.path[r.path]}</div>}
|
||||
</td>
|
||||
<td className="px-2 py-1.5">
|
||||
|
||||
@@ -558,7 +558,10 @@ export interface EvalResult {
|
||||
error: string | null
|
||||
started_at: string | null
|
||||
finished_at: string | null
|
||||
/** 这一题实际问的问题(变量按这次评测的截至时间渲染好了);题目之后改过、又没有作答运行可取时为 null */
|
||||
question?: string | null
|
||||
/** 题目的原文(可能带 {{ schedule.… }} 变量的模板);题目删了为 null */
|
||||
question_template?: string | null
|
||||
/** 这一题的花费:助手(含复核)+ 写作 + 结论裁判,服务端加好的 */
|
||||
cost?: { cost_usd: number | null; unpriced_calls: number }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user