Open-Source LLMs for Text Annotation: A Practical Guide for Model Setting and Fine-Tuning

Meysam Alizadeh, Maël Kubli, Zeynab Samei, Shirin Dehghani, Mohammadmasiha Zahedivafa +3 more
7/5/2023
cs.CL

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

This paper studies the performance of open-source Large Language Models (LLMs) in text classification tasks typical for political science research. By examining tasks like stance, topic, and relevance classification, we aim to guide scholars in making informed decisions about their use of LLMs for text analysis. Specifically, we conduct an assessment of both zero-shot and fine-tuned LLMs across a range of text annotation tasks using news articles and tweets datasets. Our analysis shows that fine-tuning improves the performance of open-source LLMs, allowing them to match or even surpass zero-shot GPT-3.5 and GPT-4, though still lagging behind fine-tuned GPT-3.5. We further establish that fine-tuning is preferable to few-shot training with a relatively modest quantity of annotated text. Our findings show that fine-tuned open-source LLMs can be effectively deployed in a broad spectrum of text annotation applications. We provide a Python notebook facilitating the application of LLMs in text annotation for other researchers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{alizadeh2023opensource,
  title  = {Open-Source LLMs for Text Annotation: A Practical Guide for Model Setting and Fine-Tuning},
  author = {Meysam Alizadeh and Maël Kubli and Zeynab Samei and Shirin Dehghani and Mohammadmasiha Zahedivafa and Juan Diego Bermeo and Maria Korobeynikova and Fabrizio Gilardi},
  year   = {2023},
  eprint = {2307.02179},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.02179v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.02179.svg)](https://codeofpaper.com/paper/2307.02179)

Discussion