IDEAS home Printed from https://ideas.repec.org/p/cge/wacage/810.html

A Practitioner's Guide to Using Large Language Models and Generative AI in Economic History

Author

Listed:
  • Ferrara, Andreas

    (University of Pittsburgh, Department of Economics, and NBER)

Abstract

Large language models (LLMs) are lowering the entry barriers to working with exciting data sources that used to require strong data science skills, such as handwritten ledgers, text, images, or sound recordings. This guide provides an introduction for researchers who are new to LLMs. It sets out a step-by-step workflow for turning a research idea into working code and data, and describes the four main ways of interacting with an LLM: the chat window, editor-integrated assis tants, agentic coding tools, and the API. It then works through the decisions a practitioner meets in sequence, beginning with whether an LLM is the right tool and whether the data are allowed to be sent to one, then how to select models, write prompts, manage context limits, and control costs, and finally how to validate, reproduce, document, and correct LLM-generated measures in regression settings. A review of recent research shows how these tools already extract, link, har monize, and classify historical data at scale. Four worked examples with replication files illustrate the use of LLMs. They classify emotions in paintings, link census records without names, measure newspaper salience and sentiment around the 1882 Chinese Exclusion Act, and score the emotional delivery of Franklin D. Roosevelt's wartime speeches. The guide also condenses the workflow, the best-practice recommendations, and the preparation of replication packages into summary tables and checklists to aid applied economists.

Suggested Citation

  • Ferrara, Andreas, 2026. "A Practitioner's Guide to Using Large Language Models and Generative AI in Economic History," CAGE Online Working Paper Series 810, Competitive Advantage in the Global Economy (CAGE).
  • Handle: RePEc:cge:wacage:810
    as

    Download full text from publisher

    File URL: https://warwick.ac.uk/fac/soc/economics/research/centres/cage/manage/publications/wp810.2026.pdf
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Antonczyk, Dirk & Fitzenberger, Bernd & Sommerfeld, Katrin, 2010. "Rising wage inequality, the decline of collective bargaining, and the gender wage gap," Labour Economics, Elsevier, vol. 17(5), pages 835-847, October.
    2. Christian Dustmann & Bernd Fitzenberger & Uta Sch?nberg & Alexandra Spitz-Oener, 2014. "From Sick Man of Europe to Economic Superstar: Germany's Resurgent Economy," Journal of Economic Perspectives, American Economic Association, vol. 28(1), pages 167-188, Winter.
    3. Christian Møller Dahl & Torben Johansen & Christian Vedel, 2024. "Breaking the HISCO Barrier: Automatic Occupational Standardization with OccCANINE," Working Papers 0255, European Historical Economics Society (EHES).
    4. Verónica Bäcker-Peral & Vitaly Meursault & Christopher Severen, 2025. "Can LLMs Credibly Transform the Creation of Panel Data from Diverse Historical Tables," Working Papers 25-28, Federal Reserve Bank of Philadelphia.
    5. Eric Chyn & Kareem Haggag & Christian Maruthiah, 2025. "Ideology in Government: Evidence from the Office of Indian Affairs and the Assimilation Era," NBER Working Papers 34415, National Bureau of Economic Research, Inc.
    6. Stelios Michalopoulos, 2025. "Ethnographic Records, Folklore, and AI," NBER Working Papers 33700, National Bureau of Economic Research, Inc.
    7. Simon Jäger & Shakked Noy & Benjamin Schoefer, 2022. "The German Model of Industrial Relations: Balancing Flexibility and Collective Action," Journal of Economic Perspectives, American Economic Association, vol. 36(4), pages 53-80, Fall.
    8. Bernd Fitzenberger & Karsten Kohn & Alexander C. Lembcke, 2013. "Union Density and Varieties of Coverage: The Anatomy of Union Wage Effects in Germany," ILR Review, Cornell University, ILR School, vol. 66(1), pages 169-197, January.
    9. Tommaso Giommoni & Gabriel Loumeau & Marco Tabellini, 2026. "Extractive Taxation and the French Revolution," NBER Working Papers 34816, National Bureau of Economic Research, Inc.
    10. Bernd Fitzenberger & Wolfgang Franz, 1999. "Industry‐Level Wage Bargaining: A Partial Rehabilitation—The German Experience," Scottish Journal of Political Economy, Scottish Economic Society, vol. 46(4), pages 437-457, September.
    11. Santiago Afonso & Sebastian Galiani & Ramiro H. Gálvez & Raul A. Sosa, 2026. "Deep Research on a Loop: Using AI Agents to Construct Economic Datasets," NBER Working Papers 35188, National Bureau of Economic Research, Inc.
    12. Tommaso Giommoni & Gabriel Loumeau & Marco Tabellini, 2026. "Extractive Taxation and the French Revolution," IRENE Working Papers 26-02, IRENE Institute of Economic Research.
    13. Michelle Yin & Hoa Vu & Claudia Persico, 2026. "How (un)Stable Are LLM Occupational Exposure Scores? Evidence from Multi-Model Replication," NBER Working Papers 35110, National Bureau of Economic Research, Inc.
    14. repec:bla:scotjp:v:46:y:1999:i:4:p:437-57 is not listed on IDEAS
    15. Eric Chyn & Kareem Haggag & Bryan A. Stuart, 2024. "Inequality and Racial Backlash: Evidence from the Reconstruction Era and the Freedmen’s Bureau," NBER Working Papers 32314, National Bureau of Economic Research, Inc.
    16. Gorin, Clement & Heblich, Stephan & Zylberberg, Yanos, 2025. "State of the Art: Economic Development Through the Lens of Paintings," CEPR Discussion Papers 20416, Centre for Economic Policy Research.
    17. Ran Abramitzky & Leah Platt Boustan & Adam Storeygard, 2025. "New Data and Insights in Regional and Urban Economics," NBER Working Papers 33561, National Bureau of Economic Research, Inc.
    18. Leland D. Crane & Akhil Karra & Paul E. Soto, 2025. "Total Recall? Evaluating the Macroeconomic Knowledge of Large Language Models," Finance and Economics Discussion Series 2025-044, Board of Governors of the Federal Reserve System (U.S.).
    19. Hui Chen & Antoine Didisheim & Luciano A. Somoza, 2026. "Out of the Black Box: Uncertainty Quantification for LLMs via Conditional Probabilities," NBER Working Papers 34965, National Bureau of Economic Research, Inc.
    20. Christian Dustmann & Uta Schönberg, 2009. "Training and Union Wages," The Review of Economics and Statistics, MIT Press, vol. 91(2), pages 363-376, May.
    21. Daron Acemoglu & Jorn-Steffen Pischke, 1999. "The Structure of Wages and Investment in General Training," Journal of Political Economy, University of Chicago Press, vol. 107(3), pages 539-572, June.
    22. Fitzenberger, Bernd & Franz, Wolfgang, 1999. "Industry-level wage bargaining : a partial rehabilitation ; the German experience," ZEW Discussion Papers 99-33, ZEW - Leibniz Centre for European Economic Research.
    23. Simon Jäger & Suresh Naidu & Benjamin Schoefer, 2024. "Collective Bargaining, Unions, and the Wage Structure: An International Perspective," NBER Working Papers 33267, National Bureau of Economic Research, Inc.
    24. Beach, Brian & Hanlon, W. Walker, 2023. "Historical newspaper data: A researcher’s guide," Explorations in Economic History, Elsevier, vol. 90(C).
    25. Jesús Fernández‐Villaverde & Isaiah Hull, 2026. "Dynamic programming in economics on a quantum annealer," Quantitative Economics, Econometric Society, vol. 17(1), pages 1-37, January.
    26. Booth, Alison L., 2014. "Wage determination and imperfect competition," Labour Economics, Elsevier, vol. 30(C), pages 53-58.
    27. Bernd Fitzenberger & Karsten Kohn & Qingwei Wang, 2011. "The erosion of union membership in Germany: determinants, densities, decompositions," Journal of Population Economics, Springer;European Society for Population Economics, vol. 24(1), pages 141-165, January.
    28. Lutz Bellmann & Mario Bossler & Hans-Dieter Gerner & Olaf Hübler, 2017. "Training and minimum wages: first evidence from the introduction of the minimum wage in Germany," IZA Journal of Labor Economics, Springer;Forschungsinstitut zur Zukunft der Arbeit GmbH (IZA), vol. 6(1), pages 1-22, December.
    29. Alan Manning, 2021. "Monopsony in Labor Markets: A Review," ILR Review, Cornell University, ILR School, vol. 74(1), pages 3-26, January.
    30. Ohler, Johann, 2026. "Selection and evolutionary growth in pre-industrial Germany," Economic History Working Papers 137404, London School of Economics and Political Science, Department of Economic History.
    31. Dahl, Christian M. & Johansen, Torben S.D. & Sørensen, Emil N. & Wittrock, Simon, 2023. "HANA: A handwritten name database for offline handwritten text recognition," Explorations in Economic History, Elsevier, vol. 87(C).
    32. Andreas Ferrara & Christian Dippel & Stephan Heblich, 2025. "Frontline Leadership: Evidence from American Civil War Captains," NBER Working Papers 34057, National Bureau of Economic Research, Inc.
    33. Niclas Griesshaber & Jochen Streb, 2025. "Multimodal LLMs for Historical Dataset Construction from Archival Image Scans: German Patents (1877-1918)," Papers 2512.19675, arXiv.org.
    34. Christian Dustmann & Johannes Ludsteck & Uta Schönberg, 2009. "Revisiting the German Wage Structure," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 124(2), pages 843-881.
    35. Wolfgang Keller & Carol H. Shiue & Sen Yan, 2024. "Mining Chinese Historical Sources At Scale: A Machine Learning-Approach to Qing State Capacity," NBER Working Papers 32982, National Bureau of Economic Research, Inc.
    36. Howes, Cooper & Dordal i Carreras, Marc & Coibion, Olivier & Gorodnichenko, Yuriy, 2025. "How Monetary Policy Is Made: Lessons from Historical FOMC Discussions," CEPR Discussion Papers 20968, Centre for Economic Policy Research.
    37. Price, Joseph & Buckles, Kasey & Van Leeuwen, Jacob & Riley, Isaac, 2021. "Combining family history and machine learning to link historical records: The Census Tree data set," Explorations in Economic History, Elsevier, vol. 80(C).
    38. Card, David, 1996. "The Effect of Unions on the Structure of Wages: A Longitudinal Analysis," Econometrica, Econometric Society, vol. 64(4), pages 957-979, July.
    39. Keller, Wolfgang & Shiue, Carol & Yan, Sen, 2024. "Mining Chinese Historical Sources At Scale: A Machine Learning-Approach to Qing State Capacity," CEPR Discussion Papers 19517, Centre for Economic Policy Research.
    40. Michalopoulos, Stelios, 2025. "Ethnographic Records, Folklore, and AI," CEPR Discussion Papers 20137, Centre for Economic Policy Research.
    41. Hemanth Asirvatham & Elliott Mokski & Andrei Shleifer, 2026. "GPT as a Measurement Tool," NBER Working Papers 34834, National Bureau of Economic Research, Inc.
    42. McDonald, Ian M & Solow, Robert M, 1981. "Wage Bargaining and Employment," American Economic Review, American Economic Association, vol. 71(5), pages 896-908, December.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Brändle, Tobias, 2024. "Unions and Collective Bargaining: The Influence on Wages, Employment and Firm Survival," GLO Discussion Paper Series 1457, Global Labor Organization (GLO).
    2. Fitzenberger Bernd & Sommerfeld Katrin, 2016. "A Sequential Decomposition of the Drop in Collective Bargaining Coverage," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 236(1), pages 37-69, February.
    3. Addison, John T. & Kölling, Arnd & Teixeira, Paulino, 2014. "Changes in Bargaining Status and Intra-Plant Wage Dispersion in Germany: A Case of (Almost) Plus Ça Change?," IZA Discussion Papers 8359, IZA Network @ LISER.
    4. Daniel Baumgarten & Sybille Lehwald, 2019. "Trade Exposure and the Decline in Collective Bargaining: Evidence from Germany," CESifo Working Paper Series 7754, CESifo.
    5. Biewen, Martin & Seckler, Matthias, 2017. "Changes in the German Wage Structure: Unions, Internationalization, Tasks, Firms, and Worker Characteristics," IZA Discussion Papers 10763, IZA Network @ LISER.
    6. Martin Biewen & Matthias Seckler, 2019. "Unions, Internationalization, Tasks, Firms, and Worker Characteristics: A Detailed Decomposition Analysis of Rising Wage Inequality in Germany," The Journal of Economic Inequality, Springer;Society for the Study of Economic Inequality, vol. 17(4), pages 461-498, December.
    7. Christian Dustmann & Bernd Fitzenberger & Uta Schönberg & Alexandra Spitz‑Oener, 2014. "Od chorego człowieka Europy do ekonomicznej megagwiazdy: odradzająca się gospodarka Niemiec," Gospodarka Narodowa. The Polish Journal of Economics, Warsaw School of Economics, issue 6, pages 149-172.
    8. Uwe Jirjahn, 2015. "Research on Trade Unions and Collective Bargaining in Germany: The Contribution of Labor Economics," Research Papers in Economics 2015-10, University of Trier, Department of Economics.
    9. John Addison & Paulino Teixeira & Katalin Evers & Lutz Bellmann, 2014. "Indicative and Updated Estimates of the Collective Bargaining Premium in Germany," Industrial Relations: A Journal of Economy and Society, Wiley Blackwell, vol. 53(1), pages 125-156, January.
    10. Daniel Baumgarten & Gabriel Felbermayr & Sybille Lehwald, 2020. "Dissecting Between‐Plant and Within‐Plant Wage Dispersion: Evidence from Germany," Industrial Relations: A Journal of Economy and Society, Wiley Blackwell, vol. 59(1), pages 85-122, January.
    11. Bernd Fitzenberger & Arnim Seidlitz, 2020. "Die Lohnungleichheit von Vollzeitbeschäftigten in Deutschland: Rückblick und Überblick [Wage inequality among the full-time employed in Germany revisited: An overview]," AStA Wirtschafts- und Sozialstatistisches Archiv, Springer;Deutsche Statistische Gesellschaft - German Statistical Society, vol. 14(2), pages 125-143, July.
    12. Bernd Fitzenberger & Karsten Kohn & Qingwei Wang, 2011. "The erosion of union membership in Germany: determinants, densities, decompositions," Journal of Population Economics, Springer;European Society for Population Economics, vol. 24(1), pages 141-165, January.
    13. Uwe Jirjahn, 2013. "Der Beitrag der Arbeitsmarktökonomik zur Erforschung von Gewerkschaften und Tarifvertragsbeziehungen in Deutschland," Research Papers in Economics 2013-03, University of Trier, Department of Economics.
    14. Colja Schneck, 2021. "Trends in Wage Inequality in the Netherlands," De Economist, Springer, vol. 169(3), pages 253-289, August.
    15. Christian Dustmann & Bernd Fitzenberger & Uta Sch?nberg & Alexandra Spitz-Oener, 2014. "From Sick Man of Europe to Economic Superstar: Germany's Resurgent Economy," Journal of Economic Perspectives, American Economic Association, vol. 28(1), pages 167-188, Winter.
    16. Aaron J. Sojourner & Brigham R. Frandsen & Robert J. Town & David C. Grabowski & Min M. Chen, 2015. "Impacts of Unionization on Quality and Productivity," ILR Review, Cornell University, ILR School, vol. 68(4), pages 771-806, August.
    17. Jens Mohrenweiser & Thomas Zwick & Uschi Backes‐Gellner, 2019. "Poaching and Firm‐Sponsored Training," British Journal of Industrial Relations, London School of Economics, vol. 57(1), pages 143-181, March.
    18. Ben Kriechel & Samuel Muehlemann & Harald Pfeifer & Miriam Schuette, 2011. "Works councils, collective bargaining and apprenticeship training," Economics of Education Working Paper Series 0057, University of Zurich, Department of Business Administration (IBW).
    19. Ben Kriechel & Samuel Muehlemann & Harald Pfeifer & Miriam Schütte, 2014. "Works Councils, Collective Bargaining, and Apprenticeship Training – Evidence From German Firms," Industrial Relations: A Journal of Economy and Society, Wiley Blackwell, vol. 53(2), pages 199-222, April.
    20. Fitzenberger, Bernd & Seidlitz, Arnim, 2020. "Die Lohnungleichheit von Vollzeitbeschäftigten in Deutschland : Rückblick und Überblick (Wage inequality among the full-time employed in Germany revisited : An overview)," IAB-Discussion Paper 202019, Institut für Arbeitsmarkt- und Berufsforschung (IAB), Nürnberg [Institute for Employment Research, Nuremberg, Germany].

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;

    JEL classification:

    • C8 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs
    • N0 - Economic History - - General
    • C55 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Large Data Sets: Modeling and Analysis

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:cge:wacage:810. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Jane Snape (email available below). General contact details of provider: https://edirc.repec.org/data/dewaruk.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.