Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Can LLMs Track Their Output Length? A Dynamic Feedback Mechanism for Precise Length Regulation

About

Precisely controlling the length of generated text is a common requirement in real-world applications. However, despite significant advancements in following human instructions, Large Language Models (LLMs) still struggle with this task. In this work, we demonstrate that LLMs often fail to accurately measure their response lengths, leading to poor adherence to length constraints. To address this issue, we propose a novel length regulation approach that incorporates dynamic length feedback during generation, enabling adaptive adjustments to meet target lengths. Experiments on summarization and biography tasks show our training-free approach significantly improves precision in achieving target token, word, or sentence counts without compromising quality. Additionally, we demonstrate that further supervised fine-tuning allows our method to generalize effectively to broader text-generation tasks.

Meiman Xiao, Ante Wang, Qingguo Hu, Zhongjian Miao, Huangjun Shen, Longyue Wang, Weihua Luo, Jinsong Su• 2026

Related benchmarks

TaskDatasetResultRank
Biography GenerationBiographies
Token MAE11.22
14
SummarizationGovReport
Token MAE17.4
14
Word-level length-controlled question answeringELI5 (test)
MAE14.1
14
Sentence-level length-controlled question answeringELI5 (test)
MAE0.08
12
Token-level length-controlled question answeringELI5 (test)
MAE10.33
12
Showing 5 of 5 rows

Other info

Follow for update