IDEAS home Printed from https://ideas.repec.org/a/cup/pscirm/v13y2025i2p264-281_2.html

How to train your stochastic parrot: large language models for political texts

Author

Listed:
  • Ornstein, Joseph T.
  • Blasingame, Elise N.
  • Truscott, Jake S.

Abstract

We demonstrate how few-shot prompts to large language models (LLMs) can be effectively applied to a wide range of text-as-data tasks in political science—including sentiment analysis, document scaling, and topic modeling. In a series of pre-registered analyses, this approach outperforms conventional supervised learning methods without the need for extensive data pre-processing or large sets of labeled training data. Performance is comparable to expert and crowd-coding methods at a fraction of the cost. We propose a set of best practices for adapting these models to social science measurement tasks, and develop an open-source software package for researchers.

Suggested Citation

  • Ornstein, Joseph T. & Blasingame, Elise N. & Truscott, Jake S., 2025. "How to train your stochastic parrot: large language models for political texts," Political Science Research and Methods, Cambridge University Press, vol. 13(2), pages 264-281, April.
  • Handle: RePEc:cup:pscirm:v:13:y:2025:i:2:p:264-281_2
    as

    Download full text from publisher

    File URL: https://www.cambridge.org/core/product/identifier/S2049847024000645/type/journal_article
    File Function: link to article abstract page
    Download Restriction: no
    ---><---

    More about this item

    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:cup:pscirm:v:13:y:2025:i:2:p:264-281_2. 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.

    We have no bibliographic references for this item. You can help adding them by using 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: Kirk Stebbing (email available below). General contact details of provider: https://www.cambridge.org/ram .

    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.