Econ Papers Daily / 研究评论

让AI代理编写计量经济学代码

Letting AI agents write econometric code

Sebastian Galiani, Federico A. López, Raul A. Sosa

来源
VoxEU / CEPR Columns · 研究评论
本站首次发现
2026-10-18 08:08
日期信息
官方在线 2026-10-18 · 来源:RSS
主题
暂无主题标签

摘要

Large language models increasingly write the code behind empirical research. This column reports a benchmark of 40 econometric tasks in Stata, R, and Python. For each task, two leading models write a script, as a chatbot that never runs it and as an agent that runs and revises it. Letting the models run their code raises the share of correct results from 79% to 97% and makes the prompt and the software matter far less. The failures that remain under the agent come from scripts that run without errors but return wrong numbers, and detecting them is still the researcher’s work.

中文摘要

大型语言模型日益承担实证研究背后的代码编写工作。本专栏报告了一项涵盖Stata、R和Python中40项计量经济学任务的基准测试。对于每项任务,两个领先模型分别以两种方式编写脚本:一是作为从不运行脚本的聊天机器人,二是作为运行并修订脚本的智能体。让模型运行其代码,可将正确结果的比例从79%提升至97%,并使提示词和软件的影响大幅降低。智能体模式下仍存在的失败,源于脚本运行无报错但返回错误数字,而检测此类问题仍是研究者的工作。