arXiv:2410.12207cs.AIcs.LG2024-10ACL被引 6

让大模型自我修正复杂指令,准确率翻倍

Divide-Verify-Refine: Can LLMs Self-Align with Complex Instructions?

  • 拆解复杂指令为单一约束,用工具精准验证
  • 动态调用成功修正案例,提升反馈质量
  • 适用于需要多条件合规的场景,如写作与生成

近期研究发现,大模型在处理包含多个约束(如长度、格式、情感)的复杂指令时表现不佳。现有方法依赖微调,但数据质量要求高且计算成本大。另一种方式是利用大模型自纠错能力进行响应优化,但受限于反馈可靠性,且效果依赖少量示例。针对约束类型多样导致人工构造示例费时低效的问题,本文提出分-验-修(DVR)框架:首先将复杂指令分解为单一约束并准备对应工具;其次使用工具(如Python工具包检查格式,预训练分类器分析内容)进行严格验证与文本引导;最后通过动态少样本提示实现高效修正,其修正库持续积累成功案例并智能检索。为弥补现有数据集复杂度不足,我们构建了新的复杂指令数据集。实验显示,DVR使Llama3.1-8B的约束遵循率提升一倍,Mistral-7B性能提升三倍。

原文摘要 · Abstract (English)

Recent studies show LLMs struggle with complex instructions involving multiple constraints (e.g., length, format, sentiment). Existing works address this issue by fine-tuning, which heavily relies on fine-tuning data quality and is computational expensive. An alternative is leveraging LLMs' self-correction to refine responses for better constraint adherence. However, this is limited by the feedback quality, as LLMs cannot generate reliable feedback or detect errors. Moreover, its effectiveness relies on few-shot examples illustrating response modifications. As constraints in complex instructions are diverse, manually crafting such examples for each constraint type can be labor-intensive and sub-optimal. To address these two challenges, we propose the Divide-Verify-Refine (DVR) framework with three steps: (1) Divide complex instructions into single constraints and prepare appropriate tools; (2) Verify responses using tools that provide rigorous check and textual guidance (e.g., Python toolkit for format checks or pre-trained classifiers for content analysis); (3) Refine: To maximize refinement effectiveness, we propose dynamic few-shot prompting, where a refinement repository collects successful refinements, and these examples are selectively retrieved for future refinements. Recognizing the lack of complexity in existing datasets, we create a new dataset of complex instructions. DVR doubles Llama3.1-8B's constraint adherence and triples Mistral-7B's performance.

大模型指令遵循自修正框架

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。