arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.08561cs.SEcs.CL
收藏

在社会科学中自动化计算可重复性:比较基于提示和基于代理的方法

Automating Computational Reproducibility in Social Science: Comparing Prompt-Based and Agent-Based Approaches

University of Koblenz Koblenz Germany;University of Koblenz

Syed Mehtab Hussain Shah, Frank Hopfgartner, Arnim Bleier

AI总结:

研究探讨了大型语言模型和AI代理能否自动诊断和修复计算失败,通过可控的可重复性测试平台评估两种方法在不同复杂度下的表现,发现基于代理的方法在可重复性上表现更优。

摘要:

重现计算研究通常被认为只是重新运行原始代码和提供的数据。实际上,缺失的包、脆弱的文件路径、版本冲突或不完整的逻辑经常导致分析失败,即使材料已共享。本研究探讨了大型语言模型和AI代理是否能自动化诊断和修复此类失败,使计算结果更容易重现和验证。我们通过一个由五个完全可重现的R基础社会科学研究构建的受控可重复性测试平台来评估这一问题。在清洁的Docker环境中,测试了两种自动化修复流程:第一种是基于提示的,通过结构化提示反复查询语言模型;第二种是基于代理的系统,能够检查文件、修改代码并自主重新运行分析。在基于提示的运行中,重现成功率在31-79%之间,性能受到提示上下文和错误复杂性的影响。复杂情况从额外上下文中获益最大。基于代理的流程表现显著更好,成功率在所有复杂性水平上达到69-96%。这些结果表明,自动化流程,尤其是基于代理的系统,可以显著减少手动工作并提高各种错误类型的可重复性成功率。与以往的基准测试不同,我们的测试平台在受控失败模式下隔离了出版后修复,允许直接比较基于提示和基于代理的方法。

英文摘要:

Reproducing computational research is often assumed to be as simple as rerunning the original code with provided data. In practice, missing packages, fragile file paths, version conflicts, or incomplete logic frequently cause analyses to fail, even when materials are shared. This study investigates whether large language models and AI agents can automate the diagnosis and repair of such failures, making computational results easier to reproduce and verify. We evaluate this using a controlled reproducibility testbed built from five fully reproducible R-based social science studies. Realistic failures were injected, ranging from simple issues to complex missing logic, and two automated repair workflows were tested in clean Docker environments. The first workflow is prompt-based, repeatedly querying language models with structured prompts of varying context, while the second uses agent-based systems that inspect files, modify code, and rerun analyses autonomously. Across prompt-based runs, reproduction success ranged from 31-79 percent, with performance strongly influenced by prompt context and error complexity. Complex cases benefited most from additional context. Agent-based workflows performed substantially better, with success rates of 69-96 percent across all complexity levels. These results suggest that automated workflows, especially agent-based systems, can significantly reduce manual effort and improve reproduction success across diverse error types. Unlike prior benchmarks, our testbed isolates post-publication repair under controlled failure modes, allowing direct comparison of prompt-based and agent-based approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑