We present Code-QA-Bench, a fully automated framework for synthesizing repository-level code understanding benchmarks that separates genuine code comprehension from documentation recall and pretraining memorization. The framework makes two methodological contributions: (1) an answer-first generation pipeline where a tool-equipped agent explores source code to produce verified gold answers before deriving questions, ensuring every task is grounded in real code structure; and (2) a three-condition experimental design evaluating agents under closed-book (no repository), code-only (documentation removed), and documented (full repository) conditions, with deltas directly quantifying documentation utility and memorization. We generate 528 code-derivable and 100 doc-dependent tasks across 10 Python repositories from SWE-Bench, scored by an LLM judge on accuracy, completeness, and specificity. Experiments on four frontier models reveal that code access is the dominant factor (+0.23 mean gain over closed-book), documentation provides modest additional benefit (+0.071 on doc-dependent tasks), and code-only $\approx$ documented on code-derivable tasks, validating the design. The framework is open-source and applicable to any well-documented Python repository.


翻译:我们提出Code-QA-Bench,一个全自动化的代码理解基准合成框架,用于在仓库级代码理解中分离真正的代码理解与文档回忆及预训练记忆。该框架有两项方法论贡献:(1)答案优先生成管道——配备工具的智能体先探索源代码生成经过验证的黄金答案,再推导问题,确保每项任务都基于真实代码结构;(2)三条件实验设计——在闭卷(无仓库)、仅代码(删除文档)和含文档(完整仓库)三种条件下评估智能体,通过差值直接量化文档效用与记忆效应。我们从SWE-Bench的10个Python仓库中生成528项代码可推导任务和100项文档依赖任务,由LLM裁判基于准确性、完整性和特异性进行评分。对四个前沿模型的实验表明:代码访问是主导因素(比闭卷平均提升+0.23),文档提供适度额外收益(在文档依赖任务上+0.071),且在代码可推导任务上仅代码≈含文档,验证了设计有效性。该框架为开源实现,适用于任何文档完善的Python仓库。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
【干货】深入理解自编码器(附代码实现)
手把手教你入门使用tf-slim库 | 回顾
AI研习社
12+阅读 · 2017年12月9日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
tensorflow系列笔记:流程,概念和代码解析
北京思腾合力科技有限公司
30+阅读 · 2017年11月11日
揭开知识库问答KB-QA的面纱3·信息抽取篇
PaperWeekly
15+阅读 · 2017年8月14日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月18日
VIP会员
最新内容
从采集到决策:美军视角下的战术情报范式重构
专知会员服务
0+阅读 · 22分钟前
《履带式无人地面战车技术发展现状》
专知会员服务
1+阅读 · 今天1:46
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
2+阅读 · 8月1日
美空军如何将人工智能从战场部署至后方机关
专知会员服务
11+阅读 · 7月31日
《史诗怒火行动:多域前瞻评估》49页报告
专知会员服务
7+阅读 · 7月31日
《英国防部:未来空战系统数字化战略》33页
专知会员服务
5+阅读 · 7月31日
《面向自主飞行网络的智能体人工智能架构》
专知会员服务
7+阅读 · 7月31日
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员