arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.06186cs.CLcs.LG
收藏

通过规格链提示提升黑盒大语言模型的结构多样性

Improving Structural Diversity of Blackbox LLMs via Chain-of-Specification Prompting

Microsoft Research(微软研究院);University of Pennsylvania(宾夕法尼亚大学)

Halley Young, Yimeng Zeng, Jacob Gardner, Osbert Bastani

AI总结:

针对大语言模型生成多样性可控性不足的问题,提出结构多样性指标与规格链(CoS)提示策略,可在黑盒LLM上显著提升诗歌、代码领域的结构多样性。

摘要:

生成多样化文本的能力是大语言模型(LLM)面临的一项关键挑战。迄今为止,学界已通过n元语法多样性或BERT嵌入多样性等指标对多样性展开研究。然而,对于这类多样性,用户几乎无法控制考量多样性的维度。例如,在诗歌领域,用户可能希望在押韵和格律方面实现多样性,而在代码领域,用户可能希望在用于解决问题的表达式类型方面具备多样性。\n我们提出了一种名为结构多样性的多样性指标,用户可提供从生成文本到特征的映射,以此捕捉其关注的多样性类型。此外,我们提出了一种名为规格链(Chain-of-Specification, CoS)提示的新型策略来提升多样性:首先让LLM生成编码某一结构特征实例的规格,随后提示LLM生成满足这些特征的文本;值得注意的是,该策略可适用于黑盒LLM。实验结果表明,在诗歌和代码领域的结构多样性任务上,CoS相较于多个基线模型显著提升了多样性。

英文摘要:

The capability to generate diverse text is a key challenge facing large language models (LLMs). Thus far, diversity has been studied via metrics such as $n$-gram diversity or diversity of BERT embeddings. However, for these kinds of diversity, the user has little control over the dimensions along which diversity is considered. For example, in the poetry domain, one might desire diversity in terms of rhyme and meter, whereas in the code domain, one might desire diversity in terms of the kinds of expressions used to solve a problem. We propose a diversity metric called structural diversity, where the user provides a mapping from generated text to features capturing the kinds of diversity that they care about. In addition, we propose a novel strategy called chain-of-specification (CoS) prompting for improving diversity by first having the LLM generate a specification encoding one instance of structural features, and then prompting the LLM to generate text that satisfies these features; notably, our strategy works with blackbox LLMs. In our experiments, we show that for structural diversity in the poetry and code domains, CoS significantly improves diversity compared to several baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑