Plan-and-Write:无需模型重训练的LLM结构引导长度控制
Plan-and-Write: Structure-Guided Length Control for LLMs without Model Retraining
AI总结:
本文提出一种无需模型重训练的结构引导提示工程方法Plan-and-Write,通过在提示中引入规划与字数统计机制实现精确长度控制,在文档摘要任务中显著提升了多个LLM的长度保真度且保持或提升了输出质量。
摘要:
大型语言模型(LLMs)的长度控制是一个至关重要但尚未充分解决的挑战,其应用场景涵盖需要简洁回复的语音界面,到需要详尽输出的研究摘要。当前的长度控制方法,包括Regularized DPO、Length-Instruction Fine Tuning以及工具增强方法,通常需要昂贵的模型重训练或复杂的推理时工具支持。本文提出了一种提示工程方法,能够在无需模型重训练的情况下实现精确的长度控制。我们的结构引导方法在提示词中实现了周密的规划和字数统计机制,促使模型仔细跟踪并遵守指定的长度约束。在六个最先进的LLMs上进行的综合评估表明,在文档摘要任务中,与标准提示相比,我们的方法显著提升了若干模型的长度保真度,特别是对于较短到中等长度的约束。所提技术在不同模型架构中表现出不同的收益,部分模型在长度遵守方面提升了高达37.6%。质量评估进一步显示,与标准提示技术相比,我们的方法保持或提升了整体输出质量。我们的方法为需要精确长度控制的应用提供了可立即部署的解决方案,对于模型重训练不切实际或成本过高的生产环境尤为宝贵。
英文摘要:
Length control in Large Language Models (LLMs) is a crucial but under-addressed challenge, with applications ranging from voice interfaces requiring concise responses to research summaries needing comprehensive outputs. Current approaches to length control, including Regularized DPO, Length-Instruction Fine Tuning, and tool-augmented methods, typically require expensive model retraining or complex inference-time tooling. This paper presents a prompt engineering methodology that enables precise length control without model retraining. Our structure-guided approach implements deliberate planning and word counting mechanisms within the prompt, encouraging the model to carefully track and adhere to specified length constraints. Comprehensive evaluations across six state-of-the-art LLMs demonstrate that our method significantly improves length fidelity for several models compared to standard prompting when applied to document summarization tasks, particularly for shorter-to-medium length constraints. The proposed technique shows varying benefits across different model architectures, with some models demonstrating up to 37.6% improvement in length adherence. Quality evaluations further reveal that our approach maintains or enhances overall output quality compared to standard prompting techniques. Our approach provides an immediately deployable solution for applications requiring precise length control, particularly valuable for production environments where model retraining is impractical or cost-prohibitive.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。