Today's fun GPT+Econ exercise: asking it to develop example code for structural estimation from a description + latex equations. The goal was to get it to give me a function that could estimate an approximate mixed-logit model. Step 1: ask GPT-4 how best to structure my prompt
Step 2: Ask for a verbal algorithm. I wrote this quickly, just directly copying three equations from my JMP, and left in a subscripting typo (the "t" subscript in e_{t} isn't defined)
The code also had a couple of minor bugs (hallucinated an IV regression package in python) but only took 2 minutes to fix and it got it right on the next try. Also constructed e_t in Step 3 correctly even though my subscript was wrong!
Mar 25, 2023 · 7:22 PM UTC
I'm sure these screenshots aren't super informative. Main point-- once we get access to web search and python eval plug-ins, I think a little bit of better prompting would be able to generate a smooth pipeline from an "Estimation" section in a paper into passable initial code.