用引导式提示提升大模型长文本生成能力,效果优于传统上下文学习。
Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelines
- 通过自评指标与输出约束双流引导,显式传授任务语言和格式分布。
- 在零样本和少样本下,对开源与闭源模型均提升超5%的生成质量。
- 可与自动提示优化器协同,适用于弱模型增强强模型的场景。
上下文学习(ICL)是预训练大语言模型的重要能力,能在不微调的情况下通过少量示例显著提升任务表现。然而,在摘要等长文本生成任务中,ICL常表现不佳。我们通过实证与理论分析表明,在合理假设下,仅靠示例无法有效教会模型生成所需的语言与格式分布。为此,我们提出LongGuide,通过自动生成两类并行引导:(i) 自评指标引导(MGs),指导模型优化自我评估指标;(ii) 输出约束引导(OCGs),在词与句层面限制生成内容。LongGuide自动选择最优引导组合,在零样本与少样本设置下,显著提升多个开源与闭源大模型性能,平均增益超5%。该方法具备泛化性,弱模型可学习以增强强模型,且能与自动提示优化器协同增效。
原文摘要 · Abstract (English)
In-context learning (ICL) is an important yet not fully understood ability of pre-trained large language models (LLMs). It can greatly enhance task performance using a few examples, termed demonstrations, without fine-tuning. Although effective in question answering, ICL often underperforms in long-form generation tasks such as summarization. Under appropriately realistic assumptions, we empirically and theoretically show that ICL demonstrations alone are insufficient to teach LLMs the task language and format distributions for generation. We argue for explicit exposure to the task distributions and hypothesize that defining them by prompting enhances model performance. To this end, we present LongGuide, which efficiently generates two parallel streams of guidelines capturing task language and format properties: (i) Metric Guidelines (MGs) that instruct models to optimize self-evaluated metrics; and (ii) Output Constraint Guidelines (OCGs) that constrain generation at both token and sentence levels. LongGuide automatically selects the best combination of guidelines, improving both strong open- and closed-source LLMs by over 5% in both zero- and few-shot settings. We show that LongGuide is generalizable, learnable by weak models to enhance strong ones, and integrates synergistically with automatic prompt optimizers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。