EMNLP Findings2024
Ruler: A Model-Agnostic Method to Control Generated Length for Large Language Models
Jiaming Li, Lei Zhang, Yunshui Li, Ziqiang Liu, Yuelin Bai, Run Luo, Longze Chen, Min Yang
摘要
The instruction-following ability of large language models enables humans to interact with AI agents in a natural way. However, when required to generate responses of a specific length, large language models often struggle to meet users' needs due to their inherent difficulty in accurately perceiving numerical constraints. To explore the ability of large language models to control the length of generated responses, we propose the Target Length Generation Task (TLG) and design two metrics, Precise Match (PM) and Flexible Match (FM) to evaluate the model's performance in adhering to specified response lengths. Furthermore, we introduce a novel, model-agnostic approach called RULER, which employs Meta Length Tokens (MLTs) to enhance the instruction-following ability of large language models under length-constrained instructions. Specifically, RULER equips LLMs with the ability to generate responses of a specified length based on length constraints within the instructions. Moreover, RULER can automatically generate appropriate MLT when length constraints are not explicitly provided, demonstrating excellent versatility and generalization. Comprehensive experiments show the effectiveness of RULER across different LLMs on Target Length Generation Task, e.g., at All Level 27.97 average gain on PM, 29.57 average gain on FM. In addition, we conduct extensive ablation experiments to further substantiate the efficacy and generalization of RULER. Our code and data is available at https://github.com/Geaming2002/Ruler.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Models 引用了 Length Controlled Generation for Black-box LLMs
- LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Models 引用了 Measuring Massive Multitask Language Understanding
- LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Models 引用了 Language Models are Few-Shot Learners
- LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Models 引用了 From Sub-Ability Diagnosis to Human-Aligned Generation: Bridging the Gap for Text Length Control via MarkerGen
- Length Controlled Generation for Black-box LLMs 引用了 Language Models are Few-Shot Learners
- Length Controlled Generation for Black-box LLMs 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Measuring Massive Multitask Language Understanding 引用了 Language Models are Few-Shot Learners
- TruthfulQA: Measuring How Models Mimic Human Falsehoods 引用了 Measuring Massive Multitask Language Understanding
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- From Sub-Ability Diagnosis to Human-Aligned Generation: Bridging the Gap for Text Length Control via MarkerGen 引用了 TruthfulQA: Measuring How Models Mimic Human Falsehoods
- Calibrate Before Use: Improving Few-shot Performance of Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper3
- From Sub-Ability Diagnosis to Human-Aligned Generation: Bridging the Gap for Text Length Control via MarkerGenPeiwen Yuan, Chuyi Tan, Shaoxiong Feng, Yiwei Li 等ACL 2025 · 2 次引用
- LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language ModelsWei Zhang, Lintong Du, yuanhe zhang, Zhenhong Zhou 等ICML 2026
- Length Controlled Generation for Black-box LLMsYuxuan Gu, Wenjie Wang, Xiaocheng Feng, Weihong Zhong 等ACL 2025
它引用的 Paper18
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 次引用
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein 等ICML 2021 · 1,843 次引用
相关 Paper
- Prompt-Based Length Controlled Generation with Multiple Control TypesRenlong Jie, Xiaojun Meng, Lifeng Shang, Xin Jiang 等ACL Findings 2024 · 4 次引用
- LongGenBench: Benchmarking Long-Form Generation in Long Context LLMsYuhao Wu, Ming Shan Hee, Zhiqiang Hu, Roy Ka-Wei LeeICLR 2025
- Evaluating Large Language Models at Evaluating Instruction FollowingZhiyuan Zeng, Jiatong Yu, Tianyu Gao, Yu Meng 等ICLR 2024 · 299 次引用
- Following Length Constraints in InstructionsWeizhe Yuan, Ilia Kulikov, Ping Yu, Kyunghyun Cho 等EMNLP 2025 · 1 次引用
- Context Length Alone Hurts LLM Performance Despite Perfect RetrievalYufeng Du, Minyang Tian, Srikanth Ronanki, Subendhu Rongali 等EMNLP Findings 2025 · 38 次引用
