LawBench: Benchmarking Legal Knowledge of Large Language Models

Zhiwei Fei, Xiaoyu Shen, Dawei Zhu, Fengzhe Zhou, Zhuo Han, Alan Huang, Songyang Zhang, Kai Chen, Zhixin Yin, Zongwen Shen, Jidong Ge, Vincent NgEMNLP 2024

Abstract

As Large Language Models (LLMs) are increasingly integrated into professional domains, evaluating their specialized knowledge becomes critical. LawBench is the first comprehensive evaluation benchmark specifically designed for the Chinese civil law system. It features 20 distinct tasks organized according to Bloom’s cognitive taxonomy, spanning legal knowledge memorization, understanding, and application. Our evaluation of 21 representative LLMs reveals that while general-purpose giants like GPT-4 and Qwen-1.5-72B lead the field, specialized legal LLMs often struggle due to weaker foundation models and a "fine-tuning tax" that degrades their instruction-following capabilities.

Introduction

Most existing legal benchmarks for LLMs, such as LexGLUE or LegalBench, are centered on the common law system prevalent in the US and UK. In these jurisdictions, judicial precedent is the primary source of law. However, the Chinese legal system is rooted in civil law, where the focus is the precise interpretation and application of statutory codes. A model excelling at finding precedents might fail at the "statute-first" reasoning required in a civil law jurisdiction. LawBench addresses this gap by providing a standardized framework to measure an LLM’s legal proficiency within the Chinese context.

Methodology and Task Design

LawBench utilizes a hierarchical framework based on Bloom’s Cognitive Taxonomy to evaluate legal capability across three levels:

  1. Legal Knowledge Memorization: Tests the model's ability to recite specific articles and answer basic legal questions.
  2. Legal Knowledge Understanding: Involves "mid-level" tasks such as document proofreading, entity recognition, and identifying dispute focuses.
  3. Legal Knowledge Application: The most complex level, requiring models to predict charges, calculate criminal damages, and provide legal consultations based on specific scenarios.
LawBench task categorization based on Bloom’s Cognitive Taxonomy

The benchmark aggregates data from prominent sources like CAIL (Challenge of AI in Law) and JEC-QA, while introducing new tasks like Article Recitation (Task 1-1) and Legal Consultation (Task 3-8). Each of the 20 tasks contains 500 test instances to ensure statistical significance.

Evaluation and Results

We evaluated 21 LLMs across three categories: multilingual (e.g., GPT-4, Llama-2), Chinese-oriented (e.g., Qwen, InternLM), and legal-specific (e.g., ChatLaw, LexiLaw). Models were tested in both zero-shot and one-shot prompting environments.

Comparison of Zero-shot and One-shot performance across 21 LLMs

Key Findings

  • Foundation Model Dominance: General-purpose models like Qwen-1.5-72B-Chat and GPT-4 significantly outperformed specialized legal models. This suggests that massive general models possess superior "latent" legal knowledge and reasoning skills compared to smaller specialized models fine-tuned on narrow datasets.
  • The "Fine-tuning Tax": Legal-specific models often exhibited higher abstention rates—failing to provide valid answers. Fine-tuning on narrow legal data can inadvertently damage a model's ability to follow general instructions.
  • Language Specificity: Chinese-oriented models (e.g., InternLM, Baichuan) of the same parameter size (7B-13B) vastly outperformed multilingual models like Llama-2 on Chinese legal tasks, highlighting the importance of language-specific pre-training.
  • Memorization vs. Application: A strong correlation was observed between memorization and application. Models failing to "remember" the law in Task 1-1 almost always failed to "apply" it correctly in complex prediction tasks.

Discussion and Limitations

While GPT-4 is a top performer, it occasionally "hallucinates" statutory content or denies the existence of real Chinese laws, emphasizing the need for Retrieval-Augmented Generation (RAG) in practical legal applications. Furthermore, models generally struggled with numerical reasoning, such as Criminal Damages Calculation (Task 3-7).

Limitations of the current study include potential data leakage from public datasets and the reliance on automated metrics like ROUGE-L, which may not fully capture legal "correctness." Future work will explore using LLMs as judges and incorporating human expert evaluations.

Conclusion

LawBench provides a rigorous framework for assessing LLMs in the context of the Chinese legal system. By categorizing tasks through cognitive levels, it offers deep insights into the strengths and weaknesses of current models. LawBench is now integrated into the OpenCompass platform, serving as a living leaderboard for the legal AI community.

Summary updated

BibTeX
@inproceedings{fei2024lawbench,
  author = {Zhiwei Fei and Xiaoyu Shen and Dawei Zhu and Fengzhe Zhou and Zhuo Han and Alan Huang and Songyang Zhang and Kai Chen and Zhixin Yin and Zongwen Shen and Jidong Ge and Vincent Ng},
  title = {{LawBench: Benchmarking Legal Knowledge of Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.452},
}
Figure