LawGPT: Knowledge-Guided Data Generation and Its Application to Legal LLM

Zhi Zhou, Kun-Yang Yu, Shi-Yu Tian, Xiao-Wen Yang, Jiang-Xin Shi +4 more
2/10/2025
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large language models (LLMs), both proprietary and open-source, have demonstrated remarkable capabilities across various natural language processing tasks. However, they face significant limitations in legal reasoning tasks. Proprietary models introduce data privacy risks and high inference costs, while open-source models underperform due to insufficient legal domain training data. To address these limitations, we study data generation for legal reasoning to improve the legal reasoning performance of open-source LLMs with the help of proprietary LLMs. This is challenging due to the lack of legal knowledge in proprietary LLMs and the difficulty in verifying the generated data. We propose KgDG, a knowledge-guided data generation framework for legal reasoning. Our framework enables leveraging legal knowledge to enhance generation diversity and introduces a refinement and verification process to ensure the quality of generated data. Moreover, we expand the generated dataset to further enhance the LLM reasoning capabilities. Using KgDG, we create a synthetic legal reasoning dataset containing 50K high-quality examples. Our trained model LawGPT outperforms existing legal-specific LLMs and achieves performance comparable to proprietary LLMs, demonstrating the effectiveness of KgDG and LawGPT. Our code and resources is publicly available at https://github.com/LAMDASZ-ML/Knowledge-Guide-Data-Generation .

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. 1 weaker match is 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{zhou2025lawgpt,
  title  = {LawGPT: Knowledge-Guided Data Generation and Its Application to Legal LLM},
  author = {Zhi Zhou and Kun-Yang Yu and Shi-Yu Tian and Xiao-Wen Yang and Jiang-Xin Shi and Pengxiao Song and Yi-Xuan Jin and Lan-Zhe Guo and Yu-Feng Li},
  year   = {2025},
  eprint = {2502.06572},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.06572v2}
}

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

Discussion