It is imperative for Large language models (LLMs) to follow instructions with elaborate requirements (i.e. Complex Instructions Following). Yet, it remains under-explored how to enhance the ability of LLMs to follow complex instructions with multiple constraints. To bridge the gap, we initially study what training data is effective in enhancing complex constraints following abilities. We found that training LLMs with instructions containing multiple constraints enhances their understanding of complex instructions, especially those with lower complexity levels. The improvement can even generalize to compositions of out-of-domain constraints. Additionally, we further propose methods addressing how to obtain and utilize the effective training data. Finally, we conduct extensive experiments to prove the effectiveness of our methods in terms of overall performance and training efficiency. We also demonstrate that our methods improve models' ability to follow instructions generally and generalize effectively across out-of-domain, in-domain, and adversarial settings, while maintaining general capabilities.
翻译:大型语言模型(LLMs)遵循具有精细要求的指令(即复杂指令遵循)至关重要。然而,如何增强LLMs遵循包含多个约束的复杂指令的能力仍未得到充分探索。为弥补这一差距,我们首先研究了何种训练数据能有效提升复杂约束遵循能力。我们发现,使用包含多个约束的指令训练LLMs能增强其对复杂指令的理解,尤其是对复杂度较低的指令。这种改进甚至能泛化至领域外约束的组合。此外,我们进一步提出了获取和利用有效训练数据的方法。最后,我们通过大量实验验证了所提方法在整体性能和训练效率方面的有效性。实验还表明,我们的方法能普遍提升模型的指令遵循能力,并在领域外、领域内及对抗性场景中有效泛化,同时保持模型的通用能力。