Large Language Model Prompt Chaining for Long Legal Document Classification

Dietrich Trautmann
8/8/2023
cs.CL

No confident code implementation found for this paper.

Abstract

Prompting is used to guide or steer a language model in generating an appropriate response that is consistent with the desired outcome. Chaining is a strategy used to decompose complex tasks into smaller, manageable components. In this study, we utilize prompt chaining for extensive legal document classification tasks, which present difficulties due to their intricate domain-specific language and considerable length. Our approach begins with the creation of a concise summary of the original document, followed by a semantic search for related exemplar texts and their corresponding annotations from a training corpus. Finally, we prompt for a label - based on the task - to assign, by leveraging the in-context learning from the few-shot prompt. We demonstrate that through prompt chaining, we can not only enhance the performance over zero-shot, but also surpass the micro-F1 score achieved by larger models, such as ChatGPT zero-shot, using smaller models.

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. Any repos shown below are weak matches — 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{trautmann2023large,
  title  = {Large Language Model Prompt Chaining for Long Legal Document Classification},
  author = {Dietrich Trautmann},
  year   = {2023},
  eprint = {2308.04138},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.04138v1}
}

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/2308.04138.svg)](https://codeofpaper.com/paper/2308.04138)

Discussion