Research on the Length Controllability of Chinese Large Language Model Outputs Based on Post-Processing Correction
Large language models often deviate from the target word count when following length constraints such as “generate X words.” Existing studies mostly focus on content quality, while paying relatively less attention to format control, especially the accuracy of length control. To address this issue, this study builds a Chinese text generation benchmark covering 5 topics and 4 word-count levels, and evaluates three representative models: DeepSeek-V3, Tongyi Qianwen (Qwen2.5), and Kimi. Based on this, a lightweight post-processing framework, LAPP (Length-Aware Post-Processing), is proposed. When the output is too long, LAPP uses sentence-level intelligent truncation; when the output is too short, it calls Qwen2.5-1.5B-Instruct for semantics-preserving expansion, and controls the length error within ±10% through iterative correction. The experimental results show that the original average deviation rates of the three models are 11.93%–38.70%, which are reduced to about 5% after LAPP correction, and the pass rate increases from 20%–70% to 85%–100%. The semantic preservation results show an average BERTScore of 0.97 between the corrected and original texts, suggesting that the framework improves length control while largely keeping the original meaning. This study shows that the “rough generation + precise correction” approach is effective for word-count control, and offers a low-cost, transferable way to improve the instruction-following ability of large language models.
Authors
- Yiheng Xu (ORCID: https://orcid.org/0009-0005-7467-8986)
Institutions
- Shanghai University (CN)
Publication Details
- Journal
- Computers and artificial intelligence.
- Published
- 2026-10-29
- DOI
- https://doi.org/10.70267/cai.v3n5.3339
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 0.00