Hugging Face Daily Papers论文
TestPrism:超越单一参考的测试评估新视角
提出 TestPrism,旨在解决大语言模型代码代理在测试生成中仅依赖单一参考答案进行评估的缺陷。该基准包含来自17个来源的300个测试任务和3000个候选实现(有效与无效各半),并引入联合成功函数作为核心指标,以更全面地衡量测试质量。
这篇是正式发表的长论文,站内提供中文解读,全文请到原文阅读 PDF。
Abstract
Large language model (LLM) coding agents have advanced test generation across diverse programming tasks. However, the common practice of evaluating tests against a single reference solution overlooks alternative valid implementations and can overstate test quality. We introduce TestPrism, comprising 300 test tasks from 17 sources and 3000 candidate implementations, evenly split between valid and invalid solutions. Its primary metric, Joint Success Function, requires the generated tests to fail on the initial program state, accept every valid candidate, and reject every invalid candidate. Across fourteen baseline coding agent configurations, Joint Success Function reaches only 28.00%, whereas single reference success reaches 59.67%. Our analysis reveals missed behaviors, unsupported assertions, and faulty test construction. To address these weaknesses, we introduce TestHelix, which combines heterogeneous synthesis of test and repair pairs with peer cross validation and recursive self improvement (RSI). Across two models, TestHelix improves Joint Success Function by 8.67 to 9.00 percentage points over the native harness comparators in the TestHelix evaluation

