arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.13250cs.CL
收藏

探索代码提示这一奇特案例

Exploring the Curious Case of Code Prompts

University of Pennsylvania(宾夕法尼亚大学)

Li Zhang, Liam Dugan, Hainiu Xu, Chris Callison-Burch

AI总结:

本文在问答、情感和摘要等更广泛任务上比较三款 GPT 模型的代码提示与文本提示,发现代码提示并非普遍更优,其效果受提示风格和文本指令微调影响。

摘要:

近期研究表明,用自然语言的类代码表示来提示语言模型,能够提升其在结构化推理任务上的性能。然而,此类任务仅占所有自然语言任务的一小部分。在本研究中,我们试图回答代码提示是否总体上是与语言模型交互的首选方式。我们在更广泛的任务集合(例如问答、情感分析、摘要)上,比较了三款流行 GPT 模型(davinci、code-davinci-002 和 text-davinci-002)的代码提示与文本提示,发现除少数例外,代码提示并未始终优于文本提示。此外,我们表明代码提示的风格会对部分任务(而非全部任务)的性能产生很大影响,而且基于文本指令进行微调会使代码提示取得更好的相对性能。

英文摘要:

Recent work has shown that prompting language models with code-like representations of natural language leads to performance improvements on structured reasoning tasks. However, such tasks comprise only a small subset of all natural language tasks. In our work, we seek to answer whether or not code-prompting is the preferred way of interacting with language models in general. We compare code and text prompts across three popular GPT models (davinci, code-davinci-002, and text-davinci-002) on a broader selection of tasks (e.g., QA, sentiment, summarization) and find that with few exceptions, code prompts do not consistently outperform text prompts. Furthermore, we show that the style of code prompt has a large effect on performance for some but not all tasks and that fine-tuning on text instructions leads to better relative performance of code prompts.

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

↑