Open Access iconOpen Access

ARTICLE

A Keyword-Guided Training Approach to Large Language Models for Judicial Document Generation

Yi-Ting Peng1,*, Chin-Laung Lei2

1 Department of Computer Science and Information Engineering, Fu Jen Catholic University, New Taipei, 242062, Taiwan
2 Department of Electrical Engineering, National Taiwan University, Taipei, 106319, Taiwan

* Corresponding Author: Yi-Ting Peng. Email: email

(This article belongs to the Special Issue: Emerging Artificial Intelligence Technologies and Applications-II)

Computer Modeling in Engineering & Sciences 2025, 145(3), 3969-3992. https://doi.org/10.32604/cmes.2025.073258

Abstract

The rapid advancement of Large Language Models (LLMs) has enabled their application in diverse professional domains, including law. However, research on automatic judicial document generation remains limited, particularly for Taiwanese courts. This study proposes a keyword-guided training framework that enhances LLMs’ ability to generate structured and semantically coherent judicial decisions in Chinese. The proposed method first employs LLMs to extract representative legal keywords from absolute court judgments. Then it integrates these keywords into Supervised Fine-Tuning (SFT) and Reinforcement Learning with Human Feedback using Proximal Policy Optimization (RLHF-PPO). Experimental evaluations using models such as Chinese Alpaca 7B and TAIDE-LX-7B demonstrate that keyword-guided training significantly improves generation quality, achieving ROUGE-1, ROUGE-2, and ROUGE-L score gains of up to 17%, 16%, and 20%, respectively. The results confirm that the proposed framework effectively aligns generated judgments with human-written legal logic and structural conventions. This research advances domain-adaptive LLM fine-tuning strategies and establishes a technical foundation for AI-assisted judicial document generation in the Taiwanese legal context. This research provides empirical evidence that domain-adaptive LLM fine-tuning strategies can significantly improve performance in complex, structured legal text generation.

Keywords

Legal AI; large language models; natural language processing; generative AI; legal document generation

Cite This Article

APA Style
Peng, Y., Lei, C. (2025). A Keyword-Guided Training Approach to Large Language Models for Judicial Document Generation. Computer Modeling in Engineering & Sciences, 145(3), 3969–3992. https://doi.org/10.32604/cmes.2025.073258
Vancouver Style
Peng Y, Lei C. A Keyword-Guided Training Approach to Large Language Models for Judicial Document Generation. Comput Model Eng Sci. 2025;145(3):3969–3992. https://doi.org/10.32604/cmes.2025.073258
IEEE Style
Y. Peng and C. Lei, “A Keyword-Guided Training Approach to Large Language Models for Judicial Document Generation,” Comput. Model. Eng. Sci., vol. 145, no. 3, pp. 3969–3992, 2025. https://doi.org/10.32604/cmes.2025.073258



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 570

    View

  • 240

    Download

  • 0

    Like

Share Link