Large language models (LLMs) are increasingly used to automate data analysis through executable code generation. Yet, data science tasks often admit multiple statistically valid solutions, e.g. different modeling strategies, making it critical to understand the reasoning behind analyses, not just their outcomes. While manual review of LLM-generated code can help ensure statistical soundness, it is labor-intensive and requires expertise. A more scalable approach is to evaluate the underlying workflows-the logical plans guiding code generation. However, it remains unclear how to assess whether an LLM-generated workflow supports reproducible implementations. To address this, we present AIRepr, an Analyst-Inspector framework for automatically evaluating and improving the reproducibility of LLM-generated data analysis workflows. Our framework is grounded in statistical principles and supports scalable, automated assessment. We introduce two novel reproducibility-enhancing prompting strategies and benchmark them against standard prompting across 15 analyst-inspector LLM pairs and 1,032 tasks from three public benchmarks. Our findings show that workflows with higher reproducibility also yield more accurate analyses, and that reproducibility-enhancing prompts substantially improve both metrics. This work provides a foundation for transparent, reliable, and efficient human-AI collaboration in data science. Our code is publicly available.


翻译:大型语言模型(LLMs)正越来越多地通过生成可执行代码来自动化数据分析。然而,数据科学任务通常允许多种统计上有效的解决方案,例如不同的建模策略,这使得理解分析背后的推理过程而不仅仅是其结果变得至关重要。虽然手动审查LLM生成的代码有助于确保统计稳健性,但这种方法劳动密集且需要专业知识。一种更具可扩展性的方法是评估底层工作流——即指导代码生成的逻辑计划。然而,如何评估LLM生成的工作流是否支持可复现的实现仍不明确。为此,我们提出了AIRepr,一种用于自动评估和改进LLM生成的数据分析工作流可复现性的分析师-检查员框架。我们的框架基于统计原理,支持可扩展的自动化评估。我们引入了两种新颖的增强可复现性提示策略,并在15对分析师-检查员LLM组合以及来自三个公共基准的1,032个任务上,将其与标准提示策略进行了基准测试。我们的研究结果表明,具有更高可复现性的工作流也能产生更准确的分析,并且增强可复现性的提示策略能显著改善这两个指标。这项工作为数据科学中透明、可靠和高效的人机协作奠定了基础。我们的代码已公开可用。

0
下载
关闭预览

相关内容

专知会员服务
30+阅读 · 2020年9月18日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员