Text generation under constraints have seen increasing interests in natural language processing, especially with the rapidly improving capabilities of large language models. However, existing benchmarks for constrained generation usually focus on fixed constraint types (e.g.,generate a sentence containing certain words) that have proved to be easy for state-of-the-art models like GPT-4. We present COLLIE, a grammar-based framework that allows the specification of rich, compositional constraints with diverse generation levels (word, sentence, paragraph, passage) and modeling challenges (e.g.,language understanding, logical reasoning, counting, semantic planning). We also develop tools for automatic extraction of task instances given a constraint structure and a raw text corpus. Using COLLIE, we compile the COLLIE-v1 dataset with 2080 instances comprising 13 constraint structures. We perform systematic experiments across five state-of-the-art instruction-tuned language models and analyze their performances to reveal shortcomings. COLLIE is designed to be extensible and lightweight, and we hope the community finds it useful to develop more complex constraints and evaluations in the future.
翻译:在自然语言处理领域,尤其是随着大型语言模型能力的快速提升,约束条件下的文本生成受到越来越多的关注。然而,现有约束生成基准通常聚焦于固定的约束类型(如生成包含特定单词的句子),而这些任务对GPT-4等前沿模型而言已被证明较为简单。我们提出COLLIE框架,这是一个基于语法的框架,允许指定丰富且可组合的约束条件,涵盖多种生成层次(词、句子、段落、篇章)及建模挑战(如语言理解、逻辑推理、计数、语义规划)。我们还开发了根据约束结构和原始文本语料库自动提取任务实例的工具。利用COLLIE,我们构建了包含2080个实例、涵盖13种约束结构的COLLIE-v1数据集。我们对五种前沿指令微调语言模型进行系统实验,通过分析其表现揭示模型的不足。COLLIE设计具有可扩展性和轻量级特性,期望学术界能借助该框架开发更复杂的约束条件与评估任务。