IDEAS home Printed from https://ideas.repec.org/p/crm/wpaper/26171.html

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

Author

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 assistants, 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, harmonize, 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

  • Andreas Ferrara, 2026. "A Practitioner’s Guide to Using Large Language Models and Generative AI in Economic History," RFBerlin Discussion Paper Series 26171, ROCKWOOL Foundation Berlin (RFBerlin).
  • Handle: RePEc:crm:wpaper:26171
    as

    Download full text from publisher

    File URL: https://www.rfberlin.com/wp-content/uploads/2026/06/26171-1.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. 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.
    3. 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.
    4. Beach, Brian & Hanlon, W. Walker, 2023. "Historical newspaper data: A researcher’s guide," Explorations in Economic History, Elsevier, vol. 90(C).
    5. Booth, Alison L., 2014. "Wage determination and imperfect competition," Labour Economics, Elsevier, vol. 30(C), pages 53-58.
    6. Ferrara, Andreas & Dippel, Christian & Heblich, Stephan, 2025. "Frontline Leadership: Evidence from American Civil War Captains," CAGE Online Working Paper Series 762, Competitive Advantage in the Global Economy (CAGE).
    7. 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.
    8. 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.
    9. McDonald, Ian M & Solow, Robert M, 1981. "Wage Bargaining and Employment," American Economic Review, American Economic Association, vol. 71(5), pages 896-908, December.
    10. 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.
    11. Stelios Michalopoulos, 2025. "Ethnographic Records, Folklore, and AI," NBER Working Papers 33700, National Bureau of Economic Research, Inc.
    12. 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.
    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. 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.
    15. 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.
    16. Niclas Griesshaber & Jochen Streb, 2025. "Multimodal LLMs for Historical Dataset Construction from Archival Image Scans: German Patents (1877-1918)," Papers 2512.19675, arXiv.org.
    17. 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.
    18. 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.
    19. 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).
    20. 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.
    21. 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.
    22. 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.
    23. 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).
    24. 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).
    25. 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.
    26. 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.
    27. Tommaso Giommoni & Gabriel Loumeau & Marco Tabellini, 2026. "Extractive Taxation and the French Revolution," IRENE Working Papers 26-02, IRENE Institute of Economic Research.
    28. 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.
    29. 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.).
    30. Alan Manning, 2021. "Monopsony in Labor Markets: A Review," ILR Review, Cornell University, ILR School, vol. 74(1), pages 3-26, January.
    31. 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.
    32. 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.
    33. Hemanth Asirvatham & Elliott Mokski & Andrei Shleifer, 2026. "GPT as a Measurement Tool," NBER Working Papers 34834, National Bureau of Economic Research, Inc.
    34. 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.
    35. repec:bla:scotjp:v:46:y:1999:i:4:p:437-57 is not listed on IDEAS
    36. Tommaso Giommoni & Gabriel Loumeau & Marco Tabellini, 2026. "Extractive Taxation and the French Revolution," NBER Working Papers 34816, National Bureau of Economic Research, Inc.
    37. 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.
    38. 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.
    39. 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.
    40. 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.
    41. 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.
    42. Michalopoulos, Stelios, 2025. "Ethnographic Records, Folklore, and AI," CEPR Discussion Papers 20137, Centre for Economic Policy Research.
    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. Bellmann, Lutz & Dustmann, Christian & Fitzenberger, Bernd, 2026. "Collective Bargaining in Germany: Trends and Challenges," IAB-Discussion Paper 202604, Institut für Arbeitsmarkt- und Berufsforschung (IAB), Nürnberg [Institute for Employment Research, Nuremberg, Germany].
    2. 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).
    3. 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.
    4. 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.
    5. 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.
    6. 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.
    7. Daniel Baumgarten & Sybille Lehwald, 2019. "Trade Exposure and the Decline in Collective Bargaining: Evidence from Germany," CESifo Working Paper Series 7754, CESifo.
    8. 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.
    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. 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.
    13. 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.
    14. 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.
    15. 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.
    16. Mertens, Matthias, 2023. "Labor Market Power and Between-Firm Wage (In)Equality," International Journal of Industrial Organization, Elsevier, vol. 91(C).
    17. 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.
    18. 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.
    19. Colja Schneck, 2021. "Trends in Wage Inequality in the Netherlands," De Economist, Springer, vol. 169(3), pages 253-289, August.
    20. 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.

    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:crm:wpaper:26171. 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: Moritz Lubczyk or Matthew Nibloe (email available below). General contact details of provider: https://edirc.repec.org/data/cmucluk.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.