1 option
AI Agents and Prompt Engineering in Econometric Coding / Sebastian Galiani, Federico Ariel López, Raul A. Sosa.
- Format:
- Book
- Author/Creator:
- Galiani, Sebastian.
- Series:
- Working Paper Series (National Bureau of Economic Research) no. w35588.
- NBER working paper series no. w35588
- Language:
- English
- Physical Description:
- 1 online resource: illustrations (black and white);
- Place of Publication:
- Cambridge, Mass. National Bureau of Economic Research 2026.
- Summary:
- We study how large language models write code for econometric analysis. We compare three dimensions of AI-assisted coding: statistical software (Stata, R, or Python), prompting (zero-shot versus few-shot), and the degree of agency, from a chatbot that writes a single script to an agent that executes and revises its own code. On a benchmark of applied econometric and statistical tasks, moving from the chatbot to the constrained agent raises task success from 74 to 96 percent, at about eight additional cents per run. For Claude Sonnet 4.6 and GPT-5.4 through Codex, few-shot prompting improves the chatbot far more than the constrained agent, indicating that prompting and agency act as substitutes. For these models, differences across statistical software are sizeable under the chatbot but largely disappear under the constrained agent.
- Notes:
- August 2026.
- Print version record
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.