Fine-tuning Large Language Models for Improving Factuality in Legal Question Answering

Yinghao Hu, Leilei Gan, Wenyi Xiao, Kun Kuang, Fei Wu
1/11/2025
cs.CL

No official code found. Best implementation: YinghaoHu/LegalHalBench (4 stars, last commit 2025-01-16).

Abstract

Hallucination, or the generation of incorrect or fabricated information, remains a critical challenge in large language models (LLMs), particularly in high-stake domains such as legal question answering (QA). In order to mitigate the hallucination rate in legal QA, we first introduce a benchmark called LegalHalBench and three automatic metrics to evaluate the common hallucinations when LLMs answer legal questions. We then propose a hallucination mitigation method that integrates behavior cloning and a novel Hard Sample-aware Iterative Direct Preference Optimization (HIPO). We conduct extensive real-data experiments to validate the effectiveness of our approach. Our results demonstrate remarkable improvements in various metrics, including the newly proposed Non-Hallucinated Statute Rate, Statute Relevance Rate, Legal Claim Truthfulness, as well as traditional metrics such as METEOR, BERTScore, ROUGE-L, and win rates.

View on arXivView PDF

Code Implementations(1)

40PythonDec 7, 20241 years ago

Similar Papers

Cite this paper

@article{hu2025finetuning,
  title  = {Fine-tuning Large Language Models for Improving Factuality in Legal Question Answering},
  author = {Yinghao Hu and Leilei Gan and Wenyi Xiao and Kun Kuang and Fei Wu},
  year   = {2025},
  eprint = {2501.06521},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.06521v1}
}

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

Discussion