challenge-coding-004
Suite: coding
Finish: stop
Prompt
只输出 Python 代码,不要解释。实现 solve(capacity: int, ops: list[str]) -> list[int],模拟 LRU cache。ops 包含 "put key value" 和 "get key"。get 返回 value,不存在返回 -1。put 已存在 key 要更新并变成最近使用。容量为 0 时所有 get 都返回 -1。
Standard Answer / Scoring Expectation
Reference tests:
ops = ['put a 1', 'put b 2', 'get a', 'put c 3', 'get b', 'get a', 'get c']
assert solution.solve(2, ops) == [1, -1, 1, 3]
assert solution.solve(0, ['put a 1', 'get a']) == [-1]
assert solution.solve(1, ['put a 1', 'put a 2', 'get a']) == [2]
Mistake Analysis
Failure type: runtime_type_assumption
题目里的 cache key 是字符串,例如 `a`、`b`、`c`,但模型把 key 强行写成 `int(parts[1])`。测试一遇到 `put a 1` 就在解析 `a` 时抛出 ValueError。根因是模型擅自补了“key 是整数”的类型假设。
Scorer Details
{
"returncode": 1,
"stdout": "",
"stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-4gug7ckv/test_solution.py\", line 4, in <module>\n assert solution.solve(2, ops) == [1, -1, 1, 3]\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/private/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-4gug7ckv/solution.py\", line 18, in solve\n key = int(parts[1])\n ^^^^^^^^^^^^^\nValueError: invalid literal for int() with base 10: 'a'\n"
}
Output
```python
from collections import OrderedDict
def solve(capacity: int, ops: list[str]) -> list[int]:
cache = OrderedDict()
res = []
for op in ops:
parts = op.split()
if parts[0] == "get":
key = int(parts[1])
if capacity == 0:
res.append(-1)
elif key in cache:
cache.move_to_end(key)
res.append(cache[key])
else:
res.append(-1)
elif parts[0] == "put":
key = int(parts[1])
value = int(parts[2])
if capacity == 0:
continue
if key in cache:
cache.move_to_end(key)
else:
if len(cache) == capacity:
cache.popitem(last=False)
cache[key] = value
return res
```
challenge-coding-006
Suite: coding
Finish: stop
Prompt
只输出 Python 代码,不要解释。实现 solve(text: str) -> int,把时长字符串转换成毫秒。支持整数单位 d、h、m、s、ms,可有空格,单位可重复,顺序任意。例如 "1h 30m 500ms"。
Standard Answer / Scoring Expectation
Reference tests:
assert solution.solve('1h 30m 500ms') == 5400500
assert solution.solve('2d 1h 2s') == 176402000
assert solution.solve('100ms 2s 3ms') == 2103
Mistake Analysis
Failure type: code_assertion_failure
模型代码可以运行,但至少一个单元测试断言失败,说明逻辑结果不符合题目要求。
Scorer Details
{
"returncode": 1,
"stdout": "",
"stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-lg5d4gyo/test_solution.py\", line 3, in <module>\n assert solution.solve('1h 30m 500ms') == 5400500\nAssertionError\n"
}
Output
import re
def solve(text: str) -> int:
multipliers = {'d': 86400000, 'h': 3600000, 'm': 60000, 's': 1000, 'ms': 1}
return sum(int(val) * multipliers[unit] for val, unit in re.findall(r'(\d+)\s*(d|h|m|s|ms)', text))
challenge-rag-001
Suite: rag_long_context
Finish: stop
Prompt
只根据资料回答。
资料 A:DracoBench v0.2 的目标是提高区分度,优先增加 coding、debugging、RAG 和 instruction_following 题。
资料 B:DracoBench v0.2 不会默认使用 LLM-as-judge;开放中文写作题只做少量规则校验和人工抽检。
资料 C:v0.2 的 HTML 报告必须展示通过率、成本、reasoning tokens、失败样例和逐题明细。
问题:v0.2 为什么没有把 LLM-as-judge 作为默认判分?
Standard Answer / Scoring Expectation
Required phrases: 人工抽检
At least one from each group: 默认使用 / 默认判分 / 默认采用 / 作为默认判分
Forbidden phrases: 因为成本太高、因为不支持中文
Length guidance (diagnostic only): min=n/a, max=160
Mistake Analysis
Failure type: missing_required_info
问题问的是“为什么 v0.2 不把 LLM-as-judge 作为默认判分”。资料 B 给出的关键依据是:开放中文写作题只做少量规则校验和人工抽检。模型回答 `根据提供的资料,未提及 v0.2 没有把 LLM-as-judge 作为默认判分的原因。` 只是复述“不会默认使用”或说资料未说明,没有说出替代判分方式里的“人工抽检”,因此缺少真正解释原因的证据链。
Scorer Details
{
"missing": [
"人工抽检"
],
"missing_any": [],
"present_forbidden": [],
"char_count": 44,
"length_ok": true,
"length_scored": false
}
Output
根据提供的资料,未提及 v0.2 没有把 LLM-as-judge 作为默认判分的原因。
challenge-coding-014
Suite: coding
Finish: stop
Prompt
只输出 Python 代码,不要解释。实现 solve(nums: list[int]) -> int。返回删除恰好一个元素后,剩余数组的最大连续子数组和。nums 长度至少为 2,可以全为负数。
Standard Answer / Scoring Expectation
Reference tests:
assert solution.solve([1,-2,0,3]) == 4
assert solution.solve([1,-2,-2,3]) == 3
assert solution.solve([-1,-1,-1]) == -1
assert solution.solve([2,1,-2,3]) == 6
Mistake Analysis
Failure type: code_assertion_failure
模型采用了左右最大子数组拼接法,但没有正确覆盖“删除后可以只取一侧子数组”的情况。在 `[1,-2,-2,3]` 中,最佳做法是删除一个 `-2` 后取右侧 `[3]`,答案为 3;模型只算出 2,说明动态规划状态没有完整表达“恰好删除一个元素后的最大连续和”。
Scorer Details
{
"returncode": 1,
"stdout": "",
"stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/4cht1kfj1_j31gdv5w01sgmw0000gn/T/dracobench-code-g2po5qf_/test_solution.py\", line 4, in <module>\n assert solution.solve([1,-2,-2,3]) == 3\nAssertionError\n"
}
Output
```python
def solve(nums: list[int]) -> int:
dp0 = nums[0]
dp1 = 0
ans = float('-inf')
for i in range(1, len(nums)):
dp1 = max(dp0, dp1 + nums[i])
dp0 = max(nums[i], dp0 + nums[i])
ans = max(ans, dp1)
return ans
```
challenge-rag-006
Suite: rag_long_context
Finish: stop
Prompt
只根据资料回答。
资料:一次失败分析显示,模型输出了 key = int(parts[1]),但测试数据里的 key 是字符串 a、b、c。报告认为这是“擅自补类型假设”,不是 token 截断。
问题:这次失败的根因是什么?
Standard Answer / Scoring Expectation
Required phrases: key
At least one from each group: 字符串 / 类型不匹配;整数 / int;类型假设 / 假设 key 为整数 / 假设 key 是整数 / key 为整数类型
Length guidance (diagnostic only): min=n/a, max=120
Mistake Analysis
Failure type: missing_required_info
模型回答没有覆盖评分规则要求的完整证据链。必须出现的关键信息:key;每组至少一个依据表达:字符串 / 类型不匹配;整数 / int。这通常表示答案方向可能对,但没有把资料依据说清楚。
Scorer Details
{
"missing": [
"key"
],
"missing_any": [
[
"字符串",
"类型不匹配"
],
[
"整数",
"int"
]
],
"present_forbidden": [],
"char_count": 18,
"length_ok": true,
"length_scored": false
}
Output
这次失败的根因是“擅自补类型假设”。
challenge-reasoning-017
Suite: reasoning
Finish: stop
Prompt
只回答最终数字:依赖关系为 a 无依赖;b 依赖 a;c 依赖 a;d 依赖 b 和 c;e 依赖 b;f 依赖 d 和 e;g 依赖 a。按可并行执行的拓扑层划分,第二层有几个任务?
Standard Answer / Scoring Expectation
Answer: 3
Mistake Analysis
Failure type: answer_mismatch
模型最终答案 `2` 与标准答案 `3` 不一致。拓扑层应为第一层 `{a}`,第二层 `{b,c,g}`,因为 b、c、g 都只依赖 a。第二层有 3 个任务,模型输出 `2`,通常是漏掉了同样只依赖 a 的 `g`。
Scorer Details
{
"expected": "3",
"actual": "2"
}
Output
2
challenge-rag-009
Suite: rag_long_context
Finish: stop
Prompt
只根据资料回答,不要自行补充。
资料:报告展示 pass_rate、avg_latency_ms、total_cost、reasoning_tokens、失败样例和逐题明细。资料没有包含用户满意度调查,也没有包含模型训练数据来源。
问题:能否根据这份报告判断用户满意度?
Standard Answer / Scoring Expectation
Required phrases: 不能、用户满意度
At least one from each group: 没有包含 / 没有提供 / 资料没有 / 未包含
Forbidden phrases: 可以判断
Length guidance (diagnostic only): min=n/a, max=120
Mistake Analysis
Failure type: missing_required_info
模型结论 `不能。` 方向正确,但回答过短,只给了“不能”而没有说明依据。这类 RAG 题要求同时回答结论和资料中的缺失字段;本题缺少 `用户满意度`,所以读者无法复查模型为什么不能判断。
Scorer Details
{
"missing": [
"用户满意度"
],
"missing_any": [
[
"没有包含",
"没有提供",
"资料没有",
"未包含"
]
],
"present_forbidden": [],
"char_count": 3,
"length_ok": true,
"length_scored": false
}
Output
不能。