Skip to main content
QUICK REVIEW

[Paper Review] Legal Prompting: Teaching a Language Model to Think Like a Lawyer

Fangyi Yu, Lee Quartey|arXiv (Cornell University)|Dec 2, 2022
Artificial Intelligence in LawSocial Sciences34 citations
TL;DR

The paper evaluates zero-shot, few-shot, and fine-tuning prompts for legal reasoning using GPT-3 on COLIEE tasks, finding that legal-reasoning prompts (e.g., IRAC-based) yield the best results, with significant improvements over prior COLIEE winners.

ABSTRACT

Large language models that are capable of zero or few-shot prompting approaches have given rise to the new research area of prompt engineering. Recent advances showed that for example Chain-of-Thought (CoT) prompts can improve arithmetic or common sense tasks significantly. We explore how such approaches fare with legal reasoning tasks and take the COLIEE entailment task based on the Japanese Bar exam for testing zero-shot/few-shot and fine-tuning approaches. Our findings show that while CoT prompting and fine-tuning with explanations approaches show improvements, the best results are produced by prompts that are derived from specific legal reasoning techniques such as IRAC (Issue, Rule, Application, Conclusion). Based on our experiments we improve the 2021 best result from 0.7037 accuracy to 0.8148 accuracy and beat the 2022 best system of 0.6789 accuracy with an accuracy of 0.7431.

Motivation & Objective

  • Investigate how prompting techniques affect legal reasoning tasks in large language models.
  • Assess zero-shot, few-shot, and fine-tuning approaches using COLIEE 2021 and 2022 data.
  • Determine which prompt designs best capture standard legal reasoning (e.g., IRAC) to improve accuracy.
  • Compare prompt-based methods to COLIEE state-of-the-art results and analyze consistency across years.

Proposed method

  • Use GPT-3 (text-davinci-002) to perform COLIEE Task 4 (entailment) on 2021 and 2022 test sets.
  • Evaluate zero-shot prompts with and without domain-specific legal reasoning prompts.
  • Evaluate few-shot prompts with 1, 3, and 8 demonstrations from a bar-exam blog dataset.
  • Fine-tune GPT-3 with binary labels and with/without explanations.
  • Test zero-shot with chain-of-thought prompts (ZS-CoT) and assess two-stage reasoning prompts.
  • Apply legal-reasoning prompts (LR prompts) inspired by IRAC-style schemas (e.g., TRRAC, IRREAC, IRRAC) to ZS settings.
  • Compare fine-tuning with pseudo-explanations and GPT-3-generated explanations to instrucitve prompts without explanations.

Experimental results

Research questions

  • RQ1How do zero-shot, few-shot, and fine-tuning prompts compare in enabling GPT-3 to perform legal entailment on COLIEE data?
  • RQ2Which legal-reasoning prompt structures (e.g., IRAC variants) maximize accuracy on COLIEE 2021 and 2022?
  • RQ3Do explanations or rationales during fine-tuning consistently improve performance across years?
  • RQ4What is the relative robustness of prompt-based methods across different COLIEE years?

Key findings

  • Zero-shot legal-reasoning prompts (e.g., TRRAC) achieve substantial gains, notably 0.8148 accuracy on 2021 COLIEE, surpassing the 2021 winner by 0.815 points.
  • IRREAC and IRRAC approaches reach 0.7156 accuracy on 2022 COLIEE, beating the 2022 winner by 0.041 points.
  • Eight-shot few-shot prompting yields best overall performance on 2022 data with 0.7431 accuracy, surpassing the 2022 winner (0.6789) by 0.0642 points.
  • Fine-tuning with instructive prompts outperforms other fine-tuning configurations by up to ~24% relative gain on the 2021 test set.
  • GPT-3 can generate explanations across prompting modes, but fine-tuning with instructive prompts without external explanations often performs best.
  • Few-shot approaches provide more consistent gains across both years than zero-shot prompts alone, which show year-specific superiority.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.