Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Lawma: The Power of Specialization for Legal Tasks (2407.16615v1)

Published 23 Jul 2024 in cs.CL, cs.AI, and cs.LG

Abstract: Annotation and classification of legal text are central components of empirical legal research. Traditionally, these tasks are often delegated to trained research assistants. Motivated by the advances in LLMing, empirical legal scholars are increasingly turning to prompting commercial models, hoping that it will alleviate the significant cost of human annotation. Despite growing use, our understanding of how to best utilize LLMs for legal tasks remains limited. We conduct a comprehensive study of 260 legal text classification tasks, nearly all new to the machine learning community. Starting from GPT-4 as a baseline, we show that it has non-trivial but highly varied zero-shot accuracy, often exhibiting performance that may be insufficient for legal work. We then demonstrate that a lightly fine-tuned Llama 3 model vastly outperforms GPT-4 on almost all tasks, typically by double-digit percentage points. We find that larger models respond better to fine-tuning than smaller models. A few tens to hundreds of examples suffice to achieve high classification accuracy. Notably, we can fine-tune a single model on all 260 tasks simultaneously at a small loss in accuracy relative to having a separate model for each task. Our work points to a viable alternative to the predominant practice of prompting commercial models. For concrete legal tasks with some available labeled data, researchers are better off using a fine-tuned open-source model.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Ricardo Dominguez-Olmedo (4 papers)
  2. Vedant Nanda (16 papers)
  3. Rediet Abebe (25 papers)
  4. Stefan Bechtold (3 papers)
  5. Christoph Engel (2 papers)
  6. Jens Frankenreiter (4 papers)
  7. Krishna Gummadi (4 papers)
  8. Moritz Hardt (79 papers)
  9. Michael Livermore (2 papers)
Citations (3)
X Twitter Logo Streamline Icon: https://streamlinehq.com

Tweets